Tutorial: Order book
What is an Order book?
An orderbook is a collection of Buy and Sell orders that were originally placed using a Maker execution type.
Condition
If Algodex supports an asset then a unique orderbook exists for that asset.
Walkthrough
A user is interested in the price of a particular asset so they fetch the Algodex orderbook related to that asset.
The Algodex order book contains the most recent unfulfilled Buy and Sell order's related to that asset.
An order remains in the order book until someone places an order using a Taker execution type.
Fetch Order book [JavaScript]
When using api.placeOrder()
if an orderbook is not provided we fetch the orderbook based off the asset id specified in the order object. However, it is possible to fetch the orderbook ahead of time, as shown in the example below.
Last updated