Skip to main content

QuoteParams

Parameters for requesting a swap quote.
chainIndex
string
Chain identifier (e.g., “501” for Solana, “1” for Ethereum)
fromTokenAddress
string
required
Contract address of the source token
toTokenAddress
string
required
Contract address of the destination token
amount
string
required
Amount to swap in the smallest unit (e.g., wei for ETH)
userWalletAddress
string
User’s wallet address
slippagePercent
string
required
Slippage tolerance as a percentage (e.g., “0.5” for 0.5%)
dexIds
string
Comma-separated list of DEX IDs to route through
directRoute
boolean
Use direct routing without intermediate tokens
priceImpactProtectionPercent
string
Maximum acceptable price impact percentage
feePercent
string
Custom fee percentage for the swap
interface QuoteParams extends BaseParams {
  slippagePercent: string;
}

QuoteData

Complete quote information including routing and pricing details.
chainIndex
string
required
Chain identifier
contextSlot
number
Context slot number (Solana-specific)
dexRouterList
DexRouter[]
required
List of DEX routers used in the swap path
estimateGasFee
string
required
Estimated gas fee for the transaction
fromToken
TokenInfo
required
Source token information
toToken
TokenInfo
required
Destination token information
fromTokenAmount
string
required
Amount of source token to swap
toTokenAmount
string
required
Expected amount of destination token to receive
priceImpactPercent
string
required
Price impact as a percentage
router
string
required
Router address or identifier
swapMode
string
required
Swap mode (e.g., “exactIn”, “exactOut”)
tradeFee
string
required
Trading fee amount
routerResult
RouterResult
Detailed routing result
tx
TransactionData
Transaction data for execution
interface QuoteData {
  chainIndex: string;
  contextSlot?: number;
  dexRouterList: DexRouter[];
  estimateGasFee: string;
  fromToken: TokenInfo;
  toToken: TokenInfo;
  fromTokenAmount: string;
  toTokenAmount: string;
  priceImpactPercent: string;
  router: string;
  swapMode: string;
  tradeFee: string;
  routerResult?: RouterResult;
  tx?: TransactionData;
}

RouterResult

Detailed routing information for a swap.
chainIndex
string
required
Chain identifier
contextSlot
number
Context slot number (Solana-specific)
dexRouterList
DexRouter[]
required
List of DEX routers in the swap path
estimateGasFee
string
required
Estimated gas fee
fromToken
TokenInfo
required
Source token information
toToken
TokenInfo
required
Destination token information
fromTokenAmount
string
required
Source token amount
toTokenAmount
string
required
Destination token amount
priceImpactPercent
string
required
Price impact percentage
router
string
required
Router address or identifier
swapMode
string
required
Swap mode
tradeFee
string
required
Trading fee
interface RouterResult {
  chainIndex: string;
  contextSlot?: number;
  dexRouterList: DexRouter[];
  estimateGasFee: string;
  fromToken: TokenInfo;
  toToken: TokenInfo;
  fromTokenAmount: string;
  toTokenAmount: string;
  priceImpactPercent: string;
  router: string;
  swapMode: string;
  tradeFee: string;
}

DexRouter

Information about a DEX router in the swap path.
dexProtocol
DexProtocol
required
DEX protocol information
fromToken
TokenInfo
required
Source token for this router hop
fromTokenIndex
string
required
Index of the source token
toToken
TokenInfo
required
Destination token for this router hop
toTokenIndex
string
required
Index of the destination token
interface DexRouter {
  dexProtocol: DexProtocol;
  fromToken: TokenInfo;
  fromTokenIndex: string;
  toToken: TokenInfo;
  toTokenIndex: string;
}

TokenInfo

Information about a token.
decimal
string
required
Token decimals
isHoneyPot
boolean
required
Whether the token is identified as a honeypot
taxRate
string
required
Token tax rate percentage
tokenContractAddress
string
required
Token contract address
tokenSymbol
string
required
Token symbol
tokenUnitPrice
string
required
Token unit price in USD
interface TokenInfo {
  decimal: string;
  isHoneyPot: boolean;
  taxRate: string;
  tokenContractAddress: string;
  tokenSymbol: string;
  tokenUnitPrice: string;
}

Build docs developers (and LLMs) love