Orderbook
To indicate current pricing for Native APIs and aggregators, you must send price levels for each supported pair on every network. The recommended frequency is every second for each pair on every supported network.
Below is the message format expected by Native:
Note: The price levels must be returned in a non-cumulative manner.
For example, given the following price levels for the WETH-USDT
pair:
If someone wants to trade 3 WETH for USDT, the price calculation would be: 0.001 * 1600 + 1 * 1610 + 1.999 * 1612 = 4833.988
Note:
Price caching: Native will cache these price levels for a maximum of 5 seconds (or until new levels are published). Prices will be considered expired and invalid if you do not post new price levels within 5 seconds.
Minimum order quantity: The first level always represents the minimum amount you're looking to buy. If you want to support arbitrarily small amounts, set the first level quantity to "0".
Last updated