Swap
Get swap instructions
Get raw swap instructions and address lookup tables for building custom transactions.
Requires API key.
POST
Authorizations
Body
application/json
Payer wallet public key
Example:
"62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm"
Input token mint address
Example:
"So11111111111111111111111111111111111111112"
Output token mint address
Example:
"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"
Amount in input token base units (lamports for SOL)
Example:
1000000000
Swap mode — exactIn or exactOut
Available options:
exactIn, exactOut Required range:
0 <= x <= 10000Example:
500
Wallet to receive tip (auth only)
Tip amount in lamports (auth only)
Example:
5000
Wallet to receive fee (auth only)
Fee in basis points (auth only)
Example:
50
Priority fee per transaction in lamports
Example:
100000
