Gateway Swaps

Execute Swap

Execute a token swap transaction.

Executes a swap on the specified DEX aggregator. The transaction is signed and submitted to the blockchain. Swap details are recorded in the database for tracking.

Supported Connectors: - jupiter: Solana's leading swap aggregator - 0x: Ethereum/L2 swap aggregator

post/gateway/swap/execute

Request body

connectorstring required

DEX router connector (e.g., 'jupiter', '0x')

networkstring required

Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')

trading_pairstring required

Trading pair (e.g., 'SOL-USDC')

sidestring required

Trade side: 'BUY' or 'SELL'

wallet_addressstring nullable

Wallet address (optional, uses default if not provided)

Response

Successful Response

transaction_hashstring required

Transaction hash

trading_pairstring required

Trading pair

sidestring required

Trade side

amountstring required

Amount swapped

statusstring

Transaction status

Changes