0x · Schema

0x Swap Price

An indicative price for an asset pair returned by /swap/allowance-holder/price and /swap/permit2/price. Does NOT include calldata.

CryptocurrencyDeFiDEX AggregatorSwapGaslessCross-ChainPermit2LiquidityTrade AnalyticsWeb3SettlementSmart Contracts

Properties

Name Type Description
liquidityAvailable boolean
chainId integer
buyToken string
sellToken string
buyAmount string
sellAmount string
minBuyAmount string
blockNumber string
estimatedPriceImpact stringnull
totalNetworkFee stringnull
gas stringnull
gasPrice stringnull
route objectnull
fees objectnull
issues objectnull
View JSON Schema on GitHub

JSON Schema

0x-swap-price-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/0x/main/json-schema/0x-swap-price-schema.json",
  "title": "0x Swap Price",
  "description": "An indicative price for an asset pair returned by /swap/allowance-holder/price and /swap/permit2/price. Does NOT include calldata.",
  "x-schema-source": "openapi",
  "type": "object",
  "properties": {
    "liquidityAvailable": {
      "type": "boolean"
    },
    "chainId": {
      "type": "integer"
    },
    "buyToken": {
      "type": "string",
      "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "sellToken": {
      "type": "string",
      "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "buyAmount": {
      "type": "string",
      "pattern": "^[0-9]+$"
    },
    "sellAmount": {
      "type": "string",
      "pattern": "^[0-9]+$"
    },
    "minBuyAmount": {
      "type": "string",
      "pattern": "^[0-9]+$"
    },
    "blockNumber": {
      "type": "string",
      "pattern": "^[0-9]+$"
    },
    "estimatedPriceImpact": {
      "type": [
        "string",
        "null"
      ]
    },
    "totalNetworkFee": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[0-9]+$"
    },
    "gas": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[0-9]+$"
    },
    "gasPrice": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[0-9]+$"
    },
    "route": {
      "type": [
        "object",
        "null"
      ]
    },
    "fees": {
      "type": [
        "object",
        "null"
      ]
    },
    "issues": {
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "liquidityAvailable"
  ]
}