APIFinance

Read-only DEX — 0x — Firm Permit2 swap quote with permit2.eip712 + tx data

Retrieve read-only DEX 0x Firm Permit2 swap quote with permit2.eip712 + tx data with the BlockRun API. Supply a buy token and a chain ID (chainId). Sample fields include hashes and tokens. Use it in a transaction-routing workflow. The GET request schema also lists buyToken, sellToken.

Selected price
$0 / callPublished pricing
Sellers / APIs
1 / 1
Requests · 30d
—Loading...
Success rate · 30d
—Loading...
USE THIS API

Read-only DEX — 0x — Firm Permit2 swap quote with permit2.eip712 + tx data

Prepare your request, then continue with your agent.

Selected price

$0 / call

Provider
Pricing
Connect your agent
On this page

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
The contract address of the token to buy
Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains
The contract address of the token to sell
The address which holds the `sellToken` balance and has the allowance set for the swap
Optional parameters (13)
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.
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
The target gas price (in wei) for the swap transaction. If not provided, the default value is based on the 0x gas price oracle
The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations.
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.
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).
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.
The maximum acceptable slippage of the `buyToken` in parts-per-million (PPM). Mutually exclusive with `slippageBps`. e.g. 3000 PPM = 30 BPS = 0.30%.
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`.
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%.
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.
The address of the external account that started the transaction. This is only needed if `taker` is a smart contract.
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.

Sample response

{
  "allowanceTarget": "0x000000000022d473030f116ddee9f6b43ac78ba3",
  "blockNumber": "53329865",
  "buyAmount": "4439150343572890",
  "buyToken": "0x4200000000000000000000000000000000000006",
  "fees": {
    "gasFee": null,
    "integratorFee": {
      "amount": "20000",
      "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "type": "volume"
    },
    "integratorFees": [
      {
        "amount": "20000",
        "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "type": "volume"
      }
    ],
    "zeroExFee": {
      "amount": "15000",
      "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "type": "volume"
    }
  },
  "issues": {
    "allowance": {
      "actual": "0",
      "spender": "0x000000000022d473030f116ddee9f6b43ac78ba3"
    },
    "balance": null,
    "invalidSourcesPassed": [],
    "simulationIncomplete": false
  },
  "liquidityAvailable": true,
  "minBuyAmount": "4394758840137161",
  "mode": "exact-in",
  "permit2": {
    "eip712": {
      "domain": {
        "chainId": 8453,
        "name": "Permit2",
        "verifyingContract": "0x000000000022d473030f116ddee9f6b43ac78ba3"
      },
      "message": {
        "deadline": "1793449378",
        "nonce": "2241959297937691820908574931991713",
        "permitted": {
          "amount": "10000000",
          "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
        },
        "spender": "0x7d6839415693801e94cdc4a7d732c9a3fdbbd1d7"
      },
      "primaryType": "PermitTransferFrom",
      "types": {
        "EIP712Domain": [
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "chainId",
            "type": "uint256"
          },
          {
            "name": "verifyingContract",
            "type": "address"
          }
        ],
        "PermitTransferFrom": [
          {
            "name": "permitted",
            "type": "TokenPermissions"
          },
          {
            "name": "spender",
            "type": "address"
          },
          {
            "name": "nonce",
            "type": "uint256"
          },
          {
            "name": "deadline",
            "type": "uint256"
          }
        ],
        "TokenPermissions": [
          {
            "name": "token",
            "type": "address"
          },
          {
            "name": "amount",
            "type": "uint256"
          }
        ]
      }
    },
    "hash": "0xfef4ebbc774d31be4d9e9d81b4155423a2b17d4bc3603f65fdc50c9685320fa3",
    "type": "Permit2"
  },
  "route": {
    "fills": [
      {
        "from": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "proportionBps": "10000",
        "source": "LunarBase",
        "to": "0x4200000000000000000000000000000000000006"
      }
    ],
    "tokens": [
      {
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC"
      },
      {
        "address": "0x4200000000000000000000000000000000000006",
        "symbol": "WETH"
      }
    ]
  },
  "sellAmount": "10000000",
  "sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "tokenMetadata": {
    "buyToken": {
      "buyTaxBps": "0",
      "sellTaxBps": "0",
      "transferTaxBps": "0"
    },
    "sellToken": {
      "buyTaxBps": "0",
      "sellTaxBps": "0",
      "transferTaxBps": "0"
    }
  },
  "totalNetworkFee": "2810530729000",
  "transaction": {
    "data": "0x1fff991f00000000000000000000000011111111111111111111111111111111111111110000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000f9d02878a35c900000000000000000000000000000000000000000000000000000000000000a06c0369976686f68273a6e51e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000006a0000000000000000000000000000000000000000000000000000000000000012438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000e9030014f5dae217d0a152f02a043567b16c1abf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000005dc000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000ad01c20d5886137e056775af56915de824c8fce50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000efc4ec03a7c47d3a38a9be7ff1d52dd01b99000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c425d2e751000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d6839415693801e94cdc4a7d732c9a3fdbbd1d70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e31a2687d04ec000000000000000000000000000000000000000000000000000000006ae5dda20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010438c9c147000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000000000000f42400000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000024d0e30db00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a45f80abae000000000000000000000000f5c4f3dc02c3fb9279495a8fef7b0741da9561570000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000fc592c37a963200000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffc1fb425e0000000000000000000000007d6839415693801e94cdc4a7d732c9a3fdbbd1d7000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000009896800000000000000000000000000000000000006e898131631616b1779bad70bca1000000000000000000000000000000000000000000000000000000006ae5dda200000000000000000000000000000000000000000000000000000000000000c0",
    "gas": "352165",
    "gasPrice": "7975000",
    "to": "0x7d6839415693801e94cdc4a7d732c9a3fdbbd1d7",
    "value": "0"
  },
  "zid": "0x6c0369976686f68273a6e51e"
}

Response result

Response structure

Inferred from examples
  • allowanceTargetstring
  • blockNumberstring
  • buyAmountstring
  • buyTokenstring
  • feesobject
    • gasFeenull
    • integratorFeeobject
      • amountstring
      • tokenstring
      • typestring
    • integratorFeesobject[]
      • amountstring
      • tokenstring
      • typestring
    • zeroExFeeobject
      • amountstring
      • tokenstring
      • typestring
  • issuesobject
    • allowanceobject
      • actualstring
      • spenderstring
    • balancenull
    • invalidSourcesPassedunknown[]
    • simulationIncompleteboolean
  • liquidityAvailableboolean
  • minBuyAmountstring
  • modestring
  • permit2object
    • eip712object
      • domainobject
        • chainIdinteger
        • namestring
        • verifyingContractstring
      • messageobject
        • deadlinestring
        • noncestring
        • permittedobject
          • amountstring
          • tokenstring
        • spenderstring
      • primaryTypestring
      • typesobject
        • EIP712Domainobject[]
          • namestring
          • typestring
        • PermitTransferFromobject[]
          • namestring
          • typestring
        • TokenPermissionsobject[]
          • namestring
          • typestring
    • hashstring
    • typestring
  • routeobject
    • fillsobject[]
      • fromstring
      • proportionBpsstring
      • sourcestring
      • tostring
    • tokensobject[]
      • addressstring
      • symbolstring
  • sellAmountstring
  • sellTokenstring
  • tokenMetadataobject
    • buyTokenobject
      • buyTaxBpsstring
      • sellTaxBpsstring
      • transferTaxBpsstring
    • sellTokenobject
      • buyTaxBpsstring
      • sellTaxBpsstring
      • transferTaxBpsstring
  • totalNetworkFeestring
  • transactionobject
    • datastring
    • gasstring
    • gasPricestring
    • tostring
    • valuestring
  • zidstring

Sellers

SellerPricingRequests · 30dPerformanceAccess
blockrunCurrent
Read-only DEX — 0x — Firm Permit2 swap quote with permit2.eip712 + tx data · GET · View API reference
$0 / call—
—successP50—
Loading...
Selected pricing · blockrunUSD / call
Unit price
$0

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: 4. Price update time: not supplied.

calls

Total $0

API

Method
GET
Endpoint
https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/quote
Content type
application/json
Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
  'https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/quote?buyToken=0x4200000000000000000000000000000000000006&chainId=8453&sellAmount=10000000&sellToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&taker=0x1111111111111111111111111111111111111111' \
  -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.

ParameterLocationTypeRequiredDescription
buyAmountURL query parametersquerystringNoThe 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.
buyTokenURL query parametersquerystringYesThe contract address of the token to buy
chainIdURL query parametersqueryintegerYesChain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains
excludedSourcesURL query parametersquerystringNoLiquidity 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
gasPriceURL query parametersquerystringNoThe target gas price (in wei) for the swap transaction. If not provided, the default value is based on the 0x gas price oracle
recipientURL query parametersquerystringNoThe address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations.
sellAmountURL query parametersquerystringNoThe 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.
sellEntireBalanceURL query parametersquerystringNoIf 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"

sellTokenURL query parametersquerystringYesThe contract address of the token to sell
slippageBpsURL query parametersqueryintegerNoThe 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

slippagePpmURL query parametersqueryintegerNoThe 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

takerURL query parametersquerystringYesThe address which holds the `sellToken` balance and has the allowance set for the swap
tradeSurplusMaxBpsURL query parametersqueryintegerNoThe 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

tradeSurplusMaxPpmURL query parametersqueryintegerNoThe 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

tradeSurplusRecipientURL query parametersquerystringNoThe 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.
txOriginURL query parametersquerystringNoThe address of the external account that started the transaction. This is only needed if `taker` is a smart contract.
wrapUnwrapModeURL query parametersquerystringNoControls 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 markers inside a nested object or variant apply when that object or variant is used.

Sample response

Sample response · Documented HTTP 200 Published documentation example. Verify the actual response after an approved call.

Documentation example
{
  "allowanceTarget": "0x000000000022d473030f116ddee9f6b43ac78ba3",
  "blockNumber": "53329865",
  "buyAmount": "4439150343572890",
  "buyToken": "0x4200000000000000000000000000000000000006",
  "fees": {
    "gasFee": null,
    "integratorFee": {
      "amount": "20000",
      "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "type": "volume"
    },
    "integratorFees": [
      {
        "amount": "20000",
        "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "type": "volume"
      }
    ],
    "zeroExFee": {
      "amount": "15000",
      "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "type": "volume"
    }
  },
  "issues": {
    "allowance": {
      "actual": "0",
      "spender": "0x000000000022d473030f116ddee9f6b43ac78ba3"
    },
    "balance": null,
    "invalidSourcesPassed": [],
    "simulationIncomplete": false
  },
  "liquidityAvailable": true,
  "minBuyAmount": "4394758840137161",
  "mode": "exact-in",
  "permit2": {
    "eip712": {
      "domain": {
        "chainId": 8453,
        "name": "Permit2",
        "verifyingContract": "0x000000000022d473030f116ddee9f6b43ac78ba3"
      },
      "message": {
        "deadline": "1793449378",
        "nonce": "2241959297937691820908574931991713",
        "permitted": {
          "amount": "10000000",
          "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
        },
        "spender": "0x7d6839415693801e94cdc4a7d732c9a3fdbbd1d7"
      },
      "primaryType": "PermitTransferFrom",
      "types": {
        "EIP712Domain": [
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "chainId",
            "type": "uint256"
          },
          {
            "name": "verifyingContract",
            "type": "address"
          }
        ],
        "PermitTransferFrom": [
          {
            "name": "permitted",
            "type": "TokenPermissions"
          },
          {
            "name": "spender",
            "type": "address"
          },
          {
            "name": "nonce",
            "type": "uint256"
          },
          {
            "name": "deadline",
            "type": "uint256"
          }
        ],
        "TokenPermissions": [
          {
            "name": "token",
            "type": "address"
          },
          {
            "name": "amount",
            "type": "uint256"
          }
        ]
      }
    },
    "hash": "0xfef4ebbc774d31be4d9e9d81b4155423a2b17d4bc3603f65fdc50c9685320fa3",
    "type": "Permit2"
  },
  "route": {
    "fills": [
      {
        "from": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "proportionBps": "10000",
        "source": "LunarBase",
        "to": "0x4200000000000000000000000000000000000006"
      }
    ],
    "tokens": [
      {
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC"
      },
      {
        "address": "0x4200000000000000000000000000000000000006",
        "symbol": "WETH"
      }
    ]
  },
  "sellAmount": "10000000",
  "sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "tokenMetadata": {
    "buyToken": {
      "buyTaxBps": "0",
      "sellTaxBps": "0",
      "transferTaxBps": "0"
    },
    "sellToken": {
      "buyTaxBps": "0",
      "sellTaxBps": "0",
      "transferTaxBps": "0"
    }
  },
  "totalNetworkFee": "2810530729000",
  "transaction": {
    "data": "0x1fff991f00000000000000000000000011111111111111111111111111111111111111110000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000f9d02878a35c900000000000000000000000000000000000000000000000000000000000000a06c0369976686f68273a6e51e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000006a0000000000000000000000000000000000000000000000000000000000000012438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000e9030014f5dae217d0a152f02a043567b16c1abf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000005dc000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000ad01c20d5886137e056775af56915de824c8fce50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000efc4ec03a7c47d3a38a9be7ff1d52dd01b99000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c425d2e751000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d6839415693801e94cdc4a7d732c9a3fdbbd1d70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e31a2687d04ec000000000000000000000000000000000000000000000000000000006ae5dda20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010438c9c147000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000000000000f42400000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000024d0e30db00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a45f80abae000000000000000000000000f5c4f3dc02c3fb9279495a8fef7b0741da9561570000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000fc592c37a963200000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffc1fb425e0000000000000000000000007d6839415693801e94cdc4a7d732c9a3fdbbd1d7000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000009896800000000000000000000000000000000000006e898131631616b1779bad70bca1000000000000000000000000000000000000000000000000000000006ae5dda200000000000000000000000000000000000000000000000000000000000000c0",
    "gas": "352165",
    "gasPrice": "7975000",
    "to": "0x7d6839415693801e94cdc4a7d732c9a3fdbbd1d7",
    "value": "0"
  },
  "zid": "0x6c0369976686f68273a6e51e"
}

Agent integration

Copy the resource contract without sharing an API key.

View API Markdown
API Markdown
# Read-only DEX — 0x — Firm Permit2 swap quote with permit2.eip712 + tx data

Retrieve read-only DEX 0x Firm Permit2 swap quote with permit2.eip712 + tx data with the BlockRun API. Supply a buy token and a chain ID (chainId). Sample fields include hashes and tokens. Use it in a transaction-routing workflow. The GET request schema also lists buyToken, sellToken.
## Available implementations
blockrun · Read-only DEX — 0x — Firm Permit2 swap quote with permit2.eip712 + tx data: https://openany.si/markets/apis/capabilities/blockrun-read-only-dex-0x-firm-permit2-swap-quote-with-permit2-eip712-tx-data?offering=a465ec6a-e673-4290-bdca-ef8d6218dead · $0 / call

## Selected API contract
Documentation: https://openany.si/markets/apis/capabilities/blockrun-read-only-dex-0x-firm-permit2-swap-quote-with-permit2-eip712-tx-data
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/quote
Price: $0 / call
Provider: blockrun
Contract revision: 4
Price source: OpenAny public API contract and documented provider unit rates. 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/quote?buyToken=0x4200000000000000000000000000000000000006&chainId=8453&sellAmount=10000000&sellToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&taker=0x1111111111111111111111111111111111111111' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## API contract
```json
{
  "resource_type": "api",
  "name": "Read-only DEX — 0x — Firm Permit2 swap quote with permit2.eip712 + tx data",
  "endpoint": "https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/quote",
  "method": "GET",
  "content_type": "none",
  "execution_mode": "sync",
  "authentication": {
    "type": "bearer",
    "environment_variable": "OPENANY_API_KEY"
  },
  "inputs": [
    {
      "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.",
      "location": "query",
      "name": "buyAmount",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "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 target gas price (in wei) for the swap transaction. If not provided, the default value is based on the 0x gas price oracle",
      "location": "query",
      "name": "gasPrice",
      "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. Exactly one of `sellAmount` or `buyAmount` must be provided — specifying both will result in an error.",
      "location": "query",
      "name": "sellAmount",
      "nullable": false,
      "required": false,
      "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_values": [
        "true",
        "false"
      ],
      "location": "query",
      "name": "sellEntireBalance",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "The contract address of the token to sell",
      "location": "query",
      "name": "sellToken",
      "nullable": false,
      "required": true,
      "type": "string"
    },
    {
      "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.",
      "location": "query",
      "maximum": "10000",
      "minimum": "0",
      "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": true,
      "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"
    },
    {
      "description": "The address of the external account that started the transaction. This is only needed if `taker` is a smart contract.",
      "location": "query",
      "name": "txOrigin",
      "nullable": false,
      "required": false,
      "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_values": [
        "direct",
        "settler"
      ],
      "location": "query",
      "name": "wrapUnwrapMode",
      "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",
          "taker": "0x1111111111111111111111111111111111111111"
        }
      },
      "response_body": {
        "allowanceTarget": "0x000000000022d473030f116ddee9f6b43ac78ba3",
        "blockNumber": "53329865",
        "buyAmount": "4439150343572890",
        "buyToken": "0x4200000000000000000000000000000000000006",
        "fees": {
          "gasFee": null,
          "integratorFee": {
            "amount": "20000",
            "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "type": "volume"
          },
          "integratorFees": [
            {
              "amount": "20000",
              "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
              "type": "volume"
            }
          ],
          "zeroExFee": {
            "amount": "15000",
            "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "type": "volume"
          }
        },
        "issues": {
          "allowance": {
            "actual": "0",
            "spender": "0x000000000022d473030f116ddee9f6b43ac78ba3"
          },
          "balance": null,
          "invalidSourcesPassed": [],
          "simulationIncomplete": false
        },
        "liquidityAvailable": true,
        "minBuyAmount": "4394758840137161",
        "mode": "exact-in",
        "permit2": {
          "eip712": {
            "domain": {
              "chainId": 8453,
              "name": "Permit2",
              "verifyingContract": "0x000000000022d473030f116ddee9f6b43ac78ba3"
            },
            "message": {
              "deadline": "1793449378",
              "nonce": "2241959297937691820908574931991713",
              "permitted": {
                "amount": "10000000",
                "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
              },
              "spender": "0x7d6839415693801e94cdc4a7d732c9a3fdbbd1d7"
            },
            "primaryType": "PermitTransferFrom",
            "types": {
              "EIP712Domain": [
                {
                  "name": "name",
                  "type": "string"
                },
                {
                  "name": "chainId",
                  "type": "uint256"
                },
                {
                  "name": "verifyingContract",
                  "type": "address"
                }
              ],
              "PermitTransferFrom": [
                {
                  "name": "permitted",
                  "type": "TokenPermissions"
                },
                {
                  "name": "spender",
                  "type": "address"
                },
                {
                  "name": "nonce",
                  "type": "uint256"
                },
                {
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "TokenPermissions": [
                {
                  "name": "token",
                  "type": "address"
                },
                {
                  "name": "amount",
                  "type": "uint256"
                }
              ]
            }
          },
          "hash": "0xfef4ebbc774d31be4d9e9d81b4155423a2b17d4bc3603f65fdc50c9685320fa3",
          "type": "Permit2"
        },
        "route": {
          "fills": [
            {
              "from": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
              "proportionBps": "10000",
              "source": "LunarBase",
              "to": "0x4200000000000000000000000000000000000006"
            }
          ],
          "tokens": [
            {
              "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
              "symbol": "USDC"
            },
            {
              "address": "0x4200000000000000000000000000000000000006",
              "symbol": "WETH"
            }
          ]
        },
        "sellAmount": "10000000",
        "sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "tokenMetadata": {
          "buyToken": {
            "buyTaxBps": "0",
            "sellTaxBps": "0",
            "transferTaxBps": "0"
          },
          "sellToken": {
            "buyTaxBps": "0",
            "sellTaxBps": "0",
            "transferTaxBps": "0"
          }
        },
        "totalNetworkFee": "2810530729000",
        "transaction": {
          "data": "0x1fff991f00000000000000000000000011111111111111111111111111111111111111110000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000f9d02878a35c900000000000000000000000000000000000000000000000000000000000000a06c0369976686f68273a6e51e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000006a0000000000000000000000000000000000000000000000000000000000000012438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000e9030014f5dae217d0a152f02a043567b16c1abf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000005dc000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000ad01c20d5886137e056775af56915de824c8fce50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000efc4ec03a7c47d3a38a9be7ff1d52dd01b99000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c425d2e751000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d6839415693801e94cdc4a7d732c9a3fdbbd1d70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e31a2687d04ec000000000000000000000000000000000000000000000000000000006ae5dda20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010438c9c147000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000000000000f42400000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000024d0e30db00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a45f80abae000000000000000000000000f5c4f3dc02c3fb9279495a8fef7b0741da9561570000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000fc592c37a963200000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffc1fb425e0000000000000000000000007d6839415693801e94cdc4a7d732c9a3fdbbd1d7000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000009896800000000000000000000000000000000000006e898131631616b1779bad70bca1000000000000000000000000000000000000000000000000000000006ae5dda200000000000000000000000000000000000000000000000000000000000000c0",
          "gas": "352165",
          "gasPrice": "7975000",
          "to": "0x7d6839415693801e94cdc4a7d732c9a3fdbbd1d7",
          "value": "0"
        },
        "zid": "0x6c0369976686f68273a6e51e"
      }
    }
  ]
}
```

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect the error and usage record before retrying a paid operation.

Examples

Documentation example

Published documentation example. Verify the actual response after an approved call.

  1. 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 / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. Run the request

    Paste the complete command below into your terminal.

    Values to replace before running 17

    Review these request fields before running. Keep the published provider and request method unchanged.

    buyAmount
    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
    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
    gasPrice
    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
    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. Exactly one of `sellAmount` or `buyAmount` must be provided — specifying both will result in an error.
    sellEntireBalance
    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).
    sellToken
    The contract address of the token to sell
    slippageBps
    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.
    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.
    txOrigin
    The address of the external account that started the transaction. This is only needed if `taker` is a smart contract.
    wrapUnwrapMode
    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.
    Terminal · cURL
    curl \
      'https://api.openany.si/v1/agent-apis/blockrun/api/v1/zerox/quote?buyToken=0x4200000000000000000000000000000000000006&chainId=8453&sellAmount=10000000&sellToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&taker=0x1111111111111111111111111111111111111111' \
      -X GET \
      -H "Authorization: Bearer $OPENANY_API_KEY" \
      -H 'Content-Type: application/json'
  3. Check the response

    Sample response · Documented HTTP 200

    Sample response
    {
      "allowanceTarget": "0x000000000022d473030f116ddee9f6b43ac78ba3",
      "blockNumber": "53329865",
      "buyAmount": "4439150343572890",
      "buyToken": "0x4200000000000000000000000000000000000006",
      "fees": {
        "gasFee": null,
        "integratorFee": {
          "amount": "20000",
          "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
          "type": "volume"
        },
        "integratorFees": [
          {
            "amount": "20000",
            "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "type": "volume"
          }
        ],
        "zeroExFee": {
          "amount": "15000",
          "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
          "type": "volume"
        }
      },
      "issues": {
        "allowance": {
          "actual": "0",
          "spender": "0x000000000022d473030f116ddee9f6b43ac78ba3"
        },
        "balance": null,
        "invalidSourcesPassed": [],
        "simulationIncomplete": false
      },
      "liquidityAvailable": true,
      "minBuyAmount": "4394758840137161",
      "mode": "exact-in",
      "permit2": {
        "eip712": {
          "domain": {
            "chainId": 8453,
            "name": "Permit2",
            "verifyingContract": "0x000000000022d473030f116ddee9f6b43ac78ba3"
          },
          "message": {
            "deadline": "1793449378",
            "nonce": "2241959297937691820908574931991713",
            "permitted": {
              "amount": "10000000",
              "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
            },
            "spender": "0x7d6839415693801e94cdc4a7d732c9a3fdbbd1d7"
          },
          "primaryType": "PermitTransferFrom",
          "types": {
            "EIP712Domain": [
              {
                "name": "name",
                "type": "string"
              },
              {
                "name": "chainId",
                "type": "uint256"
              },
              {
                "name": "verifyingContract",
                "type": "address"
              }
            ],
            "PermitTransferFrom": [
              {
                "name": "permitted",
                "type": "TokenPermissions"
              },
              {
                "name": "spender",
                "type": "address"
              },
              {
                "name": "nonce",
                "type": "uint256"
              },
              {
                "name": "deadline",
                "type": "uint256"
              }
            ],
            "TokenPermissions": [
              {
                "name": "token",
                "type": "address"
              },
              {
                "name": "amount",
                "type": "uint256"
              }
            ]
          }
        },
        "hash": "0xfef4ebbc774d31be4d9e9d81b4155423a2b17d4bc3603f65fdc50c9685320fa3",
        "type": "Permit2"
      },
      "route": {
        "fills": [
          {
            "from": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "proportionBps": "10000",
            "source": "LunarBase",
            "to": "0x4200000000000000000000000000000000000006"
          }
        ],
        "tokens": [
          {
            "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "symbol": "USDC"
          },
          {
            "address": "0x4200000000000000000000000000000000000006",
            "symbol": "WETH"
          }
        ]
      },
      "sellAmount": "10000000",
      "sellToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "tokenMetadata": {
        "buyToken": {
          "buyTaxBps": "0",
          "sellTaxBps": "0",
          "transferTaxBps": "0"
        },
        "sellToken": {
          "buyTaxBps": "0",
          "sellTaxBps": "0",
          "transferTaxBps": "0"
        }
      },
      "totalNetworkFee": "2810530729000",
      "transaction": {
        "data": "0x1fff991f00000000000000000000000011111111111111111111111111111111111111110000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000f9d02878a35c900000000000000000000000000000000000000000000000000000000000000a06c0369976686f68273a6e51e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000006a0000000000000000000000000000000000000000000000000000000000000012438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000e9030014f5dae217d0a152f02a043567b16c1abf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000005dc000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000ad01c20d5886137e056775af56915de824c8fce50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a438c9c147000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000efc4ec03a7c47d3a38a9be7ff1d52dd01b99000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c425d2e751000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d6839415693801e94cdc4a7d732c9a3fdbbd1d70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e31a2687d04ec000000000000000000000000000000000000000000000000000000006ae5dda20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010438c9c147000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000000000000f42400000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000024d0e30db00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a45f80abae000000000000000000000000f5c4f3dc02c3fb9279495a8fef7b0741da9561570000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000fc592c37a963200000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffc1fb425e0000000000000000000000007d6839415693801e94cdc4a7d732c9a3fdbbd1d7000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000009896800000000000000000000000000000000000006e898131631616b1779bad70bca1000000000000000000000000000000000000000000000000000000006ae5dda200000000000000000000000000000000000000000000000000000000000000c0",
        "gas": "352165",
        "gasPrice": "7975000",
        "to": "0x7d6839415693801e94cdc4a7d732c9a3fdbbd1d7",
        "value": "0"
      },
      "zid": "0x6c0369976686f68273a6e51e"
    }

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.

Use Read-only DEX — 0x — Firm Permit2 swap quote with permit2.eip712 + tx data with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.