Get Quotes

Get quotes from Jupiter by specifying required parameters.

This version contains experimental support for Jupiter in the Quotes endpoint and Prices stream endpoint. Note that the endpoints in Trader API are powered by Geyser, which is faster but will also result in subtly different state representations than what you'd normally get over Solana RPC. We welcome any feedback you have on these results.

Request

Method:

GET ./api/v2/jupiter/quotes

Parameters:

ParameterTypeDescription

inToken

string

Symbol of the swap-in token.

outToken

string

Symbol of the swap-out token.

inAmount

double

The amount of token wanted to be swapped from.

slippage

double

The maximum slippage tolerance in percentage.

fastMode

boolean

OPTIONAL. Lower latency option that excludes Raydium Pools.

Jupiter support for this endpoint is still experimental as we incorporate Geyser streams into Jupiter's aggregation algorithms. We welcome any feedback here.

Request example:

curl --header "Authorization: $AUTH_HEADER" \
"https://ny.solana.dex.blxrbdn.com/api/v2/jupiter/quotes?inToken=SOL&outToken=USDC&inAmount=0.1&slippage=0.1",

Response:

Fields:

FieldTypeDescription

inToken

string

Symbol of the swap-in token.

inTokenAddress

string

The program address for the swap-in token.

outToken

string

Symbol of the swap-out token.

outTokenAddress

string

The program address for the swap-out token.

inAmount

double

The amount of token wanted to be swapped from.

quotes

[] ProjectQuote

See ProjectQuote below for details.

ProjectQuote

FieldTypeDescription

project

string

Symbol of the swap-in token.

routes

[]QuoteRoute

See QuoteRoute below for details.

QuoteRoute

FieldTypeDescription

inAmount

double

Number of the swap-in token.

outAmount

double

Number of the swap-out token.

steps

[]QuoteStep

See QuoteStep below for details.

QuoteStep

FieldTypeDescription

inToken

string

Symbol of the swap-in token for the current step.

inTokenAddress

string

The program address for the swap-in token for the current step.

outToken

string

Symbol of the swap-out token for the current step.

outTokenAddress

string

The program address for the swap-out token for the current step.

inAmount

double

Number of the swap-in token for the current step.

outAmount

double

Number of the swap-out token for the current step.

slippage

double

The maximum slippage tolerance in percentage.

priceImpact

PriceImpactPercent

"percent" Percentage impact on price. "infinity" Indicates possible infinity values: INF_NOT, INF_POSITIVE, INF_NEGATIVE. Usually INF_NOT.

fee

Fee

"amount" Amount paid to AMM project. "mint" Token currency the fee is paid in. "percent" Percentage of the swap consumed by the fee.

PriceImpactPercent

FieldTypeDescription

percent

number

Percentage impact on price.

infinity

string

Indicates possible infinity values: INF_NOT, INF_POSITIVE, INF_NEGATIVE. Usually INF_NOT.

Fee

FieldTypeDescription

amount

number

Amount paid to AMM project

mint

string

Token currency the fee is paid in

percent

number

Percentage of the swap consumed by the fee

Response Example:

{
    "inToken": "SOL",
    "inTokenAddress": "So11111111111111111111111111111111111111112",
    "outToken": "USDC",
    "outTokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "inAmount": 0.1,
    "quotes": [
        {
            "routes": [
                {
                    "inAmount": 0.1,
                    "outAmount": 5.843859,
                    "steps": [
                        {
                            "project": {
                                "label": "Raydium",
                                "id": ""
                            },
                            "inToken": "SOL",
                            "inTokenAddress": "So11111111111111111111111111111111111111112",
                            "outToken": "",
                            "outTokenAddress": "4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R",
                            "inAmount": 0.1,
                            "outAmount": 3.328617,
                            "slippage": 0.1,
                            "priceImpactPercent": {
                                "percent": 9.899955638899446e-7,
                                "infinity": "INF_NOT"
                            },
                            "fee": {
                                "amount": 0.00025,
                                "mint": "",
                                "percent": 0
                            }
                        }
                    ]
                }
            ]
        }
    ]
}

Last updated