Orderbook
In order to indicate current pricing for Native APIs and aggregators, you have to send price levels for each supported pair on every network. The recommended frequency is every second for every pair on every supported network. The following is the message format expected by Native:
Note: Order quantity is ordered in a non-cumulative way, let's say we have a WETH-USDT order book with the current price level:
For example, if someone wanted to trade 3 WETH for USDT, the price would be: 0.001 * 1600 + 1 * 1610 + 1.999 * 1612 = 4833.988
Note: Native will cache these price levels for a max of 5 seconds (or until new levels are published) and use them to route RFQs. Price will be considered expired and invalid if you do not post new price levels after 5 seconds
Note: The first level is always the minimum amount you're looking to buy. if you want to support an arbitrarily small amount, you should pass the first level quantity as 0
Last updated