amm/quotes
Get a price quote by providing the specified tokens information through native swap.pump.fun liquidity pool.
Request
Be aware that this endpoint is using a beta URL.
Method:
GET ./api/v2/pumpfun/amm/quotes
Parameters:
inToken
string
Address of the swap-in token.
inAmount
double
The amount of token wants to be swapped from.
outToken
string
Address of the swap-out token.
pool
string
Specify exact which liquidity pool wants to interact with.
slippage
double
The maximum slippage tolerance in percentage.
Request example:
curl --location 'https://pump-ny.solana.dex.blxrbdn.com/api/v2/pumpfun/amm/quotes' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: $AUTH_HEADER' \
--data '{
"inToken": "So11111111111111111111111111111111111111112",
"inAmount": 0.01,
"outToken": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"pool": "Gf7sXMoP8iRw4iiXmJ1nq4vxcRycbGXy5RL8a8LnTd3v",
"slippage": 1
}'
Response:
Fields:
quoteType
string
The type of the swap, which is either a 'BUY' or a 'SELL'.
inToken
string
Address of the swap-in token.
inAmount
double
The amount of token wanted to be swapped from.
outToken
string
Address of the swap-out token.
outAmount
string
The amount of token expected to be received.
Response Example:
{
"quoteType":"BUY",
"inToken":"So11111111111111111111111111111111111111112",
"inAmount":0.0101,
"outToken":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"outAmount":1.740342
}
Last updated