For the complete documentation index, see llms.txt. This page is also available as Markdown.

GET Orderbook

Native Relay liquidity is highly efficient and often moves rapidly to meet the market mid-price.

Therefore, it is common for one side of the liquidity to be depleted completely. Or, the available liquidity switches from one direction to the opposite.

Whenever a trading direction has insufficient liquidity, the entire orderbook object (unique in base+quote addresses) will be removed completely from the endpoint. In such cases, quoting on this particular pair/direction is no longer available.

Response notes:

  • Each level is [base_quantity, price] and is per-level, not cumulative. Prices are net of the fee configured for your API key.

  • side is always bid: each item means selling base for quote. The opposite direction is a separate item.

  • minimum_in_base is expressed in wei of the base token. Quotes below it fail with 171055.

  • Empty or expired books, and pairs not enabled for your API key, are omitted.

  • Optional params: chain (name) or chainId (numeric), and showNative (see Native Tokens Support).

Get price levels for all supported pair in a chain

get
Query parameters
chainstring · enumRequired

Blockchain name, eg: ethereum, arbitrum, ...

Possible values:
Header parameters
apiKeystringRequired

The API key that was assigned to you by Native

Responses
200

Success

application/json
base_addressstringRead-onlyRequired
quote_addressstringRead-onlyRequired
base_symbolstringRead-onlyRequired
quote_symbolstringRead-onlyRequired
levelsstring[]Read-onlyRequired
sidestringRead-onlyRequired
minimum_in_basenumberRead-onlyRequired
get/v1/orderbook
GET /swap-api-v2/v1/orderbook?chain=ethereum HTTP/1.1
Host: v2.api.native.org
apiKey: text
Accept: */*
[
  {
    "base_address": "text",
    "quote_address": "text",
    "base_symbol": "text",
    "quote_symbol": "text",
    "levels": [
      "text"
    ],
    "side": "text",
    "minimum_in_base": 1
  }
]

Last updated