I am surprized that your api do not provide full orderbook, especially that this was not explicitly stated anywhere
From the docs:
"The L2 book shows the top 50 levels for each side. Each side is a list of the levels with bids being sorted from highest price to lowest and asks from lowest to highest. This makes the first element of the bid and ask side equivalent to the L1 book bid and ask."
I will look at expanding the REST order book levels. If you want a more detailed picture, use the websocket API for the streaming data.
Prices at 1$ and 2000$ are nowhere near relevant for current market activity. What do you glean from knowing that someone wants 0.01 BTC at 1$?. In some cases (equity exchanges, etc) trading wil leven halt if the price of the market moves too dramatically over a given timeframe.
I will look at expending the levels as I previously mentioned, but it will continue to be the inside book for some N levels. A full book may be available via REST in the future with some limited query requirements to make it clear that it should not be continuously polled. Users who want up to date info are strongly encouraged to use the streaming API and maintain their order book state. All of the above are advanced uses which target only a small faction of our user base.
Hi! sorry for my remark. I should first search before asking
I have read socket.io api docs carefully now as I am interested in implementing the book thru your api. And I even made some modifications to your example to analyze and prepare myself.
And I have a technical question if you don't mind. If you think this is not proper place for it please suggest where we can continue.
As I can understand from your api to build a book I first need to get full book and then listen for all events and modify the book state accordingly.
In general I have no problem with it except one thing.
As long as initial full book you provide in the form array of price/volume tuples and all next events arrive with order_id which can be used to find and select and filter orders to follow thier further state and alter or not the state of my local book.
What I stuck with is that initially I do not know ids of orders which are already in the book and thus I cannot understand how those already existing orders can be identified in subsiquent order events to be able to update local book correctly.
Can you please advice?
From what I can see it I would suggest to extend initial book response with order_id of each order currently in the book. this whould greatly simplify the task of keeping local book state.
thank you in advance