0x · Example Payload

0X Swap Allowance Holder Get Quote Example

CryptocurrencyDeFiDEX AggregatorSwapGaslessCross-ChainPermit2LiquidityTrade AnalyticsWeb3SettlementSmart Contracts

0X Swap Allowance Holder Get Quote Example is an example object payload from 0x, with 2 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

requestresponse

Example Payload

Raw ↑
{
  "request": {
    "method": "GET",
    "url": "https://api.0x.org/swap/allowance-holder/quote?chainId=8453&sellToken=0x4200000000000000000000000000000000000006&buyToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&sellAmount=100000000000000000&taker=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
    "headers": {
      "0x-api-key": "YOUR_API_KEY",
      "0x-version": "v2"
    }
  },
  "response": {
    "status": 200,
    "body": {
      "liquidityAvailable": true,
      "chainId": 8453,
      "blockNumber": "20850142",
      "buyAmount": "262914238",
      "buyToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "sellAmount": "100000000000000000",
      "sellToken": "0x4200000000000000000000000000000000000006",
      "minBuyAmount": "260319257",
      "allowanceTarget": "0x0000000000001fF3684f28c67538d4D072C22734",
      "transaction": {
        "to": "0x7F6cEE965959295cC64d0E6c00d99d6532d8e86b",
        "data": "0x2213bc0b00000000000000000000000000000000000000000000000000000000...",
        "gas": "288079",
        "gasPrice": "73178385",
        "value": "0"
      },
      "totalNetworkFee": "21080000000000000",
      "fees": {
        "integratorFee": null,
        "zeroExFee": {
          "amount": "0",
          "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "type": "volume"
        },
        "gasFee": null
      },
      "issues": {
        "allowance": {
          "actual": "0",
          "spender": "0x0000000000001fF3684f28c67538d4D072C22734"
        },
        "balance": null,
        "simulationIncomplete": false,
        "invalidSourcesPassed": []
      },
      "route": {
        "fills": [
          {
            "source": "Aerodrome_V1",
            "from": "0x4200000000000000000000000000000000000006",
            "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
            "proportionBps": "10000"
          }
        ],
        "tokens": [
          {"address": "0x4200000000000000000000000000000000000006", "symbol": "WETH"},
          {"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "symbol": "USDC"}
        ]
      }
    }
  }
}