Get a price quote for a swap via router (Jupiter, 0x).
Example: connector: ‘jupiter’ network: ‘solana-mainnet-beta’ trading_pair: ‘SOL-USDC’ side: ‘BUY’ amount: 1 slippage_pct: 1
Returns: Quote with price, expected output amount, and gas estimate
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Request for swap price quote
DEX router connector (e.g., 'jupiter', '0x')
Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta', 'ethereum-mainnet')
Trading pair in BASE-QUOTE format (e.g., 'SOL-USDC')
Trade side: 'BUY' or 'SELL'
Amount to swap (in base token for SELL, quote token for BUY)
Maximum slippage percentage (default: 1.0)
Successful Response
Response with swap quote details
Base token symbol
Quote token symbol
Quoted price (base/quote)
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Amount specified in request (BUY: base amount to receive, SELL: base amount to sell)
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Applied slippage percentage
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Actual input amount (BUY: quote to spend, SELL: base to sell)
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Actual output amount (BUY: base to receive, SELL: quote to receive)
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Deprecated: use amount_out instead
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Estimated gas cost
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$