Is the update interval for Binance’s book_ticker 1ms? Sometimes when an agg_trade is pushed, there is no change in book_ticker, and the corresponding push information for the agg_trade’s quantity cannot be found in book_ticker either.
bookTicker
represents the quantity for the best price currently on the book. While aggTrade
streams show the quantity traded. Also note that a single order with big enough quantity might result in multiple aggtrades.
For example, suppose the ask side of the order book looks like this:
3.22000000 @ 21.52
544.73000000 @ 21.53
Then someone places a LIMIT order to buy 9.58 SOL at 21.55 BUSD.
This completely consumes the ask at 21.52 and then eats into the next level for the remaining quantity. Two aggregate trades happen at different prices, but it’s a single update to best price & quantity which goes from 3.22 @ 21.52 to 538.37 @ 21.53 as a result of that one order being filled.
Can I understand it this way? A taker order will only generate one book_ticker push (which also applies when the best price is broken).
I try to use diff_book_depth to find out the book_ticker corresponding to aggTrade. Below is my logic:
diff_book_depth[“E”]:1679375742706=<book_ticker[“E”]:1679375742778<=diff_book_depth[“E”]:1679375742806
diff_book_depth[“U”] should happen at diff_book_depth[“E”]:1679375742806
get diff_book_depth[“U”]:2754989225<=diff_book_depth[“U”]<=diff_book_depth[“U”]:2754989236
But from diff_book_depth[“U”]:2754989225<=diff_book_depth[“U”]<=diff_book_depth[“U”]:2754989236 there is only about a 95% chance of getting the book_ticker corresponding to aggTrade.
Do I need to use @trade to proceed?
Can I understand it this way? A taker order will only generate one book_ticker push?
Correct. A taker order generates a single bookTicker
push, with the new best price & quantity after that order is done taking.
A maker order can push a bookTicker
event too, if it adds quantity to the current best price, or offers a better price.
Note that bookTicker
events are also pushed when orders with the best price are canceled. Not every bookTicker
event corresponds to a trade.
This makes it quite non-trivial to correlate bookTicker
events with aggTrade
.
I try to use diff_book_depth to find out the book_ticker corresponding to aggTrade.
I’m afraid depth
streams won’t help a lot here, besides being an indirect and imprecise way to infer the "E"
value for bookTicker
events. depth
streams are throttled: that is, events are only pushed every 100 ms, not in real-time like bookTicker
or aggTrade
. Between two consecutive partial depth events there can be multiple bookTicker
and aggTrade
events, which you still need to match somehow.
Listening to the trade
stream can help figure out which aggTrade
events are caused by a single order. The first trade always happens at the current best price.
However, you must be very careful in tracking the best price, since events are only properly sequential in individual streams. That is, you can receive bookTicker
events after corresponding aggTrade
, or the other way around, they are not synchronized.
Here’s an example from listening to wss://stream.binance.com/stream?streams=solbusd@trade/solbusd@aggTrade/solbusd@bookTicker
Example
Maker BUY orders placed at 22.18.
Note that "u" are not contiguous. That are updates not at the best price.
{"stream":"solbusd@bookTicker","data":{"u":2755642659,"s":"SOLBUSD","b":"22.18000000","B":"901.11000000","a":"22.19000000","A":"50.33000000"}}
{"stream":"solbusd@bookTicker","data":{"u":2755642668,"s":"SOLBUSD","b":"22.18000000","B":"946.35000000","a":"22.19000000","A":"50.33000000"}}
{"stream":"solbusd@bookTicker","data":{"u":2755642671,"s":"SOLBUSD","b":"22.18000000","B":"949.54000000","a":"22.19000000","A":"50.33000000"}}
A single BUY order filled at 22.19, taking 50.33 - 26.72 = 23.61 in multiple trades.
This time "bookTicker" arrived before the "aggTrade".
{"stream":"solbusd@bookTicker","data":{"u":2755642676,"s":"SOLBUSD","b":"22.18000000","B":"949.54000000","a":"22.19000000","A":"26.72000000"}}
{"stream":"solbusd@aggTrade","data":{"e":"aggTrade","E":1679392826954,"s":"SOLBUSD","a":68325280,"p":"22.19000000","q":"23.61000000","f":117169391,"l":117169406,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169391,"p":"22.19000000","q":"1.44000000","b":1486413011,"a":1486396365,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169392,"p":"22.19000000","q":"0.47000000","b":1486413011,"a":1486397280,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169393,"p":"22.19000000","q":"0.90000000","b":1486413011,"a":1486397306,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169394,"p":"22.19000000","q":"0.51000000","b":1486413011,"a":1486397333,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169395,"p":"22.19000000","q":"0.51000000","b":1486413011,"a":1486397346,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169396,"p":"22.19000000","q":"1.23000000","b":1486413011,"a":1486397354,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169397,"p":"22.19000000","q":"4.74000000","b":1486413011,"a":1486397537,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169398,"p":"22.19000000","q":"1.54000000","b":1486413011,"a":1486397637,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169399,"p":"22.19000000","q":"0.51000000","b":1486413011,"a":1486397676,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169400,"p":"22.19000000","q":"0.91000000","b":1486413011,"a":1486398499,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169401,"p":"22.19000000","q":"0.81000000","b":1486413011,"a":1486398569,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169402,"p":"22.19000000","q":"0.83000000","b":1486413011,"a":1486398623,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169403,"p":"22.19000000","q":"0.91000000","b":1486413011,"a":1486399258,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169404,"p":"22.19000000","q":"0.93000000","b":1486413011,"a":1486399615,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169405,"p":"22.19000000","q":"0.76000000","b":1486413011,"a":1486400660,"T":1679392826953,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826954,"s":"SOLBUSD","t":117169406,"p":"22.19000000","q":"6.61000000","b":1486413011,"a":1486401334,"T":1679392826953,"m":false,"M":true}}
Another BUY order at 22.19 takes 26.72 - 24.57 = 2.15:
{"stream":"solbusd@bookTicker","data":{"u":2755642678,"s":"SOLBUSD","b":"22.18000000","B":"949.54000000","a":"22.19000000","A":"24.57000000"}}
{"stream":"solbusd@aggTrade","data":{"e":"aggTrade","E":1679392826958,"s":"SOLBUSD","a":68325281,"p":"22.19000000","q":"2.15000000","f":117169407,"l":117169407,"T":1679392826958,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826959,"s":"SOLBUSD","t":117169407,"p":"22.19000000","q":"2.15000000","b":1486413013,"a":1486401334,"T":1679392826958,"m":false,"M":true}}
And one more BUY order -- a different one (see "b") –– takes 24.57 - 23.61 = 0.96.
This time "bookTicker" arrived after "trade".
{"stream":"solbusd@aggTrade","data":{"e":"aggTrade","E":1679392826963,"s":"SOLBUSD","a":68325282,"p":"22.19000000","q":"0.96000000","f":117169408,"l":117169408,"T":1679392826963,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392826963,"s":"SOLBUSD","t":117169408,"p":"22.19000000","q":"0.96000000","b":1486413014,"a":1486401334,"T":1679392826963,"m":false,"M":true}}
{"stream":"solbusd@bookTicker","data":{"u":2755642680,"s":"SOLBUSD","b":"22.18000000","B":"949.54000000","a":"22.19000000","A":"23.61000000"}}
Another BUY order takes the entire 22.19 level:
{"stream":"solbusd@bookTicker","data":{"u":2755642693,"s":"SOLBUSD","b":"22.18000000","B":"949.54000000","a":"22.20000000","A":"1369.03000000"}}
{"stream":"solbusd@aggTrade","data":{"e":"aggTrade","E":1679392827022,"s":"SOLBUSD","a":68325283,"p":"22.19000000","q":"23.61000000","f":117169409,"l":117169415,"T":1679392827021,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392827022,"s":"SOLBUSD","t":117169409,"p":"22.19000000","q":"3.93000000","b":1486413024,"a":1486401334,"T":1679392827021,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392827022,"s":"SOLBUSD","t":117169410,"p":"22.19000000","q":"4.52000000","b":1486413024,"a":1486412000,"T":1679392827021,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392827022,"s":"SOLBUSD","t":117169411,"p":"22.19000000","q":"4.52000000","b":1486413024,"a":1486412006,"T":1679392827021,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392827022,"s":"SOLBUSD","t":117169412,"p":"22.19000000","q":"2.26000000","b":1486413024,"a":1486412009,"T":1679392827021,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392827022,"s":"SOLBUSD","t":117169413,"p":"22.19000000","q":"1.67000000","b":1486413024,"a":1486412068,"T":1679392827021,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392827022,"s":"SOLBUSD","t":117169414,"p":"22.19000000","q":"1.78000000","b":1486413024,"a":1486412870,"T":1679392827021,"m":false,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392827022,"s":"SOLBUSD","t":117169415,"p":"22.19000000","q":"4.93000000","b":1486413024,"a":1486412954,"T":1679392827021,"m":false,"M":true}}
Placing maker SELL order at 22.20:
{"stream":"solbusd@bookTicker","data":{"u":2755642694,"s":"SOLBUSD","b":"22.18000000","B":"949.54000000","a":"22.20000000","A":"1475.21000000"}}
Placing maker BUY orders at 22.19 -- and some other updates in between:
{"stream":"solbusd@bookTicker","data":{"u":2755642695,"s":"SOLBUSD","b":"22.19000000","B":"121.09000000","a":"22.20000000","A":"1475.21000000"}}
{"stream":"solbusd@bookTicker","data":{"u":2755642699,"s":"SOLBUSD","b":"22.19000000","B":"125.26000000","a":"22.20000000","A":"1475.21000000"}}
{"stream":"solbusd@bookTicker","data":{"u":2755642700,"s":"SOLBUSD","b":"22.19000000","B":"128.78000000","a":"22.20000000","A":"1475.21000000"}}
{"stream":"solbusd@bookTicker","data":{"u":2755642705,"s":"SOLBUSD","b":"22.19000000","B":"130.45000000","a":"22.20000000","A":"1475.21000000"}}
Placing maker SELL order at 22.20:
{"stream":"solbusd@bookTicker","data":{"u":2755642722,"s":"SOLBUSD","b":"22.19000000","B":"130.45000000","a":"22.20000000","A":"1578.68000000"}}
Filling SELL order at 22.19 for 130.45 - 115.13 = 15.32:
{"stream":"solbusd@aggTrade","data":{"e":"aggTrade","E":1679392827084,"s":"SOLBUSD","a":68325284,"p":"22.19000000","q":"15.32000000","f":117169416,"l":117169416,"T":1679392827082,"m":true,"M":true}}
{"stream":"solbusd@trade","data":{"e":"trade","E":1679392827085,"s":"SOLBUSD","t":117169416,"p":"22.19000000","q":"15.32000000","b":1486413026,"a":1486413041,"T":1679392827082,"m":true,"M":true}}
{"stream":"solbusd@bookTicker","data":{"u":2755642724,"s":"SOLBUSD","b":"22.19000000","B":"115.13000000","a":"22.20000000","A":"1578.68000000"}}
Some SELL orders at 22.20 are being canceled:
{"stream":"solbusd@bookTicker","data":{"u":2755642725,"s":"SOLBUSD","b":"22.19000000","B":"115.13000000","a":"22.20000000","A":"1475.21000000"}}
{"stream":"solbusd@bookTicker","data":{"u":2755642726,"s":"SOLBUSD","b":"22.19000000","B":"115.13000000","a":"22.20000000","A":"933.33000000"}}
{"stream":"solbusd@bookTicker","data":{"u":2755642727,"s":"SOLBUSD","b":"22.19000000","B":"115.13000000","a":"22.20000000","A":"835.71000000"}}
After trying to use Combined stream, there are still some omissions
`
For example, not found in the following example
{“e”:“aggTrade”,“E”:1679441190819,“s”:“SOLBUSD”,“a”:68360441,“p”:“22.61000000”,“q”:“46.41000000”,“f”:117277950,“l”:117277958,“T”:1679441190818,“m”:false,“M”:true}}
`
Example
1679441181.2175071 : {"stream":"solbusd@bookTicker","data":{"u":2757515350,"s":"SOLBUSD","b":"22.60000000","B":"136.10000000","a":"22.61000000","A":"466.66000000"}}
1679441181.217715 : {"stream":"solbusd@bookTicker","data":{"u":2757515352,"s":"SOLBUSD","b":"22.60000000","B":"136.10000000","a":"22.61000000","A":"468.43000000"}}
1679441181.220778 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441181071,"s":"SOLBUSD","t":117277945,"p":"22.60000000","q":"4.42000000","b":1487443552,"a":1487443595,"T":1679441181068,"m":true,"M":true}}
#issue a sell order with quantity 136.1 >>> 136.1 - 136.1 = 0 "b"update to 22.59
1679441181.2211049 : {"stream":"solbusd@aggTrade","data":{"e":"aggTrade","E":1679441181070,"s":"SOLBUSD","a":68360440,"p":"22.60000000","q":"136.10000000","f":117277945,"l":117277949,"T":1679441181068,"m":true,"M":true}}
1679441181.221313 : {"stream":"solbusd@bookTicker","data":{"u":2757515353,"s":"SOLBUSD","b":"22.59000000","B":"368.08000000","a":"22.61000000","A":"468.43000000"}}
1679441181.2217522 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441181071,"s":"SOLBUSD","t":117277946,"p":"22.60000000","q":"5.07000000","b":1487443554,"a":1487443595,"T":1679441181068,"m":true,"M":true}}
1679441181.222004 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441181071,"s":"SOLBUSD","t":117277947,"p":"22.60000000","q":"22.09000000","b":1487443564,"a":1487443595,"T":1679441181068,"m":true,"M":true}}
1679441181.222181 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441181071,"s":"SOLBUSD","t":117277948,"p":"22.60000000","q":"60.33000000","b":1487443573,"a":1487443595,"T":1679441181068,"m":true,"M":true}}
1679441181.2223349 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441181071,"s":"SOLBUSD","t":117277949,"p":"22.60000000","q":"44.19000000","b":1487443574,"a":1487443595,"T":1679441181068,"m":true,"M":true}}
1679441181.2224681 : {"stream":"solbusd@bookTicker","data":{"u":2757515354,"s":"SOLBUSD","b":"22.60000000","B":"43.20000000","a":"22.61000000","A":"468.43000000"}}
1679441181.222783 : {"stream":"solbusd@bookTicker","data":{"u":2757515355,"s":"SOLBUSD","b":"22.60000000","B":"194.61000000","a":"22.61000000","A":"468.43000000"}}
1679441181.2231958 : {"stream":"solbusd@bookTicker","data":{"u":2757515356,"s":"SOLBUSD","b":"22.60000000","B":"194.61000000","a":"22.61000000","A":"511.65000000"}}
1679441181.223331 : {"stream":"solbusd@bookTicker","data":{"u":2757515357,"s":"SOLBUSD","b":"22.60000000","B":"194.61000000","a":"22.61000000","A":"725.59000000"}}
1679441181.2242281 : {"stream":"solbusd@bookTicker","data":{"u":2757515358,"s":"SOLBUSD","b":"22.60000000","B":"199.20000000","a":"22.61000000","A":"725.59000000"}}
1679441181.2279198 : {"stream":"solbusd@bookTicker","data":{"u":2757515359,"s":"SOLBUSD","b":"22.60000000","B":"199.20000000","a":"22.61000000","A":"734.62000000"}}
1679441181.2351859 : {"stream":"solbusd@bookTicker","data":{"u":2757515360,"s":"SOLBUSD","b":"22.60000000","B":"199.20000000","a":"22.61000000","A":"754.62000000"}}
1679441181.2904031 : {"stream":"solbusd@bookTicker","data":{"u":2757515363,"s":"SOLBUSD","b":"22.60000000","B":"199.20000000","a":"22.61000000","A":"863.56000000"}}
1679441181.558026 : {"stream":"solbusd@bookTicker","data":{"u":2757515370,"s":"SOLBUSD","b":"22.60000000","B":"199.20000000","a":"22.61000000","A":"865.33000000"}}
1679441181.5681741 : {"stream":"solbusd@bookTicker","data":{"u":2757515371,"s":"SOLBUSD","b":"22.60000000","B":"269.70000000","a":"22.61000000","A":"865.33000000"}}
1679441182.35993 : {"stream":"solbusd@bookTicker","data":{"u":2757515374,"s":"SOLBUSD","b":"22.60000000","B":"199.20000000","a":"22.61000000","A":"865.33000000"}}
1679441182.3763058 : {"stream":"solbusd@bookTicker","data":{"u":2757515376,"s":"SOLBUSD","b":"22.60000000","B":"221.29000000","a":"22.61000000","A":"865.33000000"}}
1679441182.396995 : {"stream":"solbusd@bookTicker","data":{"u":2757515377,"s":"SOLBUSD","b":"22.60000000","B":"199.20000000","a":"22.61000000","A":"865.33000000"}}
1679441182.54904 : {"stream":"solbusd@bookTicker","data":{"u":2757515378,"s":"SOLBUSD","b":"22.60000000","B":"269.70000000","a":"22.61000000","A":"865.33000000"}}
1679441182.946325 : {"stream":"solbusd@bookTicker","data":{"u":2757515379,"s":"SOLBUSD","b":"22.60000000","B":"199.20000000","a":"22.61000000","A":"865.33000000"}}
1679441183.2433972 : {"stream":"solbusd@bookTicker","data":{"u":2757515380,"s":"SOLBUSD","b":"22.60000000","B":"269.70000000","a":"22.61000000","A":"865.33000000"}}
1679441183.355008 : {"stream":"solbusd@bookTicker","data":{"u":2757515381,"s":"SOLBUSD","b":"22.60000000","B":"291.79000000","a":"22.61000000","A":"865.33000000"}}
1679441184.3611462 : {"stream":"solbusd@bookTicker","data":{"u":2757515383,"s":"SOLBUSD","b":"22.60000000","B":"407.30000000","a":"22.61000000","A":"865.33000000"}}
1679441185.754037 : {"stream":"solbusd@bookTicker","data":{"u":2757515386,"s":"SOLBUSD","b":"22.60000000","B":"407.30000000","a":"22.61000000","A":"863.56000000"}}
1679441185.889375 : {"stream":"solbusd@bookTicker","data":{"u":2757515387,"s":"SOLBUSD","b":"22.60000000","B":"461.49000000","a":"22.61000000","A":"863.56000000"}}
1679441186.43463 : {"stream":"solbusd@bookTicker","data":{"u":2757515392,"s":"SOLBUSD","b":"22.60000000","B":"505.68000000","a":"22.61000000","A":"863.56000000"}}
1679441186.558835 : {"stream":"solbusd@bookTicker","data":{"u":2757515393,"s":"SOLBUSD","b":"22.60000000","B":"505.68000000","a":"22.61000000","A":"861.79000000"}}
1679441186.640162 : {"stream":"solbusd@bookTicker","data":{"u":2757515394,"s":"SOLBUSD","b":"22.60000000","B":"536.78000000","a":"22.61000000","A":"861.79000000"}}
1679441186.647561 : {"stream":"solbusd@bookTicker","data":{"u":2757515396,"s":"SOLBUSD","b":"22.60000000","B":"536.78000000","a":"22.61000000","A":"852.76000000"}}
1679441186.660161 : {"stream":"solbusd@bookTicker","data":{"u":2757515397,"s":"SOLBUSD","b":"22.60000000","B":"536.78000000","a":"22.61000000","A":"743.82000000"}}
1679441186.856002 : {"stream":"solbusd@bookTicker","data":{"u":2757515399,"s":"SOLBUSD","b":"22.60000000","B":"536.78000000","a":"22.61000000","A":"726.13000000"}}
1679441187.0588439 : {"stream":"solbusd@bookTicker","data":{"u":2757515402,"s":"SOLBUSD","b":"22.60000000","B":"538.55000000","a":"22.61000000","A":"726.13000000"}}
1679441187.199862 : {"stream":"solbusd@bookTicker","data":{"u":2757515403,"s":"SOLBUSD","b":"22.60000000","B":"540.32000000","a":"22.61000000","A":"726.13000000"}}
1679441189.001569 : {"stream":"solbusd@bookTicker","data":{"u":2757515405,"s":"SOLBUSD","b":"22.60000000","B":"540.32000000","a":"22.61000000","A":"681.95000000"}}
1679441189.026519 : {"stream":"solbusd@bookTicker","data":{"u":2757515407,"s":"SOLBUSD","b":"22.60000000","B":"540.32000000","a":"22.61000000","A":"661.95000000"}}
1679441189.082249 : {"stream":"solbusd@bookTicker","data":{"u":2757515411,"s":"SOLBUSD","b":"22.60000000","B":"587.50000000","a":"22.61000000","A":"661.95000000"}}
1679441189.087908 : {"stream":"solbusd@bookTicker","data":{"u":2757515413,"s":"SOLBUSD","b":"22.60000000","B":"587.50000000","a":"22.61000000","A":"639.86000000"}}
1679441189.1225011 : {"stream":"solbusd@bookTicker","data":{"u":2757515417,"s":"SOLBUSD","b":"22.60000000","B":"596.49000000","a":"22.61000000","A":"639.86000000"}}
1679441189.155346 : {"stream":"solbusd@bookTicker","data":{"u":2757515419,"s":"SOLBUSD","b":"22.60000000","B":"596.49000000","a":"22.61000000","A":"596.64000000"}}
1679441189.155555 : {"stream":"solbusd@bookTicker","data":{"u":2757515420,"s":"SOLBUSD","b":"22.60000000","B":"596.49000000","a":"22.61000000","A":"382.70000000"}}
1679441189.158875 : {"stream":"solbusd@bookTicker","data":{"u":2757515422,"s":"SOLBUSD","b":"22.60000000","B":"596.49000000","a":"22.61000000","A":"322.33000000"}}
1679441189.747564 : {"stream":"solbusd@bookTicker","data":{"u":2757515423,"s":"SOLBUSD","b":"22.60000000","B":"816.49000000","a":"22.61000000","A":"322.33000000"}}
1679441190.849649 : {"stream":"solbusd@bookTicker","data":{"u":2757515438,"s":"SOLBUSD","b":"22.60000000","B":"816.49000000","a":"22.61000000","A":"271.96000000"}}
1679441190.8574982 : {"stream":"solbusd@bookTicker","data":{"u":2757515442,"s":"SOLBUSD","b":"22.60000000","B":"816.49000000","a":"22.61000000","A":"266.96000000"}}
1679441190.858476 : {"stream":"solbusd@bookTicker","data":{"u":2757515443,"s":"SOLBUSD","b":"22.60000000","B":"821.47000000","a":"22.61000000","A":"266.96000000"}}
1679441190.874101 : {"stream":"solbusd@bookTicker","data":{"u":2757515447,"s":"SOLBUSD","b":"22.60000000","B":"821.47000000","a":"22.61000000","A":"157.27000000"}}
1679441190.879039 : {"stream":"solbusd@bookTicker","data":{"u":2757515448,"s":"SOLBUSD","b":"22.60000000","B":"821.47000000","a":"22.61000000","A":"179.35000000"}}
1679441190.887159 : {"stream":"solbusd@bookTicker","data":{"u":2757515452,"s":"SOLBUSD","b":"22.60000000","B":"880.43000000","a":"22.61000000","A":"179.35000000"}}
1679441190.893297 : {"stream":"solbusd@bookTicker","data":{"u":2757515456,"s":"SOLBUSD","b":"22.60000000","B":"923.63000000","a":"22.61000000","A":"179.35000000"}}
1679441190.9041321 : {"stream":"solbusd@bookTicker","data":{"u":2757515459,"s":"SOLBUSD","b":"22.60000000","B":"923.63000000","a":"22.61000000","A":"120.22000000"}}
#issue a buy order with quantity 46.41
1679441190.96578 : {"stream":"solbusd@aggTrade","data":{"e":"aggTrade","E":1679441190819,"s":"SOLBUSD","a":68360441,"p":"22.61000000","q":"46.41000000","f":117277950,"l":117277958,"T":1679441190818,"m":false,"M":true}}
1679441190.96678 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190820,"s":"SOLBUSD","t":117277950,"p":"22.61000000","q":"9.98000000","b":1487443664,"a":1487405457,"T":1679441190818,"m":false,"M":true}}
1679441190.9669042 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190820,"s":"SOLBUSD","t":117277951,"p":"22.61000000","q":"24.63000000","b":1487443664,"a":1487406629,"T":1679441190818,"m":false,"M":true}}
1679441190.967015 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190820,"s":"SOLBUSD","t":117277952,"p":"22.61000000","q":"0.23000000","b":1487443664,"a":1487409825,"T":1679441190818,"m":false,"M":true}}
1679441190.967169 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190820,"s":"SOLBUSD","t":117277953,"p":"22.61000000","q":"0.45000000","b":1487443664,"a":1487409852,"T":1679441190818,"m":false,"M":true}}
1679441190.967289 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190820,"s":"SOLBUSD","t":117277954,"p":"22.61000000","q":"0.93000000","b":1487443664,"a":1487410875,"T":1679441190818,"m":false,"M":true}}
1679441190.9674182 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190820,"s":"SOLBUSD","t":117277955,"p":"22.61000000","q":"0.47000000","b":1487443664,"a":1487411595,"T":1679441190818,"m":false,"M":true}}
1679441190.967542 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190820,"s":"SOLBUSD","t":117277956,"p":"22.61000000","q":"0.51000000","b":1487443664,"a":1487435917,"T":1679441190818,"m":false,"M":true}}
1679441190.9676511 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190820,"s":"SOLBUSD","t":117277957,"p":"22.61000000","q":"0.81000000","b":1487443664,"a":1487435918,"T":1679441190818,"m":false,"M":true}}
1679441190.967757 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190820,"s":"SOLBUSD","t":117277958,"p":"22.61000000","q":"8.40000000","b":1487443664,"a":1487443237,"T":1679441190818,"m":false,"M":true}}
1679441190.96785 : {"stream":"solbusd@bookTicker","data":{"u":2757515477,"s":"SOLBUSD","b":"22.60000000","B":"923.63000000","a":"22.61000000","A":"74.04000000"}}
#issue a buy order with quantity 15.92 >>> 74.04 - 15.92 = 58.12
1679441190.9712682 : {"stream":"solbusd@aggTrade","data":{"e":"aggTrade","E":1679441190825,"s":"SOLBUSD","a":68360442,"p":"22.61000000","q":"15.92000000","f":117277959,"l":117277959,"T":1679441190824,"m":false,"M":true}}
1679441190.9724889 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190825,"s":"SOLBUSD","t":117277959,"p":"22.61000000","q":"15.92000000","b":1487443666,"a":1487443237,"T":1679441190824,"m":false,"M":true}}
1679441190.972616 : {"stream":"solbusd@bookTicker","data":{"u":2757515479,"s":"SOLBUSD","b":"22.60000000","B":"923.63000000","a":"22.61000000","A":"58.12000000"}}
1679441190.974832 : {"stream":"solbusd@bookTicker","data":{"u":2757515484,"s":"SOLBUSD","b":"22.60000000","B":"923.63000000","a":"22.61000000","A":"46.41000000"}}
#issue a buy order with quantity 11.71 >>> 58.12 - 11.71 = 46.41
1679441190.975712 : {"stream":"solbusd@aggTrade","data":{"e":"aggTrade","E":1679441190828,"s":"SOLBUSD","a":68360443,"p":"22.61000000","q":"11.71000000","f":117277960,"l":117277960,"T":1679441190827,"m":false,"M":true}}
1679441190.975851 : {"stream":"solbusd@trade","data":{"e":"trade","E":1679441190828,"s":"SOLBUSD","t":117277960,"p":"22.61000000","q":"11.71000000","b":1487443669,"a":1487443237,"T":1679441190827,"m":false,"M":true}}
1679441191.0393631 : {"stream":"solbusd@bookTicker","data":{"u":2757515485,"s":"SOLBUSD","b":"22.60000000","B":"923.63000000","a":"22.61000000","A":"24.33000000"}}
1679441191.039645 : {"stream":"solbusd@bookTicker","data":{"u":2757515487,"s":"SOLBUSD","b":"22.60000000","B":"923.63000000","a":"22.61000000","A":"27.73000000"}}
1679441191.039831 : {"stream":"solbusd@bookTicker","data":{"u":2757515494,"s":"SOLBUSD","b":"22.60000000","B":"923.63000000","a":"22.61000000","A":"0.26000000"}}