# Read-only DEX — 0x — Indicative Permit2 swap quote (no commitment)

Get 0x — Indicative Permit2 swap quote data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by BlockRun, pass parameters such as buyAmount, buyToken, chainId, and retrieve structured data including returned allowance target field, returned block number field, returned buy amount field, returned buy token field, and returned amount field for application integration and result review, and integration reference.

Documentation: https://openany.si/market/apis/blockrun/blockrun-read-only-dex-0x-indicative-permit2-swap-quote-no-commitment/?offering=7e18e4fe-30fd-4610-8524-207d85d709b2
API ID: 7e18e4fe-30fd-4610-8524-207d85d709b2
Provider: blockrun
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/price
Page update time: 2026-12-03T02:49:51.643Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:49:50.818Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Read-only DEX — 0x — Indicative Permit2 swap quote (no commitment) request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "buyAmount": {
          "type": "string",
          "description": "The amount of `buyToken` in `buyToken` base units to buy. Exactly one of `sellAmount` or `buyAmount` must be provided — specifying both will result in an error."
        },
        "buyToken": {
          "type": "string",
          "description": "The contract address of the token to buy"
        },
        "chainId": {
          "type": "integer",
          "description": "Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains"
        },
        "excludedSources": {
          "type": "string",
          "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"
        },
        "gasPrice": {
          "type": "string",
          "description": "The target gas price (in wei) for the swap transaction. If not provided, the default value is based on the 0x gas price oracle"
        },
        "recipient": {
          "type": "string",
          "description": "The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations."
        },
        "sellAmount": {
          "type": "string",
          "description": "The amount of `sellToken` in `sellToken` base units to sell. Exactly one of `sellAmount` or `buyAmount` must be provided — specifying both will result in an error."
        },
        "sellEntireBalance": {
          "type": "string",
          "description": "If set to `true`, the taker's entire `sellToken` balance will be sold during trade execution. The `sellAmount` should be the maximum estimated value, as close as possible to the actual taker's balance to ensure the best routing. Selling more than the `sellAmount` may cause the trade to revert. This feature is designed for cases where the precise sell amount is determined during execution. Learn more [here](https://docs.0x.org/docs/0x-swap-api/additional-topics/sell-entire-balance).",
          "enum": [
            "true",
            "false"
          ]
        },
        "sellToken": {
          "type": "string",
          "description": "The contract address of the token to sell"
        },
        "slippageBps": {
          "type": "integer",
          "description": "The maximum acceptable slippage of the `buyToken` in Bps. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100Bps. Deprecated: use `slippagePpm` instead. `slippageBps` accepts only whole numbers.",
          "minimum": 0,
          "maximum": 10000
        },
        "slippagePpm": {
          "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%.",
          "minimum": 0,
          "maximum": 1000000
        },
        "taker": {
          "type": "string",
          "description": "The address which holds the `sellToken` balance and has the allowance set for the swap"
        },
        "tradeSurplusMaxBps": {
          "type": "integer",
          "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`.",
          "minimum": 1,
          "maximum": 10000
        },
        "tradeSurplusMaxPpm": {
          "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%.",
          "minimum": 1,
          "maximum": 1000000
        },
        "tradeSurplusRecipient": {
          "type": "string",
          "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."
        },
        "txOrigin": {
          "type": "string",
          "description": "The address of the external account that started the transaction. This is only needed if `taker` is a smart contract."
        },
        "wrapUnwrapMode": {
          "type": "string",
          "description": "Controls how native wrap/unwrap trades are executed. `direct` calls the wrapped-native token contract directly. `settler` routes wrap/unwrap through Settler or Allowance Holder for compatibility. Ignored for non-wrap/unwrap swaps. If omitted, `direct` mode is used.",
          "enum": [
            "direct",
            "settler"
          ]
        }
      },
      "required": [
        "buyToken",
        "chainId",
        "sellToken"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "allowanceTarget": {
      "type": "string"
    },
    "blockNumber": {
      "type": "string"
    },
    "buyAmount": {
      "type": "string"
    },
    "buyToken": {
      "type": "string"
    },
    "estimatedNetSellAmount": {
      "type": "string"
    },
    "fees": {
      "type": "object",
      "properties": {
        "integratorFee": {
          "type": "object",
          "properties": {
            "amount": {
              "type": "string"
            },
            "token": {
              "type": "string"
            },
            "type": {
              "type": "string"
            }
          }
        },
        "integratorFees": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "string"
              },
              "token": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            }
          }
        },
        "zeroExFee": {
          "type": "object",
          "properties": {
            "amount": {
              "type": "string"
            },
            "token": {
              "type": "string"
            },
            "type": {
              "type": "string"
            }
          }
        }
      }
    },
    "gas": {
      "type": "string"
    },
    "gasPrice": {
      "type": "string"
    },
    "issues": {
      "type": "object",
      "properties": {
        "allowance": {
          "type": "object",
          "properties": {
            "actual": {
              "type": "string"
            },
            "spender": {
              "type": "string"
            }
          }
        },
        "balance": {
          "type": "null"
        },
        "invalidSourcesPassed": {
          "type": "array",
          "items": {}
        },
        "simulationIncomplete": {
          "type": "boolean"
        }
      }
    },
    "liquidityAvailable": {
      "type": "boolean"
    },
    "maxSellAmount": {
      "type": "string"
    },
    "mode": {
      "type": "string"
    },
    "routes": {
      "type": "object",
      "properties": {
        "forward": {
          "type": "object",
          "properties": {
            "fills": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "proportionBps": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  }
                }
              }
            },
            "tokens": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string"
                  },
                  "symbol": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "refund": {
          "type": "object",
          "properties": {
            "fills": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "proportionBps": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  }
                }
              }
            },
            "tokens": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string"
                  },
                  "symbol": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "sellToken": {
      "type": "string"
    },
    "tokenMetadata": {
      "type": "object",
      "properties": {
        "buyToken": {
          "type": "object",
          "properties": {
            "buyTaxBps": {
              "type": "string"
            },
            "sellTaxBps": {
              "type": "string"
            },
            "transferTaxBps": {
              "type": "string"
            }
          }
        },
        "sellToken": {
          "type": "object",
          "properties": {
            "buyTaxBps": {
              "type": "string"
            },
            "sellTaxBps": {
              "type": "string"
            },
            "transferTaxBps": {
              "type": "string"
            }
          }
        }
      }
    },
    "totalNetworkFee": {
      "type": "string"
    },
    "zid": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Documentation example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/price?buyAmount=1000000000000000&buyToken=0x4200000000000000000000000000000000000006&chainId=8453&sellToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&taker=0x1111111111111111111111111111111111111111' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "allowanceTarget": "0x000000000022d473030f116ddee9f6b43ac78ba3",
  "blockNumber": "53329866",
  "buyAmount": "1000000000000000",
  "buyToken": "0x4200000000000000000000000000000000000006",
  "estimatedNetSellAmount": "2252777",
  "fees": {
    "integratorFee": {
      "amount": "4567",
      "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "type": "volume"
    },
    "integratorFees": [
      {
        "amount": "4567",
        "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "type": "volume"
      }
    ],
    "zeroExFee": {
      "amount": "3425",
      "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "type": "volume"
    }
  },
  "gas": "464457",
  "gasPrice": "7975000",
  "issues": {
    "allowance": {
      "actual": "0",
      "spender": "0x000000000022d473030f116ddee9f6b43ac78ba3"
    },
    "balance": null,
    "invalidSourcesPassed": [],
    "simulationIncomplete": false
  },
  "liquidityAvailable": true,
  "maxSellAmount": "2283357",
  "mode": "exact-out",
  "routes": {
    "forward": {
      "fills": [
        {
          "from": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
          "proportionBps": "10000",
          "source": "LunarBase",
          "to": "0x4200000000000000000000000000000000000006"
        }
      ],
      "tokens": [
        {
          "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
          "symbol": "USDC"
        },
        {
          "address": "0x4200000000000000000000000000000000000006",
          "symbol": "WETH"
        }
      ]
    },
    "refund": {
      "fills": [
        {
          "from": "0x4200000000000000000000000000000000000006",
          "proportionBps": "10000",
          "source": "AlienBase_V3",
          "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
        }
      ],
      "tokens": [
        {
          "address": "0x4200000000000000000000000000000000000006",
          "symbol": "WETH"
        },
        {
          "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
          "symbol": "USDC"
        }
      ]
    }
  },
  "sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "tokenMetadata": {
    "buyToken": {
      "buyTaxBps": "0",
      "sellTaxBps": "0",
      "transferTaxBps": "0"
    },
    "sellToken": {
      "buyTaxBps": "0",
      "sellTaxBps": "0",
      "transferTaxBps": "0"
    }
  },
  "totalNetworkFee": "3706392767710",
  "zid": "0x129c1097e1742a668caf4a2b"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- blockrun: https://openany.si/market/apis/blockrun/blockrun-read-only-dex-0x-indicative-permit2-swap-quote-no-commitment/?offering=7e18e4fe-30fd-4610-8524-207d85d709b2

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
