Read-only DEX — 0x — Gasless firm quote — returns trade.eip712 (+ optional approval.eip712) for client to sign
blockrun_get_api_v1_zerox_gasless_quoteGasless firm quote — returns trade.eip712 (+ optional approval.eip712) for client to sign. Provider: 0x. Free to call — BlockRun earns the on-chain affiliate fee set on each quote, not an x402 charge. Uses the caller's OpenAny gateway credentials. Charges and authorization are determined by the gateway.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taker | Yes | The address which holds the `sellToken` balance and has the allowance set for the swap | |
| chainId | Yes | Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains | |
| buyToken | Yes | The contract address of the token to buy | |
| recipient | No | The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations. | |
| sellToken | Yes | The contract address of the token to sell. Native token is not supported | |
| sellAmount | Yes | The amount of `sellToken` in `sellToken` base units to sell | |
| slippageBps | No | 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. Deprecated: use `slippagePpm` instead. `slippageBps` accepts only whole numbers. | |
| slippagePpm | No | The maximum acceptable slippage of the `buyToken` in parts-per-million (PPM). Mutually exclusive with `slippageBps`. e.g. 3000 PPM = 30 BPS = 0.30%. | |
| excludedSources | No | Liquidity sources e.g. Uniswap_V3, SushiSwap, 0x_RFQ to exclude from the provided quote. See `https://api.0x.org/sources?chainId=<chain_id>` with the desired chain's ID for a full list of sources. Separate multiple sources with a comma | |
| tradeSurplusMaxBps | No | 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`. Mutually exclusive with `tradeSurplusMaxPpm`. | |
| tradeSurplusMaxPpm | No | The maximum trade surplus (positive slippage) that can be collected in parts-per-million (PPM) of the buy amount. Mutually exclusive with `tradeSurplusMaxBps`. If not provided, defaults to 1000000 (100%). Must be used together with `tradeSurplusRecipient`. e.g. 5000 PPM = 50 BPS = 0.5%. | |
| tradeSurplusRecipient | No | The address to receive any trade surplus. If specified, this address will receive trade surplus when applicable. Otherwise, the taker will receive the surplus. This feature is only available to selected integrators on a custom pricing plan. In other cases, the surplus will be collected by 0x. For assistance with a custom plan, please contact support. |