Request Body
The wallet address of the user who will execute the trade.
The address of the base token you want to trade (e.g. ETH address).
The address of the collateral/quote token (e.g. USDC address).
The leverage multiplier (e.g.
10 for 10x leverage).Set to
true or "true" for a long position, false or "false" for a short position.Set to
true or "true" to only reduce an existing position, false or "false" otherwise.The amount of collateral token to use for the position.
The type of order. Possible values:
market, limit, stop_limit. Defaults to market.Required for
limit and stop_limit orders. The trigger price for the order.Take Profit price. Must be valid based on direction (above open price for long, below for short).
Stop Loss price. Must be valid based on direction (below open price for long, above for short).
Position size in raw token units. If not provided, calculated from collateral amount and leverage.
Maximum allowed slippage in percentage.
Array of chain IDs to search for quotes (e.g.
["evm:42161", "evm:137"]). If omitted, searches all supported chains.Array of DEXes to query. Supported values:
gains, lighter. If omitted, queries all supported DEXes.Margin mode. Possible values:
0 (isolated) or 1 (cross). Only applicable for certain DEXes.Referrer wallet address for fee sharing.
Response
Quote result containing execution payload.
Error Response
If the quote cannot be generated, the API returns a 500 error with:Error message (e.g. “could not find quote”)
Array of error strings from each DEX that was queried. Format:
"dex - error message" or just "error message" if no DEX specified.