Dex - Route
Calculate the best route for token swap considering price impact and fees. Returns the optimal path and a prepared transaction.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
A chain name listed in supported networks
sol
, base
Body
DEX identifier for the trade
raydium
, meteora
, pumpfun
, moonshot
, jupiter
"raydium"
Public key of the wallet initiating the transaction
8 - 64
"HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH"
Amount to swap. Use "auto" for full balance or percentage like "50%"
"1000000000"
Swap direction mode
ExactIn
, ExactOut
"ExactIn"
Slippage tolerance percentage
0 <= x <= 100
5
Priority fee in SOL to increase transaction processing speed
"0.000001"
Input Mint, the base token address
8 - 64
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
Ouput Mint, the quote token address
8 - 64
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
Response
Original swap request parameters
Base64 encoded transaction
"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
Detailed routing information
{
"inAmount": "1000000000",
"outAmount": "985000000",
"priceImpact": "0.15",
"route": ["USDC", "SOL"]
}
Time taken to process the request in milliseconds
245
Was this page helpful?