Read-only DEX — 0x — Gasless indicative price quote
Gasless indicative price quote. Provider: 0x. Free to call — BlockRun earns the on-chain affiliate fee set on each quote, not an x402 charge.
- Selected price
- $0 / callPublished pricing
- Providers / implementations
- 1 / 1
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
| Provider | Price / call | Requests · 30d | Performance | Access |
|---|---|---|---|---|
blockrunCurrent Read-only DEX — 0x — Gasless indicative price quote · GET | $0 / call | — | —successP50— |
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.
Playground
Run sends a real API request. Charges follow the published API contract.
curl \
'https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/gasless/price?buyToken=0x4200000000000000000000000000000000000006&chainId=8453&sellAmount=10000000&sellToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/gasless/price- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
'https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/gasless/price?buyToken=0x4200000000000000000000000000000000000006&chainId=8453&sellAmount=10000000&sellToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
buyToken | URL query parametersquery | string | Yes | The contract address of the token to buy |
chainId | URL query parametersquery | integer | Yes | Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains |
excludedSources | URL query parametersquery | string | 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 |
recipient | URL query parametersquery | string | No | The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations. |
sellAmount | URL query parametersquery | string | Yes | The amount of `sellToken` in `sellToken` base units to sell |
sellToken | URL query parametersquery | string | Yes | The contract address of the token to sell. Native token is not supported |
slippageBps | URL query parametersquery | integer | 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. minimum: 30 · maximum: 10000 |
slippagePpm | URL query parametersquery | integer | 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%. minimum: 0 · maximum: 1000000 |
taker | URL query parametersquery | string | No | The address which holds the `sellToken` balance and has the allowance set for the swap |
tradeSurplusMaxBps | URL query parametersquery | integer | 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`. minimum: 1 · maximum: 10000 |
tradeSurplusMaxPpm | URL query parametersquery | integer | 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%. minimum: 1 · maximum: 1000000 |
tradeSurplusRecipient | URL query parametersquery | string | 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. |
Required markers inside a nested object or variant apply when that object or variant is used.
Sample response
Published response example · Documented HTTP 200; not a live result. Published documentation example. Verify the actual response after an approved call.
{
"allowanceTarget": "0x000000000022d473030f116ddee9f6b43ac78ba3",
"blockNumber": "53329866",
"buyAmount": "4436068845652620",
"buyToken": "0x4200000000000000000000000000000000000006",
"fees": {
"gasFee": {
"amount": "6868",
"token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"type": "gas"
},
"integratorFee": {
"amount": "20000",
"token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"type": "volume"
},
"integratorFees": [
{
"amount": "20000",
"token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"type": "volume"
}
],
"zeroExFee": {
"amount": "15000",
"token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"type": "volume"
}
},
"issues": {
"allowance": null,
"balance": null,
"invalidSourcesPassed": [],
"simulationIncomplete": false
},
"liquidityAvailable": true,
"minBuyAmount": "4422760639115662",
"route": {
"fills": [
{
"from": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"proportionBps": "10000",
"source": "LunarBase",
"to": "0x4200000000000000000000000000000000000006"
}
],
"tokens": [
{
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"symbol": "USDC"
},
{
"address": "0x4200000000000000000000000000000000000006",
"symbol": "WETH"
}
]
},
"sellAmount": "10000000",
"sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"target": "0xf22785087a4d1105c4ceb009305fc164f4d3358e",
"tokenMetadata": {
"buyToken": {
"buyTaxBps": "0",
"sellTaxBps": "0",
"transferTaxBps": "0"
},
"sellToken": {
"buyTaxBps": "0",
"sellTaxBps": "0",
"transferTaxBps": "0"
}
},
"zid": "0xc9bbdc00710d2245e8ed6eba"
}Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# Read-only DEX — 0x — Gasless indicative price quote
Gasless indicative price quote. Provider: 0x. Free to call — BlockRun earns the on-chain affiliate fee set on each quote, not an x402 charge.
## Available implementations
blockrun · Read-only DEX — 0x — Gasless indicative price quote: https://openany.si/markets/apis/capabilities/blockrun-read-only-dex-0x-gasless-indicative-price-quote?offering=d4a9a2a5-9113-49ad-ba1d-92278faa61ae · $0 / call
## Selected API contract
Documentation: https://openany.si/markets/apis/capabilities/blockrun-read-only-dex-0x-gasless-indicative-price-quote
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/gasless/price
Price: $0 / call
Provider: blockrun
Contract revision: 3
Price source: selected implementation in the OpenAny public API catalog. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```bash
curl \
'https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/gasless/price?buyToken=0x4200000000000000000000000000000000000006&chainId=8453&sellAmount=10000000&sellToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'
```
## API contract
```json
{
"resource_type": "api",
"name": "Read-only DEX — 0x — Gasless indicative price quote",
"endpoint": "https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/gasless/price",
"method": "GET",
"content_type": "none",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "The contract address of the token to buy",
"location": "query",
"name": "buyToken",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains",
"location": "query",
"name": "chainId",
"nullable": false,
"required": true,
"type": "integer"
},
{
"description": "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",
"location": "query",
"name": "excludedSources",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations.",
"location": "query",
"name": "recipient",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "The amount of `sellToken` in `sellToken` base units to sell",
"location": "query",
"name": "sellAmount",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "The contract address of the token to sell. Native token is not supported",
"location": "query",
"name": "sellToken",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "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.",
"location": "query",
"maximum": "10000",
"minimum": "30",
"name": "slippageBps",
"nullable": false,
"required": false,
"type": "integer"
},
{
"description": "The maximum acceptable slippage of the `buyToken` in parts-per-million (PPM). Mutually exclusive with `slippageBps`. e.g. 3000 PPM = 30 BPS = 0.30%.",
"location": "query",
"maximum": "1000000",
"minimum": "0",
"name": "slippagePpm",
"nullable": false,
"required": false,
"type": "integer"
},
{
"description": "The address which holds the `sellToken` balance and has the allowance set for the swap",
"location": "query",
"name": "taker",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "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`.",
"location": "query",
"maximum": "10000",
"minimum": "1",
"name": "tradeSurplusMaxBps",
"nullable": false,
"required": false,
"type": "integer"
},
{
"description": "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%.",
"location": "query",
"maximum": "1000000",
"minimum": "1",
"name": "tradeSurplusMaxPpm",
"nullable": false,
"required": false,
"type": "integer"
},
{
"description": "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.",
"location": "query",
"name": "tradeSurplusRecipient",
"nullable": false,
"required": false,
"type": "string"
}
],
"billing": {
"currency": "USD",
"mode": "fixed",
"priceMicroUsd": "0",
"rounding": null,
"unit": "call",
"unitQuantity": null
},
"examples": [
{
"http_status": 200,
"name": "Documentation example",
"request": {
"body": null,
"headers": {},
"path": {},
"query": {
"buyToken": "0x4200000000000000000000000000000000000006",
"chainId": "8453",
"sellAmount": "10000000",
"sellToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"response_body": {
"allowanceTarget": "0x000000000022d473030f116ddee9f6b43ac78ba3",
"blockNumber": "53329866",
"buyAmount": "4436068845652620",
"buyToken": "0x4200000000000000000000000000000000000006",
"fees": {
"gasFee": {
"amount": "6868",
"token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"type": "gas"
},
"integratorFee": {
"amount": "20000",
"token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"type": "volume"
},
"integratorFees": [
{
"amount": "20000",
"token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"type": "volume"
}
],
"zeroExFee": {
"amount": "15000",
"token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"type": "volume"
}
},
"issues": {
"allowance": null,
"balance": null,
"invalidSourcesPassed": [],
"simulationIncomplete": false
},
"liquidityAvailable": true,
"minBuyAmount": "4422760639115662",
"route": {
"fills": [
{
"from": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"proportionBps": "10000",
"source": "LunarBase",
"to": "0x4200000000000000000000000000000000000006"
}
],
"tokens": [
{
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"symbol": "USDC"
},
{
"address": "0x4200000000000000000000000000000000000006",
"symbol": "WETH"
}
]
},
"sellAmount": "10000000",
"sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"target": "0xf22785087a4d1105c4ceb009305fc164f4d3358e",
"tokenMetadata": {
"buyToken": {
"buyTaxBps": "0",
"sellTaxBps": "0",
"transferTaxBps": "0"
},
"sellToken": {
"buyTaxBps": "0",
"sellTaxBps": "0",
"transferTaxBps": "0"
}
},
"zid": "0xc9bbdc00710d2245e8ed6eba"
}
}
]
}
```Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Documentation example
Published documentation example. Verify the actual response after an approved call.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 12
Review these request fields before running. Keep the published provider and request method unchanged.
buyToken- The contract address of the token to buy
chainId- Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains
excludedSources- 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
recipient- The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations.
sellAmount- The amount of `sellToken` in `sellToken` base units to sell
sellToken- The contract address of the token to sell. Native token is not supported
slippageBps- 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- The maximum acceptable slippage of the `buyToken` in parts-per-million (PPM). Mutually exclusive with `slippageBps`. e.g. 3000 PPM = 30 BPS = 0.30%.
taker- The address which holds the `sellToken` balance and has the allowance set for the swap
tradeSurplusMaxBps- 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- 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- 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.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/gasless/price?buyToken=0x4200000000000000000000000000000000000006&chainId=8453&sellAmount=10000000&sellToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Published response example · Documented HTTP 200; not a live result.
Sample response · not a live result{ "allowanceTarget": "0x000000000022d473030f116ddee9f6b43ac78ba3", "blockNumber": "53329866", "buyAmount": "4436068845652620", "buyToken": "0x4200000000000000000000000000000000000006", "fees": { "gasFee": { "amount": "6868", "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "type": "gas" }, "integratorFee": { "amount": "20000", "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "type": "volume" }, "integratorFees": [ { "amount": "20000", "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "type": "volume" } ], "zeroExFee": { "amount": "15000", "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "type": "volume" } }, "issues": { "allowance": null, "balance": null, "invalidSourcesPassed": [], "simulationIncomplete": false }, "liquidityAvailable": true, "minBuyAmount": "4422760639115662", "route": { "fills": [ { "from": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "proportionBps": "10000", "source": "LunarBase", "to": "0x4200000000000000000000000000000000000006" } ], "tokens": [ { "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "symbol": "USDC" }, { "address": "0x4200000000000000000000000000000000000006", "symbol": "WETH" } ] }, "sellAmount": "10000000", "sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "target": "0xf22785087a4d1105c4ceb009305fc164f4d3358e", "tokenMetadata": { "buyToken": { "buyTaxBps": "0", "sellTaxBps": "0", "transferTaxBps": "0" }, "sellToken": { "buyTaxBps": "0", "sellTaxBps": "0", "transferTaxBps": "0" } }, "zid": "0xc9bbdc00710d2245e8ed6eba" }
Common questions
Do I need a separate key for every provider?
Use your OpenAny API key for standard API access. Read it from OPENANY_API_KEY in your environment and keep it out of prompts, source code and logs.
Are these providers interchangeable?
No. Each offering has its own inputs, pricing and response contract. Selecting a catalog offering does not establish automatic routing or fallback. Confirm the service contract before calling.
How is this API billed?
API-key calls use your shared balance at the selected implementation's published rate. Check the billing unit and request-specific pricing rules before making a paid call. Recorded usage determines the final charge under that contract.
Where do the price and contract come from?
The selected implementation publishes its provider, request contract, revision and billing rules through OpenAny's public API catalog. A revision number identifies a contract version, not a price update date. A price update timestamp is not supplied; do not treat a page date as one.
How do OpenAny Balance and x402 differ?
OpenAny Balance uses an API key and one shared balance. Card, USDC and x402 top-ups, card auto top-up and USDC subscriptions fund that balance; available routes appear on the Credits page. Direct x402 is a separate pay-per-request flow, available only on listings that show it and requiring an authorized payment client.
Does Playground send a paid request?
Yes. After you sign in, Run sends a real API request using an active OpenAny API key. Charges follow the published API contract and use your shared balance. Selecting an implementation, editing inputs and viewing sample responses do not send requests.