api - CEX order book market update -
i trying use cex.io api construct live order book, struggling understanding message api.
i subscribing following json:
{ "e": "order-book-subscribe", "data": { "pair": [ "btc", "usd" ], "subscribe": false, "depth": -1 }, "oid": "1435927928274_3_order-book-subscribe" }
the first message snapshot of order book, 1 ok.
but next, messages "just" updates, same 1 :
{ 'e': 'md_update', 'data': { 'id': 92276361, 'pair': 'btc:usd', 'time': 1505337293621, 'bids': [], 'asks': [ [4078.1692, 0.0] ] } }
how update snapshot first received updates lines ?
how know, if of lines if there match in book ?
and if subscribe depth = 1
, updates best bid / best ask ?
Comments
Post a Comment