getPrice
Headers
Query parameters
The amount of sellToken in sellToken base units to sell
The address which holds the sellToken balance and has the allowance set for the swap
The address to receive the buyToken. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations.
The wallet address to receive the specified trading fees (supports single or multiple comma-separated values). You must also specify the swapFeeBps in the request to use this feature. When multiple values are provided, must match length of swapFeeBps.
The amount in Bps of the swapFeeToken to charge and deliver to the swapFeeRecipient (supports single or multiple comma-separated values). You must also specify the swapFeeRecipient in the request to use this feature. For security, this field has a default limit of 1000 Bps. If your application requires a higher value, please reach out to us.
The maximum trade surplus (positive slippage) that can be collected in Bps of the buy amount. If not provided, defaults to 10000 (100%). Must be used together with tradeSurplusRecipient.
The maximum acceptable slippage of the buyToken in Bps. 0x sets the optimal slippage tolerance per trade by default. To mitigate the risk of MEV attacks, we recommend adjusting this value only when trading low-liquidity tokens.