Skip to main content
POST
Get Swap Quote

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Request for swap price quote

connector
string
required

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

network
string
required

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

trading_pair
string
required

Trading pair in BASE-QUOTE format (e.g., 'SOL-USDC')

side
string
required

Trade side: 'BUY' or 'SELL'

amount
required

Amount to swap (in base token for SELL, quote token for BUY)

slippage_pct
default:1

Maximum slippage percentage (default: 1.0)

Response

Successful Response

Response with swap quote details

base
string
required

Base token symbol

quote
string
required

Quote token symbol

price
string
required

Quoted price (base/quote)

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
amount
string
required

Amount specified in request (BUY: base amount to receive, SELL: base amount to sell)

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
slippage_pct
string
required

Applied slippage percentage

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
amount_in
string | null

Actual input amount (BUY: quote to spend, SELL: base to sell)

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
amount_out
string | null

Actual output amount (BUY: base to receive, SELL: quote to receive)

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
expected_amount
string | null

Deprecated: use amount_out instead

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
gas_estimate
string | null

Estimated gas cost

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$