-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
unittest_unicorn_fy.py
executable file
·571 lines (452 loc) · 315 KB
/
unittest_unicorn_fy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# File: unittest_unicorn_fy.py
#
# Part of ‘UnicornFy’
# Project website: https://www.lucit.tech/unicorn-fy.html
# Github: https://github.com/LUCIT-Systems-and-Development/unicorn-fy
# Documentation: https://unicorn-fy.docs.lucit.tech/
# PyPI: https://pypi.org/project/unicorn-fy
# LUCIT Online Shop: https://shop.lucit.services/software
#
# License: LSOSL - LUCIT Synergetic Open Source License
# https://github.com/LUCIT-Systems-and-Development/unicorn-fy/blob/master/LICENSE
#
# Author: LUCIT Systems and Development
#
# Copyright (c) 2019-2023, LUCIT Systems and Development (https://www.lucit.tech)
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish, dis-
# tribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the fol-
# lowing conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
import unicorn_binance_websocket_api
import unicorn_binance_rest_api
from unicorn_fy.unicorn_fy import UnicornFy
import logging
import unittest
import os
import time
import threading
# Todo: Add stream_everything with rest
# https://docs.python.org/3/library/logging.html#logging-levels
logging.basicConfig(level=logging.ERROR,
filename=os.path.basename(__file__) + '.log',
format="{asctime} [{levelname:8}] {process} {thread} {module}: {message}",
style="{")
print("Starting unittests")
def print_stream_data_from_stream_buffer(binance_websocket_api_manager):
while True:
if binance_websocket_api_manager.is_manager_stopping():
exit(0)
oldest_stream_data_from_stream_buffer = binance_websocket_api_manager.pop_stream_data_from_stream_buffer()
if oldest_stream_data_from_stream_buffer is not False:
unicorn_fied_data = UnicornFy.binance_com_websocket(oldest_stream_data_from_stream_buffer)
#print(str(unicorn_fied_data))
else:
time.sleep(0.01)
def print_stream_data_from_stream_buffer_futures(binance_websocket_api_manager):
while True:
if binance_websocket_api_manager.is_manager_stopping():
exit(0)
oldest_stream_data_from_stream_buffer = binance_websocket_api_manager.pop_stream_data_from_stream_buffer()
if oldest_stream_data_from_stream_buffer is not False:
unicorn_fied_data = UnicornFy.binance_com_futures_websocket(oldest_stream_data_from_stream_buffer)
#print(str(unicorn_fied_data))
else:
time.sleep(0.01)
class TestBinanceGeneric(unittest.TestCase):
def setUp(self):
self.unicorn_fy = UnicornFy()
self.unicorn_fy_version = str(self.unicorn_fy.get_version())
self.unicorn_fy.get_latest_release_info()
self.unicorn_fy.get_latest_version()
def test_set_to_false_if_not_exist(self):
value = {'key': '',
'blub': 2}
self.assertEqual(str(self.unicorn_fy.set_to_false_if_not_exist(value, "invalid")),
"{'key': '', 'blub': 2, 'invalid': False}")
def test_is_json(self):
self.assertFalse(self.unicorn_fy.is_json(False))
def test_result(self):
data = '{"result":null,"id":2}'
asserted_result = "{'result': None, 'id': 2, 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_error(self):
data = '{"error":"blahblah"}'
asserted_result = "{'error': 'blahblah', 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_template(self):
data = ''
asserted_result = ""
self.assertEqual(str(self.unicorn_fy.binance_com_margin_websocket(data)), asserted_result)
def tearDown(self):
del self.unicorn_fy
class TestBinanceComWebsocket(unittest.TestCase):
def setUp(self):
self.unicorn_fy = UnicornFy()
self.unicorn_fy_version = str(self.unicorn_fy.get_version())
data = '{"stream":"btcusdt@aggTrade","data":{"e":"aggTrade","E":1592584651517,"s":"BTCUSDT","a":315753210,"p":"9319.00000000","q":"0.01864900","f":343675554,"l":343675554,"T":1592584651516,"m":true,"M":true}}'
self.unicorn_fy.binance_websocket(data, show_deprecated_warning=True)
def test_aggTrade_single(self):
data = '{"stream":"btcusdt@aggTrade","data":{"e":"aggTrade","E":1592584651517,"s":"BTCUSDT","a":315753210,"p":"9319.00000000","q":"0.01864900","f":343675554,"l":343675554,"T":1592584651516,"m":true,"M":true}}'
asserted_result = "{'stream_type': 'btcusdt@aggTrade', 'event_type': 'aggTrade', 'event_time': 1592584651517, 'symbol': 'BTCUSDT', 'aggregate_trade_id': 315753210, 'price': '9319.00000000', 'quantity': '0.01864900', 'first_trade_id': 343675554, 'last_trade_id': 343675554, 'trade_time': 1592584651516, 'is_market_maker': True, 'ignore': True, 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_trade_single(self):
data = '{"stream":"btcusdt@trade","data":{"e":"trade","E":1592591955766,"s":"BTCUSDT","t":343719861,"p":"9302.00000000","q":"0.00101900","b":2517144287,"a":2517144235,"T":1592591955765,"m":false,"M":true}}'
asserted_result = "{'stream_type': 'btcusdt@trade', 'event_type': 'trade', 'event_time': 1592591955766, 'symbol': 'BTCUSDT', 'trade_id': 343719861, 'price': '9302.00000000', 'quantity': '0.00101900', 'buyer_order_id': 2517144287, 'seller_order_id': 2517144235, 'trade_time': 1592591955765, 'is_market_maker': False, 'ignore': True, 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_ticker_single(self):
data = '{"stream":"btcusdt@ticker","data":{"e":"24hrTicker","E":1592593727005,"s":"BTCUSDT","p":"-65.00000000","P":"-0.693","w":"9343.29777965","x":"9383.27000000","c":"9318.48000000","Q":"0.00250000","b":"9318.18000000","B":"0.32000000","a":"9318.47000000","A":"0.35414300","o":"9383.48000000","h":"9438.30000000","l":"9215.79000000","v":"48745.36667100","q":"455442476.18534620","O":1592507327001,"C":1592593727001,"F":343178738,"L":343729077,"n":550340}}'
asserted_result = "{'stream_type': 'btcusdt@ticker', 'event_type': '24hrTicker', 'data': [{'stream_type': 'btcusdt@ticker', 'event_type': '24hrTicker', 'event_time': 1592593727005, 'symbol': 'BTCUSDT', 'price_change': '-65.00000000', 'price_change_percent': '-0.693', 'weighted_average_price': '9343.29777965', 'trade_before_24h_window': '9383.27000000', 'last_price': '9318.48000000', 'last_quantity': '0.00250000', 'best_bid_price': '9318.18000000', 'best_bid_quantity': '0.32000000', 'best_ask_price': '9318.47000000', 'best_ask_quantity': '0.35414300', 'open_price': '9383.48000000', 'high_price': '9438.30000000', 'low_price': '9215.79000000', 'total_traded_base_asset_volume': '48745.36667100', 'total_traded_quote_asset_volume': '455442476.18534620', 'statistics_open_time': 1592507327001, 'statistics_close_time': 1592593727001, 'first_trade_id': 343178738, 'last_trade_id': 343729077, 'total_nr_of_trades': 550340}], 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_miniTicker_arr(self):
data = '[{"e":"24hrMiniTicker","E":1592594715455,"s":"ETHBTC","c":"0.02456700","o":"0.02459800","h":"0.02470900","l":"0.02438100","v":"163116.18600000","q":"4006.04936991"},{"e":"24hrMiniTicker","E":1592594715775,"s":"BTCUSDT","c":"9342.70000000","o":"9393.74000000","h":"9438.30000000","l":"9215.79000000","v":"47798.03832300","q":"446546826.58722200"},{"e":"24hrMiniTicker","E":1592594715488,"s":"ETHUSDT","c":"229.47000000","o":"231.06000000","h":"232.69000000","l":"226.74000000","v":"439855.40218000","q":"100960868.33504020"},{"e":"24hrMiniTicker","E":1592594715714,"s":"LINKBTC","c":"0.00043725","o":"0.00044065","h":"0.00044673","l":"0.00043490","v":"1034299.00000000","q":"456.44873499"},{"e":"24hrMiniTicker","E":1592594715746,"s":"LINKETH","c":"0.01781759","o":"0.01789017","h":"0.01817306","l":"0.01770212","v":"75699.00000000","q":"1359.70614144"},{"e":"24hrMiniTicker","E":1592594715757,"s":"ETCBTC","c":"0.00068510","o":"0.00065590","h":"0.00068720","l":"0.00065400","v":"283704.17000000","q":"190.31163530"},{"e":"24hrMiniTicker","E":1592594715436,"s":"TRXETH","c":"0.00006977","o":"0.00006925","h":"0.00006999","l":"0.00006898","v":"57356284.00000000","q":"3980.89377161"},{"e":"24hrMiniTicker","E":1592594715681,"s":"TNBBTC","c":"0.00000031","o":"0.00000029","h":"0.00000031","l":"0.00000028","v":"334919689.00000000","q":"97.62568721"},{"e":"24hrMiniTicker","E":1592594715454,"s":"ELFBTC","c":"0.00001121","o":"0.00001105","h":"0.00001134","l":"0.00001052","v":"7105620.00000000","q":"78.17667453"},{"e":"24hrMiniTicker","E":1592594715442,"s":"ELFETH","c":"0.00045625","o":"0.00045000","h":"0.00046193","l":"0.00042902","v":"261232.00000000","q":"116.09339754"},{"e":"24hrMiniTicker","E":1592594715696,"s":"RLCBTC","c":"0.00006922","o":"0.00005916","h":"0.00007305","l":"0.00005752","v":"7289087.00000000","q":"493.31904576"},{"e":"24hrMiniTicker","E":1592594714915,"s":"ADAUSDT","c":"0.08013000","o":"0.08099000","h":"0.08239000","l":"0.07844000","v":"297708746.40000000","q":"23902853.53009500"},{"e":"24hrMiniTicker","E":1592594715812,"s":"DATABTC","c":"0.00000585","o":"0.00000584","h":"0.00000618","l":"0.00000570","v":"12724161.00000000","q":"75.51506149"},{"e":"24hrMiniTicker","E":1592594715768,"s":"ETCUSDT","c":"6.40130000","o":"6.16160000","h":"6.42130000","l":"6.09630000","v":"1368917.75000000","q":"8580762.83062200"},{"e":"24hrMiniTicker","E":1592594715388,"s":"FETUSDT","c":"0.03144000","o":"0.03100000","h":"0.03188000","l":"0.02923000","v":"225670248.30000000","q":"6911155.91613500"},{"e":"24hrMiniTicker","E":1592594714974,"s":"BATUSDT","c":"0.21920000","o":"0.21810000","h":"0.22300000","l":"0.21390000","v":"7422701.22000000","q":"1619349.76348900"},{"e":"24hrMiniTicker","E":1592594715293,"s":"IOSTUSDT","c":"0.00578900","o":"0.00568200","h":"0.00605200","l":"0.00557400","v":"1610340020.00000000","q":"9367137.54193700"},{"e":"24hrMiniTicker","E":1592594715370,"s":"ERDBTC","c":"0.00000057","o":"0.00000047","h":"0.00000059","l":"0.00000044","v":"2092244908.00000000","q":"1087.58437768"},{"e":"24hrMiniTicker","E":1592594715719,"s":"TOMOBNB","c":"0.02937000","o":"0.02784000","h":"0.02937000","l":"0.02705000","v":"98503.20000000","q":"2766.91140800"},{"e":"24hrMiniTicker","E":1592594715796,"s":"TOMOBTC","c":"0.00005045","o":"0.00004779","h":"0.00005048","l":"0.00004652","v":"2978511.00000000","q":"144.42861171"},{"e":"24hrMiniTicker","E":1592594715535,"s":"TOMOUSDT","c":"0.46920000","o":"0.44930000","h":"0.47170000","l":"0.43000000","v":"2175928.92000000","q":"983414.94253100"},{"e":"24hrMiniTicker","E":1592594715403,"s":"BEAMUSDT","c":"0.50340000","o":"0.49170000","h":"0.53000000","l":"0.48070000","v":"2266897.49000000","q":"1148328.48354700"},{"e":"24hrMiniTicker","E":1592594715042,"s":"VITEBTC","c":"0.00000190","o":"0.00000184","h":"0.00000195","l":"0.00000173","v":"35965553.00000000","q":"66.24169781"},{"e":"24hrMiniTicker","E":1592594715034,"s":"VITEUSDT","c":"0.01773000","o":"0.01730000","h":"0.01821000","l":"0.01606000","v":"15621038.00000000","q":"268307.71989000"},{"e":"24hrMiniTicker","E":1592594715251,"s":"MBLBNB","c":"0.00011700","o":"0.00011350","h":"0.00011880","l":"0.00010980","v":"83375259.00000000","q":"9505.73917390"},{"e":"24hrMiniTicker","E":1592594715431,"s":"KNCUSDT","c":"1.19900000","o":"1.15600000","h":"1.22400000","l":"1.14000000","v":"939178.01300000","q":"1109490.22233400"}]'
asserted_result = "{'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'data': [{'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715455, 'symbol': 'ETHBTC', 'close_price': '0.02456700', 'open_price': '0.02459800', 'high_price': '0.02470900', 'low_price': '0.02438100', 'taker_by_base_asset_volume': '163116.18600000', 'taker_by_quote_asset_volume': '4006.04936991'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715775, 'symbol': 'BTCUSDT', 'close_price': '9342.70000000', 'open_price': '9393.74000000', 'high_price': '9438.30000000', 'low_price': '9215.79000000', 'taker_by_base_asset_volume': '47798.03832300', 'taker_by_quote_asset_volume': '446546826.58722200'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715488, 'symbol': 'ETHUSDT', 'close_price': '229.47000000', 'open_price': '231.06000000', 'high_price': '232.69000000', 'low_price': '226.74000000', 'taker_by_base_asset_volume': '439855.40218000', 'taker_by_quote_asset_volume': '100960868.33504020'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715714, 'symbol': 'LINKBTC', 'close_price': '0.00043725', 'open_price': '0.00044065', 'high_price': '0.00044673', 'low_price': '0.00043490', 'taker_by_base_asset_volume': '1034299.00000000', 'taker_by_quote_asset_volume': '456.44873499'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715746, 'symbol': 'LINKETH', 'close_price': '0.01781759', 'open_price': '0.01789017', 'high_price': '0.01817306', 'low_price': '0.01770212', 'taker_by_base_asset_volume': '75699.00000000', 'taker_by_quote_asset_volume': '1359.70614144'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715757, 'symbol': 'ETCBTC', 'close_price': '0.00068510', 'open_price': '0.00065590', 'high_price': '0.00068720', 'low_price': '0.00065400', 'taker_by_base_asset_volume': '283704.17000000', 'taker_by_quote_asset_volume': '190.31163530'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715436, 'symbol': 'TRXETH', 'close_price': '0.00006977', 'open_price': '0.00006925', 'high_price': '0.00006999', 'low_price': '0.00006898', 'taker_by_base_asset_volume': '57356284.00000000', 'taker_by_quote_asset_volume': '3980.89377161'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715681, 'symbol': 'TNBBTC', 'close_price': '0.00000031', 'open_price': '0.00000029', 'high_price': '0.00000031', 'low_price': '0.00000028', 'taker_by_base_asset_volume': '334919689.00000000', 'taker_by_quote_asset_volume': '97.62568721'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715454, 'symbol': 'ELFBTC', 'close_price': '0.00001121', 'open_price': '0.00001105', 'high_price': '0.00001134', 'low_price': '0.00001052', 'taker_by_base_asset_volume': '7105620.00000000', 'taker_by_quote_asset_volume': '78.17667453'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715442, 'symbol': 'ELFETH', 'close_price': '0.00045625', 'open_price': '0.00045000', 'high_price': '0.00046193', 'low_price': '0.00042902', 'taker_by_base_asset_volume': '261232.00000000', 'taker_by_quote_asset_volume': '116.09339754'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715696, 'symbol': 'RLCBTC', 'close_price': '0.00006922', 'open_price': '0.00005916', 'high_price': '0.00007305', 'low_price': '0.00005752', 'taker_by_base_asset_volume': '7289087.00000000', 'taker_by_quote_asset_volume': '493.31904576'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594714915, 'symbol': 'ADAUSDT', 'close_price': '0.08013000', 'open_price': '0.08099000', 'high_price': '0.08239000', 'low_price': '0.07844000', 'taker_by_base_asset_volume': '297708746.40000000', 'taker_by_quote_asset_volume': '23902853.53009500'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715812, 'symbol': 'DATABTC', 'close_price': '0.00000585', 'open_price': '0.00000584', 'high_price': '0.00000618', 'low_price': '0.00000570', 'taker_by_base_asset_volume': '12724161.00000000', 'taker_by_quote_asset_volume': '75.51506149'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715768, 'symbol': 'ETCUSDT', 'close_price': '6.40130000', 'open_price': '6.16160000', 'high_price': '6.42130000', 'low_price': '6.09630000', 'taker_by_base_asset_volume': '1368917.75000000', 'taker_by_quote_asset_volume': '8580762.83062200'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715388, 'symbol': 'FETUSDT', 'close_price': '0.03144000', 'open_price': '0.03100000', 'high_price': '0.03188000', 'low_price': '0.02923000', 'taker_by_base_asset_volume': '225670248.30000000', 'taker_by_quote_asset_volume': '6911155.91613500'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594714974, 'symbol': 'BATUSDT', 'close_price': '0.21920000', 'open_price': '0.21810000', 'high_price': '0.22300000', 'low_price': '0.21390000', 'taker_by_base_asset_volume': '7422701.22000000', 'taker_by_quote_asset_volume': '1619349.76348900'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715293, 'symbol': 'IOSTUSDT', 'close_price': '0.00578900', 'open_price': '0.00568200', 'high_price': '0.00605200', 'low_price': '0.00557400', 'taker_by_base_asset_volume': '1610340020.00000000', 'taker_by_quote_asset_volume': '9367137.54193700'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715370, 'symbol': 'ERDBTC', 'close_price': '0.00000057', 'open_price': '0.00000047', 'high_price': '0.00000059', 'low_price': '0.00000044', 'taker_by_base_asset_volume': '2092244908.00000000', 'taker_by_quote_asset_volume': '1087.58437768'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715719, 'symbol': 'TOMOBNB', 'close_price': '0.02937000', 'open_price': '0.02784000', 'high_price': '0.02937000', 'low_price': '0.02705000', 'taker_by_base_asset_volume': '98503.20000000', 'taker_by_quote_asset_volume': '2766.91140800'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715796, 'symbol': 'TOMOBTC', 'close_price': '0.00005045', 'open_price': '0.00004779', 'high_price': '0.00005048', 'low_price': '0.00004652', 'taker_by_base_asset_volume': '2978511.00000000', 'taker_by_quote_asset_volume': '144.42861171'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715535, 'symbol': 'TOMOUSDT', 'close_price': '0.46920000', 'open_price': '0.44930000', 'high_price': '0.47170000', 'low_price': '0.43000000', 'taker_by_base_asset_volume': '2175928.92000000', 'taker_by_quote_asset_volume': '983414.94253100'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715403, 'symbol': 'BEAMUSDT', 'close_price': '0.50340000', 'open_price': '0.49170000', 'high_price': '0.53000000', 'low_price': '0.48070000', 'taker_by_base_asset_volume': '2266897.49000000', 'taker_by_quote_asset_volume': '1148328.48354700'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715042, 'symbol': 'VITEBTC', 'close_price': '0.00000190', 'open_price': '0.00000184', 'high_price': '0.00000195', 'low_price': '0.00000173', 'taker_by_base_asset_volume': '35965553.00000000', 'taker_by_quote_asset_volume': '66.24169781'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715034, 'symbol': 'VITEUSDT', 'close_price': '0.01773000', 'open_price': '0.01730000', 'high_price': '0.01821000', 'low_price': '0.01606000', 'taker_by_base_asset_volume': '15621038.00000000', 'taker_by_quote_asset_volume': '268307.71989000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715251, 'symbol': 'MBLBNB', 'close_price': '0.00011700', 'open_price': '0.00011350', 'high_price': '0.00011880', 'low_price': '0.00010980', 'taker_by_base_asset_volume': '83375259.00000000', 'taker_by_quote_asset_volume': '9505.73917390'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1592594715431, 'symbol': 'KNCUSDT', 'close_price': '1.19900000', 'open_price': '1.15600000', 'high_price': '1.22400000', 'low_price': '1.14000000', 'taker_by_base_asset_volume': '939178.01300000', 'taker_by_quote_asset_volume': '1109490.22233400'}], 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_miniTicker_single(self):
data = '{"stream":"btcusdt@miniTicker","data":{"e":"24hrMiniTicker","E":1601628771865,"s":"BTCUSDT","c":"10456.56000000","o":"10884.90000000","h":"10912.83000000","l":"10385.02000000","v":"64483.09756200","q":"685180788.34970800"}}'
asserted_result = "{'stream_type': 'btcusdt@miniTicker', 'event_type': '24hrMiniTicker', 'data': [{'stream_type': 'btcusdt@miniTicker', 'event_type': '24hrMiniTicker', 'event_time': 1601628771865, 'symbol': 'BTCUSDT', 'close_price': '10456.56000000', 'open_price': '10884.90000000', 'high_price': '10912.83000000', 'low_price': '10385.02000000', 'taker_by_base_asset_volume': '64483.09756200', 'taker_by_quote_asset_volume': '685180788.34970800'}], 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_kline_1m(self):
data = '{"stream":"btcusdt@kline_1m","data":{"e":"kline","E":1601630228469,"s":"BTCUSDT","k":{"t":1601630220000,"T":1601630279999,"s":"BTCUSDT","i":"1m","f":427033476,"L":427033658,"o":"10437.32000000","c":"10441.80000000","h":"10441.80000000","l":"10437.32000000","v":"20.63957400","n":183,"x":false,"q":"215452.69236872","V":"19.31210700","Q":"201593.99488069","B":"0"}}}'
asserted_result = "{'stream_type': 'btcusdt@kline_1m', 'event_type': 'kline', 'event_time': 1601630228469, 'symbol': 'BTCUSDT', 'kline': {'kline_start_time': 1601630220000, 'kline_close_time': 1601630279999, 'symbol': 'BTCUSDT', 'interval': '1m', 'first_trade_id': False, 'last_trade_id': False, 'open_price': '10437.32000000', 'close_price': '10441.80000000', 'high_price': '10441.80000000', 'low_price': '10437.32000000', 'base_volume': '20.63957400', 'number_of_trades': 183, 'is_closed': False, 'quote': '215452.69236872', 'taker_by_base_asset_volume': '19.31210700', 'taker_by_quote_asset_volume': '201593.99488069', 'ignore': '0'}, 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_listStatus(self):
data = '{"e":"listStatus","E":1606946194410,"s":"ETHUSDT","g":10717037,"c":"OCO","l":"ALL_DONE","L":"ALL_DONE","r":"NONE","C":"i8B7NXuB37QkJ2Vy8f5KHh","T":1606946194409,"O":[{"s":"ETHUSDT","i":2175939815,"c":"electron_648187c31bda49b6a2e81d23ae0"},{"s":"ETHUSDT","i":2175939816,"c":"84wruoWCZdkBUqbqlKfpv6"}]}'
asserted_result = "{'stream_type': 'ethusdt@listStatus', 'event_type': 'listStatus', 'event_time': 1606946194410, 'symbol': 'ETHUSDT', 'order_list_id': 10717037, 'contingency_type': 'OCO', 'list_status_type': 'ALL_DONE', 'list_order_status': 'ALL_DONE', 'list_reject_reason': 'NONE', 'list_client_order_id': 'i8B7NXuB37QkJ2Vy8f5KHh', 'transaction_time': 1606946194409, 'objects': [{'symbol': 'ETHUSDT', 'order_id': 2175939815, 'client_order_id': 'electron_648187c31bda49b6a2e81d23ae0'}, {'symbol': 'ETHUSDT', 'order_id': 2175939816, 'client_order_id': '84wruoWCZdkBUqbqlKfpv6'}], 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_balanceUpdate(self):
data = '{"e":"balanceUpdate","E":1615926131286,"a":"USDT","d":"1.00000000","T":1615926131285}'
asserted_result = "{'stream_type': '!userData@arr', 'event_type': 'balanceUpdate', 'event_time': 1615926131286, 'asset': 'USDT', 'balance_delta': '1.00000000', 'clear_time': 1615926131285, 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_template(self):
data = ''
asserted_result = "" + self.unicorn_fy_version + "']}"
#self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def tearDown(self):
del self.unicorn_fy
class TestBinanceComWebsocketFutures(unittest.TestCase):
def setUp(self):
self.unicorn_fy = UnicornFy()
self.unicorn_fy_version = str(self.unicorn_fy.get_version())
self.unicorn_fy.binance_futures_websocket("data", show_deprecated_warning=True)
def test_update(self):
result = self.unicorn_fy.is_update_available()
is_valid_result = result is True or result is False
self.assertTrue(is_valid_result, False)
def test_with_non_json(self):
self.unicorn_fy.binance_futures_websocket(False)
def test_result(self):
data = '{"result":null,"id":2}'
asserted_result = "{'result': None, 'id': 2, 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_error(self):
data = '{"error":"blahblah"}'
asserted_result = "{'error': 'blahblah', 'unicorn_fied': ['binance.com', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_websocket(data)), asserted_result)
def test_aggTrade_single(self):
data = '{"stream":"btcusdt@aggTrade","data":{"e":"aggTrade","E":1592584651517,"s":"BTCUSDT","a":315753210,"p":"9319.00000000","q":"0.01864900","f":343675554,"l":343675554,"T":1592584651516,"m":true,"M":true}}'
asserted_result = "{'stream_type': 'btcusdt@aggTrade', 'event_type': 'aggTrade', 'event_time': 1592584651517, 'symbol': 'BTCUSDT', 'aggregate_trade_id': 315753210, 'price': '9319.00000000', 'quantity': '0.01864900', 'first_trade_id': 343675554, 'last_trade_id': 343675554, 'trade_time': 1592584651516, 'is_market_maker': True, 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_miniTicker_arr(self):
data = '[{"e":"24hrMiniTicker","E":1654791477302,"s":"IOTXUSDT","c":"0.03454","o":"0.03468","h":"0.03514","l":"0.03326","v":"239547480","q":"8205498.12000"},{"e":"24hrMiniTicker","E":1654791477696,"s":"BTCUSDT","c":"30176.90","o":"30512.00","h":"30691.90","l":"29900.00","v":"315372.462","q":"9541424594.18"},{"e":"24hrMiniTicker","E":1654791477956,"s":"ETHUSDT","c":"1791.45","o":"1819.39","h":"1832.70","l":"1770.54","v":"1943053.624","q":"3495018572.69"},{"e":"24hrMiniTicker","E":1654791477444,"s":"MASKUSDT","c":"1.8360","o":"1.8650","h":"2.0050","l":"1.7890","v":"28916646","q":"54364161.0400"},{"e":"24hrMiniTicker","E":1654791477295,"s":"ATAUSDT","c":"0.2055","o":"0.1965","h":"0.2799","l":"0.1927","v":"2072187993","q":"474299914.3400"},{"e":"24hrMiniTicker","E":1654791478146,"s":"LINKUSDT","c":"9.342","o":"8.595","h":"9.567","l":"8.417","v":"63491712.45","q":"570747708.760"},{"e":"24hrMiniTicker","E":1654791477823,"s":"GALAUSDT","c":"0.07635","o":"0.07979","h":"0.07992","l":"0.07365","v":"2974073816","q":"226648693.23000"},{"e":"24hrMiniTicker","E":1654791477505,"s":"XLMUSDT","c":"0.13993","o":"0.14359","h":"0.14368","l":"0.13813","v":"173863052","q":"24403470.08000"},{"e":"24hrMiniTicker","E":1654791477961,"s":"ADAUSDT","c":"0.63660","o":"0.66630","h":"0.66640","l":"0.62540","v":"1182818236","q":"762080169.44000"},{"e":"24hrMiniTicker","E":1654791477271,"s":"XTZUSDT","c":"2.221","o":"2.058","h":"2.264","l":"2.003","v":"73658189.8","q":"158587238.420"},{"e":"24hrMiniTicker","E":1654791477409,"s":"BNBUSDT","c":"290.270","o":"292.880","h":"293.350","l":"285.960","v":"1023167.23","q":"296161105.580"},{"e":"24hrMiniTicker","E":1654791478034,"s":"CTSIUSDT","c":"0.2322","o":"0.2379","h":"0.2483","l":"0.2277","v":"231535318","q":"54897811.8200"},{"e":"24hrMiniTicker","E":1654791477699,"s":"PEOPLEUSDT","c":"0.02152","o":"0.02222","h":"0.02230","l":"0.02042","v":"4333882899","q":"92714973.49000"},{"e":"24hrMiniTicker","E":1654791478176,"s":"VETUSDT","c":"0.031590","o":"0.030760","h":"0.032630","l":"0.029850","v":"2914600677","q":"90889586.480000"},{"e":"24hrMiniTicker","E":1654791477344,"s":"ROSEUSDT","c":"0.06672","o":"0.06734","h":"0.06812","l":"0.06487","v":"331382177","q":"21993313.11000"},{"e":"24hrMiniTicker","E":1654791477344,"s":"IOSTUSDT","c":"0.016814","o":"0.017053","h":"0.017079","l":"0.016662","v":"628508231","q":"10579136.480000"},{"e":"24hrMiniTicker","E":1654791477633,"s":"THETAUSDT","c":"1.4200","o":"1.3480","h":"1.4670","l":"1.3030","v":"137858755.1","q":"190739596.9800"},{"e":"24hrMiniTicker","E":1654791478238,"s":"API3USDT","c":"1.6050","o":"1.5050","h":"1.6300","l":"1.3930","v":"12446068.2","q":"18522370.9400"},{"e":"24hrMiniTicker","E":1654791478111,"s":"GMTUSDT","c":"0.99020","o":"1.00100","h":"1.04830","l":"0.94940","v":"686986677","q":"684048320.48000"},{"e":"24hrMiniTicker","E":1654791477541,"s":"KAVAUSDT","c":"2.5703","o":"2.6290","h":"2.7298","l":"2.5174","v":"14485616.9","q":"37938380.0800"},{"e":"24hrMiniTicker","E":1654791478222,"s":"BANDUSDT","c":"2.3498","o":"1.7159","h":"2.5362","l":"1.6322","v":"101982687.2","q":"212894152.8500"},{"e":"24hrMiniTicker","E":1654791478143,"s":"DARUSDT","c":"0.4217","o":"0.4271","h":"0.4363","l":"0.4142","v":"33840120.9","q":"14269747.5900"},{"e":"24hrMiniTicker","E":1654791478108,"s":"RLCUSDT","c":"0.9440","o":"0.9269","h":"0.9665","l":"0.8753","v":"26508267.3","q":"24515542.4700"},{"e":"24hrMiniTicker","E":1654791477709,"s":"WAVESUSDT","c":"7.7170","o":"7.9170","h":"7.9870","l":"7.6080","v":"33638249.2","q":"261321813.4500"},{"e":"24hrMiniTicker","E":1654791478022,"s":"GALUSDT","c":"3.91310","o":"4.14970","h":"4.17700","l":"3.79730","v":"15860513","q":"63394380.45000"},{"e":"24hrMiniTicker","E":1654791478236,"s":"DOTUSDT","c":"9.357","o":"9.142","h":"9.441","l":"8.879","v":"23530544.9","q":"215520039.530"},{"e":"24hrMiniTicker","E":1654791478246,"s":"1000LUNCBUSD","c":"0.0721000","o":"0.0596000","h":"0.0880000","l":"0.0349000","v":"6878775288","q":"440826743.1200000"},{"e":"24hrMiniTicker","E":1654791477812,"s":"CRVUSDT","c":"1.150","o":"1.187","h":"1.187","l":"1.132","v":"44202510.4","q":"51156567.430"},{"e":"24hrMiniTicker","E":1654791478227,"s":"LUNA2BUSD","c":"2.7786000","o":"3.4796000","h":"3.4900000","l":"1.7645000","v":"545842069","q":"1465147176.3600000"},{"e":"24hrMiniTicker","E":1654791477907,"s":"OPUSDT","c":"0.8103000","o":"0.9915000","h":"0.9974000","l":"0.6968000","v":"546738907.2","q":"457061216.8100000"},{"e":"24hrMiniTicker","E":1654791478106,"s":"TLMBUSD","c":"0.0365800","o":"0.0323600","h":"0.0403000","l":"0.0323600","v":"506486378","q":"18645064.9400000"},{"e":"24hrMiniTicker","E":1654791477905,"s":"RUNEUSDT","c":"2.8860","o":"2.9150","h":"2.9670","l":"2.8020","v":"21661759","q":"62422922.5200"},{"e":"24hrMiniTicker","E":1654791477665,"s":"STORJUSDT","c":"0.5660","o":"0.5839","h":"0.5849","l":"0.5564","v":"17087554","q":"9693979.5100"},{"e":"24hrMiniTicker","E":1654791478254,"s":"BLZUSDT","c":"0.17302","o":"0.15494","h":"0.19329","l":"0.14126","v":"2893256743","q":"487656931.04000"},{"e":"24hrMiniTicker","E":1654791477578,"s":"AVAXUSDT","c":"24.6800","o":"24.6600","h":"25.2700","l":"23.7000","v":"15405300","q":"377118434.5300"},{"e":"24hrMiniTicker","E":1654791477346,"s":"HNTUSDT","c":"11.5930","o":"10.9270","h":"12.3920","l":"10.5010","v":"11380753","q":"129078832.1700"},{"e":"24hrMiniTicker","E":1654791477325,"s":"KSMUSDT","c":"67.520","o":"66.820","h":"68.350","l":"65.370","v":"253445.4","q":"16925174.320"},{"e":"24hrMiniTicker","E":1654791478057,"s":"MATICUSDT","c":"0.62940","o":"0.61700","h":"0.63640","l":"0.60050","v":"179530932","q":"111003831.28000"},{"e":"24hrMiniTicker","E":1654791478243,"s":"OCEANUSDT","c":"0.30734","o":"0.28031","h":"0.31989","l":"0.26469","v":"517465486","q":"152604120.22000"},{"e":"24hrMiniTicker","E":1654791477679,"s":"1INCHUSDT","c":"0.8063","o":"0.8354","h":"0.8361","l":"0.8006","v":"25250374","q":"20622902.5000"},{"e":"24hrMiniTicker","E":1654791478100,"s":"SANDUSDT","c":"1.29570","o":"1.31180","h":"1.32310","l":"1.28060","v":"78716297","q":"102364317.41000"},{"e":"24hrMiniTicker","E":1654791478125,"s":"LITUSDT","c":"0.810","o":"0.857","h":"1.333","l":"0.759","v":"709918463.5","q":"730764518.080"},{"e":"24hrMiniTicker","E":1654791478182,"s":"UNFIUSDT","c":"9.045","o":"9.792","h":"10.400","l":"7.158","v":"161775069.7","q":"1398031170.530"},{"e":"24hrMiniTicker","E":1654791477696,"s":"COTIUSDT","c":"0.13218","o":"0.14155","h":"0.14492","l":"0.13001","v":"685977764","q":"94843132.79000"},{"e":"24hrMiniTicker","E":1654791477266,"s":"ALICEUSDT","c":"2.956","o":"2.911","h":"2.999","l":"2.754","v":"23952685.4","q":"68619593.400"},{"e":"24hrMiniTicker","E":1654791477701,"s":"LINAUSDT","c":"0.01136","o":"0.01138","h":"0.01214","l":"0.01052","v":"5666769320","q":"63121087.15000"},{"e":"24hrMiniTicker","E":1654791478197,"s":"MTLUSDT","c":"1.9017","o":"1.7243","h":"2.0000","l":"1.6710","v":"157519143","q":"292435423.6600"},{"e":"24hrMiniTicker","E":1654791478076,"s":"OGNUSDT","c":"0.2695","o":"0.2810","h":"0.2822","l":"0.2567","v":"217171422","q":"58962113.6600"},{"e":"24hrMiniTicker","E":1654791477478,"s":"NKNUSDT","c":"0.10111","o":"0.10478","h":"0.10576","l":"0.09755","v":"152513593","q":"15468509.58000"},{"e":"24hrMiniTicker","E":1654791478176,"s":"DGBUSDT","c":"0.01254","o":"0.01209","h":"0.01305","l":"0.01167","v":"1052331478","q":"12892668.87000"},{"e":"24hrMiniTicker","E":1654791477417,"s":"ETHBUSD","c":"1789.76","o":"1818.09","h":"1830.95","l":"1769.08","v":"315614.214","q":"567162885.47"}]'
asserted_result = "{'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'data': [{'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477302, 'symbol': 'IOTXUSDT', 'close_price': '0.03454', 'open_price': '0.03468', 'high_price': '0.03514', 'low_price': '0.03326', 'total_traded_base_asset_volume': '239547480', 'total_traded_quote_asset_volume': '8205498.12000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477696, 'symbol': 'BTCUSDT', 'close_price': '30176.90', 'open_price': '30512.00', 'high_price': '30691.90', 'low_price': '29900.00', 'total_traded_base_asset_volume': '315372.462', 'total_traded_quote_asset_volume': '9541424594.18'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477956, 'symbol': 'ETHUSDT', 'close_price': '1791.45', 'open_price': '1819.39', 'high_price': '1832.70', 'low_price': '1770.54', 'total_traded_base_asset_volume': '1943053.624', 'total_traded_quote_asset_volume': '3495018572.69'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477444, 'symbol': 'MASKUSDT', 'close_price': '1.8360', 'open_price': '1.8650', 'high_price': '2.0050', 'low_price': '1.7890', 'total_traded_base_asset_volume': '28916646', 'total_traded_quote_asset_volume': '54364161.0400'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477295, 'symbol': 'ATAUSDT', 'close_price': '0.2055', 'open_price': '0.1965', 'high_price': '0.2799', 'low_price': '0.1927', 'total_traded_base_asset_volume': '2072187993', 'total_traded_quote_asset_volume': '474299914.3400'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478146, 'symbol': 'LINKUSDT', 'close_price': '9.342', 'open_price': '8.595', 'high_price': '9.567', 'low_price': '8.417', 'total_traded_base_asset_volume': '63491712.45', 'total_traded_quote_asset_volume': '570747708.760'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477823, 'symbol': 'GALAUSDT', 'close_price': '0.07635', 'open_price': '0.07979', 'high_price': '0.07992', 'low_price': '0.07365', 'total_traded_base_asset_volume': '2974073816', 'total_traded_quote_asset_volume': '226648693.23000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477505, 'symbol': 'XLMUSDT', 'close_price': '0.13993', 'open_price': '0.14359', 'high_price': '0.14368', 'low_price': '0.13813', 'total_traded_base_asset_volume': '173863052', 'total_traded_quote_asset_volume': '24403470.08000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477961, 'symbol': 'ADAUSDT', 'close_price': '0.63660', 'open_price': '0.66630', 'high_price': '0.66640', 'low_price': '0.62540', 'total_traded_base_asset_volume': '1182818236', 'total_traded_quote_asset_volume': '762080169.44000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477271, 'symbol': 'XTZUSDT', 'close_price': '2.221', 'open_price': '2.058', 'high_price': '2.264', 'low_price': '2.003', 'total_traded_base_asset_volume': '73658189.8', 'total_traded_quote_asset_volume': '158587238.420'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477409, 'symbol': 'BNBUSDT', 'close_price': '290.270', 'open_price': '292.880', 'high_price': '293.350', 'low_price': '285.960', 'total_traded_base_asset_volume': '1023167.23', 'total_traded_quote_asset_volume': '296161105.580'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478034, 'symbol': 'CTSIUSDT', 'close_price': '0.2322', 'open_price': '0.2379', 'high_price': '0.2483', 'low_price': '0.2277', 'total_traded_base_asset_volume': '231535318', 'total_traded_quote_asset_volume': '54897811.8200'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477699, 'symbol': 'PEOPLEUSDT', 'close_price': '0.02152', 'open_price': '0.02222', 'high_price': '0.02230', 'low_price': '0.02042', 'total_traded_base_asset_volume': '4333882899', 'total_traded_quote_asset_volume': '92714973.49000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478176, 'symbol': 'VETUSDT', 'close_price': '0.031590', 'open_price': '0.030760', 'high_price': '0.032630', 'low_price': '0.029850', 'total_traded_base_asset_volume': '2914600677', 'total_traded_quote_asset_volume': '90889586.480000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477344, 'symbol': 'ROSEUSDT', 'close_price': '0.06672', 'open_price': '0.06734', 'high_price': '0.06812', 'low_price': '0.06487', 'total_traded_base_asset_volume': '331382177', 'total_traded_quote_asset_volume': '21993313.11000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477344, 'symbol': 'IOSTUSDT', 'close_price': '0.016814', 'open_price': '0.017053', 'high_price': '0.017079', 'low_price': '0.016662', 'total_traded_base_asset_volume': '628508231', 'total_traded_quote_asset_volume': '10579136.480000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477633, 'symbol': 'THETAUSDT', 'close_price': '1.4200', 'open_price': '1.3480', 'high_price': '1.4670', 'low_price': '1.3030', 'total_traded_base_asset_volume': '137858755.1', 'total_traded_quote_asset_volume': '190739596.9800'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478238, 'symbol': 'API3USDT', 'close_price': '1.6050', 'open_price': '1.5050', 'high_price': '1.6300', 'low_price': '1.3930', 'total_traded_base_asset_volume': '12446068.2', 'total_traded_quote_asset_volume': '18522370.9400'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478111, 'symbol': 'GMTUSDT', 'close_price': '0.99020', 'open_price': '1.00100', 'high_price': '1.04830', 'low_price': '0.94940', 'total_traded_base_asset_volume': '686986677', 'total_traded_quote_asset_volume': '684048320.48000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477541, 'symbol': 'KAVAUSDT', 'close_price': '2.5703', 'open_price': '2.6290', 'high_price': '2.7298', 'low_price': '2.5174', 'total_traded_base_asset_volume': '14485616.9', 'total_traded_quote_asset_volume': '37938380.0800'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478222, 'symbol': 'BANDUSDT', 'close_price': '2.3498', 'open_price': '1.7159', 'high_price': '2.5362', 'low_price': '1.6322', 'total_traded_base_asset_volume': '101982687.2', 'total_traded_quote_asset_volume': '212894152.8500'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478143, 'symbol': 'DARUSDT', 'close_price': '0.4217', 'open_price': '0.4271', 'high_price': '0.4363', 'low_price': '0.4142', 'total_traded_base_asset_volume': '33840120.9', 'total_traded_quote_asset_volume': '14269747.5900'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478108, 'symbol': 'RLCUSDT', 'close_price': '0.9440', 'open_price': '0.9269', 'high_price': '0.9665', 'low_price': '0.8753', 'total_traded_base_asset_volume': '26508267.3', 'total_traded_quote_asset_volume': '24515542.4700'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477709, 'symbol': 'WAVESUSDT', 'close_price': '7.7170', 'open_price': '7.9170', 'high_price': '7.9870', 'low_price': '7.6080', 'total_traded_base_asset_volume': '33638249.2', 'total_traded_quote_asset_volume': '261321813.4500'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478022, 'symbol': 'GALUSDT', 'close_price': '3.91310', 'open_price': '4.14970', 'high_price': '4.17700', 'low_price': '3.79730', 'total_traded_base_asset_volume': '15860513', 'total_traded_quote_asset_volume': '63394380.45000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478236, 'symbol': 'DOTUSDT', 'close_price': '9.357', 'open_price': '9.142', 'high_price': '9.441', 'low_price': '8.879', 'total_traded_base_asset_volume': '23530544.9', 'total_traded_quote_asset_volume': '215520039.530'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478246, 'symbol': '1000LUNCBUSD', 'close_price': '0.0721000', 'open_price': '0.0596000', 'high_price': '0.0880000', 'low_price': '0.0349000', 'total_traded_base_asset_volume': '6878775288', 'total_traded_quote_asset_volume': '440826743.1200000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477812, 'symbol': 'CRVUSDT', 'close_price': '1.150', 'open_price': '1.187', 'high_price': '1.187', 'low_price': '1.132', 'total_traded_base_asset_volume': '44202510.4', 'total_traded_quote_asset_volume': '51156567.430'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478227, 'symbol': 'LUNA2BUSD', 'close_price': '2.7786000', 'open_price': '3.4796000', 'high_price': '3.4900000', 'low_price': '1.7645000', 'total_traded_base_asset_volume': '545842069', 'total_traded_quote_asset_volume': '1465147176.3600000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477907, 'symbol': 'OPUSDT', 'close_price': '0.8103000', 'open_price': '0.9915000', 'high_price': '0.9974000', 'low_price': '0.6968000', 'total_traded_base_asset_volume': '546738907.2', 'total_traded_quote_asset_volume': '457061216.8100000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478106, 'symbol': 'TLMBUSD', 'close_price': '0.0365800', 'open_price': '0.0323600', 'high_price': '0.0403000', 'low_price': '0.0323600', 'total_traded_base_asset_volume': '506486378', 'total_traded_quote_asset_volume': '18645064.9400000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477905, 'symbol': 'RUNEUSDT', 'close_price': '2.8860', 'open_price': '2.9150', 'high_price': '2.9670', 'low_price': '2.8020', 'total_traded_base_asset_volume': '21661759', 'total_traded_quote_asset_volume': '62422922.5200'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477665, 'symbol': 'STORJUSDT', 'close_price': '0.5660', 'open_price': '0.5839', 'high_price': '0.5849', 'low_price': '0.5564', 'total_traded_base_asset_volume': '17087554', 'total_traded_quote_asset_volume': '9693979.5100'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478254, 'symbol': 'BLZUSDT', 'close_price': '0.17302', 'open_price': '0.15494', 'high_price': '0.19329', 'low_price': '0.14126', 'total_traded_base_asset_volume': '2893256743', 'total_traded_quote_asset_volume': '487656931.04000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477578, 'symbol': 'AVAXUSDT', 'close_price': '24.6800', 'open_price': '24.6600', 'high_price': '25.2700', 'low_price': '23.7000', 'total_traded_base_asset_volume': '15405300', 'total_traded_quote_asset_volume': '377118434.5300'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477346, 'symbol': 'HNTUSDT', 'close_price': '11.5930', 'open_price': '10.9270', 'high_price': '12.3920', 'low_price': '10.5010', 'total_traded_base_asset_volume': '11380753', 'total_traded_quote_asset_volume': '129078832.1700'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477325, 'symbol': 'KSMUSDT', 'close_price': '67.520', 'open_price': '66.820', 'high_price': '68.350', 'low_price': '65.370', 'total_traded_base_asset_volume': '253445.4', 'total_traded_quote_asset_volume': '16925174.320'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478057, 'symbol': 'MATICUSDT', 'close_price': '0.62940', 'open_price': '0.61700', 'high_price': '0.63640', 'low_price': '0.60050', 'total_traded_base_asset_volume': '179530932', 'total_traded_quote_asset_volume': '111003831.28000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478243, 'symbol': 'OCEANUSDT', 'close_price': '0.30734', 'open_price': '0.28031', 'high_price': '0.31989', 'low_price': '0.26469', 'total_traded_base_asset_volume': '517465486', 'total_traded_quote_asset_volume': '152604120.22000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477679, 'symbol': '1INCHUSDT', 'close_price': '0.8063', 'open_price': '0.8354', 'high_price': '0.8361', 'low_price': '0.8006', 'total_traded_base_asset_volume': '25250374', 'total_traded_quote_asset_volume': '20622902.5000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478100, 'symbol': 'SANDUSDT', 'close_price': '1.29570', 'open_price': '1.31180', 'high_price': '1.32310', 'low_price': '1.28060', 'total_traded_base_asset_volume': '78716297', 'total_traded_quote_asset_volume': '102364317.41000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478125, 'symbol': 'LITUSDT', 'close_price': '0.810', 'open_price': '0.857', 'high_price': '1.333', 'low_price': '0.759', 'total_traded_base_asset_volume': '709918463.5', 'total_traded_quote_asset_volume': '730764518.080'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478182, 'symbol': 'UNFIUSDT', 'close_price': '9.045', 'open_price': '9.792', 'high_price': '10.400', 'low_price': '7.158', 'total_traded_base_asset_volume': '161775069.7', 'total_traded_quote_asset_volume': '1398031170.530'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477696, 'symbol': 'COTIUSDT', 'close_price': '0.13218', 'open_price': '0.14155', 'high_price': '0.14492', 'low_price': '0.13001', 'total_traded_base_asset_volume': '685977764', 'total_traded_quote_asset_volume': '94843132.79000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477266, 'symbol': 'ALICEUSDT', 'close_price': '2.956', 'open_price': '2.911', 'high_price': '2.999', 'low_price': '2.754', 'total_traded_base_asset_volume': '23952685.4', 'total_traded_quote_asset_volume': '68619593.400'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477701, 'symbol': 'LINAUSDT', 'close_price': '0.01136', 'open_price': '0.01138', 'high_price': '0.01214', 'low_price': '0.01052', 'total_traded_base_asset_volume': '5666769320', 'total_traded_quote_asset_volume': '63121087.15000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478197, 'symbol': 'MTLUSDT', 'close_price': '1.9017', 'open_price': '1.7243', 'high_price': '2.0000', 'low_price': '1.6710', 'total_traded_base_asset_volume': '157519143', 'total_traded_quote_asset_volume': '292435423.6600'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478076, 'symbol': 'OGNUSDT', 'close_price': '0.2695', 'open_price': '0.2810', 'high_price': '0.2822', 'low_price': '0.2567', 'total_traded_base_asset_volume': '217171422', 'total_traded_quote_asset_volume': '58962113.6600'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477478, 'symbol': 'NKNUSDT', 'close_price': '0.10111', 'open_price': '0.10478', 'high_price': '0.10576', 'low_price': '0.09755', 'total_traded_base_asset_volume': '152513593', 'total_traded_quote_asset_volume': '15468509.58000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791478176, 'symbol': 'DGBUSDT', 'close_price': '0.01254', 'open_price': '0.01209', 'high_price': '0.01305', 'low_price': '0.01167', 'total_traded_base_asset_volume': '1052331478', 'total_traded_quote_asset_volume': '12892668.87000'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654791477417, 'symbol': 'ETHBUSD', 'close_price': '1789.76', 'open_price': '1818.09', 'high_price': '1830.95', 'low_price': '1769.08', 'total_traded_base_asset_volume': '315614.214', 'total_traded_quote_asset_volume': '567162885.47'}], 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_miniTicker_single(self):
data = '{"stream":"btcusdt@miniTicker","data":{"e":"24hrMiniTicker","E":1654791723970,"s":"BTCUSDT","c":"30180.00","o":"30463.50","h":"30691.90","l":"29900.00","v":"315252.128","q":"9537613226.33"}}'
asserted_result = "{'stream_type': 'btcusdt@miniTicker', 'event_type': '24hrMiniTicker', 'data': [{'stream_type': 'btcusdt@miniTicker', 'event_type': '24hrMiniTicker', 'event_time': 1654791723970, 'symbol': 'BTCUSDT', 'close_price': '30180.00', 'open_price': '30463.50', 'high_price': '30691.90', 'low_price': '29900.00', 'total_traded_base_asset_volume': '315252.128', 'total_traded_quote_asset_volume': '9537613226.33'}], 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_bookTicker_arr(self):
data = '{"e":"bookTicker","u":1592216279872,"s":"GALAUSDT","b":"0.07661","B":"40088","a":"0.07662","A":"929","T":1654792470066,"E":1654792470073}'
asserted_result = "{'stream_type': 'bookTicker', 'order_book_update_id': 1592216279872, 'symbol': 'GALAUSDT', 'best_bid_price': '0.07661', 'best_bid_quantity': '40088', 'best_ask_price': '0.07662', 'best_ask_quantity': '929', 'event_type': 'bookTicker', 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_bookTicker_single(self):
data = '{"stream":"galausdt@bookTicker","data":{"e":"bookTicker","u":1592216279872,"s":"GALAUSDT","b":"0.07661","B":"40088","a":"0.07662","A":"929","T":1654792470066,"E":1654792470073}}'
asserted_result = "{'stream_type': 'bookTicker', 'order_book_update_id': 1592216279872, 'symbol': 'GALAUSDT', 'best_bid_price': '0.07661', 'best_bid_quantity': '40088', 'best_ask_price': '0.07662', 'best_ask_quantity': '929', 'event_type': 'bookTicker', 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_markPrice_arr(self):
data = '[{"e":"markPriceUpdate","E":1654858611001,"s":"BTCUSDT","p":"29985.90000000","P":"29946.84064848","i":"29994.33653248","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ETHUSDT","p":"1770.73000000","P":"1769.35032027","i":"1771.80411191","r":"0.00006714","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BCHUSDT","p":"174.59831300","P":"173.99197609","i":"174.74065485","r":"-0.00023532","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"XRPUSDT","p":"0.40080000","P":"0.40037583","i":"0.40097207","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"EOSUSDT","p":"1.23500000","P":"1.23496686","i":"1.23617742","r":"-0.00012295","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"LTCUSDT","p":"59.31804743","P":"59.10770838","i":"59.36699811","r":"-0.00009846","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"TRXUSDT","p":"0.08095434","P":"0.08091734","i":"0.08102140","r":"-0.00003137","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ETCUSDT","p":"21.05500000","P":"21.03466178","i":"21.07237652","r":"-0.00013189","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"LINKUSDT","p":"8.88532947","P":"8.86992269","i":"8.88993845","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"XLMUSDT","p":"0.13811976","P":"0.13851578","i":"0.13811222","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ADAUSDT","p":"0.61139690","P":"0.61016144","i":"0.61175129","r":"0.00007163","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"XMRUSDT","p":"181.57000000","P":"181.03165518","i":"181.67097067","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DASHUSDT","p":"56.97192180","P":"56.65191316","i":"57.07759647","r":"-0.00004794","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ZECUSDT","p":"90.41324745","P":"90.37942358","i":"90.48134170","r":"0.00007979","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"XTZUSDT","p":"2.15900000","P":"2.15048712","i":"2.15979677","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BNBUSDT","p":"288.29000000","P":"287.55062075","i":"288.59468232","r":"-0.00009995","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ATOMUSDT","p":"8.78902810","P":"8.75222235","i":"8.79653306","r":"-0.00014543","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ONTUSDT","p":"0.28950000","P":"0.28909288","i":"0.28977825","r":"-0.00001681","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"IOTAUSDT","p":"0.33810000","P":"0.33689848","i":"0.33825708","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BATUSDT","p":"0.39000000","P":"0.38650033","i":"0.39035794","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"VETUSDT","p":"0.03109000","P":"0.03097547","i":"0.03109847","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"NEOUSDT","p":"11.79646191","P":"11.73113719","i":"11.79602945","r":"0.00006146","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"QTUMUSDT","p":"3.86100000","P":"3.85626217","i":"3.86292850","r":"-0.00023392","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"IOSTUSDT","p":"0.01651700","P":"0.01652246","i":"0.01653156","r":"-0.00010310","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"THETAUSDT","p":"1.39296108","P":"1.38961731","i":"1.39373527","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ALGOUSDT","p":"0.38870000","P":"0.38739725","i":"0.38882224","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ZILUSDT","p":"0.04769977","P":"0.04761441","i":"0.04770051","r":"-0.00003004","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"KNCUSDT","p":"1.85678212","P":"1.85838195","i":"1.85832033","r":"0.00002631","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ZRXUSDT","p":"0.37960000","P":"0.37968667","i":"0.37991225","r":"0.00000193","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"COMPUSDT","p":"54.21000000","P":"54.20330697","i":"54.27364839","r":"0.00004748","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"OMGUSDT","p":"2.62000000","P":"2.61089978","i":"2.62048862","r":"0.00007527","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DOGEUSDT","p":"0.07875000","P":"0.07866549","i":"0.07879146","r":"0.00000520","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"SXPUSDT","p":"0.50522008","P":"0.50325878","i":"0.50560829","r":"0.00009630","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"KAVAUSDT","p":"2.59416850","P":"2.57840399","i":"2.59766999","r":"-0.00048107","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BANDUSDT","p":"1.98370323","P":"1.97835290","i":"1.98537424","r":"-0.00100878","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"RLCUSDT","p":"0.89560000","P":"0.88867796","i":"0.89550240","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"WAVESUSDT","p":"7.29400501","P":"7.31127221","i":"7.29982524","r":"-0.00091017","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"MKRUSDT","p":"1105.19919735","P":"1096.15028930","i":"1105.57897331","r":"-0.00013311","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"SNXUSDT","p":"2.65500000","P":"2.64529865","i":"2.65740449","r":"-0.00012827","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DOTUSDT","p":"9.11280657","P":"9.10781591","i":"9.12452175","r":"-0.00023690","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DEFIUSDT","p":"867.00000000","P":"864.58078836","i":"868.21472999","r":"-0.00026250","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"YFIUSDT","p":"7462.55027837","P":"7467.85922149","i":"7468.31252782","r":"-0.00019631","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BALUSDT","p":"7.90365305","P":"7.84732442","i":"7.91407356","r":"-0.00010634","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"CRVUSDT","p":"1.12100000","P":"1.12093840","i":"1.12217495","r":"-0.00017598","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"TRBUSDT","p":"15.01477993","P":"14.43570795","i":"15.03699550","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"RUNEUSDT","p":"2.79882374","P":"2.79578821","i":"2.80037512","r":"-0.00009350","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"SUSHIUSDT","p":"1.45806707","P":"1.45507724","i":"1.45970929","r":"0.00006169","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"SRMUSDT","p":"1.00825821","P":"1.00553404","i":"1.00964544","r":"0.00006369","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"EGLDUSDT","p":"61.01153880","P":"60.87591982","i":"61.06520911","r":"0.00007125","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"SOLUSDT","p":"39.35272285","P":"39.23971893","i":"39.37808374","r":"0.00005648","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ICXUSDT","p":"0.37206244","P":"0.37158854","i":"0.37207729","r":"-0.00002952","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"STORJUSDT","p":"0.54497658","P":"0.54153015","i":"0.54533647","r":"0.00008110","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BLZUSDT","p":"0.17851000","P":"0.17805254","i":"0.17865126","r":"-0.00047002","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"UNIUSDT","p":"5.07900000","P":"5.07483154","i":"5.08037145","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"AVAXUSDT","p":"23.98000000","P":"23.91515080","i":"23.99237066","r":"-0.00003641","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"FTMUSDT","p":"0.33030000","P":"0.32931178","i":"0.33046202","r":"-0.00012110","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"HNTUSDT","p":"11.67800000","P":"11.70081020","i":"11.68799310","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ENJUSDT","p":"0.61120436","P":"0.61044652","i":"0.61173783","r":"0.00005192","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"FLMUSDT","p":"0.11963246","P":"0.11850358","i":"0.11977274","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"TOMOUSDT","p":"0.61440000","P":"0.61257833","i":"0.61521303","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"RENUSDT","p":"0.14493776","P":"0.14476214","i":"0.14503832","r":"-0.00002288","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"KSMUSDT","p":"66.33649799","P":"66.01444829","i":"66.37529850","r":"0.00008604","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"NEARUSDT","p":"5.00500000","P":"4.98904326","i":"5.00676228","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"AAVEUSDT","p":"93.69676046","P":"93.57240142","i":"93.76329434","r":"0.00000154","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"FILUSDT","p":"7.11420343","P":"7.10772302","i":"7.11869073","r":"0.00002601","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"RSRUSDT","p":"0.00808152","P":"0.00807096","i":"0.00808912","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"LRCUSDT","p":"0.50170000","P":"0.49888210","i":"0.50233183","r":"-0.00003379","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"MATICUSDT","p":"0.63595187","P":"0.63457089","i":"0.63668406","r":"-0.00002329","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"OCEANUSDT","p":"0.28339000","P":"0.28189355","i":"0.28351185","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"CVCUSDT","p":"0.17604441","P":"0.17541995","i":"0.17605510","r":"-0.00010566","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BELUSDT","p":"1.24420000","P":"1.24156065","i":"1.24504311","r":"0.00003715","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"CTKUSDT","p":"0.82890239","P":"0.82586663","i":"0.82885004","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"AXSUSDT","p":"19.08000000","P":"19.05897905","i":"19.09179234","r":"-0.00060607","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ALPHAUSDT","p":"0.15338897","P":"0.15300357","i":"0.15338150","r":"0.00007799","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ZENUSDT","p":"18.75040571","P":"18.65914863","i":"18.75499148","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"SKLUSDT","p":"0.07128583","P":"0.07113524","i":"0.07131866","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"GRTUSDT","p":"0.14513000","P":"0.14456084","i":"0.14525506","r":"-0.00003366","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"1INCHUSDT","p":"0.78759443","P":"0.78684213","i":"0.78807828","r":"-0.00025177","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BTCBUSD","p":"29955.99881350","P":"29920.31660813","i":"29969.55436960","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"CHZUSDT","p":"0.11780071","P":"0.11762258","i":"0.11790026","r":"0.00000466","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"SANDUSDT","p":"1.27146825","P":"1.26797932","i":"1.27259505","r":"-0.00008703","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ANKRUSDT","p":"0.03697000","P":"0.03679369","i":"0.03700524","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BTSUSDT","p":"0.01316660","P":"0.01313471","i":"0.01317811","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"LITUSDT","p":"0.81859627","P":"0.80449767","i":"0.81923780","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"UNFIUSDT","p":"8.17654325","P":"8.08936713","i":"8.18233071","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"REEFUSDT","p":"0.00413517","P":"0.00412509","i":"0.00413691","r":"0.00004126","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"RVNUSDT","p":"0.02679000","P":"0.02671691","i":"0.02680479","r":"-0.00008398","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"SFPUSDT","p":"0.40140000","P":"0.39765711","i":"0.40144639","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"XEMUSDT","p":"0.04895000","P":"0.04900678","i":"0.04910000","r":"-0.00070903","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BTCSTUSDT","p":"7.09587329","P":"7.09072135","i":"7.09564923","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"COTIUSDT","p":"0.12654000","P":"0.12627069","i":"0.12661559","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"CHRUSDT","p":"0.22942587","P":"0.22819695","i":"0.22965063","r":"0.00001031","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"MANAUSDT","p":"0.95898792","P":"0.95700897","i":"0.95976021","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ALICEUSDT","p":"2.76119304","P":"2.75359641","i":"2.76454953","r":"0.00005141","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"HBARUSDT","p":"0.08486576","P":"0.08482908","i":"0.08495983","r":"-0.00009860","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ONEUSDT","p":"0.03870000","P":"0.03860237","i":"0.03874172","r":"0.00001340","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"LINAUSDT","p":"0.01129691","P":"0.01126854","i":"0.01129876","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"STMXUSDT","p":"0.00929229","P":"0.00929812","i":"0.00929171","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DENTUSDT","p":"0.00122300","P":"0.00121848","i":"0.00122401","r":"-0.00011002","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"CELRUSDT","p":"0.01751980","P":"0.01744938","i":"0.01751882","r":"-0.00004197","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"HOTUSDT","p":"0.00242003","P":"0.00241507","i":"0.00242368","r":"-0.00008129","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"MTLUSDT","p":"1.86200000","P":"1.84696332","i":"1.86462706","r":"-0.00093516","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"OGNUSDT","p":"0.26429589","P":"0.26222113","i":"0.26428555","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"NKNUSDT","p":"0.09772610","P":"0.09714508","i":"0.09779773","r":"-0.00008761","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"SCUSDT","p":"0.00528083","P":"0.00528318","i":"0.00528144","r":"-0.00012306","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DGBUSDT","p":"0.01194243","P":"0.01187548","i":"0.01190042","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"1000SHIBUSDT","p":"0.01049200","P":"0.01046572","i":"0.01049999","r":"-0.00011906","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ICPUSDT","p":"6.34504263","P":"0.00000000","i":"6.34484227","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BAKEUSDT","p":"0.33332351","P":"0.33204526","i":"0.33370854","r":"0.00003999","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"GTCUSDT","p":"3.34671941","P":"3.33441490","i":"3.34653938","r":"0.00002781","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ETHBUSD","p":"1769.23000000","P":"1767.65991559","i":"1770.00603966","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BTCDOMUSDT","p":"1556.07842977","P":"1554.55498384","i":"1554.08748159","r":"0.00039021","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"TLMUSDT","p":"0.03346981","P":"0.00000000","i":"0.03346876","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BNBBUSD","p":"288.12000000","P":"287.28609685","i":"288.31994498","r":"0.00000000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ADABUSD","p":"0.61080000","P":"0.60959707","i":"0.61113690","r":"0.00006546","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"XRPBUSD","p":"0.40060000","P":"0.40001028","i":"0.40065816","r":"0.00002323","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"IOTXUSDT","p":"0.03381242","P":"0.03364582","i":"0.03381028","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DOGEBUSD","p":"0.07872800","P":"0.07861847","i":"0.07872761","r":"-0.00008785","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"AUDIOUSDT","p":"0.41854160","P":"0.41643298","i":"0.41897859","r":"0.00008701","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"RAYUSDT","p":"0.86525817","P":"0.86424811","i":"0.86523184","r":"-0.00002151","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"C98USDT","p":"0.75293254","P":"0.75085619","i":"0.75344811","r":"-0.00007481","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"MASKUSDT","p":"1.76800000","P":"1.76197188","i":"1.76858995","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ATAUSDT","p":"0.19850714","P":"0.19648134","i":"0.19857634","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"SOLBUSD","p":"39.33462950","P":"39.21250150","i":"39.35033142","r":"0.00000784","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"FTTBUSD","p":"28.31471315","P":"28.25713492","i":"28.32817800","r":"0.00003106","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DYDXUSDT","p":"1.74800000","P":"1.75031776","i":"1.74972018","r":"-0.00014524","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"1000XECUSDT","p":"0.05019989","P":"0.05011825","i":"0.05019728","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"GALAUSDT","p":"0.07356072","P":"0.07329987","i":"0.07360924","r":"0.00002123","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"CELOUSDT","p":"1.23484455","P":"1.23200774","i":"1.23458296","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ARUSDT","p":"13.29363931","P":"13.22438808","i":"13.29716686","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"KLAYUSDT","p":"0.35547372","P":"0.35510053","i":"0.35580780","r":"-0.00018281","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ARPAUSDT","p":"0.03748000","P":"0.03755699","i":"0.03753443","r":"0.00003928","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"CTSIUSDT","p":"0.22560000","P":"0.22635455","i":"0.22566801","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"LPTUSDT","p":"12.01159535","P":"11.97128856","i":"12.02741407","r":"-0.00003974","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ENSUSDT","p":"11.44900000","P":"11.40479564","i":"11.45365756","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"PEOPLEUSDT","p":"0.02059006","P":"0.02049469","i":"0.02058777","r":"-0.00004571","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ANTUSDT","p":"1.79700000","P":"1.78832066","i":"1.79750666","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ROSEUSDT","p":"0.06524000","P":"0.06503210","i":"0.06523960","r":"0.00007189","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DUSKUSDT","p":"0.14201000","P":"0.14189037","i":"0.14222640","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"FLOWUSDT","p":"2.40100000","P":"2.39229811","i":"2.40166113","r":"-0.00038719","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"IMXUSDT","p":"0.96958490","P":"0.96298586","i":"0.97088430","r":"-0.00007056","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"API3USDT","p":"1.55954735","P":"1.55160896","i":"1.56046493","r":"-0.00027996","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"GMTUSDT","p":"0.96460000","P":"0.96037222","i":"0.96519665","r":"-0.00018122","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"APEUSDT","p":"5.60900000","P":"5.59185577","i":"5.60920177","r":"0.00003189","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"BTCUSDT_220624","p":"30021.66583544","P":"29946.84064848","i":"29994.33653248","r":"0.00000000","T":0},{"e":"markPriceUpdate","E":1654858611001,"s":"ETHUSDT_220624","p":"1773.88911934","P":"1769.35032027","i":"1771.80411191","r":"0.00000000","T":0},{"e":"markPriceUpdate","E":1654858611001,"s":"BNXUSDT","p":"127.18000000","P":"127.10523713","i":"127.18814340","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"WOOUSDT","p":"0.15819000","P":"0.15776850","i":"0.15834533","r":"-0.00006224","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"FTTUSDT","p":"28.34143820","P":"28.28229335","i":"28.34414969","r":"-0.00003318","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"JASMYUSDT","p":"0.01157493","P":"0.01157432","i":"0.01157005","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DARUSDT","p":"0.41606286","P":"0.41398992","i":"0.41649482","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"GALUSDT","p":"3.85950000","P":"3.83298963","i":"3.86106767","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"AVAXBUSD","p":"23.95999893","P":"23.89845518","i":"23.97653233","r":"-0.00009652","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"NEARBUSD","p":"5.00380635","P":"4.98500531","i":"5.00562749","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"GMTBUSD","p":"0.96380559","P":"0.95956382","i":"0.96460827","r":"-0.00011648","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"APEBUSD","p":"5.60200000","P":"5.58721475","i":"5.60616208","r":"0.00000614","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"GALBUSD","p":"3.85493384","P":"3.82965767","i":"3.85469039","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"FTMBUSD","p":"0.32997342","P":"0.32901875","i":"0.33021222","r":"-0.00000372","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DODOBUSD","p":"0.17873359","P":"0.17615028","i":"0.17872230","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ANCBUSD","p":"0.16526556","P":"0.16380404","i":"0.16670581","r":"-0.01361607","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"GALABUSD","p":"0.07355359","P":"0.07323505","i":"0.07358747","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"TRXBUSD","p":"0.08090500","P":"0.08085480","i":"0.08095241","r":"-0.00009077","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"1000LUNCBUSD","p":"0.07200000","P":"0.07315732","i":"0.07254762","r":"-0.00528973","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"LUNA2BUSD","p":"2.94920000","P":"2.98626942","i":"2.96994532","r":"-0.00969882","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"OPUSDT","p":"0.91961468","P":"0.89453496","i":"0.92200849","r":"-0.00027731","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"DOTBUSD","p":"9.10409729","P":"9.10013591","i":"9.11860429","r":"-0.00005233","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"TLMBUSD","p":"0.03343927","P":"0.03347697","i":"0.03344766","r":"-0.00070645","T":1654876800000},{"e":"markPriceUpdate","E":1654858611001,"s":"ICPBUSD","p":"6.35357951","P":"6.32000298","i":"6.34270250","r":"0.00010000","T":1654876800000}]'
asserted_result = "{'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'data': [{'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BTCUSDT', 'mark_price': '29985.90000000', 'estimated_settle_price': '29946.84064848', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '29994.33653248'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ETHUSDT', 'mark_price': '1770.73000000', 'estimated_settle_price': '1769.35032027', 'funding_rate': '0.00006714', 'next_funding_time': 1654876800000, 'index_price': '1771.80411191'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BCHUSDT', 'mark_price': '174.59831300', 'estimated_settle_price': '173.99197609', 'funding_rate': '-0.00023532', 'next_funding_time': 1654876800000, 'index_price': '174.74065485'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'XRPUSDT', 'mark_price': '0.40080000', 'estimated_settle_price': '0.40037583', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.40097207'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'EOSUSDT', 'mark_price': '1.23500000', 'estimated_settle_price': '1.23496686', 'funding_rate': '-0.00012295', 'next_funding_time': 1654876800000, 'index_price': '1.23617742'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'LTCUSDT', 'mark_price': '59.31804743', 'estimated_settle_price': '59.10770838', 'funding_rate': '-0.00009846', 'next_funding_time': 1654876800000, 'index_price': '59.36699811'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'TRXUSDT', 'mark_price': '0.08095434', 'estimated_settle_price': '0.08091734', 'funding_rate': '-0.00003137', 'next_funding_time': 1654876800000, 'index_price': '0.08102140'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ETCUSDT', 'mark_price': '21.05500000', 'estimated_settle_price': '21.03466178', 'funding_rate': '-0.00013189', 'next_funding_time': 1654876800000, 'index_price': '21.07237652'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'LINKUSDT', 'mark_price': '8.88532947', 'estimated_settle_price': '8.86992269', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '8.88993845'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'XLMUSDT', 'mark_price': '0.13811976', 'estimated_settle_price': '0.13851578', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.13811222'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ADAUSDT', 'mark_price': '0.61139690', 'estimated_settle_price': '0.61016144', 'funding_rate': '0.00007163', 'next_funding_time': 1654876800000, 'index_price': '0.61175129'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'XMRUSDT', 'mark_price': '181.57000000', 'estimated_settle_price': '181.03165518', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '181.67097067'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DASHUSDT', 'mark_price': '56.97192180', 'estimated_settle_price': '56.65191316', 'funding_rate': '-0.00004794', 'next_funding_time': 1654876800000, 'index_price': '57.07759647'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ZECUSDT', 'mark_price': '90.41324745', 'estimated_settle_price': '90.37942358', 'funding_rate': '0.00007979', 'next_funding_time': 1654876800000, 'index_price': '90.48134170'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'XTZUSDT', 'mark_price': '2.15900000', 'estimated_settle_price': '2.15048712', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '2.15979677'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BNBUSDT', 'mark_price': '288.29000000', 'estimated_settle_price': '287.55062075', 'funding_rate': '-0.00009995', 'next_funding_time': 1654876800000, 'index_price': '288.59468232'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ATOMUSDT', 'mark_price': '8.78902810', 'estimated_settle_price': '8.75222235', 'funding_rate': '-0.00014543', 'next_funding_time': 1654876800000, 'index_price': '8.79653306'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ONTUSDT', 'mark_price': '0.28950000', 'estimated_settle_price': '0.28909288', 'funding_rate': '-0.00001681', 'next_funding_time': 1654876800000, 'index_price': '0.28977825'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'IOTAUSDT', 'mark_price': '0.33810000', 'estimated_settle_price': '0.33689848', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.33825708'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BATUSDT', 'mark_price': '0.39000000', 'estimated_settle_price': '0.38650033', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.39035794'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'VETUSDT', 'mark_price': '0.03109000', 'estimated_settle_price': '0.03097547', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.03109847'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'NEOUSDT', 'mark_price': '11.79646191', 'estimated_settle_price': '11.73113719', 'funding_rate': '0.00006146', 'next_funding_time': 1654876800000, 'index_price': '11.79602945'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'QTUMUSDT', 'mark_price': '3.86100000', 'estimated_settle_price': '3.85626217', 'funding_rate': '-0.00023392', 'next_funding_time': 1654876800000, 'index_price': '3.86292850'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'IOSTUSDT', 'mark_price': '0.01651700', 'estimated_settle_price': '0.01652246', 'funding_rate': '-0.00010310', 'next_funding_time': 1654876800000, 'index_price': '0.01653156'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'THETAUSDT', 'mark_price': '1.39296108', 'estimated_settle_price': '1.38961731', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '1.39373527'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ALGOUSDT', 'mark_price': '0.38870000', 'estimated_settle_price': '0.38739725', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.38882224'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ZILUSDT', 'mark_price': '0.04769977', 'estimated_settle_price': '0.04761441', 'funding_rate': '-0.00003004', 'next_funding_time': 1654876800000, 'index_price': '0.04770051'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'KNCUSDT', 'mark_price': '1.85678212', 'estimated_settle_price': '1.85838195', 'funding_rate': '0.00002631', 'next_funding_time': 1654876800000, 'index_price': '1.85832033'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ZRXUSDT', 'mark_price': '0.37960000', 'estimated_settle_price': '0.37968667', 'funding_rate': '0.00000193', 'next_funding_time': 1654876800000, 'index_price': '0.37991225'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'COMPUSDT', 'mark_price': '54.21000000', 'estimated_settle_price': '54.20330697', 'funding_rate': '0.00004748', 'next_funding_time': 1654876800000, 'index_price': '54.27364839'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'OMGUSDT', 'mark_price': '2.62000000', 'estimated_settle_price': '2.61089978', 'funding_rate': '0.00007527', 'next_funding_time': 1654876800000, 'index_price': '2.62048862'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DOGEUSDT', 'mark_price': '0.07875000', 'estimated_settle_price': '0.07866549', 'funding_rate': '0.00000520', 'next_funding_time': 1654876800000, 'index_price': '0.07879146'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'SXPUSDT', 'mark_price': '0.50522008', 'estimated_settle_price': '0.50325878', 'funding_rate': '0.00009630', 'next_funding_time': 1654876800000, 'index_price': '0.50560829'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'KAVAUSDT', 'mark_price': '2.59416850', 'estimated_settle_price': '2.57840399', 'funding_rate': '-0.00048107', 'next_funding_time': 1654876800000, 'index_price': '2.59766999'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BANDUSDT', 'mark_price': '1.98370323', 'estimated_settle_price': '1.97835290', 'funding_rate': '-0.00100878', 'next_funding_time': 1654876800000, 'index_price': '1.98537424'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'RLCUSDT', 'mark_price': '0.89560000', 'estimated_settle_price': '0.88867796', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.89550240'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'WAVESUSDT', 'mark_price': '7.29400501', 'estimated_settle_price': '7.31127221', 'funding_rate': '-0.00091017', 'next_funding_time': 1654876800000, 'index_price': '7.29982524'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'MKRUSDT', 'mark_price': '1105.19919735', 'estimated_settle_price': '1096.15028930', 'funding_rate': '-0.00013311', 'next_funding_time': 1654876800000, 'index_price': '1105.57897331'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'SNXUSDT', 'mark_price': '2.65500000', 'estimated_settle_price': '2.64529865', 'funding_rate': '-0.00012827', 'next_funding_time': 1654876800000, 'index_price': '2.65740449'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DOTUSDT', 'mark_price': '9.11280657', 'estimated_settle_price': '9.10781591', 'funding_rate': '-0.00023690', 'next_funding_time': 1654876800000, 'index_price': '9.12452175'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DEFIUSDT', 'mark_price': '867.00000000', 'estimated_settle_price': '864.58078836', 'funding_rate': '-0.00026250', 'next_funding_time': 1654876800000, 'index_price': '868.21472999'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'YFIUSDT', 'mark_price': '7462.55027837', 'estimated_settle_price': '7467.85922149', 'funding_rate': '-0.00019631', 'next_funding_time': 1654876800000, 'index_price': '7468.31252782'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BALUSDT', 'mark_price': '7.90365305', 'estimated_settle_price': '7.84732442', 'funding_rate': '-0.00010634', 'next_funding_time': 1654876800000, 'index_price': '7.91407356'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'CRVUSDT', 'mark_price': '1.12100000', 'estimated_settle_price': '1.12093840', 'funding_rate': '-0.00017598', 'next_funding_time': 1654876800000, 'index_price': '1.12217495'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'TRBUSDT', 'mark_price': '15.01477993', 'estimated_settle_price': '14.43570795', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '15.03699550'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'RUNEUSDT', 'mark_price': '2.79882374', 'estimated_settle_price': '2.79578821', 'funding_rate': '-0.00009350', 'next_funding_time': 1654876800000, 'index_price': '2.80037512'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'SUSHIUSDT', 'mark_price': '1.45806707', 'estimated_settle_price': '1.45507724', 'funding_rate': '0.00006169', 'next_funding_time': 1654876800000, 'index_price': '1.45970929'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'SRMUSDT', 'mark_price': '1.00825821', 'estimated_settle_price': '1.00553404', 'funding_rate': '0.00006369', 'next_funding_time': 1654876800000, 'index_price': '1.00964544'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'EGLDUSDT', 'mark_price': '61.01153880', 'estimated_settle_price': '60.87591982', 'funding_rate': '0.00007125', 'next_funding_time': 1654876800000, 'index_price': '61.06520911'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'SOLUSDT', 'mark_price': '39.35272285', 'estimated_settle_price': '39.23971893', 'funding_rate': '0.00005648', 'next_funding_time': 1654876800000, 'index_price': '39.37808374'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ICXUSDT', 'mark_price': '0.37206244', 'estimated_settle_price': '0.37158854', 'funding_rate': '-0.00002952', 'next_funding_time': 1654876800000, 'index_price': '0.37207729'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'STORJUSDT', 'mark_price': '0.54497658', 'estimated_settle_price': '0.54153015', 'funding_rate': '0.00008110', 'next_funding_time': 1654876800000, 'index_price': '0.54533647'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BLZUSDT', 'mark_price': '0.17851000', 'estimated_settle_price': '0.17805254', 'funding_rate': '-0.00047002', 'next_funding_time': 1654876800000, 'index_price': '0.17865126'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'UNIUSDT', 'mark_price': '5.07900000', 'estimated_settle_price': '5.07483154', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '5.08037145'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'AVAXUSDT', 'mark_price': '23.98000000', 'estimated_settle_price': '23.91515080', 'funding_rate': '-0.00003641', 'next_funding_time': 1654876800000, 'index_price': '23.99237066'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'FTMUSDT', 'mark_price': '0.33030000', 'estimated_settle_price': '0.32931178', 'funding_rate': '-0.00012110', 'next_funding_time': 1654876800000, 'index_price': '0.33046202'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'HNTUSDT', 'mark_price': '11.67800000', 'estimated_settle_price': '11.70081020', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '11.68799310'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ENJUSDT', 'mark_price': '0.61120436', 'estimated_settle_price': '0.61044652', 'funding_rate': '0.00005192', 'next_funding_time': 1654876800000, 'index_price': '0.61173783'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'FLMUSDT', 'mark_price': '0.11963246', 'estimated_settle_price': '0.11850358', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.11977274'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'TOMOUSDT', 'mark_price': '0.61440000', 'estimated_settle_price': '0.61257833', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.61521303'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'RENUSDT', 'mark_price': '0.14493776', 'estimated_settle_price': '0.14476214', 'funding_rate': '-0.00002288', 'next_funding_time': 1654876800000, 'index_price': '0.14503832'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'KSMUSDT', 'mark_price': '66.33649799', 'estimated_settle_price': '66.01444829', 'funding_rate': '0.00008604', 'next_funding_time': 1654876800000, 'index_price': '66.37529850'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'NEARUSDT', 'mark_price': '5.00500000', 'estimated_settle_price': '4.98904326', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '5.00676228'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'AAVEUSDT', 'mark_price': '93.69676046', 'estimated_settle_price': '93.57240142', 'funding_rate': '0.00000154', 'next_funding_time': 1654876800000, 'index_price': '93.76329434'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'FILUSDT', 'mark_price': '7.11420343', 'estimated_settle_price': '7.10772302', 'funding_rate': '0.00002601', 'next_funding_time': 1654876800000, 'index_price': '7.11869073'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'RSRUSDT', 'mark_price': '0.00808152', 'estimated_settle_price': '0.00807096', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.00808912'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'LRCUSDT', 'mark_price': '0.50170000', 'estimated_settle_price': '0.49888210', 'funding_rate': '-0.00003379', 'next_funding_time': 1654876800000, 'index_price': '0.50233183'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'MATICUSDT', 'mark_price': '0.63595187', 'estimated_settle_price': '0.63457089', 'funding_rate': '-0.00002329', 'next_funding_time': 1654876800000, 'index_price': '0.63668406'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'OCEANUSDT', 'mark_price': '0.28339000', 'estimated_settle_price': '0.28189355', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.28351185'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'CVCUSDT', 'mark_price': '0.17604441', 'estimated_settle_price': '0.17541995', 'funding_rate': '-0.00010566', 'next_funding_time': 1654876800000, 'index_price': '0.17605510'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BELUSDT', 'mark_price': '1.24420000', 'estimated_settle_price': '1.24156065', 'funding_rate': '0.00003715', 'next_funding_time': 1654876800000, 'index_price': '1.24504311'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'CTKUSDT', 'mark_price': '0.82890239', 'estimated_settle_price': '0.82586663', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.82885004'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'AXSUSDT', 'mark_price': '19.08000000', 'estimated_settle_price': '19.05897905', 'funding_rate': '-0.00060607', 'next_funding_time': 1654876800000, 'index_price': '19.09179234'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ALPHAUSDT', 'mark_price': '0.15338897', 'estimated_settle_price': '0.15300357', 'funding_rate': '0.00007799', 'next_funding_time': 1654876800000, 'index_price': '0.15338150'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ZENUSDT', 'mark_price': '18.75040571', 'estimated_settle_price': '18.65914863', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '18.75499148'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'SKLUSDT', 'mark_price': '0.07128583', 'estimated_settle_price': '0.07113524', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.07131866'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'GRTUSDT', 'mark_price': '0.14513000', 'estimated_settle_price': '0.14456084', 'funding_rate': '-0.00003366', 'next_funding_time': 1654876800000, 'index_price': '0.14525506'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': '1INCHUSDT', 'mark_price': '0.78759443', 'estimated_settle_price': '0.78684213', 'funding_rate': '-0.00025177', 'next_funding_time': 1654876800000, 'index_price': '0.78807828'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BTCBUSD', 'mark_price': '29955.99881350', 'estimated_settle_price': '29920.31660813', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '29969.55436960'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'CHZUSDT', 'mark_price': '0.11780071', 'estimated_settle_price': '0.11762258', 'funding_rate': '0.00000466', 'next_funding_time': 1654876800000, 'index_price': '0.11790026'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'SANDUSDT', 'mark_price': '1.27146825', 'estimated_settle_price': '1.26797932', 'funding_rate': '-0.00008703', 'next_funding_time': 1654876800000, 'index_price': '1.27259505'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ANKRUSDT', 'mark_price': '0.03697000', 'estimated_settle_price': '0.03679369', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.03700524'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BTSUSDT', 'mark_price': '0.01316660', 'estimated_settle_price': '0.01313471', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.01317811'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'LITUSDT', 'mark_price': '0.81859627', 'estimated_settle_price': '0.80449767', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.81923780'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'UNFIUSDT', 'mark_price': '8.17654325', 'estimated_settle_price': '8.08936713', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '8.18233071'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'REEFUSDT', 'mark_price': '0.00413517', 'estimated_settle_price': '0.00412509', 'funding_rate': '0.00004126', 'next_funding_time': 1654876800000, 'index_price': '0.00413691'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'RVNUSDT', 'mark_price': '0.02679000', 'estimated_settle_price': '0.02671691', 'funding_rate': '-0.00008398', 'next_funding_time': 1654876800000, 'index_price': '0.02680479'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'SFPUSDT', 'mark_price': '0.40140000', 'estimated_settle_price': '0.39765711', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.40144639'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'XEMUSDT', 'mark_price': '0.04895000', 'estimated_settle_price': '0.04900678', 'funding_rate': '-0.00070903', 'next_funding_time': 1654876800000, 'index_price': '0.04910000'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BTCSTUSDT', 'mark_price': '7.09587329', 'estimated_settle_price': '7.09072135', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '7.09564923'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'COTIUSDT', 'mark_price': '0.12654000', 'estimated_settle_price': '0.12627069', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.12661559'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'CHRUSDT', 'mark_price': '0.22942587', 'estimated_settle_price': '0.22819695', 'funding_rate': '0.00001031', 'next_funding_time': 1654876800000, 'index_price': '0.22965063'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'MANAUSDT', 'mark_price': '0.95898792', 'estimated_settle_price': '0.95700897', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.95976021'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ALICEUSDT', 'mark_price': '2.76119304', 'estimated_settle_price': '2.75359641', 'funding_rate': '0.00005141', 'next_funding_time': 1654876800000, 'index_price': '2.76454953'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'HBARUSDT', 'mark_price': '0.08486576', 'estimated_settle_price': '0.08482908', 'funding_rate': '-0.00009860', 'next_funding_time': 1654876800000, 'index_price': '0.08495983'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ONEUSDT', 'mark_price': '0.03870000', 'estimated_settle_price': '0.03860237', 'funding_rate': '0.00001340', 'next_funding_time': 1654876800000, 'index_price': '0.03874172'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'LINAUSDT', 'mark_price': '0.01129691', 'estimated_settle_price': '0.01126854', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.01129876'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'STMXUSDT', 'mark_price': '0.00929229', 'estimated_settle_price': '0.00929812', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.00929171'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DENTUSDT', 'mark_price': '0.00122300', 'estimated_settle_price': '0.00121848', 'funding_rate': '-0.00011002', 'next_funding_time': 1654876800000, 'index_price': '0.00122401'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'CELRUSDT', 'mark_price': '0.01751980', 'estimated_settle_price': '0.01744938', 'funding_rate': '-0.00004197', 'next_funding_time': 1654876800000, 'index_price': '0.01751882'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'HOTUSDT', 'mark_price': '0.00242003', 'estimated_settle_price': '0.00241507', 'funding_rate': '-0.00008129', 'next_funding_time': 1654876800000, 'index_price': '0.00242368'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'MTLUSDT', 'mark_price': '1.86200000', 'estimated_settle_price': '1.84696332', 'funding_rate': '-0.00093516', 'next_funding_time': 1654876800000, 'index_price': '1.86462706'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'OGNUSDT', 'mark_price': '0.26429589', 'estimated_settle_price': '0.26222113', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.26428555'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'NKNUSDT', 'mark_price': '0.09772610', 'estimated_settle_price': '0.09714508', 'funding_rate': '-0.00008761', 'next_funding_time': 1654876800000, 'index_price': '0.09779773'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'SCUSDT', 'mark_price': '0.00528083', 'estimated_settle_price': '0.00528318', 'funding_rate': '-0.00012306', 'next_funding_time': 1654876800000, 'index_price': '0.00528144'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DGBUSDT', 'mark_price': '0.01194243', 'estimated_settle_price': '0.01187548', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.01190042'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': '1000SHIBUSDT', 'mark_price': '0.01049200', 'estimated_settle_price': '0.01046572', 'funding_rate': '-0.00011906', 'next_funding_time': 1654876800000, 'index_price': '0.01049999'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ICPUSDT', 'mark_price': '6.34504263', 'estimated_settle_price': '0.00000000', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '6.34484227'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BAKEUSDT', 'mark_price': '0.33332351', 'estimated_settle_price': '0.33204526', 'funding_rate': '0.00003999', 'next_funding_time': 1654876800000, 'index_price': '0.33370854'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'GTCUSDT', 'mark_price': '3.34671941', 'estimated_settle_price': '3.33441490', 'funding_rate': '0.00002781', 'next_funding_time': 1654876800000, 'index_price': '3.34653938'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ETHBUSD', 'mark_price': '1769.23000000', 'estimated_settle_price': '1767.65991559', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '1770.00603966'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BTCDOMUSDT', 'mark_price': '1556.07842977', 'estimated_settle_price': '1554.55498384', 'funding_rate': '0.00039021', 'next_funding_time': 1654876800000, 'index_price': '1554.08748159'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'TLMUSDT', 'mark_price': '0.03346981', 'estimated_settle_price': '0.00000000', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.03346876'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BNBBUSD', 'mark_price': '288.12000000', 'estimated_settle_price': '287.28609685', 'funding_rate': '0.00000000', 'next_funding_time': 1654876800000, 'index_price': '288.31994498'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ADABUSD', 'mark_price': '0.61080000', 'estimated_settle_price': '0.60959707', 'funding_rate': '0.00006546', 'next_funding_time': 1654876800000, 'index_price': '0.61113690'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'XRPBUSD', 'mark_price': '0.40060000', 'estimated_settle_price': '0.40001028', 'funding_rate': '0.00002323', 'next_funding_time': 1654876800000, 'index_price': '0.40065816'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'IOTXUSDT', 'mark_price': '0.03381242', 'estimated_settle_price': '0.03364582', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.03381028'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DOGEBUSD', 'mark_price': '0.07872800', 'estimated_settle_price': '0.07861847', 'funding_rate': '-0.00008785', 'next_funding_time': 1654876800000, 'index_price': '0.07872761'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'AUDIOUSDT', 'mark_price': '0.41854160', 'estimated_settle_price': '0.41643298', 'funding_rate': '0.00008701', 'next_funding_time': 1654876800000, 'index_price': '0.41897859'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'RAYUSDT', 'mark_price': '0.86525817', 'estimated_settle_price': '0.86424811', 'funding_rate': '-0.00002151', 'next_funding_time': 1654876800000, 'index_price': '0.86523184'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'C98USDT', 'mark_price': '0.75293254', 'estimated_settle_price': '0.75085619', 'funding_rate': '-0.00007481', 'next_funding_time': 1654876800000, 'index_price': '0.75344811'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'MASKUSDT', 'mark_price': '1.76800000', 'estimated_settle_price': '1.76197188', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '1.76858995'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ATAUSDT', 'mark_price': '0.19850714', 'estimated_settle_price': '0.19648134', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.19857634'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'SOLBUSD', 'mark_price': '39.33462950', 'estimated_settle_price': '39.21250150', 'funding_rate': '0.00000784', 'next_funding_time': 1654876800000, 'index_price': '39.35033142'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'FTTBUSD', 'mark_price': '28.31471315', 'estimated_settle_price': '28.25713492', 'funding_rate': '0.00003106', 'next_funding_time': 1654876800000, 'index_price': '28.32817800'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DYDXUSDT', 'mark_price': '1.74800000', 'estimated_settle_price': '1.75031776', 'funding_rate': '-0.00014524', 'next_funding_time': 1654876800000, 'index_price': '1.74972018'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': '1000XECUSDT', 'mark_price': '0.05019989', 'estimated_settle_price': '0.05011825', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.05019728'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'GALAUSDT', 'mark_price': '0.07356072', 'estimated_settle_price': '0.07329987', 'funding_rate': '0.00002123', 'next_funding_time': 1654876800000, 'index_price': '0.07360924'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'CELOUSDT', 'mark_price': '1.23484455', 'estimated_settle_price': '1.23200774', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '1.23458296'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ARUSDT', 'mark_price': '13.29363931', 'estimated_settle_price': '13.22438808', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '13.29716686'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'KLAYUSDT', 'mark_price': '0.35547372', 'estimated_settle_price': '0.35510053', 'funding_rate': '-0.00018281', 'next_funding_time': 1654876800000, 'index_price': '0.35580780'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ARPAUSDT', 'mark_price': '0.03748000', 'estimated_settle_price': '0.03755699', 'funding_rate': '0.00003928', 'next_funding_time': 1654876800000, 'index_price': '0.03753443'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'CTSIUSDT', 'mark_price': '0.22560000', 'estimated_settle_price': '0.22635455', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.22566801'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'LPTUSDT', 'mark_price': '12.01159535', 'estimated_settle_price': '11.97128856', 'funding_rate': '-0.00003974', 'next_funding_time': 1654876800000, 'index_price': '12.02741407'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ENSUSDT', 'mark_price': '11.44900000', 'estimated_settle_price': '11.40479564', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '11.45365756'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'PEOPLEUSDT', 'mark_price': '0.02059006', 'estimated_settle_price': '0.02049469', 'funding_rate': '-0.00004571', 'next_funding_time': 1654876800000, 'index_price': '0.02058777'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ANTUSDT', 'mark_price': '1.79700000', 'estimated_settle_price': '1.78832066', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '1.79750666'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ROSEUSDT', 'mark_price': '0.06524000', 'estimated_settle_price': '0.06503210', 'funding_rate': '0.00007189', 'next_funding_time': 1654876800000, 'index_price': '0.06523960'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DUSKUSDT', 'mark_price': '0.14201000', 'estimated_settle_price': '0.14189037', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.14222640'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'FLOWUSDT', 'mark_price': '2.40100000', 'estimated_settle_price': '2.39229811', 'funding_rate': '-0.00038719', 'next_funding_time': 1654876800000, 'index_price': '2.40166113'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'IMXUSDT', 'mark_price': '0.96958490', 'estimated_settle_price': '0.96298586', 'funding_rate': '-0.00007056', 'next_funding_time': 1654876800000, 'index_price': '0.97088430'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'API3USDT', 'mark_price': '1.55954735', 'estimated_settle_price': '1.55160896', 'funding_rate': '-0.00027996', 'next_funding_time': 1654876800000, 'index_price': '1.56046493'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'GMTUSDT', 'mark_price': '0.96460000', 'estimated_settle_price': '0.96037222', 'funding_rate': '-0.00018122', 'next_funding_time': 1654876800000, 'index_price': '0.96519665'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'APEUSDT', 'mark_price': '5.60900000', 'estimated_settle_price': '5.59185577', 'funding_rate': '0.00003189', 'next_funding_time': 1654876800000, 'index_price': '5.60920177'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BTCUSDT_220624', 'mark_price': '30021.66583544', 'estimated_settle_price': '29946.84064848', 'funding_rate': '0.00000000', 'next_funding_time': 0, 'index_price': '29994.33653248'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ETHUSDT_220624', 'mark_price': '1773.88911934', 'estimated_settle_price': '1769.35032027', 'funding_rate': '0.00000000', 'next_funding_time': 0, 'index_price': '1771.80411191'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'BNXUSDT', 'mark_price': '127.18000000', 'estimated_settle_price': '127.10523713', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '127.18814340'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'WOOUSDT', 'mark_price': '0.15819000', 'estimated_settle_price': '0.15776850', 'funding_rate': '-0.00006224', 'next_funding_time': 1654876800000, 'index_price': '0.15834533'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'FTTUSDT', 'mark_price': '28.34143820', 'estimated_settle_price': '28.28229335', 'funding_rate': '-0.00003318', 'next_funding_time': 1654876800000, 'index_price': '28.34414969'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'JASMYUSDT', 'mark_price': '0.01157493', 'estimated_settle_price': '0.01157432', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.01157005'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DARUSDT', 'mark_price': '0.41606286', 'estimated_settle_price': '0.41398992', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.41649482'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'GALUSDT', 'mark_price': '3.85950000', 'estimated_settle_price': '3.83298963', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '3.86106767'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'AVAXBUSD', 'mark_price': '23.95999893', 'estimated_settle_price': '23.89845518', 'funding_rate': '-0.00009652', 'next_funding_time': 1654876800000, 'index_price': '23.97653233'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'NEARBUSD', 'mark_price': '5.00380635', 'estimated_settle_price': '4.98500531', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '5.00562749'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'GMTBUSD', 'mark_price': '0.96380559', 'estimated_settle_price': '0.95956382', 'funding_rate': '-0.00011648', 'next_funding_time': 1654876800000, 'index_price': '0.96460827'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'APEBUSD', 'mark_price': '5.60200000', 'estimated_settle_price': '5.58721475', 'funding_rate': '0.00000614', 'next_funding_time': 1654876800000, 'index_price': '5.60616208'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'GALBUSD', 'mark_price': '3.85493384', 'estimated_settle_price': '3.82965767', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '3.85469039'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'FTMBUSD', 'mark_price': '0.32997342', 'estimated_settle_price': '0.32901875', 'funding_rate': '-0.00000372', 'next_funding_time': 1654876800000, 'index_price': '0.33021222'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DODOBUSD', 'mark_price': '0.17873359', 'estimated_settle_price': '0.17615028', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.17872230'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ANCBUSD', 'mark_price': '0.16526556', 'estimated_settle_price': '0.16380404', 'funding_rate': '-0.01361607', 'next_funding_time': 1654876800000, 'index_price': '0.16670581'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'GALABUSD', 'mark_price': '0.07355359', 'estimated_settle_price': '0.07323505', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '0.07358747'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'TRXBUSD', 'mark_price': '0.08090500', 'estimated_settle_price': '0.08085480', 'funding_rate': '-0.00009077', 'next_funding_time': 1654876800000, 'index_price': '0.08095241'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': '1000LUNCBUSD', 'mark_price': '0.07200000', 'estimated_settle_price': '0.07315732', 'funding_rate': '-0.00528973', 'next_funding_time': 1654876800000, 'index_price': '0.07254762'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'LUNA2BUSD', 'mark_price': '2.94920000', 'estimated_settle_price': '2.98626942', 'funding_rate': '-0.00969882', 'next_funding_time': 1654876800000, 'index_price': '2.96994532'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'OPUSDT', 'mark_price': '0.91961468', 'estimated_settle_price': '0.89453496', 'funding_rate': '-0.00027731', 'next_funding_time': 1654876800000, 'index_price': '0.92200849'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'DOTBUSD', 'mark_price': '9.10409729', 'estimated_settle_price': '9.10013591', 'funding_rate': '-0.00005233', 'next_funding_time': 1654876800000, 'index_price': '9.11860429'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'TLMBUSD', 'mark_price': '0.03343927', 'estimated_settle_price': '0.03347697', 'funding_rate': '-0.00070645', 'next_funding_time': 1654876800000, 'index_price': '0.03344766'}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858611001, 'symbol': 'ICPBUSD', 'mark_price': '6.35357951', 'estimated_settle_price': '6.32000298', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '6.34270250'}], 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_markPrice_single(self):
data = '{"stream":"btcusdt@markPrice","data":{"e":"markPriceUpdate","E":1654858692000,"s":"BTCUSDT","p":"29968.93335956","P":"29948.78869641","i":"29980.66509373","r":"0.00010000","T":1654876800000}}'
asserted_result = "{'stream_type': 'btcusdt@markPrice', 'event_type': 'markPriceUpdate', 'data': [{'stream_type': 'btcusdt@markPrice', 'event_type': 'markPriceUpdate', 'event_time': 1654858692000, 'symbol': 'BTCUSDT', 'mark_price': '29968.93335956', 'estimated_settle_price': '29948.78869641', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000, 'index_price': '29980.66509373'}], 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_ticker_arr(self):
data = '[{"e":"24hrTicker","E":1654795352933,"s":"IOTXUSDT","p":"0.00036","P":"1.042","w":"0.03427","c":"0.03490","Q":"151","o":"0.03454","h":"0.03514","l":"0.03326","v":"238020543","q":"8157654.50000","O":1654708920000,"C":1654795352901,"F":95297658,"L":95352174,"n":54517},{"e":"24hrTicker","E":1654795352981,"s":"DOGEBUSD","p":"-0.000130","P":"-0.163","w":"0.079766","c":"0.079860","Q":"4303","o":"0.079990","h":"0.081010","l":"0.078670","v":"166934340","q":"13315733.100000","O":1654708920000,"C":1654795352945,"F":47879042,"L":47916927,"n":37882},{"e":"24hrTicker","E":1654795353263,"s":"BTCUSDT","p":"-83.50","P":"-0.275","w":"30253.67","c":"30290.40","Q":"0.001","o":"30373.90","h":"30691.90","l":"29900.00","v":"316108.488","q":"9563442749.18","O":1654708920000,"C":1654795353213,"F":2340418538,"L":2343348586,"n":2930000},{"e":"24hrTicker","E":1654795352910,"s":"AUDIOUSDT","p":"-0.0062","P":"-1.405","w":"0.4356","c":"0.4350","Q":"108","o":"0.4412","h":"0.4560","l":"0.4203","v":"91071001","q":"39669518.6900","O":1654708920000,"C":1654795352880,"F":79298742,"L":79471387,"n":172643},{"e":"24hrTicker","E":1654795353183,"s":"ETHUSDT","p":"5.73","P":"0.318","w":"1799.21","c":"1806.68","Q":"0.056","o":"1800.95","h":"1832.70","l":"1770.54","v":"1911577.832","q":"3439322670.51","O":1654708920000,"C":1654795353103,"F":1718705485,"L":1720803951,"n":2098446},{"e":"24hrTicker","E":1654795352859,"s":"BCHUSDT","p":"-0.04","P":"-0.022","w":"177.34","c":"178.10","Q":"0.063","o":"178.14","h":"180.73","l":"174.63","v":"244948.685","q":"43439782.01","O":1654708920000,"C":1654795352844,"F":324698692,"L":324867858,"n":169164},{"e":"24hrTicker","E":1654795352891,"s":"C98USDT","p":"0.0028","P":"0.387","w":"0.7052","c":"0.7267","Q":"371","o":"0.7239","h":"0.7350","l":"0.6832","v":"49246211","q":"34727786.1300","O":1654708920000,"C":1654795352869,"F":93648407,"L":93811947,"n":163539},{"e":"24hrTicker","E":1654795353137,"s":"XRPUSDT","p":"0.0013","P":"0.325","w":"0.4004","c":"0.4017","Q":"62.2","o":"0.4004","h":"0.4040","l":"0.3962","v":"451988527.8","q":"180989081.8500","O":1654708920000,"C":1654795353065,"F":881305101,"L":881610152,"n":305047},{"e":"24hrTicker","E":1654795353165,"s":"MASKUSDT","p":"0.0350","P":"1.902","w":"1.8809","c":"1.8750","Q":"500","o":"1.8400","h":"2.0050","l":"1.7890","v":"28394883","q":"53407198.1800","O":1654708920000,"C":1654795353089,"F":64747442,"L":64919885,"n":172443},{"e":"24hrTicker","E":1654795353219,"s":"EOSUSDT","p":"-0.007","P":"-0.553","w":"1.255","c":"1.258","Q":"250.0","o":"1.265","h":"1.276","l":"1.240","v":"52565281.0","q":"65979158.700","O":1654708920000,"C":1654795353157,"F":431694096,"L":431847648,"n":153550},{"e":"24hrTicker","E":1654795352955,"s":"ATAUSDT","p":"0.0103","P":"5.274","w":"0.2291","c":"0.2056","Q":"1437","o":"0.1953","h":"0.2799","l":"0.1946","v":"2065860638","q":"473208279.9500","O":1654708920000,"C":1654795352919,"F":42985511,"L":44471962,"n":1485963},{"e":"24hrTicker","E":1654795352891,"s":"SOLBUSD","p":"1.5000","P":"3.809","w":"39.9761","c":"40.8800","Q":"5","o":"39.3800","h":"41.9000","l":"38.3600","v":"3318766","q":"132671294.6500","O":1654708920000,"C":1654795352867,"F":42353161,"L":42552632,"n":199471},{"e":"24hrTicker","E":1654795352859,"s":"LTCUSDT","p":"-0.56","P":"-0.901","w":"61.51","c":"61.61","Q":"0.218","o":"62.17","h":"62.37","l":"60.55","v":"1897147.848","q":"116702082.09","O":1654708920000,"C":1654795352844,"F":523872660,"L":524166298,"n":293635},{"e":"24hrTicker","E":1654795352864,"s":"DYDXUSDT","p":"0.041","P":"2.439","w":"1.693","c":"1.722","Q":"3.1","o":"1.681","h":"1.766","l":"1.625","v":"30831258.8","q":"52198750.020","O":1654708920000,"C":1654795352845,"F":153965888,"L":154129980,"n":164092},{"e":"24hrTicker","E":1654795352893,"s":"ETCUSDT","p":"0.081","P":"0.379","w":"21.336","c":"21.451","Q":"23.62","o":"21.370","h":"21.643","l":"21.022","v":"2712204.99","q":"57866484.480","O":1654708920000,"C":1654795352872,"F":439871526,"L":440065471,"n":193946},{"e":"24hrTicker","E":1654795352688,"s":"1000XECUSDT","p":"-0.00214","P":"-3.981","w":"0.05238","c":"0.05161","Q":"1254","o":"0.05375","h":"0.05417","l":"0.05116","v":"185649902","q":"9724113.21000","O":1654708920000,"C":1654795352679,"F":34565588,"L":34622620,"n":57032},{"e":"24hrTicker","E":1654795352891,"s":"LINKUSDT","p":"0.841","P":"9.753","w":"9.037","c":"9.464","Q":"83.96","o":"8.623","h":"9.567","l":"8.453","v":"65563176.85","q":"592490165.070","O":1654708920000,"C":1654795352867,"F":528334513,"L":529417040,"n":1082117},{"e":"24hrTicker","E":1654795352856,"s":"GALAUSDT","p":"-0.00173","P":"-2.188","w":"0.07613","c":"0.07732","Q":"10586","o":"0.07905","h":"0.07923","l":"0.07365","v":"2982230272","q":"227031601.87000","O":1654708920000,"C":1654795352843,"F":355729046,"L":356285046,"n":555967},{"e":"24hrTicker","E":1654795353168,"s":"XLMUSDT","p":"-0.00087","P":"-0.615","w":"0.14022","c":"0.14054","Q":"1406","o":"0.14141","h":"0.14251","l":"0.13813","v":"167816890","q":"23531379.71000","O":1654708920000,"C":1654795353091,"F":262980813,"L":263084033,"n":103219},{"e":"24hrTicker","E":1654795353015,"s":"ADAUSDT","p":"-0.00930","P":"-1.419","w":"0.64347","c":"0.64620","Q":"77","o":"0.65550","h":"0.65800","l":"0.62540","v":"1152909175","q":"741866652.52000","O":1654708920000,"C":1654795352971,"F":735503979,"L":736549302,"n":1045309},{"e":"24hrTicker","E":1654795352915,"s":"XMRUSDT","p":"-0.08","P":"-0.043","w":"186.46","c":"185.17","Q":"0.323","o":"185.25","h":"189.61","l":"183.66","v":"181918.590","q":"33920928.77","O":1654708920000,"C":1654795352888,"F":133378646,"L":133506881,"n":128235},{"e":"24hrTicker","E":1654795352901,"s":"DASHUSDT","p":"-0.36","P":"-0.615","w":"57.83","c":"58.17","Q":"1.195","o":"58.53","h":"58.66","l":"57.03","v":"228080.745","q":"13190866.75","O":1654708920000,"C":1654795352875,"F":132201507,"L":132269852,"n":68344},{"e":"24hrTicker","E":1654795352931,"s":"ZECUSDT","p":"0.80","P":"0.864","w":"92.46","c":"93.41","Q":"0.230","o":"92.61","h":"93.96","l":"90.40","v":"376119.745","q":"34777447.68","O":1654708920000,"C":1654795352901,"F":176090425,"L":176233033,"n":142609},{"e":"24hrTicker","E":1654795352993,"s":"ARPAUSDT","p":"-0.00114","P":"-2.733","w":"0.04031","c":"0.04058","Q":"2276","o":"0.04172","h":"0.04240","l":"0.03723","v":"1824222789","q":"73526365.60000","O":1654708920000,"C":1654795352953,"F":41125646,"L":41393283,"n":267635},{"e":"24hrTicker","E":1654795353239,"s":"XTZUSDT","p":"0.192","P":"9.375","w":"2.160","c":"2.240","Q":"173.2","o":"2.048","h":"2.269","l":"2.003","v":"77327765.8","q":"167002045.350","O":1654708920000,"C":1654795353184,"F":218430591,"L":218823116,"n":392517},{"e":"24hrTicker","E":1654795353178,"s":"BNBUSDT","p":"0.620","P":"0.213","w":"289.481","c":"291.510","Q":"0.85","o":"290.890","h":"293.350","l":"285.960","v":"1015741.21","q":"294037702.380","O":1654708920000,"C":1654795353100,"F":717697261,"L":718225468,"n":528202},{"e":"24hrTicker","E":1654795353263,"s":"CTSIUSDT","p":"-0.0043","P":"-1.810","w":"0.2371","c":"0.2333","Q":"148","o":"0.2376","h":"0.2483","l":"0.2277","v":"217560020","q":"51576697.3300","O":1654708920000,"C":1654795353213,"F":30832151,"L":31006773,"n":174622},{"e":"24hrTicker","E":1654795352998,"s":"ATOMUSDT","p":"0.046","P":"0.517","w":"8.863","c":"8.947","Q":"12.50","o":"8.901","h":"9.197","l":"8.644","v":"14948228.55","q":"132485434.700","O":1654708920000,"C":1654795352959,"F":382342958,"L":382714757,"n":371799},{"e":"24hrTicker","E":1654795353219,"s":"LPTUSDT","p":"-0.380","P":"-2.975","w":"12.461","c":"12.393","Q":"1.3","o":"12.773","h":"12.910","l":"12.062","v":"1201834.8","q":"14976135.230","O":1654708920000,"C":1654795353160,"F":25332665,"L":25410022,"n":77358},{"e":"24hrTicker","E":1654795352868,"s":"ONTUSDT","p":"0.0009","P":"0.296","w":"0.2995","c":"0.3052","Q":"29.0","o":"0.3043","h":"0.3071","l":"0.2917","v":"38166089.0","q":"11429374.7500","O":1654708920000,"C":1654795352847,"F":126199937,"L":126262718,"n":62781},{"e":"24hrTicker","E":1654795353129,"s":"IOTAUSDT","p":"-0.0004","P":"-0.113","w":"0.3497","c":"0.3549","Q":"1000.0","o":"0.3553","h":"0.3582","l":"0.3406","v":"37327068.1","q":"13052817.1100","O":1654708920000,"C":1654795353053,"F":126154864,"L":126218889,"n":64026},{"e":"24hrTicker","E":1654795353195,"s":"ENSUSDT","p":"0.258","P":"2.228","w":"11.646","c":"11.836","Q":"70.5","o":"11.578","h":"12.094","l":"11.244","v":"4114933.8","q":"47921143.020","O":1654708920000,"C":1654795353137,"F":65644324,"L":65891134,"n":246810},{"e":"24hrTicker","E":1654795353110,"s":"BATUSDT","p":"0.0077","P":"1.919","w":"0.3967","c":"0.4090","Q":"3480.9","o":"0.4013","h":"0.4092","l":"0.3869","v":"33813109.7","q":"13412890.7000","O":1654708920000,"C":1654795353040,"F":119869594,"L":119931854,"n":62259},{"e":"24hrTicker","E":1654795353217,"s":"PEOPLEUSDT","p":"-0.00016","P":"-0.729","w":"0.02139","c":"0.02178","Q":"12744","o":"0.02194","h":"0.02230","l":"0.02042","v":"4316872245","q":"92316856.71000","O":1654708920000,"C":1654795353148,"F":122508949,"L":122811064,"n":302109},{"e":"24hrTicker","E":1654795352754,"s":"VETUSDT","p":"0.002250","P":"7.358","w":"0.031280","c":"0.032830","Q":"1965","o":"0.030580","h":"0.032850","l":"0.029850","v":"3078331108","q":"96288842.390000","O":1654708920000,"C":1654795352741,"F":253254135,"L":253493732,"n":239595},{"e":"24hrTicker","E":1654795352910,"s":"ROSEUSDT","p":"0.00074","P":"1.108","w":"0.06644","c":"0.06751","Q":"5643","o":"0.06677","h":"0.06812","l":"0.06487","v":"340518565","q":"22622870.70000","O":1654708920000,"C":1654795352880,"F":58216457,"L":58330559,"n":114102},{"e":"24hrTicker","E":1654795353019,"s":"QTUMUSDT","p":"0.014","P":"0.353","w":"3.945","c":"3.981","Q":"460.0","o":"3.967","h":"4.007","l":"3.872","v":"2757722.1","q":"10878381.950","O":1654708920000,"C":1654795352974,"F":138240134,"L":138291636,"n":51502},{"e":"24hrTicker","E":1654795353026,"s":"IOSTUSDT","p":"0.000096","P":"0.565","w":"0.016839","c":"0.017080","Q":"10040","o":"0.016984","h":"0.017147","l":"0.016662","v":"638895057","q":"10758216.100000","O":1654708920000,"C":1654795352979,"F":150802083,"L":150874566,"n":72484},{"e":"24hrTicker","E":1654795352791,"s":"DUSKUSDT","p":"0.00138","P":"0.927","w":"0.15148","c":"0.15031","Q":"2574","o":"0.14893","h":"0.15827","l":"0.14422","v":"113128024","q":"17136873.84000","O":1654708920000,"C":1654795352783,"F":28885133,"L":28975279,"n":90146},{"e":"24hrTicker","E":1654795353192,"s":"ALGOUSDT","p":"-0.0018","P":"-0.434","w":"0.4143","c":"0.4130","Q":"979.5","o":"0.4148","h":"0.4319","l":"0.4030","v":"205952695.6","q":"85331018.1700","O":1654708920000,"C":1654795353117,"F":226044909,"L":226309020,"n":264110},{"e":"24hrTicker","E":1654795352960,"s":"IMXUSDT","p":"0.0010","P":"0.101","w":"0.9737","c":"0.9873","Q":"481","o":"0.9863","h":"1.0050","l":"0.9407","v":"22896562","q":"22294618.3800","O":1654708920000,"C":1654795352920,"F":35207631,"L":35301960,"n":94330},{"e":"24hrTicker","E":1654795352943,"s":"ZILUSDT","p":"-0.00041","P":"-0.824","w":"0.04915","c":"0.04937","Q":"200","o":"0.04978","h":"0.04985","l":"0.04844","v":"1228853639","q":"60394467.81000","O":1654708920000,"C":1654795352912,"F":234754000,"L":234947526,"n":193526},{"e":"24hrTicker","E":1654795352635,"s":"API3USDT","p":"0.3080","P":"20.643","w":"1.6859","c":"1.8000","Q":"169.0","o":"1.4920","h":"1.8670","l":"1.3930","v":"42870899.2","q":"72277966.0700","O":1654708920000,"C":1654795352627,"F":22456646,"L":22730185,"n":273523},{"e":"24hrTicker","E":1654795353144,"s":"GMTUSDT","p":"0.00890","P":"0.897","w":"0.99614","c":"1.00060","Q":"100","o":"0.99170","h":"1.04830","l":"0.94940","v":"681013290","q":"678384833.33000","O":1654708920000,"C":1654795353071,"F":380834979,"L":382293069,"n":1458080},{"e":"24hrTicker","E":1654795353180,"s":"COMPUSDT","p":"0.43","P":"0.767","w":"55.80","c":"56.48","Q":"3.985","o":"56.05","h":"56.83","l":"54.67","v":"319953.858","q":"17854226.61","O":1654708920000,"C":1654795353102,"F":139129348,"L":139212486,"n":83137},{"e":"24hrTicker","E":1654795352943,"s":"OMGUSDT","p":"0.0950","P":"3.567","w":"2.7164","c":"2.7580","Q":"271.7","o":"2.6630","h":"2.8160","l":"2.5670","v":"13911102.9","q":"37788312.4600","O":1654708920000,"C":1654795352911,"F":184652552,"L":184795151,"n":142599},{"e":"24hrTicker","E":1654795353096,"s":"APEUSDT","p":"-0.1280","P":"-2.146","w":"5.7896","c":"5.8360","Q":"11","o":"5.9640","h":"5.9680","l":"5.6450","v":"32646542","q":"189008790.1300","O":1654708920000,"C":1654795353034,"F":199815714,"L":200286135,"n":470416},{"e":"24hrTicker","E":1654795353120,"s":"DOGEUSDT","p":"-0.000150","P":"-0.187","w":"0.079829","c":"0.079910","Q":"4454","o":"0.080060","h":"0.081030","l":"0.078660","v":"1053456386","q":"84096389.150000","O":1654708920000,"C":1654795353048,"F":923111580,"L":923341482,"n":229901},{"e":"24hrTicker","E":1654795352869,"s":"BTCUSDT_220624","p":"-81.6","P":"-0.268","w":"30284.3","c":"30348.9","Q":"0.099","o":"30430.5","h":"30750.0","l":"29950.4","v":"1558.372","q":"47194218.06","O":1654708920000,"C":1654795352849,"F":3333041,"L":3362376,"n":29336},{"e":"24hrTicker","E":1654795352993,"s":"SXPUSDT","p":"-0.0003","P":"-0.055","w":"0.5390","c":"0.5412","Q":"9.8","o":"0.5415","h":"0.5530","l":"0.5282","v":"43192517.1","q":"23282893.1500","O":1654708920000,"C":1654795352955,"F":233167658,"L":233255097,"n":87438},{"e":"24hrTicker","E":1654795352473,"s":"BNXUSDT","p":"-2.5300","P":"-1.906","w":"132.5810","c":"130.1800","Q":"1.2","o":"132.7100","h":"136.9300","l":"129.0100","v":"213279.3","q":"28276785.1100","O":1654708920000,"C":1654795352466,"F":22866031,"L":22963868,"n":97836},{"e":"24hrTicker","E":1654795352900,"s":"WOOUSDT","p":"-0.01097","P":"-6.113","w":"0.17230","c":"0.16847","Q":"591","o":"0.17944","h":"0.18029","l":"0.16508","v":"145446761","q":"25060295.49000","O":1654708920000,"C":1654795352875,"F":7732464,"L":7824662,"n":92196},{"e":"24hrTicker","E":1654795352910,"s":"KAVAUSDT","p":"-0.0158","P":"-0.605","w":"2.6181","c":"2.5979","Q":"53.4","o":"2.6137","h":"2.7298","l":"2.5174","v":"14553299.5","q":"38101967.7400","O":1654708920000,"C":1654795352883,"F":153577459,"L":153725792,"n":148332},{"e":"24hrTicker","E":1654795353141,"s":"JASMYUSDT","p":"0.000050","P":"0.417","w":"0.012070","c":"0.012040","Q":"12067","o":"0.011990","h":"0.012520","l":"0.011700","v":"4403814880","q":"53152847.670000","O":1654708920000,"C":1654795353069,"F":22802952,"L":22944552,"n":141594},{"e":"24hrTicker","E":1654795353221,"s":"BANDUSDT","p":"0.6268","P":"36.700","w":"2.1665","c":"2.3347","Q":"25.6","o":"1.7079","h":"2.5362","l":"1.6322","v":"161736928.0","q":"350405380.8400","O":1654708920000,"C":1654795353171,"F":131200258,"L":132126771,"n":925446},{"e":"24hrTicker","E":1654795352912,"s":"RLCUSDT","p":"0.0365","P":"3.983","w":"0.9284","c":"0.9528","Q":"50.0","o":"0.9163","h":"0.9699","l":"0.8753","v":"28966756.9","q":"26891543.8800","O":1654708920000,"C":1654795352886,"F":124506405,"L":124621472,"n":115068},{"e":"24hrTicker","E":1654795353267,"s":"WAVESUSDT","p":"0.2610","P":"3.330","w":"7.8076","c":"8.0980","Q":"21.4","o":"7.8370","h":"8.2200","l":"7.6080","v":"38968334.0","q":"304249602.5300","O":1654708920000,"C":1654795353215,"F":290946167,"L":291682367,"n":736189},{"e":"24hrTicker","E":1654795352960,"s":"GALUSDT","p":"-0.17000","P":"-4.123","w":"3.99105","c":"3.95310","Q":"102","o":"4.12310","h":"4.17700","l":"3.79730","v":"16050274","q":"64057480.18000","O":1654708920000,"C":1654795352920,"F":54732715,"L":55026141,"n":293418},{"e":"24hrTicker","E":1654795352982,"s":"MKRUSDT","p":"-8.60","P":"-0.743","w":"1152.74","c":"1149.60","Q":"0.129","o":"1158.20","h":"1174.30","l":"1134.10","v":"8188.740","q":"9439525.25","O":1654708920000,"C":1654795352946,"F":102752518,"L":102819339,"n":66822},{"e":"24hrTicker","E":1654795352945,"s":"NEARBUSD","p":"-0.0510000","P":"-0.979","w":"5.1168741","c":"5.1560000","Q":"133.3","o":"5.2070000","h":"5.2150000","l":"4.9840000","v":"2282321.3","q":"11678350.8200000","O":1654708920000,"C":1654795352913,"F":1596608,"L":1629683,"n":33076},{"e":"24hrTicker","E":1654795353136,"s":"GMTBUSD","p":"0.0091000","P":"0.919","w":"0.9944784","c":"0.9998000","Q":"518.7","o":"0.9907000","h":"1.0472000","l":"0.9500000","v":"42745136.1","q":"42509115.7700000","O":1654708920000,"C":1654795353062,"F":6025109,"L":6137162,"n":112051},{"e":"24hrTicker","E":1654795352857,"s":"SNXUSDT","p":"0.038","P":"1.415","w":"2.680","c":"2.724","Q":"272.5","o":"2.686","h":"2.790","l":"2.589","v":"8682019.6","q":"23270970.760","O":1654708920000,"C":1654795352843,"F":129608726,"L":129713180,"n":104455},{"e":"24hrTicker","E":1654795352909,"s":"DOTUSDT","p":"0.301","P":"3.317","w":"9.175","c":"9.376","Q":"370.4","o":"9.075","h":"9.462","l":"8.879","v":"24076477.4","q":"220912782.690","O":1654708920000,"C":1654795352877,"F":522487459,"L":523010703,"n":523240},{"e":"24hrTicker","E":1654795352920,"s":"FTMBUSD","p":"0.0024000","P":"0.696","w":"0.3390250","c":"0.3472000","Q":"150","o":"0.3448000","h":"0.3509000","l":"0.3276000","v":"18511523","q":"6275869.4800000","O":1654708920000,"C":1654795352890,"F":706258,"L":724278,"n":18021},{"e":"24hrTicker","E":1654795353074,"s":"DODOBUSD","p":"-0.0090000","P":"-4.782","w":"0.1915353","c":"0.1792000","Q":"639","o":"0.1882000","h":"0.2274000","l":"0.1727000","v":"195387784","q":"37423659.9200000","O":1654708920000,"C":1654795353018,"F":1767772,"L":1903338,"n":135562},{"e":"24hrTicker","E":1654795352891,"s":"ANCBUSD","p":"-0.0133000","P":"-9.091","w":"0.1279416","c":"0.1330000","Q":"2934","o":"0.1463000","h":"0.1638000","l":"0.0997000","v":"996085152","q":"127440699.4500000","O":1654708920000,"C":1654795352868,"F":10115921,"L":10721278,"n":605345},{"e":"24hrTicker","E":1654795352890,"s":"YFIUSDT","p":"94.0","P":"1.248","w":"7529.9","c":"7626.0","Q":"0.022","o":"7532.0","h":"7746.0","l":"7337.0","v":"3325.218","q":"25038407.96","O":1654708920000,"C":1654795352866,"F":150805363,"L":150899754,"n":94392},{"e":"24hrTicker","E":1654795353168,"s":"BALUSDT","p":"-0.360","P":"-4.453","w":"7.850","c":"7.724","Q":"182.9","o":"8.084","h":"8.353","l":"7.569","v":"6046325.7","q":"47464760.930","O":1654708920000,"C":1654795353091,"F":82237342,"L":82411732,"n":174373},{"e":"24hrTicker","E":1654795353222,"s":"LUNA2BUSD","p":"-0.5958000","P":"-17.450","w":"2.6813115","c":"2.8185000","Q":"8","o":"3.4143000","h":"3.4900000","l":"1.7645000","v":"555861825","q":"1490438728.7800000","O":1654708920000,"C":1654795353175,"F":11649176,"L":16784795,"n":5131106},{"e":"24hrTicker","E":1654795353131,"s":"TRBUSDT","p":"-0.210","P":"-1.549","w":"12.850","c":"13.350","Q":"2.5","o":"13.560","h":"14.110","l":"11.940","v":"5062547.7","q":"65052560.950","O":1654708920000,"C":1654795353057,"F":90608923,"L":90847098,"n":238147},{"e":"24hrTicker","E":1654795353250,"s":"OPUSDT","p":"-0.1477000","P":"-15.048","w":"0.8333900","c":"0.8338000","Q":"871.6","o":"0.9815000","h":"0.9826000","l":"0.6968000","v":"551805119.9","q":"459868880.7200000","O":1654708920000,"C":1654795353206,"F":11485282,"L":13008646,"n":1522532},{"e":"24hrTicker","E":1654795352685,"s":"DOTBUSD","p":"0.3030000","P":"3.343","w":"9.1953635","c":"9.3670000","Q":"7.3","o":"9.0640000","h":"9.4540000","l":"8.8630000","v":"511043.1","q":"4699227.0500000","O":1654708920000,"C":1654795352675,"F":24687,"L":75819,"n":51132},{"e":"24hrTicker","E":1654795353153,"s":"RUNEUSDT","p":"0.0050","P":"0.173","w":"2.8834","c":"2.8940","Q":"3","o":"2.8890","h":"2.9670","l":"2.8020","v":"21465793","q":"61893664.5500","O":1654708920000,"C":1654795353079,"F":210126393,"L":210350923,"n":224528},{"e":"24hrTicker","E":1654795352931,"s":"EGLDUSDT","p":"-3.710","P":"-5.563","w":"63.079","c":"62.980","Q":"0.1","o":"66.690","h":"66.920","l":"60.810","v":"1274709.2","q":"80407739.090","O":1654708920000,"C":1654795352900,"F":142061577,"L":142339812,"n":278032},{"e":"24hrTicker","E":1654795352998,"s":"SOLUSDT","p":"1.5000","P":"3.807","w":"40.0922","c":"40.9000","Q":"3","o":"39.4000","h":"41.9600","l":"38.3800","v":"24383567","q":"977590042.0200","O":1654708920000,"C":1654795352958,"F":461569315,"L":462575578,"n":1006261},{"e":"24hrTicker","E":1654795352957,"s":"ICXUSDT","p":"-0.0040","P":"-1.014","w":"0.3890","c":"0.3903","Q":"737","o":"0.3943","h":"0.3960","l":"0.3805","v":"46668334","q":"18154287.1800","O":1654708920000,"C":1654795352920,"F":88318809,"L":88390142,"n":71329},{"e":"24hrTicker","E":1654795352857,"s":"BLZUSDT","p":"0.00351","P":"2.111","w":"0.16895","c":"0.16982","Q":"124","o":"0.16631","h":"0.19329","l":"0.14126","v":"2823489740","q":"477042687.54000","O":1654708920000,"C":1654795352843,"F":102645689,"L":104150430,"n":1504397},{"e":"24hrTicker","E":1654795352933,"s":"AVAXUSDT","p":"0.6400","P":"2.622","w":"24.5204","c":"25.0500","Q":"1","o":"24.4100","h":"25.3800","l":"23.7000","v":"15684363","q":"384586514.2500","O":1654708920000,"C":1654795352901,"F":338720397,"L":339266807,"n":546407},{"e":"24hrTicker","E":1654795353046,"s":"FTMUSDT","p":"0.002400","P":"0.695","w":"0.339449","c":"0.347500","Q":"128","o":"0.345100","h":"0.351400","l":"0.327700","v":"690367417","q":"234344628.280000","O":1654708920000,"C":1654795352992,"F":499361012,"L":499890236,"n":529217},{"e":"24hrTicker","E":1654795353010,"s":"HNTUSDT","p":"1.1640","P":"10.595","w":"11.3934","c":"12.1500","Q":"3","o":"10.9860","h":"12.3920","l":"10.5010","v":"11624374","q":"132440617.3700","O":1654708920000,"C":1654795352968,"F":98586111,"L":99098667,"n":512207},{"e":"24hrTicker","E":1654795352910,"s":"ENJUSDT","p":"0.01660","P":"2.662","w":"0.62229","c":"0.64030","Q":"86","o":"0.62370","h":"0.64700","l":"0.60580","v":"46103226","q":"28689648.68000","O":1654708920000,"C":1654795352880,"F":190988825,"L":191097284,"n":108459},{"e":"24hrTicker","E":1654795352913,"s":"TOMOUSDT","p":"0.0248","P":"3.907","w":"0.6473","c":"0.6595","Q":"30","o":"0.6347","h":"0.6929","l":"0.5932","v":"73655927","q":"47674048.5500","O":1654708920000,"C":1654795352887,"F":85936573,"L":86131345,"n":194769},{"e":"24hrTicker","E":1654795353180,"s":"RENUSDT","p":"-0.00210","P":"-1.336","w":"0.15358","c":"0.15510","Q":"2243","o":"0.15720","h":"0.15780","l":"0.14860","v":"96431894","q":"14809836.24000","O":1654708920000,"C":1654795353102,"F":108121020,"L":108195518,"n":74498},{"e":"24hrTicker","E":1654795352787,"s":"KSMUSDT","p":"0.900","P":"1.347","w":"66.872","c":"67.730","Q":"0.1","o":"66.830","h":"68.400","l":"65.370","v":"260673.4","q":"17431851.040","O":1654708920000,"C":1654795352781,"F":122742960,"L":122820683,"n":77724},{"e":"24hrTicker","E":1654795353186,"s":"NEARUSDT","p":"-0.0530","P":"-1.017","w":"5.1144","c":"5.1580","Q":"38","o":"5.2110","h":"5.2180","l":"4.9800","v":"35479907","q":"181458214.7200","O":1654708920000,"C":1654795353110,"F":351802510,"L":352206109,"n":403597},{"e":"24hrTicker","E":1654795353139,"s":"AAVEUSDT","p":"-0.450","P":"-0.459","w":"97.018","c":"97.500","Q":"0.8","o":"97.950","h":"99.670","l":"94.680","v":"752854.6","q":"73040410.070","O":1654708920000,"C":1654795353066,"F":198858733,"L":199033975,"n":175243},{"e":"24hrTicker","E":1654795352891,"s":"FILUSDT","p":"-0.022","P":"-0.302","w":"7.210","c":"7.252","Q":"0.8","o":"7.274","h":"7.325","l":"7.065","v":"6909176.6","q":"49817415.660","O":1654708920000,"C":1654795352867,"F":297711517,"L":297873290,"n":161773},{"e":"24hrTicker","E":1654795352912,"s":"RSRUSDT","p":"-0.000674","P":"-7.403","w":"0.008638","c":"0.008430","Q":"7297","o":"0.009104","h":"0.009126","l":"0.008216","v":"13397496062","q":"115731998.820000","O":1654708920000,"C":1654795352886,"F":138493065,"L":138916277,"n":423208},{"e":"24hrTicker","E":1654795352861,"s":"LRCUSDT","p":"-0.00280","P":"-0.531","w":"0.52267","c":"0.52420","Q":"14","o":"0.52700","h":"0.53880","l":"0.51300","v":"74364942","q":"38868211.20000","O":1654708920000,"C":1654795352845,"F":247540855,"L":247688849,"n":147995},{"e":"24hrTicker","E":1654795353144,"s":"MATICUSDT","p":"0.03730","P":"6.104","w":"0.62189","c":"0.64840","Q":"1046","o":"0.61110","h":"0.65290","l":"0.60050","v":"199110855","q":"123824510.34000","O":1654708920000,"C":1654795353070,"F":492908193,"L":493202359,"n":294166},{"e":"24hrTicker","E":1654795353166,"s":"OCEANUSDT","p":"0.03098","P":"11.143","w":"0.29601","c":"0.30900","Q":"2001","o":"0.27802","h":"0.31989","l":"0.26469","v":"532729791","q":"157691346.96000","O":1654708920000,"C":1654795353090,"F":97087245,"L":97663111,"n":575826},{"e":"24hrTicker","E":1654795352658,"s":"CVCUSDT","p":"-0.00439","P":"-2.320","w":"0.18469","c":"0.18486","Q":"38","o":"0.18925","h":"0.18993","l":"0.18085","v":"74146428","q":"13694345.89000","O":1654708920000,"C":1654795352651,"F":92671322,"L":92740873,"n":69552},{"e":"24hrTicker","E":1654795353021,"s":"BELUSDT","p":"-0.11300","P":"-8.027","w":"1.32934","c":"1.29480","Q":"1017","o":"1.40780","h":"1.46700","l":"1.21330","v":"431958821","q":"574221660.49000","O":1654708920000,"C":1654795352974,"F":113782352,"L":115144418,"n":1361763},{"e":"24hrTicker","E":1654795353082,"s":"AXSUSDT","p":"-0.11000","P":"-0.558","w":"19.56802","c":"19.60000","Q":"32","o":"19.71000","h":"19.97000","l":"19.21000","v":"5291493","q":"103544066.99000","O":1654708920000,"C":1654795353024,"F":320673000,"L":320853481,"n":180482},{"e":"24hrTicker","E":1654795352934,"s":"ALPHAUSDT","p":"-0.00490","P":"-2.929","w":"0.16640","c":"0.16240","Q":"431","o":"0.16730","h":"0.18070","l":"0.15640","v":"433593730","q":"72149714.99000","O":1654708920000,"C":1654795352901,"F":120357182,"L":120614640,"n":257452},{"e":"24hrTicker","E":1654795352943,"s":"ZENUSDT","p":"-0.054","P":"-0.272","w":"19.516","c":"19.770","Q":"5.0","o":"19.824","h":"19.897","l":"19.033","v":"500196.3","q":"9761676.890","O":1654708920000,"C":1654795352911,"F":97979584,"L":98043980,"n":64397},{"e":"24hrTicker","E":1654795353260,"s":"SKLUSDT","p":"0.00243","P":"3.378","w":"0.07245","c":"0.07436","Q":"3279","o":"0.07193","h":"0.07527","l":"0.06810","v":"635410764","q":"46033089.50000","O":1654708920000,"C":1654795353210,"F":111497471,"L":111693502,"n":196032},{"e":"24hrTicker","E":1654795352911,"s":"GRTUSDT","p":"-0.00088","P":"-0.581","w":"0.14839","c":"0.15052","Q":"250","o":"0.15140","h":"0.15202","l":"0.14267","v":"196339086","q":"29134277.46000","O":1654708920000,"C":1654795352886,"F":189306153,"L":189457621,"n":151469},{"e":"24hrTicker","E":1654795353096,"s":"1INCHUSDT","p":"-0.0164","P":"-1.976","w":"0.8159","c":"0.8136","Q":"177","o":"0.8300","h":"0.8317","l":"0.8006","v":"25669517","q":"20943318.6700","O":1654708920000,"C":1654795353034,"F":185801554,"L":185887764,"n":86209},{"e":"24hrTicker","E":1654795353263,"s":"BTCBUSD","p":"-79.0","P":"-0.260","w":"30221.0","c":"30270.2","Q":"0.002","o":"30349.2","h":"30660.7","l":"29878.0","v":"47761.599","q":"1443405458.74","O":1654708920000,"C":1654795353212,"F":197655396,"L":198117781,"n":462362},{"e":"24hrTicker","E":1654795352880,"s":"CHZUSDT","p":"-0.00035","P":"-0.287","w":"0.12051","c":"0.12163","Q":"1394","o":"0.12198","h":"0.12221","l":"0.11805","v":"215270099","q":"25942539.17000","O":1654708920000,"C":1654795352861,"F":250376727,"L":250479952,"n":103224},{"e":"24hrTicker","E":1654795352915,"s":"SANDUSDT","p":"0.00350","P":"0.269","w":"1.30062","c":"1.30650","Q":"5","o":"1.30300","h":"1.32310","l":"1.28060","v":"81092760","q":"105471070.27000","O":1654708920000,"C":1654795352888,"F":434056206,"L":434352757,"n":296552},{"e":"24hrTicker","E":1654795352644,"s":"BTSUSDT","p":"0.00019","P":"1.446","w":"0.01299","c":"0.01333","Q":"6766","o":"0.01314","h":"0.01358","l":"0.01248","v":"964621722","q":"12534660.26000","O":1654708920000,"C":1654795352633,"F":48326646,"L":48385656,"n":59011},{"e":"24hrTicker","E":1654795353190,"s":"LITUSDT","p":"-0.308","P":"-27.257","w":"1.030","c":"0.822","Q":"60.2","o":"1.130","h":"1.333","l":"0.759","v":"666505986.9","q":"686780244.090","O":1654708920000,"C":1654795353113,"F":74105140,"L":75952056,"n":1845276},{"e":"24hrTicker","E":1654795352900,"s":"UNFIUSDT","p":"-1.146","P":"-11.499","w":"8.581","c":"8.820","Q":"10.3","o":"9.966","h":"10.320","l":"7.158","v":"157694926.6","q":"1353204260.300","O":1654708920000,"C":1654795352875,"F":94921083,"L":98399401,"n":3471310},{"e":"24hrTicker","E":1654795353205,"s":"REEFUSDT","p":"-0.000054","P":"-1.251","w":"0.004230","c":"0.004262","Q":"11768","o":"0.004316","h":"0.004375","l":"0.004119","v":"5456634783","q":"23084040.820000","O":1654708920000,"C":1654795353142,"F":100562739,"L":100658585,"n":95846},{"e":"24hrTicker","E":1654795352897,"s":"RVNUSDT","p":"-0.00006","P":"-0.217","w":"0.02744","c":"0.02764","Q":"227","o":"0.02770","h":"0.02799","l":"0.02685","v":"319984110","q":"8778931.45000","O":1654708920000,"C":1654795352874,"F":75032418,"L":75082126,"n":49709},{"e":"24hrTicker","E":1654795352685,"s":"XEMUSDT","p":"0.0008","P":"1.587","w":"0.0503","c":"0.0512","Q":"309","o":"0.0504","h":"0.0520","l":"0.0495","v":"187480594","q":"9432257.2000","O":1654708920000,"C":1654795352677,"F":57677526,"L":57718969,"n":41443},{"e":"24hrTicker","E":1654795352982,"s":"COTIUSDT","p":"-0.00629","P":"-4.532","w":"0.13814","c":"0.13250","Q":"13494","o":"0.13879","h":"0.14492","l":"0.13001","v":"634240428","q":"87611834.31000","O":1654708920000,"C":1654795352946,"F":123265119,"L":123595835,"n":330712},{"e":"24hrTicker","E":1654795352929,"s":"MANAUSDT","p":"-0.0036","P":"-0.362","w":"0.9870","c":"0.9920","Q":"454","o":"0.9956","h":"1.0039","l":"0.9640","v":"80931914","q":"79876648.0000","O":1654708920000,"C":1654795352898,"F":328781638,"L":329074898,"n":293256},{"e":"24hrTicker","E":1654795353153,"s":"ALICEUSDT","p":"0.050","P":"1.715","w":"2.871","c":"2.966","Q":"61.9","o":"2.916","h":"2.999","l":"2.754","v":"24511856.8","q":"70375002.340","O":1654708920000,"C":1654795353079,"F":244831489,"L":245027921,"n":196432},{"e":"24hrTicker","E":1654795352838,"s":"HBARUSDT","p":"-0.00004","P":"-0.045","w":"0.08803","c":"0.08890","Q":"1237","o":"0.08894","h":"0.08944","l":"0.08640","v":"135803638","q":"11955367.43000","O":1654708920000,"C":1654795352831,"F":84636739,"L":84682777,"n":46038},{"e":"24hrTicker","E":1654795352937,"s":"ONEUSDT","p":"0.00030","P":"0.751","w":"0.03939","c":"0.04024","Q":"8003","o":"0.03994","h":"0.04051","l":"0.03836","v":"669679262","q":"26380596.33000","O":1654708920000,"C":1654795352907,"F":187582133,"L":187673586,"n":91450},{"e":"24hrTicker","E":1654795352951,"s":"LINAUSDT","p":"0.00024","P":"2.116","w":"0.01116","c":"0.01158","Q":"1394","o":"0.01134","h":"0.01214","l":"0.01052","v":"5834470112","q":"65119932.62000","O":1654708920000,"C":1654795352917,"F":105295380,"L":105507248,"n":211821},{"e":"24hrTicker","E":1654795352915,"s":"STMXUSDT","p":"-0.00012","P":"-1.216","w":"0.00972","c":"0.00975","Q":"10240","o":"0.00987","h":"0.00992","l":"0.00954","v":"725449727","q":"7054773.75000","O":1654708920000,"C":1654795352888,"F":55285579,"L":55322403,"n":36823},{"e":"24hrTicker","E":1654795352299,"s":"DENTUSDT","p":"-0.000027","P":"-2.106","w":"0.001258","c":"0.001255","Q":"776161","o":"0.001282","h":"0.001286","l":"0.001222","v":"15118197304","q":"19015874.340000","O":1654708920000,"C":1654795352295,"F":119891949,"L":119964971,"n":73022},{"e":"24hrTicker","E":1654795353018,"s":"CELRUSDT","p":"0.00020","P":"1.099","w":"0.01793","c":"0.01840","Q":"50902","o":"0.01820","h":"0.01853","l":"0.01722","v":"1623990414","q":"29110634.49000","O":1654708920000,"C":1654795352971,"F":124221006,"L":124311303,"n":90298},{"e":"24hrTicker","E":1654795352950,"s":"HOTUSDT","p":"-0.000015","P":"-0.592","w":"0.002501","c":"0.002518","Q":"38437","o":"0.002533","h":"0.002547","l":"0.002454","v":"6258677911","q":"15653001.480000","O":1654708920000,"C":1654795352915,"F":122253239,"L":122317199,"n":63960},{"e":"24hrTicker","E":1654795352853,"s":"MTLUSDT","p":"0.2188","P":"12.616","w":"1.8625","c":"1.9531","Q":"426","o":"1.7343","h":"2.0000","l":"1.6710","v":"160742161","q":"299377240.2400","O":1654708920000,"C":1654795352842,"F":94089518,"L":94832858,"n":743333},{"e":"24hrTicker","E":1654795352920,"s":"OGNUSDT","p":"-0.0009","P":"-0.324","w":"0.2715","c":"0.2773","Q":"5306","o":"0.2782","h":"0.2818","l":"0.2567","v":"222031598","q":"60283261.3100","O":1654708920000,"C":1654795352890,"F":116338203,"L":116580052,"n":241846},{"e":"24hrTicker","E":1654795352868,"s":"SCUSDT","p":"-0.000044","P":"-0.790","w":"0.005499","c":"0.005527","Q":"38967","o":"0.005571","h":"0.005597","l":"0.005409","v":"1789155712","q":"9838037.240000","O":1654708920000,"C":1654795352848,"F":53183028,"L":53235045,"n":52018},{"e":"24hrTicker","E":1654795352950,"s":"1000SHIBUSDT","p":"-0.000024","P":"-0.225","w":"0.010625","c":"0.010665","Q":"35000","o":"0.010689","h":"0.010770","l":"0.010454","v":"7930088930","q":"84258243.240000","O":1654708920000,"C":1654795352915,"F":589545503,"L":589734250,"n":188747},{"e":"24hrTicker","E":1654795352947,"s":"ICPUSDT","p":"-0.11","P":"-1.637","w":"6.63","c":"6.61","Q":"0.81","o":"6.72","h":"6.97","l":"6.40","v":"9403285.01","q":"62317252.05","O":1654708920000,"C":1654795352914,"F":194088967,"L":194211737,"n":122767},{"e":"24hrTicker","E":1654795353169,"s":"BAKEUSDT","p":"0.0013","P":"0.371","w":"0.3414","c":"0.3515","Q":"220","o":"0.3502","h":"0.3538","l":"0.3274","v":"116254701","q":"39690212.8400","O":1654708920000,"C":1654795353092,"F":101888854,"L":102036868,"n":148015},{"e":"24hrTicker","E":1654795353192,"s":"GTCUSDT","p":"-0.309","P":"-8.977","w":"3.210","c":"3.133","Q":"2.0","o":"3.442","h":"3.653","l":"3.000","v":"20423331.3","q":"65550587.330","O":1654708920000,"C":1654795353124,"F":85325601,"L":85566619,"n":240990},{"e":"24hrTicker","E":1654795353126,"s":"ETHBUSD","p":"5.35","P":"0.297","w":"1797.36","c":"1805.25","Q":"0.051","o":"1799.90","h":"1830.95","l":"1769.08","v":"304991.573","q":"548179047.95","O":1654708920000,"C":1654795353051,"F":149421713,"L":149832068,"n":410347},{"e":"24hrTicker","E":1654795352884,"s":"BNBBUSD","p":"0.670","P":"0.230","w":"289.047","c":"291.360","Q":"0.13","o":"290.690","h":"293.060","l":"285.720","v":"238231.95","q":"68860158.800","O":1654708920000,"C":1654795352863,"F":49301808,"L":49448629,"n":146821},{"e":"24hrTicker","E":1654795353249,"s":"ADABUSD","p":"-0.00930","P":"-1.420","w":"0.64295","c":"0.64580","Q":"168","o":"0.65510","h":"0.65700","l":"0.62490","v":"124297023","q":"79916909.67000","O":1654708920000,"C":1654795353204,"F":47541709,"L":47732099,"n":190389}]'
asserted_result = "{'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'data': [{'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352933, 'symbol': 'IOTXUSDT', 'price_change': '0.00036', 'price_change_percent': '1.042', 'weighted_average_price': '0.03427', 'last_price': '0.03490', 'last_quantity': '151', 'open_price': '0.03454', 'high_price': '0.03514', 'low_price': '0.03326', 'total_traded_base_asset_volume': '238020543', 'total_traded_quote_asset_volume': '8157654.50000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352901, 'first_trade_id': 95297658, 'last_trade_id': 95352174, 'total_nr_of_trades': 54517}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352981, 'symbol': 'DOGEBUSD', 'price_change': '-0.000130', 'price_change_percent': '-0.163', 'weighted_average_price': '0.079766', 'last_price': '0.079860', 'last_quantity': '4303', 'open_price': '0.079990', 'high_price': '0.081010', 'low_price': '0.078670', 'total_traded_base_asset_volume': '166934340', 'total_traded_quote_asset_volume': '13315733.100000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352945, 'first_trade_id': 47879042, 'last_trade_id': 47916927, 'total_nr_of_trades': 37882}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353263, 'symbol': 'BTCUSDT', 'price_change': '-83.50', 'price_change_percent': '-0.275', 'weighted_average_price': '30253.67', 'last_price': '30290.40', 'last_quantity': '0.001', 'open_price': '30373.90', 'high_price': '30691.90', 'low_price': '29900.00', 'total_traded_base_asset_volume': '316108.488', 'total_traded_quote_asset_volume': '9563442749.18', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353213, 'first_trade_id': 2340418538, 'last_trade_id': 2343348586, 'total_nr_of_trades': 2930000}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352910, 'symbol': 'AUDIOUSDT', 'price_change': '-0.0062', 'price_change_percent': '-1.405', 'weighted_average_price': '0.4356', 'last_price': '0.4350', 'last_quantity': '108', 'open_price': '0.4412', 'high_price': '0.4560', 'low_price': '0.4203', 'total_traded_base_asset_volume': '91071001', 'total_traded_quote_asset_volume': '39669518.6900', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352880, 'first_trade_id': 79298742, 'last_trade_id': 79471387, 'total_nr_of_trades': 172643}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353183, 'symbol': 'ETHUSDT', 'price_change': '5.73', 'price_change_percent': '0.318', 'weighted_average_price': '1799.21', 'last_price': '1806.68', 'last_quantity': '0.056', 'open_price': '1800.95', 'high_price': '1832.70', 'low_price': '1770.54', 'total_traded_base_asset_volume': '1911577.832', 'total_traded_quote_asset_volume': '3439322670.51', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353103, 'first_trade_id': 1718705485, 'last_trade_id': 1720803951, 'total_nr_of_trades': 2098446}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352859, 'symbol': 'BCHUSDT', 'price_change': '-0.04', 'price_change_percent': '-0.022', 'weighted_average_price': '177.34', 'last_price': '178.10', 'last_quantity': '0.063', 'open_price': '178.14', 'high_price': '180.73', 'low_price': '174.63', 'total_traded_base_asset_volume': '244948.685', 'total_traded_quote_asset_volume': '43439782.01', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352844, 'first_trade_id': 324698692, 'last_trade_id': 324867858, 'total_nr_of_trades': 169164}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352891, 'symbol': 'C98USDT', 'price_change': '0.0028', 'price_change_percent': '0.387', 'weighted_average_price': '0.7052', 'last_price': '0.7267', 'last_quantity': '371', 'open_price': '0.7239', 'high_price': '0.7350', 'low_price': '0.6832', 'total_traded_base_asset_volume': '49246211', 'total_traded_quote_asset_volume': '34727786.1300', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352869, 'first_trade_id': 93648407, 'last_trade_id': 93811947, 'total_nr_of_trades': 163539}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353137, 'symbol': 'XRPUSDT', 'price_change': '0.0013', 'price_change_percent': '0.325', 'weighted_average_price': '0.4004', 'last_price': '0.4017', 'last_quantity': '62.2', 'open_price': '0.4004', 'high_price': '0.4040', 'low_price': '0.3962', 'total_traded_base_asset_volume': '451988527.8', 'total_traded_quote_asset_volume': '180989081.8500', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353065, 'first_trade_id': 881305101, 'last_trade_id': 881610152, 'total_nr_of_trades': 305047}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353165, 'symbol': 'MASKUSDT', 'price_change': '0.0350', 'price_change_percent': '1.902', 'weighted_average_price': '1.8809', 'last_price': '1.8750', 'last_quantity': '500', 'open_price': '1.8400', 'high_price': '2.0050', 'low_price': '1.7890', 'total_traded_base_asset_volume': '28394883', 'total_traded_quote_asset_volume': '53407198.1800', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353089, 'first_trade_id': 64747442, 'last_trade_id': 64919885, 'total_nr_of_trades': 172443}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353219, 'symbol': 'EOSUSDT', 'price_change': '-0.007', 'price_change_percent': '-0.553', 'weighted_average_price': '1.255', 'last_price': '1.258', 'last_quantity': '250.0', 'open_price': '1.265', 'high_price': '1.276', 'low_price': '1.240', 'total_traded_base_asset_volume': '52565281.0', 'total_traded_quote_asset_volume': '65979158.700', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353157, 'first_trade_id': 431694096, 'last_trade_id': 431847648, 'total_nr_of_trades': 153550}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352955, 'symbol': 'ATAUSDT', 'price_change': '0.0103', 'price_change_percent': '5.274', 'weighted_average_price': '0.2291', 'last_price': '0.2056', 'last_quantity': '1437', 'open_price': '0.1953', 'high_price': '0.2799', 'low_price': '0.1946', 'total_traded_base_asset_volume': '2065860638', 'total_traded_quote_asset_volume': '473208279.9500', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352919, 'first_trade_id': 42985511, 'last_trade_id': 44471962, 'total_nr_of_trades': 1485963}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352891, 'symbol': 'SOLBUSD', 'price_change': '1.5000', 'price_change_percent': '3.809', 'weighted_average_price': '39.9761', 'last_price': '40.8800', 'last_quantity': '5', 'open_price': '39.3800', 'high_price': '41.9000', 'low_price': '38.3600', 'total_traded_base_asset_volume': '3318766', 'total_traded_quote_asset_volume': '132671294.6500', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352867, 'first_trade_id': 42353161, 'last_trade_id': 42552632, 'total_nr_of_trades': 199471}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352859, 'symbol': 'LTCUSDT', 'price_change': '-0.56', 'price_change_percent': '-0.901', 'weighted_average_price': '61.51', 'last_price': '61.61', 'last_quantity': '0.218', 'open_price': '62.17', 'high_price': '62.37', 'low_price': '60.55', 'total_traded_base_asset_volume': '1897147.848', 'total_traded_quote_asset_volume': '116702082.09', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352844, 'first_trade_id': 523872660, 'last_trade_id': 524166298, 'total_nr_of_trades': 293635}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352864, 'symbol': 'DYDXUSDT', 'price_change': '0.041', 'price_change_percent': '2.439', 'weighted_average_price': '1.693', 'last_price': '1.722', 'last_quantity': '3.1', 'open_price': '1.681', 'high_price': '1.766', 'low_price': '1.625', 'total_traded_base_asset_volume': '30831258.8', 'total_traded_quote_asset_volume': '52198750.020', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352845, 'first_trade_id': 153965888, 'last_trade_id': 154129980, 'total_nr_of_trades': 164092}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352893, 'symbol': 'ETCUSDT', 'price_change': '0.081', 'price_change_percent': '0.379', 'weighted_average_price': '21.336', 'last_price': '21.451', 'last_quantity': '23.62', 'open_price': '21.370', 'high_price': '21.643', 'low_price': '21.022', 'total_traded_base_asset_volume': '2712204.99', 'total_traded_quote_asset_volume': '57866484.480', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352872, 'first_trade_id': 439871526, 'last_trade_id': 440065471, 'total_nr_of_trades': 193946}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352688, 'symbol': '1000XECUSDT', 'price_change': '-0.00214', 'price_change_percent': '-3.981', 'weighted_average_price': '0.05238', 'last_price': '0.05161', 'last_quantity': '1254', 'open_price': '0.05375', 'high_price': '0.05417', 'low_price': '0.05116', 'total_traded_base_asset_volume': '185649902', 'total_traded_quote_asset_volume': '9724113.21000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352679, 'first_trade_id': 34565588, 'last_trade_id': 34622620, 'total_nr_of_trades': 57032}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352891, 'symbol': 'LINKUSDT', 'price_change': '0.841', 'price_change_percent': '9.753', 'weighted_average_price': '9.037', 'last_price': '9.464', 'last_quantity': '83.96', 'open_price': '8.623', 'high_price': '9.567', 'low_price': '8.453', 'total_traded_base_asset_volume': '65563176.85', 'total_traded_quote_asset_volume': '592490165.070', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352867, 'first_trade_id': 528334513, 'last_trade_id': 529417040, 'total_nr_of_trades': 1082117}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352856, 'symbol': 'GALAUSDT', 'price_change': '-0.00173', 'price_change_percent': '-2.188', 'weighted_average_price': '0.07613', 'last_price': '0.07732', 'last_quantity': '10586', 'open_price': '0.07905', 'high_price': '0.07923', 'low_price': '0.07365', 'total_traded_base_asset_volume': '2982230272', 'total_traded_quote_asset_volume': '227031601.87000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352843, 'first_trade_id': 355729046, 'last_trade_id': 356285046, 'total_nr_of_trades': 555967}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353168, 'symbol': 'XLMUSDT', 'price_change': '-0.00087', 'price_change_percent': '-0.615', 'weighted_average_price': '0.14022', 'last_price': '0.14054', 'last_quantity': '1406', 'open_price': '0.14141', 'high_price': '0.14251', 'low_price': '0.13813', 'total_traded_base_asset_volume': '167816890', 'total_traded_quote_asset_volume': '23531379.71000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353091, 'first_trade_id': 262980813, 'last_trade_id': 263084033, 'total_nr_of_trades': 103219}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353015, 'symbol': 'ADAUSDT', 'price_change': '-0.00930', 'price_change_percent': '-1.419', 'weighted_average_price': '0.64347', 'last_price': '0.64620', 'last_quantity': '77', 'open_price': '0.65550', 'high_price': '0.65800', 'low_price': '0.62540', 'total_traded_base_asset_volume': '1152909175', 'total_traded_quote_asset_volume': '741866652.52000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352971, 'first_trade_id': 735503979, 'last_trade_id': 736549302, 'total_nr_of_trades': 1045309}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352915, 'symbol': 'XMRUSDT', 'price_change': '-0.08', 'price_change_percent': '-0.043', 'weighted_average_price': '186.46', 'last_price': '185.17', 'last_quantity': '0.323', 'open_price': '185.25', 'high_price': '189.61', 'low_price': '183.66', 'total_traded_base_asset_volume': '181918.590', 'total_traded_quote_asset_volume': '33920928.77', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352888, 'first_trade_id': 133378646, 'last_trade_id': 133506881, 'total_nr_of_trades': 128235}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352901, 'symbol': 'DASHUSDT', 'price_change': '-0.36', 'price_change_percent': '-0.615', 'weighted_average_price': '57.83', 'last_price': '58.17', 'last_quantity': '1.195', 'open_price': '58.53', 'high_price': '58.66', 'low_price': '57.03', 'total_traded_base_asset_volume': '228080.745', 'total_traded_quote_asset_volume': '13190866.75', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352875, 'first_trade_id': 132201507, 'last_trade_id': 132269852, 'total_nr_of_trades': 68344}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352931, 'symbol': 'ZECUSDT', 'price_change': '0.80', 'price_change_percent': '0.864', 'weighted_average_price': '92.46', 'last_price': '93.41', 'last_quantity': '0.230', 'open_price': '92.61', 'high_price': '93.96', 'low_price': '90.40', 'total_traded_base_asset_volume': '376119.745', 'total_traded_quote_asset_volume': '34777447.68', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352901, 'first_trade_id': 176090425, 'last_trade_id': 176233033, 'total_nr_of_trades': 142609}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352993, 'symbol': 'ARPAUSDT', 'price_change': '-0.00114', 'price_change_percent': '-2.733', 'weighted_average_price': '0.04031', 'last_price': '0.04058', 'last_quantity': '2276', 'open_price': '0.04172', 'high_price': '0.04240', 'low_price': '0.03723', 'total_traded_base_asset_volume': '1824222789', 'total_traded_quote_asset_volume': '73526365.60000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352953, 'first_trade_id': 41125646, 'last_trade_id': 41393283, 'total_nr_of_trades': 267635}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353239, 'symbol': 'XTZUSDT', 'price_change': '0.192', 'price_change_percent': '9.375', 'weighted_average_price': '2.160', 'last_price': '2.240', 'last_quantity': '173.2', 'open_price': '2.048', 'high_price': '2.269', 'low_price': '2.003', 'total_traded_base_asset_volume': '77327765.8', 'total_traded_quote_asset_volume': '167002045.350', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353184, 'first_trade_id': 218430591, 'last_trade_id': 218823116, 'total_nr_of_trades': 392517}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353178, 'symbol': 'BNBUSDT', 'price_change': '0.620', 'price_change_percent': '0.213', 'weighted_average_price': '289.481', 'last_price': '291.510', 'last_quantity': '0.85', 'open_price': '290.890', 'high_price': '293.350', 'low_price': '285.960', 'total_traded_base_asset_volume': '1015741.21', 'total_traded_quote_asset_volume': '294037702.380', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353100, 'first_trade_id': 717697261, 'last_trade_id': 718225468, 'total_nr_of_trades': 528202}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353263, 'symbol': 'CTSIUSDT', 'price_change': '-0.0043', 'price_change_percent': '-1.810', 'weighted_average_price': '0.2371', 'last_price': '0.2333', 'last_quantity': '148', 'open_price': '0.2376', 'high_price': '0.2483', 'low_price': '0.2277', 'total_traded_base_asset_volume': '217560020', 'total_traded_quote_asset_volume': '51576697.3300', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353213, 'first_trade_id': 30832151, 'last_trade_id': 31006773, 'total_nr_of_trades': 174622}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352998, 'symbol': 'ATOMUSDT', 'price_change': '0.046', 'price_change_percent': '0.517', 'weighted_average_price': '8.863', 'last_price': '8.947', 'last_quantity': '12.50', 'open_price': '8.901', 'high_price': '9.197', 'low_price': '8.644', 'total_traded_base_asset_volume': '14948228.55', 'total_traded_quote_asset_volume': '132485434.700', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352959, 'first_trade_id': 382342958, 'last_trade_id': 382714757, 'total_nr_of_trades': 371799}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353219, 'symbol': 'LPTUSDT', 'price_change': '-0.380', 'price_change_percent': '-2.975', 'weighted_average_price': '12.461', 'last_price': '12.393', 'last_quantity': '1.3', 'open_price': '12.773', 'high_price': '12.910', 'low_price': '12.062', 'total_traded_base_asset_volume': '1201834.8', 'total_traded_quote_asset_volume': '14976135.230', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353160, 'first_trade_id': 25332665, 'last_trade_id': 25410022, 'total_nr_of_trades': 77358}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352868, 'symbol': 'ONTUSDT', 'price_change': '0.0009', 'price_change_percent': '0.296', 'weighted_average_price': '0.2995', 'last_price': '0.3052', 'last_quantity': '29.0', 'open_price': '0.3043', 'high_price': '0.3071', 'low_price': '0.2917', 'total_traded_base_asset_volume': '38166089.0', 'total_traded_quote_asset_volume': '11429374.7500', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352847, 'first_trade_id': 126199937, 'last_trade_id': 126262718, 'total_nr_of_trades': 62781}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353129, 'symbol': 'IOTAUSDT', 'price_change': '-0.0004', 'price_change_percent': '-0.113', 'weighted_average_price': '0.3497', 'last_price': '0.3549', 'last_quantity': '1000.0', 'open_price': '0.3553', 'high_price': '0.3582', 'low_price': '0.3406', 'total_traded_base_asset_volume': '37327068.1', 'total_traded_quote_asset_volume': '13052817.1100', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353053, 'first_trade_id': 126154864, 'last_trade_id': 126218889, 'total_nr_of_trades': 64026}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353195, 'symbol': 'ENSUSDT', 'price_change': '0.258', 'price_change_percent': '2.228', 'weighted_average_price': '11.646', 'last_price': '11.836', 'last_quantity': '70.5', 'open_price': '11.578', 'high_price': '12.094', 'low_price': '11.244', 'total_traded_base_asset_volume': '4114933.8', 'total_traded_quote_asset_volume': '47921143.020', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353137, 'first_trade_id': 65644324, 'last_trade_id': 65891134, 'total_nr_of_trades': 246810}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353110, 'symbol': 'BATUSDT', 'price_change': '0.0077', 'price_change_percent': '1.919', 'weighted_average_price': '0.3967', 'last_price': '0.4090', 'last_quantity': '3480.9', 'open_price': '0.4013', 'high_price': '0.4092', 'low_price': '0.3869', 'total_traded_base_asset_volume': '33813109.7', 'total_traded_quote_asset_volume': '13412890.7000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353040, 'first_trade_id': 119869594, 'last_trade_id': 119931854, 'total_nr_of_trades': 62259}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353217, 'symbol': 'PEOPLEUSDT', 'price_change': '-0.00016', 'price_change_percent': '-0.729', 'weighted_average_price': '0.02139', 'last_price': '0.02178', 'last_quantity': '12744', 'open_price': '0.02194', 'high_price': '0.02230', 'low_price': '0.02042', 'total_traded_base_asset_volume': '4316872245', 'total_traded_quote_asset_volume': '92316856.71000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353148, 'first_trade_id': 122508949, 'last_trade_id': 122811064, 'total_nr_of_trades': 302109}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352754, 'symbol': 'VETUSDT', 'price_change': '0.002250', 'price_change_percent': '7.358', 'weighted_average_price': '0.031280', 'last_price': '0.032830', 'last_quantity': '1965', 'open_price': '0.030580', 'high_price': '0.032850', 'low_price': '0.029850', 'total_traded_base_asset_volume': '3078331108', 'total_traded_quote_asset_volume': '96288842.390000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352741, 'first_trade_id': 253254135, 'last_trade_id': 253493732, 'total_nr_of_trades': 239595}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352910, 'symbol': 'ROSEUSDT', 'price_change': '0.00074', 'price_change_percent': '1.108', 'weighted_average_price': '0.06644', 'last_price': '0.06751', 'last_quantity': '5643', 'open_price': '0.06677', 'high_price': '0.06812', 'low_price': '0.06487', 'total_traded_base_asset_volume': '340518565', 'total_traded_quote_asset_volume': '22622870.70000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352880, 'first_trade_id': 58216457, 'last_trade_id': 58330559, 'total_nr_of_trades': 114102}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353019, 'symbol': 'QTUMUSDT', 'price_change': '0.014', 'price_change_percent': '0.353', 'weighted_average_price': '3.945', 'last_price': '3.981', 'last_quantity': '460.0', 'open_price': '3.967', 'high_price': '4.007', 'low_price': '3.872', 'total_traded_base_asset_volume': '2757722.1', 'total_traded_quote_asset_volume': '10878381.950', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352974, 'first_trade_id': 138240134, 'last_trade_id': 138291636, 'total_nr_of_trades': 51502}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353026, 'symbol': 'IOSTUSDT', 'price_change': '0.000096', 'price_change_percent': '0.565', 'weighted_average_price': '0.016839', 'last_price': '0.017080', 'last_quantity': '10040', 'open_price': '0.016984', 'high_price': '0.017147', 'low_price': '0.016662', 'total_traded_base_asset_volume': '638895057', 'total_traded_quote_asset_volume': '10758216.100000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352979, 'first_trade_id': 150802083, 'last_trade_id': 150874566, 'total_nr_of_trades': 72484}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352791, 'symbol': 'DUSKUSDT', 'price_change': '0.00138', 'price_change_percent': '0.927', 'weighted_average_price': '0.15148', 'last_price': '0.15031', 'last_quantity': '2574', 'open_price': '0.14893', 'high_price': '0.15827', 'low_price': '0.14422', 'total_traded_base_asset_volume': '113128024', 'total_traded_quote_asset_volume': '17136873.84000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352783, 'first_trade_id': 28885133, 'last_trade_id': 28975279, 'total_nr_of_trades': 90146}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353192, 'symbol': 'ALGOUSDT', 'price_change': '-0.0018', 'price_change_percent': '-0.434', 'weighted_average_price': '0.4143', 'last_price': '0.4130', 'last_quantity': '979.5', 'open_price': '0.4148', 'high_price': '0.4319', 'low_price': '0.4030', 'total_traded_base_asset_volume': '205952695.6', 'total_traded_quote_asset_volume': '85331018.1700', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353117, 'first_trade_id': 226044909, 'last_trade_id': 226309020, 'total_nr_of_trades': 264110}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352960, 'symbol': 'IMXUSDT', 'price_change': '0.0010', 'price_change_percent': '0.101', 'weighted_average_price': '0.9737', 'last_price': '0.9873', 'last_quantity': '481', 'open_price': '0.9863', 'high_price': '1.0050', 'low_price': '0.9407', 'total_traded_base_asset_volume': '22896562', 'total_traded_quote_asset_volume': '22294618.3800', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352920, 'first_trade_id': 35207631, 'last_trade_id': 35301960, 'total_nr_of_trades': 94330}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352943, 'symbol': 'ZILUSDT', 'price_change': '-0.00041', 'price_change_percent': '-0.824', 'weighted_average_price': '0.04915', 'last_price': '0.04937', 'last_quantity': '200', 'open_price': '0.04978', 'high_price': '0.04985', 'low_price': '0.04844', 'total_traded_base_asset_volume': '1228853639', 'total_traded_quote_asset_volume': '60394467.81000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352912, 'first_trade_id': 234754000, 'last_trade_id': 234947526, 'total_nr_of_trades': 193526}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352635, 'symbol': 'API3USDT', 'price_change': '0.3080', 'price_change_percent': '20.643', 'weighted_average_price': '1.6859', 'last_price': '1.8000', 'last_quantity': '169.0', 'open_price': '1.4920', 'high_price': '1.8670', 'low_price': '1.3930', 'total_traded_base_asset_volume': '42870899.2', 'total_traded_quote_asset_volume': '72277966.0700', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352627, 'first_trade_id': 22456646, 'last_trade_id': 22730185, 'total_nr_of_trades': 273523}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353144, 'symbol': 'GMTUSDT', 'price_change': '0.00890', 'price_change_percent': '0.897', 'weighted_average_price': '0.99614', 'last_price': '1.00060', 'last_quantity': '100', 'open_price': '0.99170', 'high_price': '1.04830', 'low_price': '0.94940', 'total_traded_base_asset_volume': '681013290', 'total_traded_quote_asset_volume': '678384833.33000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353071, 'first_trade_id': 380834979, 'last_trade_id': 382293069, 'total_nr_of_trades': 1458080}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353180, 'symbol': 'COMPUSDT', 'price_change': '0.43', 'price_change_percent': '0.767', 'weighted_average_price': '55.80', 'last_price': '56.48', 'last_quantity': '3.985', 'open_price': '56.05', 'high_price': '56.83', 'low_price': '54.67', 'total_traded_base_asset_volume': '319953.858', 'total_traded_quote_asset_volume': '17854226.61', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353102, 'first_trade_id': 139129348, 'last_trade_id': 139212486, 'total_nr_of_trades': 83137}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352943, 'symbol': 'OMGUSDT', 'price_change': '0.0950', 'price_change_percent': '3.567', 'weighted_average_price': '2.7164', 'last_price': '2.7580', 'last_quantity': '271.7', 'open_price': '2.6630', 'high_price': '2.8160', 'low_price': '2.5670', 'total_traded_base_asset_volume': '13911102.9', 'total_traded_quote_asset_volume': '37788312.4600', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352911, 'first_trade_id': 184652552, 'last_trade_id': 184795151, 'total_nr_of_trades': 142599}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353096, 'symbol': 'APEUSDT', 'price_change': '-0.1280', 'price_change_percent': '-2.146', 'weighted_average_price': '5.7896', 'last_price': '5.8360', 'last_quantity': '11', 'open_price': '5.9640', 'high_price': '5.9680', 'low_price': '5.6450', 'total_traded_base_asset_volume': '32646542', 'total_traded_quote_asset_volume': '189008790.1300', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353034, 'first_trade_id': 199815714, 'last_trade_id': 200286135, 'total_nr_of_trades': 470416}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353120, 'symbol': 'DOGEUSDT', 'price_change': '-0.000150', 'price_change_percent': '-0.187', 'weighted_average_price': '0.079829', 'last_price': '0.079910', 'last_quantity': '4454', 'open_price': '0.080060', 'high_price': '0.081030', 'low_price': '0.078660', 'total_traded_base_asset_volume': '1053456386', 'total_traded_quote_asset_volume': '84096389.150000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353048, 'first_trade_id': 923111580, 'last_trade_id': 923341482, 'total_nr_of_trades': 229901}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352869, 'symbol': 'BTCUSDT_220624', 'price_change': '-81.6', 'price_change_percent': '-0.268', 'weighted_average_price': '30284.3', 'last_price': '30348.9', 'last_quantity': '0.099', 'open_price': '30430.5', 'high_price': '30750.0', 'low_price': '29950.4', 'total_traded_base_asset_volume': '1558.372', 'total_traded_quote_asset_volume': '47194218.06', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352849, 'first_trade_id': 3333041, 'last_trade_id': 3362376, 'total_nr_of_trades': 29336}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352993, 'symbol': 'SXPUSDT', 'price_change': '-0.0003', 'price_change_percent': '-0.055', 'weighted_average_price': '0.5390', 'last_price': '0.5412', 'last_quantity': '9.8', 'open_price': '0.5415', 'high_price': '0.5530', 'low_price': '0.5282', 'total_traded_base_asset_volume': '43192517.1', 'total_traded_quote_asset_volume': '23282893.1500', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352955, 'first_trade_id': 233167658, 'last_trade_id': 233255097, 'total_nr_of_trades': 87438}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352473, 'symbol': 'BNXUSDT', 'price_change': '-2.5300', 'price_change_percent': '-1.906', 'weighted_average_price': '132.5810', 'last_price': '130.1800', 'last_quantity': '1.2', 'open_price': '132.7100', 'high_price': '136.9300', 'low_price': '129.0100', 'total_traded_base_asset_volume': '213279.3', 'total_traded_quote_asset_volume': '28276785.1100', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352466, 'first_trade_id': 22866031, 'last_trade_id': 22963868, 'total_nr_of_trades': 97836}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352900, 'symbol': 'WOOUSDT', 'price_change': '-0.01097', 'price_change_percent': '-6.113', 'weighted_average_price': '0.17230', 'last_price': '0.16847', 'last_quantity': '591', 'open_price': '0.17944', 'high_price': '0.18029', 'low_price': '0.16508', 'total_traded_base_asset_volume': '145446761', 'total_traded_quote_asset_volume': '25060295.49000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352875, 'first_trade_id': 7732464, 'last_trade_id': 7824662, 'total_nr_of_trades': 92196}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352910, 'symbol': 'KAVAUSDT', 'price_change': '-0.0158', 'price_change_percent': '-0.605', 'weighted_average_price': '2.6181', 'last_price': '2.5979', 'last_quantity': '53.4', 'open_price': '2.6137', 'high_price': '2.7298', 'low_price': '2.5174', 'total_traded_base_asset_volume': '14553299.5', 'total_traded_quote_asset_volume': '38101967.7400', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352883, 'first_trade_id': 153577459, 'last_trade_id': 153725792, 'total_nr_of_trades': 148332}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353141, 'symbol': 'JASMYUSDT', 'price_change': '0.000050', 'price_change_percent': '0.417', 'weighted_average_price': '0.012070', 'last_price': '0.012040', 'last_quantity': '12067', 'open_price': '0.011990', 'high_price': '0.012520', 'low_price': '0.011700', 'total_traded_base_asset_volume': '4403814880', 'total_traded_quote_asset_volume': '53152847.670000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353069, 'first_trade_id': 22802952, 'last_trade_id': 22944552, 'total_nr_of_trades': 141594}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353221, 'symbol': 'BANDUSDT', 'price_change': '0.6268', 'price_change_percent': '36.700', 'weighted_average_price': '2.1665', 'last_price': '2.3347', 'last_quantity': '25.6', 'open_price': '1.7079', 'high_price': '2.5362', 'low_price': '1.6322', 'total_traded_base_asset_volume': '161736928.0', 'total_traded_quote_asset_volume': '350405380.8400', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353171, 'first_trade_id': 131200258, 'last_trade_id': 132126771, 'total_nr_of_trades': 925446}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352912, 'symbol': 'RLCUSDT', 'price_change': '0.0365', 'price_change_percent': '3.983', 'weighted_average_price': '0.9284', 'last_price': '0.9528', 'last_quantity': '50.0', 'open_price': '0.9163', 'high_price': '0.9699', 'low_price': '0.8753', 'total_traded_base_asset_volume': '28966756.9', 'total_traded_quote_asset_volume': '26891543.8800', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352886, 'first_trade_id': 124506405, 'last_trade_id': 124621472, 'total_nr_of_trades': 115068}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353267, 'symbol': 'WAVESUSDT', 'price_change': '0.2610', 'price_change_percent': '3.330', 'weighted_average_price': '7.8076', 'last_price': '8.0980', 'last_quantity': '21.4', 'open_price': '7.8370', 'high_price': '8.2200', 'low_price': '7.6080', 'total_traded_base_asset_volume': '38968334.0', 'total_traded_quote_asset_volume': '304249602.5300', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353215, 'first_trade_id': 290946167, 'last_trade_id': 291682367, 'total_nr_of_trades': 736189}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352960, 'symbol': 'GALUSDT', 'price_change': '-0.17000', 'price_change_percent': '-4.123', 'weighted_average_price': '3.99105', 'last_price': '3.95310', 'last_quantity': '102', 'open_price': '4.12310', 'high_price': '4.17700', 'low_price': '3.79730', 'total_traded_base_asset_volume': '16050274', 'total_traded_quote_asset_volume': '64057480.18000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352920, 'first_trade_id': 54732715, 'last_trade_id': 55026141, 'total_nr_of_trades': 293418}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352982, 'symbol': 'MKRUSDT', 'price_change': '-8.60', 'price_change_percent': '-0.743', 'weighted_average_price': '1152.74', 'last_price': '1149.60', 'last_quantity': '0.129', 'open_price': '1158.20', 'high_price': '1174.30', 'low_price': '1134.10', 'total_traded_base_asset_volume': '8188.740', 'total_traded_quote_asset_volume': '9439525.25', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352946, 'first_trade_id': 102752518, 'last_trade_id': 102819339, 'total_nr_of_trades': 66822}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352945, 'symbol': 'NEARBUSD', 'price_change': '-0.0510000', 'price_change_percent': '-0.979', 'weighted_average_price': '5.1168741', 'last_price': '5.1560000', 'last_quantity': '133.3', 'open_price': '5.2070000', 'high_price': '5.2150000', 'low_price': '4.9840000', 'total_traded_base_asset_volume': '2282321.3', 'total_traded_quote_asset_volume': '11678350.8200000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352913, 'first_trade_id': 1596608, 'last_trade_id': 1629683, 'total_nr_of_trades': 33076}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353136, 'symbol': 'GMTBUSD', 'price_change': '0.0091000', 'price_change_percent': '0.919', 'weighted_average_price': '0.9944784', 'last_price': '0.9998000', 'last_quantity': '518.7', 'open_price': '0.9907000', 'high_price': '1.0472000', 'low_price': '0.9500000', 'total_traded_base_asset_volume': '42745136.1', 'total_traded_quote_asset_volume': '42509115.7700000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353062, 'first_trade_id': 6025109, 'last_trade_id': 6137162, 'total_nr_of_trades': 112051}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352857, 'symbol': 'SNXUSDT', 'price_change': '0.038', 'price_change_percent': '1.415', 'weighted_average_price': '2.680', 'last_price': '2.724', 'last_quantity': '272.5', 'open_price': '2.686', 'high_price': '2.790', 'low_price': '2.589', 'total_traded_base_asset_volume': '8682019.6', 'total_traded_quote_asset_volume': '23270970.760', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352843, 'first_trade_id': 129608726, 'last_trade_id': 129713180, 'total_nr_of_trades': 104455}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352909, 'symbol': 'DOTUSDT', 'price_change': '0.301', 'price_change_percent': '3.317', 'weighted_average_price': '9.175', 'last_price': '9.376', 'last_quantity': '370.4', 'open_price': '9.075', 'high_price': '9.462', 'low_price': '8.879', 'total_traded_base_asset_volume': '24076477.4', 'total_traded_quote_asset_volume': '220912782.690', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352877, 'first_trade_id': 522487459, 'last_trade_id': 523010703, 'total_nr_of_trades': 523240}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352920, 'symbol': 'FTMBUSD', 'price_change': '0.0024000', 'price_change_percent': '0.696', 'weighted_average_price': '0.3390250', 'last_price': '0.3472000', 'last_quantity': '150', 'open_price': '0.3448000', 'high_price': '0.3509000', 'low_price': '0.3276000', 'total_traded_base_asset_volume': '18511523', 'total_traded_quote_asset_volume': '6275869.4800000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352890, 'first_trade_id': 706258, 'last_trade_id': 724278, 'total_nr_of_trades': 18021}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353074, 'symbol': 'DODOBUSD', 'price_change': '-0.0090000', 'price_change_percent': '-4.782', 'weighted_average_price': '0.1915353', 'last_price': '0.1792000', 'last_quantity': '639', 'open_price': '0.1882000', 'high_price': '0.2274000', 'low_price': '0.1727000', 'total_traded_base_asset_volume': '195387784', 'total_traded_quote_asset_volume': '37423659.9200000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353018, 'first_trade_id': 1767772, 'last_trade_id': 1903338, 'total_nr_of_trades': 135562}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352891, 'symbol': 'ANCBUSD', 'price_change': '-0.0133000', 'price_change_percent': '-9.091', 'weighted_average_price': '0.1279416', 'last_price': '0.1330000', 'last_quantity': '2934', 'open_price': '0.1463000', 'high_price': '0.1638000', 'low_price': '0.0997000', 'total_traded_base_asset_volume': '996085152', 'total_traded_quote_asset_volume': '127440699.4500000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352868, 'first_trade_id': 10115921, 'last_trade_id': 10721278, 'total_nr_of_trades': 605345}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352890, 'symbol': 'YFIUSDT', 'price_change': '94.0', 'price_change_percent': '1.248', 'weighted_average_price': '7529.9', 'last_price': '7626.0', 'last_quantity': '0.022', 'open_price': '7532.0', 'high_price': '7746.0', 'low_price': '7337.0', 'total_traded_base_asset_volume': '3325.218', 'total_traded_quote_asset_volume': '25038407.96', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352866, 'first_trade_id': 150805363, 'last_trade_id': 150899754, 'total_nr_of_trades': 94392}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353168, 'symbol': 'BALUSDT', 'price_change': '-0.360', 'price_change_percent': '-4.453', 'weighted_average_price': '7.850', 'last_price': '7.724', 'last_quantity': '182.9', 'open_price': '8.084', 'high_price': '8.353', 'low_price': '7.569', 'total_traded_base_asset_volume': '6046325.7', 'total_traded_quote_asset_volume': '47464760.930', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353091, 'first_trade_id': 82237342, 'last_trade_id': 82411732, 'total_nr_of_trades': 174373}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353222, 'symbol': 'LUNA2BUSD', 'price_change': '-0.5958000', 'price_change_percent': '-17.450', 'weighted_average_price': '2.6813115', 'last_price': '2.8185000', 'last_quantity': '8', 'open_price': '3.4143000', 'high_price': '3.4900000', 'low_price': '1.7645000', 'total_traded_base_asset_volume': '555861825', 'total_traded_quote_asset_volume': '1490438728.7800000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353175, 'first_trade_id': 11649176, 'last_trade_id': 16784795, 'total_nr_of_trades': 5131106}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353131, 'symbol': 'TRBUSDT', 'price_change': '-0.210', 'price_change_percent': '-1.549', 'weighted_average_price': '12.850', 'last_price': '13.350', 'last_quantity': '2.5', 'open_price': '13.560', 'high_price': '14.110', 'low_price': '11.940', 'total_traded_base_asset_volume': '5062547.7', 'total_traded_quote_asset_volume': '65052560.950', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353057, 'first_trade_id': 90608923, 'last_trade_id': 90847098, 'total_nr_of_trades': 238147}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353250, 'symbol': 'OPUSDT', 'price_change': '-0.1477000', 'price_change_percent': '-15.048', 'weighted_average_price': '0.8333900', 'last_price': '0.8338000', 'last_quantity': '871.6', 'open_price': '0.9815000', 'high_price': '0.9826000', 'low_price': '0.6968000', 'total_traded_base_asset_volume': '551805119.9', 'total_traded_quote_asset_volume': '459868880.7200000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353206, 'first_trade_id': 11485282, 'last_trade_id': 13008646, 'total_nr_of_trades': 1522532}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352685, 'symbol': 'DOTBUSD', 'price_change': '0.3030000', 'price_change_percent': '3.343', 'weighted_average_price': '9.1953635', 'last_price': '9.3670000', 'last_quantity': '7.3', 'open_price': '9.0640000', 'high_price': '9.4540000', 'low_price': '8.8630000', 'total_traded_base_asset_volume': '511043.1', 'total_traded_quote_asset_volume': '4699227.0500000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352675, 'first_trade_id': 24687, 'last_trade_id': 75819, 'total_nr_of_trades': 51132}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353153, 'symbol': 'RUNEUSDT', 'price_change': '0.0050', 'price_change_percent': '0.173', 'weighted_average_price': '2.8834', 'last_price': '2.8940', 'last_quantity': '3', 'open_price': '2.8890', 'high_price': '2.9670', 'low_price': '2.8020', 'total_traded_base_asset_volume': '21465793', 'total_traded_quote_asset_volume': '61893664.5500', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353079, 'first_trade_id': 210126393, 'last_trade_id': 210350923, 'total_nr_of_trades': 224528}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352931, 'symbol': 'EGLDUSDT', 'price_change': '-3.710', 'price_change_percent': '-5.563', 'weighted_average_price': '63.079', 'last_price': '62.980', 'last_quantity': '0.1', 'open_price': '66.690', 'high_price': '66.920', 'low_price': '60.810', 'total_traded_base_asset_volume': '1274709.2', 'total_traded_quote_asset_volume': '80407739.090', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352900, 'first_trade_id': 142061577, 'last_trade_id': 142339812, 'total_nr_of_trades': 278032}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352998, 'symbol': 'SOLUSDT', 'price_change': '1.5000', 'price_change_percent': '3.807', 'weighted_average_price': '40.0922', 'last_price': '40.9000', 'last_quantity': '3', 'open_price': '39.4000', 'high_price': '41.9600', 'low_price': '38.3800', 'total_traded_base_asset_volume': '24383567', 'total_traded_quote_asset_volume': '977590042.0200', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352958, 'first_trade_id': 461569315, 'last_trade_id': 462575578, 'total_nr_of_trades': 1006261}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352957, 'symbol': 'ICXUSDT', 'price_change': '-0.0040', 'price_change_percent': '-1.014', 'weighted_average_price': '0.3890', 'last_price': '0.3903', 'last_quantity': '737', 'open_price': '0.3943', 'high_price': '0.3960', 'low_price': '0.3805', 'total_traded_base_asset_volume': '46668334', 'total_traded_quote_asset_volume': '18154287.1800', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352920, 'first_trade_id': 88318809, 'last_trade_id': 88390142, 'total_nr_of_trades': 71329}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352857, 'symbol': 'BLZUSDT', 'price_change': '0.00351', 'price_change_percent': '2.111', 'weighted_average_price': '0.16895', 'last_price': '0.16982', 'last_quantity': '124', 'open_price': '0.16631', 'high_price': '0.19329', 'low_price': '0.14126', 'total_traded_base_asset_volume': '2823489740', 'total_traded_quote_asset_volume': '477042687.54000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352843, 'first_trade_id': 102645689, 'last_trade_id': 104150430, 'total_nr_of_trades': 1504397}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352933, 'symbol': 'AVAXUSDT', 'price_change': '0.6400', 'price_change_percent': '2.622', 'weighted_average_price': '24.5204', 'last_price': '25.0500', 'last_quantity': '1', 'open_price': '24.4100', 'high_price': '25.3800', 'low_price': '23.7000', 'total_traded_base_asset_volume': '15684363', 'total_traded_quote_asset_volume': '384586514.2500', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352901, 'first_trade_id': 338720397, 'last_trade_id': 339266807, 'total_nr_of_trades': 546407}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353046, 'symbol': 'FTMUSDT', 'price_change': '0.002400', 'price_change_percent': '0.695', 'weighted_average_price': '0.339449', 'last_price': '0.347500', 'last_quantity': '128', 'open_price': '0.345100', 'high_price': '0.351400', 'low_price': '0.327700', 'total_traded_base_asset_volume': '690367417', 'total_traded_quote_asset_volume': '234344628.280000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352992, 'first_trade_id': 499361012, 'last_trade_id': 499890236, 'total_nr_of_trades': 529217}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353010, 'symbol': 'HNTUSDT', 'price_change': '1.1640', 'price_change_percent': '10.595', 'weighted_average_price': '11.3934', 'last_price': '12.1500', 'last_quantity': '3', 'open_price': '10.9860', 'high_price': '12.3920', 'low_price': '10.5010', 'total_traded_base_asset_volume': '11624374', 'total_traded_quote_asset_volume': '132440617.3700', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352968, 'first_trade_id': 98586111, 'last_trade_id': 99098667, 'total_nr_of_trades': 512207}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352910, 'symbol': 'ENJUSDT', 'price_change': '0.01660', 'price_change_percent': '2.662', 'weighted_average_price': '0.62229', 'last_price': '0.64030', 'last_quantity': '86', 'open_price': '0.62370', 'high_price': '0.64700', 'low_price': '0.60580', 'total_traded_base_asset_volume': '46103226', 'total_traded_quote_asset_volume': '28689648.68000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352880, 'first_trade_id': 190988825, 'last_trade_id': 191097284, 'total_nr_of_trades': 108459}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352913, 'symbol': 'TOMOUSDT', 'price_change': '0.0248', 'price_change_percent': '3.907', 'weighted_average_price': '0.6473', 'last_price': '0.6595', 'last_quantity': '30', 'open_price': '0.6347', 'high_price': '0.6929', 'low_price': '0.5932', 'total_traded_base_asset_volume': '73655927', 'total_traded_quote_asset_volume': '47674048.5500', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352887, 'first_trade_id': 85936573, 'last_trade_id': 86131345, 'total_nr_of_trades': 194769}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353180, 'symbol': 'RENUSDT', 'price_change': '-0.00210', 'price_change_percent': '-1.336', 'weighted_average_price': '0.15358', 'last_price': '0.15510', 'last_quantity': '2243', 'open_price': '0.15720', 'high_price': '0.15780', 'low_price': '0.14860', 'total_traded_base_asset_volume': '96431894', 'total_traded_quote_asset_volume': '14809836.24000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353102, 'first_trade_id': 108121020, 'last_trade_id': 108195518, 'total_nr_of_trades': 74498}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352787, 'symbol': 'KSMUSDT', 'price_change': '0.900', 'price_change_percent': '1.347', 'weighted_average_price': '66.872', 'last_price': '67.730', 'last_quantity': '0.1', 'open_price': '66.830', 'high_price': '68.400', 'low_price': '65.370', 'total_traded_base_asset_volume': '260673.4', 'total_traded_quote_asset_volume': '17431851.040', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352781, 'first_trade_id': 122742960, 'last_trade_id': 122820683, 'total_nr_of_trades': 77724}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353186, 'symbol': 'NEARUSDT', 'price_change': '-0.0530', 'price_change_percent': '-1.017', 'weighted_average_price': '5.1144', 'last_price': '5.1580', 'last_quantity': '38', 'open_price': '5.2110', 'high_price': '5.2180', 'low_price': '4.9800', 'total_traded_base_asset_volume': '35479907', 'total_traded_quote_asset_volume': '181458214.7200', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353110, 'first_trade_id': 351802510, 'last_trade_id': 352206109, 'total_nr_of_trades': 403597}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353139, 'symbol': 'AAVEUSDT', 'price_change': '-0.450', 'price_change_percent': '-0.459', 'weighted_average_price': '97.018', 'last_price': '97.500', 'last_quantity': '0.8', 'open_price': '97.950', 'high_price': '99.670', 'low_price': '94.680', 'total_traded_base_asset_volume': '752854.6', 'total_traded_quote_asset_volume': '73040410.070', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353066, 'first_trade_id': 198858733, 'last_trade_id': 199033975, 'total_nr_of_trades': 175243}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352891, 'symbol': 'FILUSDT', 'price_change': '-0.022', 'price_change_percent': '-0.302', 'weighted_average_price': '7.210', 'last_price': '7.252', 'last_quantity': '0.8', 'open_price': '7.274', 'high_price': '7.325', 'low_price': '7.065', 'total_traded_base_asset_volume': '6909176.6', 'total_traded_quote_asset_volume': '49817415.660', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352867, 'first_trade_id': 297711517, 'last_trade_id': 297873290, 'total_nr_of_trades': 161773}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352912, 'symbol': 'RSRUSDT', 'price_change': '-0.000674', 'price_change_percent': '-7.403', 'weighted_average_price': '0.008638', 'last_price': '0.008430', 'last_quantity': '7297', 'open_price': '0.009104', 'high_price': '0.009126', 'low_price': '0.008216', 'total_traded_base_asset_volume': '13397496062', 'total_traded_quote_asset_volume': '115731998.820000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352886, 'first_trade_id': 138493065, 'last_trade_id': 138916277, 'total_nr_of_trades': 423208}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352861, 'symbol': 'LRCUSDT', 'price_change': '-0.00280', 'price_change_percent': '-0.531', 'weighted_average_price': '0.52267', 'last_price': '0.52420', 'last_quantity': '14', 'open_price': '0.52700', 'high_price': '0.53880', 'low_price': '0.51300', 'total_traded_base_asset_volume': '74364942', 'total_traded_quote_asset_volume': '38868211.20000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352845, 'first_trade_id': 247540855, 'last_trade_id': 247688849, 'total_nr_of_trades': 147995}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353144, 'symbol': 'MATICUSDT', 'price_change': '0.03730', 'price_change_percent': '6.104', 'weighted_average_price': '0.62189', 'last_price': '0.64840', 'last_quantity': '1046', 'open_price': '0.61110', 'high_price': '0.65290', 'low_price': '0.60050', 'total_traded_base_asset_volume': '199110855', 'total_traded_quote_asset_volume': '123824510.34000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353070, 'first_trade_id': 492908193, 'last_trade_id': 493202359, 'total_nr_of_trades': 294166}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353166, 'symbol': 'OCEANUSDT', 'price_change': '0.03098', 'price_change_percent': '11.143', 'weighted_average_price': '0.29601', 'last_price': '0.30900', 'last_quantity': '2001', 'open_price': '0.27802', 'high_price': '0.31989', 'low_price': '0.26469', 'total_traded_base_asset_volume': '532729791', 'total_traded_quote_asset_volume': '157691346.96000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353090, 'first_trade_id': 97087245, 'last_trade_id': 97663111, 'total_nr_of_trades': 575826}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352658, 'symbol': 'CVCUSDT', 'price_change': '-0.00439', 'price_change_percent': '-2.320', 'weighted_average_price': '0.18469', 'last_price': '0.18486', 'last_quantity': '38', 'open_price': '0.18925', 'high_price': '0.18993', 'low_price': '0.18085', 'total_traded_base_asset_volume': '74146428', 'total_traded_quote_asset_volume': '13694345.89000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352651, 'first_trade_id': 92671322, 'last_trade_id': 92740873, 'total_nr_of_trades': 69552}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353021, 'symbol': 'BELUSDT', 'price_change': '-0.11300', 'price_change_percent': '-8.027', 'weighted_average_price': '1.32934', 'last_price': '1.29480', 'last_quantity': '1017', 'open_price': '1.40780', 'high_price': '1.46700', 'low_price': '1.21330', 'total_traded_base_asset_volume': '431958821', 'total_traded_quote_asset_volume': '574221660.49000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352974, 'first_trade_id': 113782352, 'last_trade_id': 115144418, 'total_nr_of_trades': 1361763}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353082, 'symbol': 'AXSUSDT', 'price_change': '-0.11000', 'price_change_percent': '-0.558', 'weighted_average_price': '19.56802', 'last_price': '19.60000', 'last_quantity': '32', 'open_price': '19.71000', 'high_price': '19.97000', 'low_price': '19.21000', 'total_traded_base_asset_volume': '5291493', 'total_traded_quote_asset_volume': '103544066.99000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353024, 'first_trade_id': 320673000, 'last_trade_id': 320853481, 'total_nr_of_trades': 180482}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352934, 'symbol': 'ALPHAUSDT', 'price_change': '-0.00490', 'price_change_percent': '-2.929', 'weighted_average_price': '0.16640', 'last_price': '0.16240', 'last_quantity': '431', 'open_price': '0.16730', 'high_price': '0.18070', 'low_price': '0.15640', 'total_traded_base_asset_volume': '433593730', 'total_traded_quote_asset_volume': '72149714.99000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352901, 'first_trade_id': 120357182, 'last_trade_id': 120614640, 'total_nr_of_trades': 257452}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352943, 'symbol': 'ZENUSDT', 'price_change': '-0.054', 'price_change_percent': '-0.272', 'weighted_average_price': '19.516', 'last_price': '19.770', 'last_quantity': '5.0', 'open_price': '19.824', 'high_price': '19.897', 'low_price': '19.033', 'total_traded_base_asset_volume': '500196.3', 'total_traded_quote_asset_volume': '9761676.890', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352911, 'first_trade_id': 97979584, 'last_trade_id': 98043980, 'total_nr_of_trades': 64397}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353260, 'symbol': 'SKLUSDT', 'price_change': '0.00243', 'price_change_percent': '3.378', 'weighted_average_price': '0.07245', 'last_price': '0.07436', 'last_quantity': '3279', 'open_price': '0.07193', 'high_price': '0.07527', 'low_price': '0.06810', 'total_traded_base_asset_volume': '635410764', 'total_traded_quote_asset_volume': '46033089.50000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353210, 'first_trade_id': 111497471, 'last_trade_id': 111693502, 'total_nr_of_trades': 196032}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352911, 'symbol': 'GRTUSDT', 'price_change': '-0.00088', 'price_change_percent': '-0.581', 'weighted_average_price': '0.14839', 'last_price': '0.15052', 'last_quantity': '250', 'open_price': '0.15140', 'high_price': '0.15202', 'low_price': '0.14267', 'total_traded_base_asset_volume': '196339086', 'total_traded_quote_asset_volume': '29134277.46000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352886, 'first_trade_id': 189306153, 'last_trade_id': 189457621, 'total_nr_of_trades': 151469}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353096, 'symbol': '1INCHUSDT', 'price_change': '-0.0164', 'price_change_percent': '-1.976', 'weighted_average_price': '0.8159', 'last_price': '0.8136', 'last_quantity': '177', 'open_price': '0.8300', 'high_price': '0.8317', 'low_price': '0.8006', 'total_traded_base_asset_volume': '25669517', 'total_traded_quote_asset_volume': '20943318.6700', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353034, 'first_trade_id': 185801554, 'last_trade_id': 185887764, 'total_nr_of_trades': 86209}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353263, 'symbol': 'BTCBUSD', 'price_change': '-79.0', 'price_change_percent': '-0.260', 'weighted_average_price': '30221.0', 'last_price': '30270.2', 'last_quantity': '0.002', 'open_price': '30349.2', 'high_price': '30660.7', 'low_price': '29878.0', 'total_traded_base_asset_volume': '47761.599', 'total_traded_quote_asset_volume': '1443405458.74', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353212, 'first_trade_id': 197655396, 'last_trade_id': 198117781, 'total_nr_of_trades': 462362}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352880, 'symbol': 'CHZUSDT', 'price_change': '-0.00035', 'price_change_percent': '-0.287', 'weighted_average_price': '0.12051', 'last_price': '0.12163', 'last_quantity': '1394', 'open_price': '0.12198', 'high_price': '0.12221', 'low_price': '0.11805', 'total_traded_base_asset_volume': '215270099', 'total_traded_quote_asset_volume': '25942539.17000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352861, 'first_trade_id': 250376727, 'last_trade_id': 250479952, 'total_nr_of_trades': 103224}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352915, 'symbol': 'SANDUSDT', 'price_change': '0.00350', 'price_change_percent': '0.269', 'weighted_average_price': '1.30062', 'last_price': '1.30650', 'last_quantity': '5', 'open_price': '1.30300', 'high_price': '1.32310', 'low_price': '1.28060', 'total_traded_base_asset_volume': '81092760', 'total_traded_quote_asset_volume': '105471070.27000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352888, 'first_trade_id': 434056206, 'last_trade_id': 434352757, 'total_nr_of_trades': 296552}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352644, 'symbol': 'BTSUSDT', 'price_change': '0.00019', 'price_change_percent': '1.446', 'weighted_average_price': '0.01299', 'last_price': '0.01333', 'last_quantity': '6766', 'open_price': '0.01314', 'high_price': '0.01358', 'low_price': '0.01248', 'total_traded_base_asset_volume': '964621722', 'total_traded_quote_asset_volume': '12534660.26000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352633, 'first_trade_id': 48326646, 'last_trade_id': 48385656, 'total_nr_of_trades': 59011}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353190, 'symbol': 'LITUSDT', 'price_change': '-0.308', 'price_change_percent': '-27.257', 'weighted_average_price': '1.030', 'last_price': '0.822', 'last_quantity': '60.2', 'open_price': '1.130', 'high_price': '1.333', 'low_price': '0.759', 'total_traded_base_asset_volume': '666505986.9', 'total_traded_quote_asset_volume': '686780244.090', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353113, 'first_trade_id': 74105140, 'last_trade_id': 75952056, 'total_nr_of_trades': 1845276}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352900, 'symbol': 'UNFIUSDT', 'price_change': '-1.146', 'price_change_percent': '-11.499', 'weighted_average_price': '8.581', 'last_price': '8.820', 'last_quantity': '10.3', 'open_price': '9.966', 'high_price': '10.320', 'low_price': '7.158', 'total_traded_base_asset_volume': '157694926.6', 'total_traded_quote_asset_volume': '1353204260.300', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352875, 'first_trade_id': 94921083, 'last_trade_id': 98399401, 'total_nr_of_trades': 3471310}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353205, 'symbol': 'REEFUSDT', 'price_change': '-0.000054', 'price_change_percent': '-1.251', 'weighted_average_price': '0.004230', 'last_price': '0.004262', 'last_quantity': '11768', 'open_price': '0.004316', 'high_price': '0.004375', 'low_price': '0.004119', 'total_traded_base_asset_volume': '5456634783', 'total_traded_quote_asset_volume': '23084040.820000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353142, 'first_trade_id': 100562739, 'last_trade_id': 100658585, 'total_nr_of_trades': 95846}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352897, 'symbol': 'RVNUSDT', 'price_change': '-0.00006', 'price_change_percent': '-0.217', 'weighted_average_price': '0.02744', 'last_price': '0.02764', 'last_quantity': '227', 'open_price': '0.02770', 'high_price': '0.02799', 'low_price': '0.02685', 'total_traded_base_asset_volume': '319984110', 'total_traded_quote_asset_volume': '8778931.45000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352874, 'first_trade_id': 75032418, 'last_trade_id': 75082126, 'total_nr_of_trades': 49709}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352685, 'symbol': 'XEMUSDT', 'price_change': '0.0008', 'price_change_percent': '1.587', 'weighted_average_price': '0.0503', 'last_price': '0.0512', 'last_quantity': '309', 'open_price': '0.0504', 'high_price': '0.0520', 'low_price': '0.0495', 'total_traded_base_asset_volume': '187480594', 'total_traded_quote_asset_volume': '9432257.2000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352677, 'first_trade_id': 57677526, 'last_trade_id': 57718969, 'total_nr_of_trades': 41443}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352982, 'symbol': 'COTIUSDT', 'price_change': '-0.00629', 'price_change_percent': '-4.532', 'weighted_average_price': '0.13814', 'last_price': '0.13250', 'last_quantity': '13494', 'open_price': '0.13879', 'high_price': '0.14492', 'low_price': '0.13001', 'total_traded_base_asset_volume': '634240428', 'total_traded_quote_asset_volume': '87611834.31000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352946, 'first_trade_id': 123265119, 'last_trade_id': 123595835, 'total_nr_of_trades': 330712}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352929, 'symbol': 'MANAUSDT', 'price_change': '-0.0036', 'price_change_percent': '-0.362', 'weighted_average_price': '0.9870', 'last_price': '0.9920', 'last_quantity': '454', 'open_price': '0.9956', 'high_price': '1.0039', 'low_price': '0.9640', 'total_traded_base_asset_volume': '80931914', 'total_traded_quote_asset_volume': '79876648.0000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352898, 'first_trade_id': 328781638, 'last_trade_id': 329074898, 'total_nr_of_trades': 293256}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353153, 'symbol': 'ALICEUSDT', 'price_change': '0.050', 'price_change_percent': '1.715', 'weighted_average_price': '2.871', 'last_price': '2.966', 'last_quantity': '61.9', 'open_price': '2.916', 'high_price': '2.999', 'low_price': '2.754', 'total_traded_base_asset_volume': '24511856.8', 'total_traded_quote_asset_volume': '70375002.340', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353079, 'first_trade_id': 244831489, 'last_trade_id': 245027921, 'total_nr_of_trades': 196432}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352838, 'symbol': 'HBARUSDT', 'price_change': '-0.00004', 'price_change_percent': '-0.045', 'weighted_average_price': '0.08803', 'last_price': '0.08890', 'last_quantity': '1237', 'open_price': '0.08894', 'high_price': '0.08944', 'low_price': '0.08640', 'total_traded_base_asset_volume': '135803638', 'total_traded_quote_asset_volume': '11955367.43000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352831, 'first_trade_id': 84636739, 'last_trade_id': 84682777, 'total_nr_of_trades': 46038}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352937, 'symbol': 'ONEUSDT', 'price_change': '0.00030', 'price_change_percent': '0.751', 'weighted_average_price': '0.03939', 'last_price': '0.04024', 'last_quantity': '8003', 'open_price': '0.03994', 'high_price': '0.04051', 'low_price': '0.03836', 'total_traded_base_asset_volume': '669679262', 'total_traded_quote_asset_volume': '26380596.33000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352907, 'first_trade_id': 187582133, 'last_trade_id': 187673586, 'total_nr_of_trades': 91450}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352951, 'symbol': 'LINAUSDT', 'price_change': '0.00024', 'price_change_percent': '2.116', 'weighted_average_price': '0.01116', 'last_price': '0.01158', 'last_quantity': '1394', 'open_price': '0.01134', 'high_price': '0.01214', 'low_price': '0.01052', 'total_traded_base_asset_volume': '5834470112', 'total_traded_quote_asset_volume': '65119932.62000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352917, 'first_trade_id': 105295380, 'last_trade_id': 105507248, 'total_nr_of_trades': 211821}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352915, 'symbol': 'STMXUSDT', 'price_change': '-0.00012', 'price_change_percent': '-1.216', 'weighted_average_price': '0.00972', 'last_price': '0.00975', 'last_quantity': '10240', 'open_price': '0.00987', 'high_price': '0.00992', 'low_price': '0.00954', 'total_traded_base_asset_volume': '725449727', 'total_traded_quote_asset_volume': '7054773.75000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352888, 'first_trade_id': 55285579, 'last_trade_id': 55322403, 'total_nr_of_trades': 36823}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352299, 'symbol': 'DENTUSDT', 'price_change': '-0.000027', 'price_change_percent': '-2.106', 'weighted_average_price': '0.001258', 'last_price': '0.001255', 'last_quantity': '776161', 'open_price': '0.001282', 'high_price': '0.001286', 'low_price': '0.001222', 'total_traded_base_asset_volume': '15118197304', 'total_traded_quote_asset_volume': '19015874.340000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352295, 'first_trade_id': 119891949, 'last_trade_id': 119964971, 'total_nr_of_trades': 73022}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353018, 'symbol': 'CELRUSDT', 'price_change': '0.00020', 'price_change_percent': '1.099', 'weighted_average_price': '0.01793', 'last_price': '0.01840', 'last_quantity': '50902', 'open_price': '0.01820', 'high_price': '0.01853', 'low_price': '0.01722', 'total_traded_base_asset_volume': '1623990414', 'total_traded_quote_asset_volume': '29110634.49000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352971, 'first_trade_id': 124221006, 'last_trade_id': 124311303, 'total_nr_of_trades': 90298}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352950, 'symbol': 'HOTUSDT', 'price_change': '-0.000015', 'price_change_percent': '-0.592', 'weighted_average_price': '0.002501', 'last_price': '0.002518', 'last_quantity': '38437', 'open_price': '0.002533', 'high_price': '0.002547', 'low_price': '0.002454', 'total_traded_base_asset_volume': '6258677911', 'total_traded_quote_asset_volume': '15653001.480000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352915, 'first_trade_id': 122253239, 'last_trade_id': 122317199, 'total_nr_of_trades': 63960}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352853, 'symbol': 'MTLUSDT', 'price_change': '0.2188', 'price_change_percent': '12.616', 'weighted_average_price': '1.8625', 'last_price': '1.9531', 'last_quantity': '426', 'open_price': '1.7343', 'high_price': '2.0000', 'low_price': '1.6710', 'total_traded_base_asset_volume': '160742161', 'total_traded_quote_asset_volume': '299377240.2400', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352842, 'first_trade_id': 94089518, 'last_trade_id': 94832858, 'total_nr_of_trades': 743333}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352920, 'symbol': 'OGNUSDT', 'price_change': '-0.0009', 'price_change_percent': '-0.324', 'weighted_average_price': '0.2715', 'last_price': '0.2773', 'last_quantity': '5306', 'open_price': '0.2782', 'high_price': '0.2818', 'low_price': '0.2567', 'total_traded_base_asset_volume': '222031598', 'total_traded_quote_asset_volume': '60283261.3100', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352890, 'first_trade_id': 116338203, 'last_trade_id': 116580052, 'total_nr_of_trades': 241846}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352868, 'symbol': 'SCUSDT', 'price_change': '-0.000044', 'price_change_percent': '-0.790', 'weighted_average_price': '0.005499', 'last_price': '0.005527', 'last_quantity': '38967', 'open_price': '0.005571', 'high_price': '0.005597', 'low_price': '0.005409', 'total_traded_base_asset_volume': '1789155712', 'total_traded_quote_asset_volume': '9838037.240000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352848, 'first_trade_id': 53183028, 'last_trade_id': 53235045, 'total_nr_of_trades': 52018}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352950, 'symbol': '1000SHIBUSDT', 'price_change': '-0.000024', 'price_change_percent': '-0.225', 'weighted_average_price': '0.010625', 'last_price': '0.010665', 'last_quantity': '35000', 'open_price': '0.010689', 'high_price': '0.010770', 'low_price': '0.010454', 'total_traded_base_asset_volume': '7930088930', 'total_traded_quote_asset_volume': '84258243.240000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352915, 'first_trade_id': 589545503, 'last_trade_id': 589734250, 'total_nr_of_trades': 188747}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352947, 'symbol': 'ICPUSDT', 'price_change': '-0.11', 'price_change_percent': '-1.637', 'weighted_average_price': '6.63', 'last_price': '6.61', 'last_quantity': '0.81', 'open_price': '6.72', 'high_price': '6.97', 'low_price': '6.40', 'total_traded_base_asset_volume': '9403285.01', 'total_traded_quote_asset_volume': '62317252.05', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352914, 'first_trade_id': 194088967, 'last_trade_id': 194211737, 'total_nr_of_trades': 122767}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353169, 'symbol': 'BAKEUSDT', 'price_change': '0.0013', 'price_change_percent': '0.371', 'weighted_average_price': '0.3414', 'last_price': '0.3515', 'last_quantity': '220', 'open_price': '0.3502', 'high_price': '0.3538', 'low_price': '0.3274', 'total_traded_base_asset_volume': '116254701', 'total_traded_quote_asset_volume': '39690212.8400', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353092, 'first_trade_id': 101888854, 'last_trade_id': 102036868, 'total_nr_of_trades': 148015}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353192, 'symbol': 'GTCUSDT', 'price_change': '-0.309', 'price_change_percent': '-8.977', 'weighted_average_price': '3.210', 'last_price': '3.133', 'last_quantity': '2.0', 'open_price': '3.442', 'high_price': '3.653', 'low_price': '3.000', 'total_traded_base_asset_volume': '20423331.3', 'total_traded_quote_asset_volume': '65550587.330', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353124, 'first_trade_id': 85325601, 'last_trade_id': 85566619, 'total_nr_of_trades': 240990}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353126, 'symbol': 'ETHBUSD', 'price_change': '5.35', 'price_change_percent': '0.297', 'weighted_average_price': '1797.36', 'last_price': '1805.25', 'last_quantity': '0.051', 'open_price': '1799.90', 'high_price': '1830.95', 'low_price': '1769.08', 'total_traded_base_asset_volume': '304991.573', 'total_traded_quote_asset_volume': '548179047.95', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353051, 'first_trade_id': 149421713, 'last_trade_id': 149832068, 'total_nr_of_trades': 410347}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795352884, 'symbol': 'BNBBUSD', 'price_change': '0.670', 'price_change_percent': '0.230', 'weighted_average_price': '289.047', 'last_price': '291.360', 'last_quantity': '0.13', 'open_price': '290.690', 'high_price': '293.060', 'low_price': '285.720', 'total_traded_base_asset_volume': '238231.95', 'total_traded_quote_asset_volume': '68860158.800', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795352863, 'first_trade_id': 49301808, 'last_trade_id': 49448629, 'total_nr_of_trades': 146821}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654795353249, 'symbol': 'ADABUSD', 'price_change': '-0.00930', 'price_change_percent': '-1.420', 'weighted_average_price': '0.64295', 'last_price': '0.64580', 'last_quantity': '168', 'open_price': '0.65510', 'high_price': '0.65700', 'low_price': '0.62490', 'total_traded_base_asset_volume': '124297023', 'total_traded_quote_asset_volume': '79916909.67000', 'statistics_open_time': 1654708920000, 'statistics_close_time': 1654795353204, 'first_trade_id': 47541709, 'last_trade_id': 47732099, 'total_nr_of_trades': 190389}], 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_ticker_single(self):
data = '{"stream":"btcusdt@ticker","data":{"e":"24hrTicker","E":1654795519583,"s":"BTCUSDT","p":"-139.80","P":"-0.459","w":"30253.31","c":"30289.60","Q":"0.017","o":"30429.40","h":"30691.90","l":"29900.00","v":"315787.324","q":"9553610870.04","O":1654709100000,"C":1654795519576,"F":2340426935,"L":2343353385,"n":2926402}}'
asserted_result = "{'stream_type': 'btcusdt@ticker', 'event_type': '24hrTicker', 'data': [{'stream_type': 'btcusdt@ticker', 'event_type': '24hrTicker', 'event_time': 1654795519583, 'symbol': 'BTCUSDT', 'price_change': '-139.80', 'price_change_percent': '-0.459', 'weighted_average_price': '30253.31', 'last_price': '30289.60', 'last_quantity': '0.017', 'open_price': '30429.40', 'high_price': '30691.90', 'low_price': '29900.00', 'total_traded_base_asset_volume': '315787.324', 'total_traded_quote_asset_volume': '9553610870.04', 'statistics_open_time': 1654709100000, 'statistics_close_time': 1654795519576, 'first_trade_id': 2340426935, 'last_trade_id': 2343353385, 'total_nr_of_trades': 2926402}], 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_kline(self):
data = '{"stream":"btcusdt@kline_15m","data":{"e":"kline","E":1654797104663,"s":"BTCUSDT","k":{"t":1654796700000,"T":1654797599999,"s":"BTCUSDT","i":"15m","f":2343389734,"L":2343400223,"o":"30205.60","c":"30280.40","h":"30281.00","l":"30192.10","v":"955.412","n":10490,"x":false,"q":"28893669.27360","V":"624.864","Q":"18898615.54900","B":"0"}}}'
asserted_result = "{'stream_type': 'btcusdt@kline_15m', 'event_type': 'kline', 'event_time': 1654797104663, 'kline': {'kline_start_time': 1654796700000, 'kline_close_time': 1654797599999, 'interval': '15m', 'first_trade_id': False, 'last_trade_id': False, 'open_price': '30205.60', 'close_price': '30280.40', 'high_price': '30281.00', 'low_price': '30192.10', 'base_volume': '955.412', 'number_of_trades': 10490, 'is_closed': False, 'quote': '28893669.27360', 'taker_by_base_asset_volume': '624.864', 'taker_by_quote_asset_volume': '18898615.54900', 'symbol': 'BTCUSDT'}, 'symbol': 'BTCUSDT', 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_continuous_contract_kline(self):
data = '{"stream":"btcusdt_perpetual@continuousKline_15m","data":{"e":"continuous_kline","E":1654797063312,"ps":"BTCUSDT","ct":"PERPETUAL","k":{"t":1654796700000,"T":1654797599999,"i":"15m","f":1592394745262,"L":1592407783823,"o":"30205.60","c":"30264.00","h":"30275.00","l":"30192.10","v":"853.433","n":9438,"x":false,"q":"25806320.77250","V":"538.420","Q":"16281480.88260","B":"0"}}}'
asserted_result = "{'stream_type': 'btcusdt_perpetual@continuousKline_15m', 'event_type': 'continuous_kline', 'event_time': 1654797063312, 'kline': {'kline_start_time': 1654796700000, 'kline_close_time': 1654797599999, 'interval': '15m', 'first_trade_id': False, 'last_trade_id': False, 'open_price': '30205.60', 'close_price': '30264.00', 'high_price': '30275.00', 'low_price': '30192.10', 'base_volume': '853.433', 'number_of_trades': 9438, 'is_closed': False, 'quote': '25806320.77250', 'taker_by_base_asset_volume': '538.420', 'taker_by_quote_asset_volume': '16281480.88260'}, 'pair': 'BTCUSDT', 'contract_type': 'PERPETUAL', 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_liquidation_order_arr(self):
data = '{"e":"forceOrder","E":1654852482228,"o":{"s":"BALUSDT","S":"BUY","o":"LIMIT","f":"IOC","q":"1065.9","p":"8.037","ap":"7.920","X":"FILLED","l":"111.4","z":"1065.9","T":1654852482218}}'
asserted_result = "{'stream_type': 'forceOrder', 'event_type': 'forceOrder', 'event_time': 1654852482228, 'symbol': 'BALUSDT', 'side': 'BUY', 'order_type': 'LIMIT', 'time_in_force': 'IOC', 'original_quantity': '1065.9', 'price': '8.037', 'avg_price': '7.920', 'order_status': 'FILLED', 'last_executed_quantity': '111.4', 'cumulative_filled_quantity': '1065.9', 'transaction_time': 1654852482218, 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_liquidation_order_single(self):
data = '{"stream":"1000luncbusd@forceOrder","data":{"e":"forceOrder","E":1654852759373,"o":{"s":"1000LUNCBUSD","S":"SELL","o":"LIMIT","f":"IOC","q":"100","p":"0.0719248","ap":"0.0736000","X":"FILLED","l":"100","z":"100","T":1654852759361}}}'
asserted_result = "{'stream_type': 'forceOrder', 'event_type': 'forceOrder', 'event_time': 1654852759373, 'symbol': '1000LUNCBUSD', 'side': 'SELL', 'order_type': 'LIMIT', 'time_in_force': 'IOC', 'original_quantity': '100', 'price': '0.0719248', 'avg_price': '0.0736000', 'order_status': 'FILLED', 'last_executed_quantity': '100', 'cumulative_filled_quantity': '100', 'transaction_time': 1654852759361, 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_composite_index(self):
data = '{"stream":"defiusdt@compositeIndex","data":{"e":"compositeIndex","E":1654855405014,"s":"DEFIUSDT","p":"859.62638381","C":"baseAsset","c":[{"b":"1INCH","q":"USDT","w":"33.20242961","W":"0.03065800","i":"0.78418438"},{"b":"AAVE","q":"USDT","w":"0.52818868","W":"0.05793900","i":"93.35160786"},{"b":"ALGO","q":"USDT","w":"138.06273627","W":"0.06387400","i":"0.38719598"},{"b":"ALPHA","q":"USDT","w":"112.58289827","W":"0.02089800","i":"0.15264967"},{"b":"BAKE","q":"USDT","w":"68.52610869","W":"0.02641600","i":"0.32981100"},{"b":"BAL","q":"USDT","w":"2.29084696","W":"0.02028500","i":"7.76172946"},{"b":"BAND","q":"USDT","w":"8.41768250","W":"0.01608200","i":"1.96088592"},{"b":"BEL","q":"USDT","w":"51.21953387","W":"0.07475900","i":"1.23492237"},{"b":"COMP","q":"USDT","w":"0.46858008","W":"0.02961100","i":"54.08124787"},{"b":"CRV","q":"USDT","w":"31.11401582","W":"0.04072500","i":"1.11959413"},{"b":"FLM","q":"USDT","w":"139.22885616","W":"0.01840500","i":"0.11716035"},{"b":"KAVA","q":"USDT","w":"12.28356162","W":"0.03628200","i":"2.56446555"},{"b":"KNC","q":"USDT","w":"17.78564023","W":"0.03765200","i":"1.85734751"},{"b":"LINK","q":"USDT","w":"9.13098479","W":"0.09041100","i":"8.82885993"},{"b":"LRC","q":"USDT","w":"72.25277173","W":"0.04291100","i":"0.49621868"},{"b":"MKR","q":"USDT","w":"0.02863313","W":"0.03719300","i":"1092.31507760"},{"b":"REN","q":"USDT","w":"115.84095759","W":"0.02030200","i":"0.14407001"},{"b":"RSR","q":"USDT","w":"4358.49252264","W":"0.04194900","i":"0.00796904"},{"b":"RUNE","q":"USDT","w":"15.58732839","W":"0.05131600","i":"2.78422016"},{"b":"SFP","q":"USDT","w":"31.41177766","W":"0.01436400","i":"0.39494047"},{"b":"SNX","q":"USDT","w":"9.48147062","W":"0.02854700","i":"2.63770960"},{"b":"SRM","q":"USDT","w":"20.42069608","W":"0.02369700","i":"1.00389886"},{"b":"SXP","q":"USDT","w":"56.25956368","W":"0.03403900","i":"0.50120304"},{"b":"TRB","q":"USDT","w":"1.41432528","W":"0.02045200","i":"13.42406105"},{"b":"UNI","q":"USDT","w":"11.39654919","W":"0.06659300","i":"5.05622201"},{"b":"YFI","q":"USDT","w":"0.00315481","W":"0.02679100","i":"7482.48605691"},{"b":"ZRX","q":"USDT","w":"62.33366480","W":"0.02785000","i":"0.37830490"}]}}'
asserted_result = "{'stream_type': 'compositeIndex', 'event_type': 'compositeIndex', 'event_time': 1654855405014, 'symbol': 'DEFIUSDT', 'price': '859.62638381', 'composition': [{'base_asset': '1INCH', 'quote_asset': 'USDT', 'weight_quantity': '33.20242961', 'weight_percentage': '0.03065800', 'index_price': '0.78418438'}, {'base_asset': 'AAVE', 'quote_asset': 'USDT', 'weight_quantity': '0.52818868', 'weight_percentage': '0.05793900', 'index_price': '93.35160786'}, {'base_asset': 'ALGO', 'quote_asset': 'USDT', 'weight_quantity': '138.06273627', 'weight_percentage': '0.06387400', 'index_price': '0.38719598'}, {'base_asset': 'ALPHA', 'quote_asset': 'USDT', 'weight_quantity': '112.58289827', 'weight_percentage': '0.02089800', 'index_price': '0.15264967'}, {'base_asset': 'BAKE', 'quote_asset': 'USDT', 'weight_quantity': '68.52610869', 'weight_percentage': '0.02641600', 'index_price': '0.32981100'}, {'base_asset': 'BAL', 'quote_asset': 'USDT', 'weight_quantity': '2.29084696', 'weight_percentage': '0.02028500', 'index_price': '7.76172946'}, {'base_asset': 'BAND', 'quote_asset': 'USDT', 'weight_quantity': '8.41768250', 'weight_percentage': '0.01608200', 'index_price': '1.96088592'}, {'base_asset': 'BEL', 'quote_asset': 'USDT', 'weight_quantity': '51.21953387', 'weight_percentage': '0.07475900', 'index_price': '1.23492237'}, {'base_asset': 'COMP', 'quote_asset': 'USDT', 'weight_quantity': '0.46858008', 'weight_percentage': '0.02961100', 'index_price': '54.08124787'}, {'base_asset': 'CRV', 'quote_asset': 'USDT', 'weight_quantity': '31.11401582', 'weight_percentage': '0.04072500', 'index_price': '1.11959413'}, {'base_asset': 'FLM', 'quote_asset': 'USDT', 'weight_quantity': '139.22885616', 'weight_percentage': '0.01840500', 'index_price': '0.11716035'}, {'base_asset': 'KAVA', 'quote_asset': 'USDT', 'weight_quantity': '12.28356162', 'weight_percentage': '0.03628200', 'index_price': '2.56446555'}, {'base_asset': 'KNC', 'quote_asset': 'USDT', 'weight_quantity': '17.78564023', 'weight_percentage': '0.03765200', 'index_price': '1.85734751'}, {'base_asset': 'LINK', 'quote_asset': 'USDT', 'weight_quantity': '9.13098479', 'weight_percentage': '0.09041100', 'index_price': '8.82885993'}, {'base_asset': 'LRC', 'quote_asset': 'USDT', 'weight_quantity': '72.25277173', 'weight_percentage': '0.04291100', 'index_price': '0.49621868'}, {'base_asset': 'MKR', 'quote_asset': 'USDT', 'weight_quantity': '0.02863313', 'weight_percentage': '0.03719300', 'index_price': '1092.31507760'}, {'base_asset': 'REN', 'quote_asset': 'USDT', 'weight_quantity': '115.84095759', 'weight_percentage': '0.02030200', 'index_price': '0.14407001'}, {'base_asset': 'RSR', 'quote_asset': 'USDT', 'weight_quantity': '4358.49252264', 'weight_percentage': '0.04194900', 'index_price': '0.00796904'}, {'base_asset': 'RUNE', 'quote_asset': 'USDT', 'weight_quantity': '15.58732839', 'weight_percentage': '0.05131600', 'index_price': '2.78422016'}, {'base_asset': 'SFP', 'quote_asset': 'USDT', 'weight_quantity': '31.41177766', 'weight_percentage': '0.01436400', 'index_price': '0.39494047'}, {'base_asset': 'SNX', 'quote_asset': 'USDT', 'weight_quantity': '9.48147062', 'weight_percentage': '0.02854700', 'index_price': '2.63770960'}, {'base_asset': 'SRM', 'quote_asset': 'USDT', 'weight_quantity': '20.42069608', 'weight_percentage': '0.02369700', 'index_price': '1.00389886'}, {'base_asset': 'SXP', 'quote_asset': 'USDT', 'weight_quantity': '56.25956368', 'weight_percentage': '0.03403900', 'index_price': '0.50120304'}, {'base_asset': 'TRB', 'quote_asset': 'USDT', 'weight_quantity': '1.41432528', 'weight_percentage': '0.02045200', 'index_price': '13.42406105'}, {'base_asset': 'UNI', 'quote_asset': 'USDT', 'weight_quantity': '11.39654919', 'weight_percentage': '0.06659300', 'index_price': '5.05622201'}, {'base_asset': 'YFI', 'quote_asset': 'USDT', 'weight_quantity': '0.00315481', 'weight_percentage': '0.02679100', 'index_price': '7482.48605691'}, {'base_asset': 'ZRX', 'quote_asset': 'USDT', 'weight_quantity': '62.33366480', 'weight_percentage': '0.02785000', 'index_price': '0.37830490'}], 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_account_update_futures(self):
data = '{"e":"ACCOUNT_UPDATE","T":1617859763506,"E":1617859763511,"a":{"B":[{"a":"USDT","wb":"1790.86605837","cw":"1790.86605837"}],"P":[{"s":"CHZUSDT","pa":"0","ep":"0.00000","cr":"0","up":"0","mt":"cross","iw":"0","ps":"BOTH","ma":"USDT"},{"s":"CHZUSDT","pa":"2684","ep":"0.45855","cr":"79.89127995","up":"2.03986684","mt":"cross","iw":"0","ps":"LONG","ma":"USDT"}],"m":"ORDER"}}'
asserted_result = "{'stream_type': 'ACCOUNT_UPDATE', 'event_type': 'ACCOUNT_UPDATE', 'event_time': 1617859763511, 'transaction': 1617859763506, 'event_reason': 'ORDER', 'balances': [{'asset': 'USDT', 'wallet_balance': '1790.86605837', 'cross_wallet_balance': '1790.86605837'}], 'positions': [{'symbol': 'CHZUSDT', 'position_amount': '0', 'entry_price': '0.00000', 'accumulated_realized': '0', 'upnl': '0', 'margin_type': 'cross', 'isolated_wallet': '0', 'position_side': 'BOTH'}, {'symbol': 'CHZUSDT', 'position_amount': '2684', 'entry_price': '0.45855', 'accumulated_realized': '79.89127995', 'upnl': '2.03986684', 'margin_type': 'cross', 'isolated_wallet': '0', 'position_side': 'LONG'}], 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_order_trade_update_futures(self):
data = '{"e":"ORDER_TRADE_UPDATE","T":1617859867769,"E":1617859867772,"o":{"s":"SANDUSDT","c":"electron_6LyJZ9KPgmRbhKfFamx3","S":"BUY","o":"LIMIT","f":"GTC","q":"1000","p":"0.63428","ap":"0","sp":"0","x":"NEW","X":"NEW","i":315803079,"l":"0","z":"0","L":"0","T":1617859867769,"t":0,"b":"1262.16000","a":"0","m":false,"R":false,"wt":"CONTRACT_PRICE","ot":"LIMIT","ps":"LONG","cp":false,"rp":"0","pP":false,"si":0,"ss":0}}'
asserted_result = "{'stream_type': 'ORDER_TRADE_UPDATE', 'event_type': 'ORDER_TRADE_UPDATE', 'event_time': 1617859867772, 'symbol': 'SANDUSDT', 'client_order_id': 'electron_6LyJZ9KPgmRbhKfFamx3', 'side': 'BUY', 'order_type': 'LIMIT', 'time_in_force': 'GTC', 'order_quantity': '1000', 'order_price': '0.63428', 'order_avg_price': '0', 'order_stop_price': '0', 'current_execution_type': 'NEW', 'current_order_status': 'NEW', 'order_id': 315803079, 'last_executed_quantity': '0', 'cumulative_filled_quantity': '0', 'last_executed_price': '0', 'transaction_time': 1617859867769, 'trade_id': 0, 'net_pay': '1262.16000', 'net_selling_order_value': '0', 'is_trade_maker_side': False, 'reduce_only': False, 'trigger_price_type': 'CONTRACT_PRICE', 'order_price_type': 'LIMIT', 'position_side': 'LONG', 'order_realized_profit': '0', 'close_all': False, 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_depth_futures(self):
data = '{"stream":"btcusdt@depth5","data":{"e":"depthUpdate","E":1654853780525,"T":1654853780513,"s":"BTCUSDT","U":1594316854355,"u":1594316863126,"pu":1594316854277,"b":[["29965.00","5.041"],["29964.90","0.001"],["29964.50","0.053"],["29964.10","0.001"],["29964.00","0.275"]],"a":[["29965.10","6.292"],["29965.20","0.580"],["29965.30","0.366"],["29965.40","1.318"],["29966.10","0.001"]]}}'
asserted_result = "{'stream_type': 'btcusdt@depth5', 'event_type': 'depthUpdate', 'event_time': 1654853780525, 'transaction_time': 1654853780513, 'symbol': 'BTCUSDT', 'depth_level': 5, 'first_update_id_in_event': 1594316854355, 'final_update_id_in_event': 1594316863126, 'final_update_id_in_previous_event': 1594316854277, 'asks': [['29965.10', '6.292'], ['29965.20', '0.580'], ['29965.30', '0.366'], ['29965.40', '1.318'], ['29966.10', '0.001']], 'bids': [['29965.00', '5.041'], ['29964.90', '0.001'], ['29964.50', '0.053'], ['29964.10', '0.001'], ['29964.00', '0.275']], 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_diff_depth_futures(self):
data = '{"stream":"btcusdt@depth","data":{"e":"depthUpdate","E":1654854178479,"T":1654854178470,"s":"BTCUSDT","U":1594332829840,"u":1594332837247,"pu":1594332829814,"b":[["21006.00","0.003"],["28499.90","0.141"],["28500.00","151.746"],["29405.80","1.113"],["29406.80","1.077"],["29455.80","1.886"],["29512.10","0.077"],["29666.00","19.324"],["29709.60","0.117"],["29892.20","1.141"],["29920.40","0.000"],["29934.60","0.281"],["29937.10","3.228"],["29939.60","0.481"],["29940.40","0.292"],["29942.20","0.303"],["29942.40","0.031"],["29942.70","0.205"],["29942.90","0.371"],["29943.90","0.022"],["29944.10","0.245"],["29957.20","0.035"],["29961.90","1.039"],["29962.90","0.000"],["29965.00","0.000"],["29965.10","1.364"],["29966.10","0.000"],["29971.50","0.070"],["29987.00","0.000"],["29987.10","0.160"],["29987.20","0.929"],["29990.00","0.000"],["29990.10","0.000"],["29991.20","0.413"],["29991.30","0.000"],["29991.40","0.000"],["29991.50","1.660"],["29991.60","0.000"],["29991.70","1.586"],["29991.80","1.282"],["29993.60","0.141"],["29995.60","0.058"],["29996.50","0.055"],["29996.70","0.000"],["29997.30","0.155"],["29997.50","0.003"],["30001.20","0.001"],["30001.40","0.168"],["30001.50","0.000"],["30001.60","0.000"],["30001.70","1.585"],["30001.80","0.091"],["30001.90","0.015"],["30002.20","0.017"],["30002.30","0.000"],["30002.70","0.166"],["30002.80","0.000"],["30002.90","0.000"],["30003.00","0.000"],["30003.50","0.000"],["30003.60","0.000"],["30003.70","0.700"],["30003.80","1.000"],["30003.90","1.000"],["30004.00","0.934"],["30004.30","0.000"],["30004.40","0.000"],["30004.50","0.000"],["30004.60","0.000"],["30004.90","0.202"],["30005.90","0.058"],["30013.00","0.000"],["30027.10","0.000"],["31356.30","0.000"]],"a":[["29984.80","0.000"],["30004.90","0.000"],["30005.20","0.000"],["30005.90","0.000"],["30006.00","6.340"],["30006.20","0.017"],["30007.30","0.122"],["30007.40","0.227"],["30008.80","0.247"],["30010.10","0.401"],["30010.50","0.434"],["30011.10","0.416"],["30011.30","0.000"],["30012.50","0.118"],["30013.40","0.559"],["30017.40","9.774"],["30019.20","0.267"],["30036.20","1.671"],["30037.20","0.040"],["30039.00","0.528"],["30039.80","0.006"],["30039.90","1.467"],["30040.00","0.695"],["30040.80","2.144"],["30041.80","0.000"],["30047.40","0.380"],["30054.60","2.622"],["30058.00","1.474"],["30062.40","0.311"],["30062.50","0.001"],["30064.20","0.025"],["30064.30","0.100"],["30064.60","0.001"],["30067.70","0.201"],["30076.60","5.923"],["30079.20","1.779"],["30134.10","0.012"],["30351.10","4.051"],["30360.90","0.199"],["30606.10","1.713"],["30752.70","1.204"],["30896.20","1.131"],["31206.10","0.025"],["31206.20","0.896"],["31500.00","432.415"]]}}'
asserted_result = "{'stream_type': 'btcusdt@depth', 'event_type': 'depthUpdate', 'event_time': 1654854178479, 'transaction_time': 1654854178470, 'symbol': 'BTCUSDT', 'depth_level': False, 'first_update_id_in_event': 1594332829840, 'final_update_id_in_event': 1594332837247, 'final_update_id_in_previous_event': 1594332829814, 'asks': [['29984.80', '0.000'], ['30004.90', '0.000'], ['30005.20', '0.000'], ['30005.90', '0.000'], ['30006.00', '6.340'], ['30006.20', '0.017'], ['30007.30', '0.122'], ['30007.40', '0.227'], ['30008.80', '0.247'], ['30010.10', '0.401'], ['30010.50', '0.434'], ['30011.10', '0.416'], ['30011.30', '0.000'], ['30012.50', '0.118'], ['30013.40', '0.559'], ['30017.40', '9.774'], ['30019.20', '0.267'], ['30036.20', '1.671'], ['30037.20', '0.040'], ['30039.00', '0.528'], ['30039.80', '0.006'], ['30039.90', '1.467'], ['30040.00', '0.695'], ['30040.80', '2.144'], ['30041.80', '0.000'], ['30047.40', '0.380'], ['30054.60', '2.622'], ['30058.00', '1.474'], ['30062.40', '0.311'], ['30062.50', '0.001'], ['30064.20', '0.025'], ['30064.30', '0.100'], ['30064.60', '0.001'], ['30067.70', '0.201'], ['30076.60', '5.923'], ['30079.20', '1.779'], ['30134.10', '0.012'], ['30351.10', '4.051'], ['30360.90', '0.199'], ['30606.10', '1.713'], ['30752.70', '1.204'], ['30896.20', '1.131'], ['31206.10', '0.025'], ['31206.20', '0.896'], ['31500.00', '432.415']], 'bids': [['21006.00', '0.003'], ['28499.90', '0.141'], ['28500.00', '151.746'], ['29405.80', '1.113'], ['29406.80', '1.077'], ['29455.80', '1.886'], ['29512.10', '0.077'], ['29666.00', '19.324'], ['29709.60', '0.117'], ['29892.20', '1.141'], ['29920.40', '0.000'], ['29934.60', '0.281'], ['29937.10', '3.228'], ['29939.60', '0.481'], ['29940.40', '0.292'], ['29942.20', '0.303'], ['29942.40', '0.031'], ['29942.70', '0.205'], ['29942.90', '0.371'], ['29943.90', '0.022'], ['29944.10', '0.245'], ['29957.20', '0.035'], ['29961.90', '1.039'], ['29962.90', '0.000'], ['29965.00', '0.000'], ['29965.10', '1.364'], ['29966.10', '0.000'], ['29971.50', '0.070'], ['29987.00', '0.000'], ['29987.10', '0.160'], ['29987.20', '0.929'], ['29990.00', '0.000'], ['29990.10', '0.000'], ['29991.20', '0.413'], ['29991.30', '0.000'], ['29991.40', '0.000'], ['29991.50', '1.660'], ['29991.60', '0.000'], ['29991.70', '1.586'], ['29991.80', '1.282'], ['29993.60', '0.141'], ['29995.60', '0.058'], ['29996.50', '0.055'], ['29996.70', '0.000'], ['29997.30', '0.155'], ['29997.50', '0.003'], ['30001.20', '0.001'], ['30001.40', '0.168'], ['30001.50', '0.000'], ['30001.60', '0.000'], ['30001.70', '1.585'], ['30001.80', '0.091'], ['30001.90', '0.015'], ['30002.20', '0.017'], ['30002.30', '0.000'], ['30002.70', '0.166'], ['30002.80', '0.000'], ['30002.90', '0.000'], ['30003.00', '0.000'], ['30003.50', '0.000'], ['30003.60', '0.000'], ['30003.70', '0.700'], ['30003.80', '1.000'], ['30003.90', '1.000'], ['30004.00', '0.934'], ['30004.30', '0.000'], ['30004.40', '0.000'], ['30004.50', '0.000'], ['30004.60', '0.000'], ['30004.90', '0.202'], ['30005.90', '0.058'], ['30013.00', '0.000'], ['30027.10', '0.000'], ['31356.30', '0.000']], 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_margin_call_futures(self):
data = '{"e":"MARGIN_CALL","E":1587727187525,"cw":"3.16812045","p":[{"s":"ETHUSDT","ps":"LONG","pa":"1.327","mt":"CROSSED","iw":"0","mp":"187.17127","up":"-1.166074","mm":"1.614445"}]}'
asserted_result = "{'stream_type': 'MARGIN_CALL', 'event_type': 'MARGIN_CALL', 'event_time': 1587727187525, 'positions': [{'symbol': 'ETHUSDT', 'side': 'LONG', 'amount': '1.327', 'type': 'CROSSED', 'price': '187.17127', 'pnl': '-1.166074', 'margin': '1.614445'}], 'cross_wallet': '3.16812045', 'isolated_wallet': '0', 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_account_config_update_leverage_futures(self):
data = '{"e":"ACCOUNT_CONFIG_UPDATE","T":1617971759717,"E":1617971759721,"ac":{"s":"BTCUSDT","l":19}}'
asserted_result = "{'stream_type': 'ACCOUNT_CONFIG_UPDATE', 'event_type': 'ACCOUNT_CONFIG_UPDATE', 'event_time': 1617971759721, 'symbol': 'BTCUSDT', 'leverage': 19, 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def test_account_config_update_asset_mode_futures(self):
data = '{"e":"ACCOUNT_CONFIG_UPDATE","T":1617971759717,"E":1617971759721,"ai":{"j":false}}'
asserted_result = "{'stream_type': 'ACCOUNT_CONFIG_UPDATE', 'event_type': 'ACCOUNT_CONFIG_UPDATE', 'event_time': 1617971759721, 'multi_assets_mode': False, 'unicorn_fied': ['binance.com-futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_futures_websocket(data)), asserted_result)
def tearDown(self):
del self.unicorn_fy
class TestBinanceComWebsocketCoinFutures(unittest.TestCase):
def setUp(self):
self.unicorn_fy = UnicornFy()
self.unicorn_fy_version = str(self.unicorn_fy.get_version())
def test_aggTrade(self):
data = '{"stream":"btcusd_perp@aggTrade","data":{"e":"aggTrade","E":1654856742439,"a":193054733,"s":"BTCUSD_PERP","p":"29882.6","q":"2","f":448206690,"l":448206691,"T":1654856742275,"m":false}}'
asserted_result = "{'stream_type': 'btcusd_perp@aggTrade', 'event_type': 'aggTrade', 'event_time': 1654856742439, 'symbol': 'BTCUSD_PERP', 'aggregate_trade_id': 193054733, 'price': '29882.6', 'quantity': '2', 'first_trade_id': 448206690, 'last_trade_id': 448206691, 'trade_time': 1654856742275, 'is_market_maker': False, 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_index_price_update_arr(self):
data = '[{"e":"indexPriceUpdate","E":1654857564007,"i":"BTCUSD","p":"29931.37190909"},{"e":"indexPriceUpdate","E":1654857564007,"i":"ETHUSD","p":"1767.52436091"},{"e":"indexPriceUpdate","E":1654857564007,"i":"XRPUSD","p":"0.40018167"},{"e":"indexPriceUpdate","E":1654857564007,"i":"ADAUSD","p":"0.60998588"},{"e":"indexPriceUpdate","E":1654857564007,"i":"LINKUSD","p":"8.87642085"},{"e":"indexPriceUpdate","E":1654857564007,"i":"BNBUSD","p":"287.47518949"},{"e":"indexPriceUpdate","E":1654857564007,"i":"TRXUSD","p":"0.08103360"},{"e":"indexPriceUpdate","E":1654857564007,"i":"DOTUSD","p":"9.09923843"},{"e":"indexPriceUpdate","E":1654857564007,"i":"EOSUSD","p":"1.23508260"},{"e":"indexPriceUpdate","E":1654857564007,"i":"LTCUSD","p":"59.14333372"},{"e":"indexPriceUpdate","E":1654857564007,"i":"BCHUSD","p":"173.91198553"},{"e":"indexPriceUpdate","E":1654857564007,"i":"ETCUSD","p":"21.01172256"},{"e":"indexPriceUpdate","E":1654857564007,"i":"FILUSD","p":"7.10477415"},{"e":"indexPriceUpdate","E":1654857564007,"i":"EGLDUSD","p":"60.91258194"},{"e":"indexPriceUpdate","E":1654857564007,"i":"BUSDUSD","p":"1.00000000"},{"e":"indexPriceUpdate","E":1654857564007,"i":"USDTUSD","p":"0.99915016"},{"e":"indexPriceUpdate","E":1654857564007,"i":"DOGEUSD","p":"0.07873145"},{"e":"indexPriceUpdate","E":1654857564007,"i":"USDCUSD","p":"0.99999439"},{"e":"indexPriceUpdate","E":1654857564007,"i":"UNIUSD","p":"5.07355747"},{"e":"indexPriceUpdate","E":1654857564007,"i":"THETAUSD","p":"1.39132324"},{"e":"indexPriceUpdate","E":1654857564007,"i":"XLMUSD","p":"0.13844594"},{"e":"indexPriceUpdate","E":1654857564007,"i":"ICPUSD","p":"6.33051145"},{"e":"indexPriceUpdate","E":1654857564007,"i":"SOLUSD","p":"39.22239520"},{"e":"indexPriceUpdate","E":1654857564007,"i":"LUNAUSD","p":"2.99900000"},{"e":"indexPriceUpdate","E":1654857564007,"i":"FTMUSD","p":"0.32900087"},{"e":"indexPriceUpdate","E":1654857564007,"i":"MATICUSD","p":"0.63487657"},{"e":"indexPriceUpdate","E":1654857564007,"i":"SANDUSD","p":"1.26817144"},{"e":"indexPriceUpdate","E":1654857564007,"i":"MANAUSD","p":"0.95626215"},{"e":"indexPriceUpdate","E":1654857564007,"i":"AVAXUSD","p":"23.93945343"},{"e":"indexPriceUpdate","E":1654857564007,"i":"GALAUSD","p":"0.07326837"},{"e":"indexPriceUpdate","E":1654857564007,"i":"NEARUSD","p":"4.99134564"},{"e":"indexPriceUpdate","E":1654857564007,"i":"ATOMUSD","p":"8.76315909"},{"e":"indexPriceUpdate","E":1654857564007,"i":"AAVEUSD","p":"93.54927256"},{"e":"indexPriceUpdate","E":1654857564007,"i":"CRVUSD","p":"1.11694332"},{"e":"indexPriceUpdate","E":1654857564007,"i":"AXSUSD","p":"19.06526117"},{"e":"indexPriceUpdate","E":1654857564007,"i":"ROSEUSD","p":"0.06509806"},{"e":"indexPriceUpdate","E":1654857564007,"i":"ONEUSD","p":"0.03864697"},{"e":"indexPriceUpdate","E":1654857564007,"i":"XTZUSD","p":"2.14695830"},{"e":"indexPriceUpdate","E":1654857564007,"i":"ICXUSD","p":"0.37181942"},{"e":"indexPriceUpdate","E":1654857564007,"i":"ALGOUSD","p":"0.38712473"},{"e":"indexPriceUpdate","E":1654857564007,"i":"RUNEUSD","p":"2.79722598"},{"e":"indexPriceUpdate","E":1654857564007,"i":"APEUSD","p":"5.58756954"},{"e":"indexPriceUpdate","E":1654857564007,"i":"VETUSD","p":"0.03100389"},{"e":"indexPriceUpdate","E":1654857564007,"i":"ZILUSD","p":"0.04771165"},{"e":"indexPriceUpdate","E":1654857564007,"i":"KNCUSD","p":"1.85638157"},{"e":"indexPriceUpdate","E":1654857564007,"i":"XMRUSD","p":"181.22435964"},{"e":"indexPriceUpdate","E":1654857564007,"i":"GMTUSD","p":"0.95979311"}]'
asserted_result = "{'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'data': [{'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'BTCUSD', 'index_price': '29931.37190909'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'ETHUSD', 'index_price': '1767.52436091'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'XRPUSD', 'index_price': '0.40018167'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'ADAUSD', 'index_price': '0.60998588'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'LINKUSD', 'index_price': '8.87642085'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'BNBUSD', 'index_price': '287.47518949'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'TRXUSD', 'index_price': '0.08103360'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'DOTUSD', 'index_price': '9.09923843'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'EOSUSD', 'index_price': '1.23508260'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'LTCUSD', 'index_price': '59.14333372'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'BCHUSD', 'index_price': '173.91198553'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'ETCUSD', 'index_price': '21.01172256'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'FILUSD', 'index_price': '7.10477415'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'EGLDUSD', 'index_price': '60.91258194'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'BUSDUSD', 'index_price': '1.00000000'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'USDTUSD', 'index_price': '0.99915016'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'DOGEUSD', 'index_price': '0.07873145'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'USDCUSD', 'index_price': '0.99999439'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'UNIUSD', 'index_price': '5.07355747'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'THETAUSD', 'index_price': '1.39132324'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'XLMUSD', 'index_price': '0.13844594'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'ICPUSD', 'index_price': '6.33051145'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'SOLUSD', 'index_price': '39.22239520'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'LUNAUSD', 'index_price': '2.99900000'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'FTMUSD', 'index_price': '0.32900087'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'MATICUSD', 'index_price': '0.63487657'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'SANDUSD', 'index_price': '1.26817144'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'MANAUSD', 'index_price': '0.95626215'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'AVAXUSD', 'index_price': '23.93945343'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'GALAUSD', 'index_price': '0.07326837'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'NEARUSD', 'index_price': '4.99134564'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'ATOMUSD', 'index_price': '8.76315909'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'AAVEUSD', 'index_price': '93.54927256'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'CRVUSD', 'index_price': '1.11694332'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'AXSUSD', 'index_price': '19.06526117'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'ROSEUSD', 'index_price': '0.06509806'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'ONEUSD', 'index_price': '0.03864697'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'XTZUSD', 'index_price': '2.14695830'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'ICXUSD', 'index_price': '0.37181942'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'ALGOUSD', 'index_price': '0.38712473'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'RUNEUSD', 'index_price': '2.79722598'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'APEUSD', 'index_price': '5.58756954'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'VETUSD', 'index_price': '0.03100389'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'ZILUSD', 'index_price': '0.04771165'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'KNCUSD', 'index_price': '1.85638157'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'XMRUSD', 'index_price': '181.22435964'}, {'stream_type': '!indexPrice@arr', 'event_type': 'indexPriceUpdate', 'event_time': 1654857564007, 'pair': 'GMTUSD', 'index_price': '0.95979311'}], 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_index_price_update_single(self):
data = '{"stream":"btcusd@indexPrice","data":{"e":"indexPriceUpdate","E":1654857615004,"i":"BTCUSD","p":"29931.29009091"}}'
asserted_result = "{'stream_type': 'btcusd@indexPrice', 'event_type': 'indexPriceUpdate', 'data': [{'stream_type': 'btcusd@indexPrice', 'event_type': 'indexPriceUpdate', 'event_time': 1654857615004, 'pair': 'BTCUSD', 'index_price': '29931.29009091'}], 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_mark_price_update_arr(self):
data = '[{"e":"markPriceUpdate","E":1654858230006,"s":"BTCUSD_PERP","p":"29958.10000000","P":"29910.05037677","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"BTCUSD_220624","p":"29996.97713232","P":"29910.05037677","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"BTCUSD_220930","p":"30224.07093030","P":"29910.05037677","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"ETHUSD_PERP","p":"1768.92000000","P":"1767.39078128","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"ETHUSD_220624","p":"1771.00175509","P":"1767.39078128","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"ETHUSD_220930","p":"1784.35972315","P":"1767.39078128","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"LINKUSD_PERP","p":"8.88306288","P":"8.85638955","r":"-0.00002717","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"BNBUSD_PERP","p":"288.04800000","P":"287.16299941","r":"-0.00002373","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"TRXUSD_PERP","p":"0.08098924","P":"0.08083055","r":"-0.00010581","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"DOTUSD_PERP","p":"9.11600000","P":"9.09451466","r":"-0.00002950","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"ADAUSD_PERP","p":"0.61120000","P":"0.60906742","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"EOSUSD_PERP","p":"1.23600000","P":"1.23311192","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"LTCUSD_PERP","p":"59.31000000","P":"59.02027193","r":"-0.00002808","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"BCHUSD_PERP","p":"174.43449427","P":"173.74786009","r":"0.00003606","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"XRPUSD_PERP","p":"0.40092260","P":"0.39979488","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"ETCUSD_PERP","p":"21.06187594","P":"21.01576804","r":"0.00005088","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"FILUSD_PERP","p":"7.11717908","P":"7.09873163","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"EGLDUSD_PERP","p":"61.02551568","P":"60.78667481","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"DOGEUSD_PERP","p":"0.07880076","P":"0.07855257","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"UNIUSD_PERP","p":"5.08800000","P":"5.06448727","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"THETAUSD_PERP","p":"1.39300000","P":"1.38754285","r":"-0.00032688","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"XLMUSD_PERP","p":"0.13812520","P":"0.13848091","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"SOLUSD_PERP","p":"39.30813028","P":"39.17376920","r":"-0.00003521","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"FTMUSD_PERP","p":"0.32980000","P":"0.32881240","r":"-0.00011647","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"SANDUSD_PERP","p":"1.26960000","P":"1.26623314","r":"-0.00001506","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"MANAUSD_PERP","p":"0.95814032","P":"0.95567134","r":"-0.00004020","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"AVAXUSD_PERP","p":"23.95374886","P":"23.87678378","r":"-0.00003260","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"GALAUSD_PERP","p":"0.07343000","P":"0.07317157","r":"0.00006950","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"MATICUSD_PERP","p":"0.63550000","P":"0.63349544","r":"0.00002542","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"NEARUSD_PERP","p":"5.00227018","P":"4.98272052","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"ATOMUSD_PERP","p":"8.77600000","P":"8.73509048","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"AAVEUSD_PERP","p":"93.65501482","P":"93.44860895","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"ADAUSD_220624","p":"0.60982616","P":"0.60906742","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"LINKUSD_220624","p":"8.86511077","P":"8.85638955","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"BCHUSD_220624","p":"174.37505035","P":"173.74786009","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"DOTUSD_220624","p":"9.06145875","P":"9.09451466","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"XRPUSD_220624","p":"0.40135753","P":"0.39979488","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"LTCUSD_220624","p":"59.22610401","P":"59.02027193","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"BNBUSD_220624","p":"287.91858550","P":"287.16266514","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"CRVUSD_PERP","p":"1.12000000","P":"1.11981935","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"AXSUSD_PERP","p":"19.07253854","P":"19.03207637","r":"-0.00043852","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"ROSEUSD_PERP","p":"0.06523004","P":"0.06491136","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"XTZUSD_PERP","p":"2.15154351","P":"2.14880996","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"ICXUSD_PERP","p":"0.37198560","P":"0.37081441","r":"0.00003506","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"ALGOUSD_PERP","p":"0.38863968","P":"0.38687699","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"RUNEUSD_PERP","p":"2.79690490","P":"2.79164312","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"ADAUSD_220930","p":"0.61030896","P":"0.60906742","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"LINKUSD_220930","p":"8.87521910","P":"8.85638955","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"BCHUSD_220930","p":"175.09813368","P":"173.74786009","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"DOTUSD_220930","p":"8.86463653","P":"9.09451466","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"XRPUSD_220930","p":"0.40232753","P":"0.39979488","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"LTCUSD_220930","p":"59.60285401","P":"59.02027193","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"BNBUSD_220930","p":"283.22809725","P":"287.16299941","r":"","T":0},{"e":"markPriceUpdate","E":1654858230006,"s":"APEUSD_PERP","p":"5.60476222","P":"5.58442476","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"VETUSD_PERP","p":"0.03107000","P":"0.03093243","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"ZILUSD_PERP","p":"0.04760677","P":"0.04753627","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"KNCUSD_PERP","p":"1.85500000","P":"1.85728260","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"XMRUSD_PERP","p":"181.54000000","P":"180.84541670","r":"0.00010000","T":1654876800000},{"e":"markPriceUpdate","E":1654858230006,"s":"GMTUSD_PERP","p":"0.96121405","P":"0.95903676","r":"0.00010000","T":1654876800000}]'
asserted_result = "{'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'data': [{'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'BTCUSD_PERP', 'mark_price': '29958.10000000', 'estimated_settle_price': '29910.05037677', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'BTCUSD_220624', 'mark_price': '29996.97713232', 'estimated_settle_price': '29910.05037677', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'BTCUSD_220930', 'mark_price': '30224.07093030', 'estimated_settle_price': '29910.05037677', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ETHUSD_PERP', 'mark_price': '1768.92000000', 'estimated_settle_price': '1767.39078128', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ETHUSD_220624', 'mark_price': '1771.00175509', 'estimated_settle_price': '1767.39078128', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ETHUSD_220930', 'mark_price': '1784.35972315', 'estimated_settle_price': '1767.39078128', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'LINKUSD_PERP', 'mark_price': '8.88306288', 'estimated_settle_price': '8.85638955', 'funding_rate': '-0.00002717', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'BNBUSD_PERP', 'mark_price': '288.04800000', 'estimated_settle_price': '287.16299941', 'funding_rate': '-0.00002373', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'TRXUSD_PERP', 'mark_price': '0.08098924', 'estimated_settle_price': '0.08083055', 'funding_rate': '-0.00010581', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'DOTUSD_PERP', 'mark_price': '9.11600000', 'estimated_settle_price': '9.09451466', 'funding_rate': '-0.00002950', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ADAUSD_PERP', 'mark_price': '0.61120000', 'estimated_settle_price': '0.60906742', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'EOSUSD_PERP', 'mark_price': '1.23600000', 'estimated_settle_price': '1.23311192', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'LTCUSD_PERP', 'mark_price': '59.31000000', 'estimated_settle_price': '59.02027193', 'funding_rate': '-0.00002808', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'BCHUSD_PERP', 'mark_price': '174.43449427', 'estimated_settle_price': '173.74786009', 'funding_rate': '0.00003606', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'XRPUSD_PERP', 'mark_price': '0.40092260', 'estimated_settle_price': '0.39979488', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ETCUSD_PERP', 'mark_price': '21.06187594', 'estimated_settle_price': '21.01576804', 'funding_rate': '0.00005088', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'FILUSD_PERP', 'mark_price': '7.11717908', 'estimated_settle_price': '7.09873163', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'EGLDUSD_PERP', 'mark_price': '61.02551568', 'estimated_settle_price': '60.78667481', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'DOGEUSD_PERP', 'mark_price': '0.07880076', 'estimated_settle_price': '0.07855257', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'UNIUSD_PERP', 'mark_price': '5.08800000', 'estimated_settle_price': '5.06448727', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'THETAUSD_PERP', 'mark_price': '1.39300000', 'estimated_settle_price': '1.38754285', 'funding_rate': '-0.00032688', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'XLMUSD_PERP', 'mark_price': '0.13812520', 'estimated_settle_price': '0.13848091', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'SOLUSD_PERP', 'mark_price': '39.30813028', 'estimated_settle_price': '39.17376920', 'funding_rate': '-0.00003521', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'FTMUSD_PERP', 'mark_price': '0.32980000', 'estimated_settle_price': '0.32881240', 'funding_rate': '-0.00011647', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'SANDUSD_PERP', 'mark_price': '1.26960000', 'estimated_settle_price': '1.26623314', 'funding_rate': '-0.00001506', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'MANAUSD_PERP', 'mark_price': '0.95814032', 'estimated_settle_price': '0.95567134', 'funding_rate': '-0.00004020', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'AVAXUSD_PERP', 'mark_price': '23.95374886', 'estimated_settle_price': '23.87678378', 'funding_rate': '-0.00003260', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'GALAUSD_PERP', 'mark_price': '0.07343000', 'estimated_settle_price': '0.07317157', 'funding_rate': '0.00006950', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'MATICUSD_PERP', 'mark_price': '0.63550000', 'estimated_settle_price': '0.63349544', 'funding_rate': '0.00002542', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'NEARUSD_PERP', 'mark_price': '5.00227018', 'estimated_settle_price': '4.98272052', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ATOMUSD_PERP', 'mark_price': '8.77600000', 'estimated_settle_price': '8.73509048', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'AAVEUSD_PERP', 'mark_price': '93.65501482', 'estimated_settle_price': '93.44860895', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ADAUSD_220624', 'mark_price': '0.60982616', 'estimated_settle_price': '0.60906742', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'LINKUSD_220624', 'mark_price': '8.86511077', 'estimated_settle_price': '8.85638955', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'BCHUSD_220624', 'mark_price': '174.37505035', 'estimated_settle_price': '173.74786009', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'DOTUSD_220624', 'mark_price': '9.06145875', 'estimated_settle_price': '9.09451466', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'XRPUSD_220624', 'mark_price': '0.40135753', 'estimated_settle_price': '0.39979488', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'LTCUSD_220624', 'mark_price': '59.22610401', 'estimated_settle_price': '59.02027193', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'BNBUSD_220624', 'mark_price': '287.91858550', 'estimated_settle_price': '287.16266514', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'CRVUSD_PERP', 'mark_price': '1.12000000', 'estimated_settle_price': '1.11981935', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'AXSUSD_PERP', 'mark_price': '19.07253854', 'estimated_settle_price': '19.03207637', 'funding_rate': '-0.00043852', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ROSEUSD_PERP', 'mark_price': '0.06523004', 'estimated_settle_price': '0.06491136', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'XTZUSD_PERP', 'mark_price': '2.15154351', 'estimated_settle_price': '2.14880996', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ICXUSD_PERP', 'mark_price': '0.37198560', 'estimated_settle_price': '0.37081441', 'funding_rate': '0.00003506', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ALGOUSD_PERP', 'mark_price': '0.38863968', 'estimated_settle_price': '0.38687699', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'RUNEUSD_PERP', 'mark_price': '2.79690490', 'estimated_settle_price': '2.79164312', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ADAUSD_220930', 'mark_price': '0.61030896', 'estimated_settle_price': '0.60906742', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'LINKUSD_220930', 'mark_price': '8.87521910', 'estimated_settle_price': '8.85638955', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'BCHUSD_220930', 'mark_price': '175.09813368', 'estimated_settle_price': '173.74786009', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'DOTUSD_220930', 'mark_price': '8.86463653', 'estimated_settle_price': '9.09451466', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'XRPUSD_220930', 'mark_price': '0.40232753', 'estimated_settle_price': '0.39979488', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'LTCUSD_220930', 'mark_price': '59.60285401', 'estimated_settle_price': '59.02027193', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'BNBUSD_220930', 'mark_price': '283.22809725', 'estimated_settle_price': '287.16299941', 'funding_rate': '', 'next_funding_time': 0}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'APEUSD_PERP', 'mark_price': '5.60476222', 'estimated_settle_price': '5.58442476', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'VETUSD_PERP', 'mark_price': '0.03107000', 'estimated_settle_price': '0.03093243', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'ZILUSD_PERP', 'mark_price': '0.04760677', 'estimated_settle_price': '0.04753627', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'KNCUSD_PERP', 'mark_price': '1.85500000', 'estimated_settle_price': '1.85728260', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'XMRUSD_PERP', 'mark_price': '181.54000000', 'estimated_settle_price': '180.84541670', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}, {'stream_type': '!markPrice@arr', 'event_type': 'markPriceUpdate', 'event_time': 1654858230006, 'symbol': 'GMTUSD_PERP', 'mark_price': '0.96121405', 'estimated_settle_price': '0.95903676', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}], 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_mark_price_update_single(self):
data = '{"stream":"btcusd_perp@markPrice","data":{"e":"markPriceUpdate","E":1654858059000,"s":"BTCUSD_PERP","p":"29963.57277273","P":"29908.20423394","r":"0.00010000","T":1654876800000}}'
asserted_result = "{'stream_type': 'btcusd_perp@markPrice', 'event_type': 'markPriceUpdate', 'data': [{'stream_type': 'btcusd_perp@markPrice', 'event_type': 'markPriceUpdate', 'event_time': 1654858059000, 'symbol': 'BTCUSD_PERP', 'mark_price': '29963.57277273', 'estimated_settle_price': '29908.20423394', 'funding_rate': '0.00010000', 'next_funding_time': 1654876800000}], 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_kline(self):
data = '{"stream":"btcusd_perp@kline_5m","data":{"e":"kline","E":1654859001004,"s":"BTCUSD_PERP","k":{"t":1654858800000,"T":1654859099999,"s":"BTCUSD_PERP","i":"5m","f":448211552,"L":448211775,"o":"29955.0","c":"29949.5","h":"29959.6","l":"29949.5","v":"10517","n":224,"x":false,"q":"35.10650745","V":"4032","Q":"13.45907436","B":"0"}}}'
asserted_result = "{'stream_type': 'btcusd_perp@kline_5m', 'event_type': 'kline', 'event_time': 1654859001004, 'kline': {'kline_start_time': 1654858800000, 'kline_close_time': 1654859099999, 'interval': '5m', 'first_trade_id': False, 'last_trade_id': False, 'open_price': '29955.0', 'close_price': '29949.5', 'high_price': '29959.6', 'low_price': '29949.5', 'base_volume': '10517', 'number_of_trades': 224, 'is_closed': False, 'quote': '35.10650745', 'taker_by_base_asset_volume': '4032', 'taker_by_quote_asset_volume': '13.45907436', 'symbol': 'BTCUSD_PERP'}, 'symbol': 'BTCUSD_PERP', 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_continuous_contract_kline(self):
data = '{"stream":"btcusd_perpetual@continuousKline_5m","data":{"e":"continuous_kline","E":1654859194800,"ps":"BTCUSD","ct":"PERPETUAL","k":{"t":1654859100000,"T":1654859399999,"i":"5m","f":473173043265,"L":473173503643,"o":"29949.2","c":"29947.9","h":"29949.2","l":"29947.8","v":"4217","n":64,"x":false,"q":"14.08059866","V":"276","Q":"0.92156065","B":"0"}}}'
asserted_result = "{'stream_type': 'btcusd_perpetual@continuousKline_5m', 'event_type': 'continuous_kline', 'event_time': 1654859194800, 'kline': {'kline_start_time': 1654859100000, 'kline_close_time': 1654859399999, 'interval': '5m', 'first_trade_id': False, 'last_trade_id': False, 'open_price': '29949.2', 'close_price': '29947.9', 'high_price': '29949.2', 'low_price': '29947.8', 'base_volume': '4217', 'number_of_trades': 64, 'is_closed': False, 'quote': '14.08059866', 'taker_by_base_asset_volume': '276', 'taker_by_quote_asset_volume': '0.92156065'}, 'pair': 'BTCUSD', 'contract_type': 'PERPETUAL', 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_index_kline(self):
data = '{"stream":"btcusd@indexPriceKline_5m","data":{"e": "indexPrice_kline","E":1654859807015,"ps": "BTCUSD","k":{"t":1654859700000,"T":1654859999999,"s":"0","i":"5m","f":1654859700006,"L":1654859807012,"o":"29982.50481818","c":"29974.61445455","h":"29983.17390909","l":"29971.63081818","v":"0","n":108,"x":false,"q":"0","V":"0","Q":"0","B":"0"}}}'
asserted_result = "{'stream_type': 'btcusd@indexPriceKline_5m', 'event_type': 'indexPrice_kline', 'event_time': 1654859807015, 'pair': 'BTCUSD', 'kline': {'kline_start_time': 1654859700000, 'kline_close_time': 1654859999999, 'interval': '5m', 'open_price': '29982.50481818', 'close_price': '29974.61445455', 'high_price': '29983.17390909', 'low_price': '29971.63081818', 'number_of_basic_data': 108, 'is_closed': False}, 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_mark_kline(self):
data = '{"stream":"btcusd_perp@markPriceKline_5m","data":{"e": "markPrice_kline","E":1654859889051,"ps": "BTCUSD","k":{"t":1654859700000,"T":1654859999999,"s":"BTCUSD_PERP","i":"5m","f":1654859700002,"L":1654859889000,"o":"29971.10000000","c":"29964.10525707","h":"29971.10000000","l":"29959.90000000","v":"0","n":190,"x":false,"q":"0","V":"0","Q":"0","B":"0"}}}'
asserted_result = "{'stream_type': 'btcusd_perp@markPriceKline_5m', 'event_type': 'markPrice_kline', 'event_time': 1654859889051, 'pair': 'BTCUSD', 'kline': {'kline_start_time': 1654859700000, 'kline_close_time': 1654859999999, 'interval': '5m', 'open_price': '29971.10000000', 'close_price': '29964.10525707', 'high_price': '29971.10000000', 'low_price': '29959.90000000', 'number_of_basic_data': 190, 'is_closed': False, 'symbol': 'BTCUSD_PERP'}, 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_miniTicker_arr(self):
data = '[{"e":"24hrMiniTicker","E":1654860761238,"s":"ADAUSD_220624","ps":"ADAUSD","c":"0.61334","o":"0.64463","h":"0.65206","l":"0.60329","v":"467658","q":"7450443.33739747"},{"e":"24hrMiniTicker","E":1654860761236,"s":"BTCUSD_PERP","ps":"BTCUSD","c":"29999.4","o":"30383.9","h":"30419.7","l":"29500.2","v":"26130970","q":"86942.12137913"},{"e":"24hrMiniTicker","E":1654860761230,"s":"ETHUSD_PERP","ps":"ETHUSD","c":"1772.43","o":"1810.89","h":"1817.65","l":"1740.61","v":"159030061","q":"890649.89736103"},{"e":"24hrMiniTicker","E":1654860761653,"s":"ADAUSD_PERP","ps":"ADAUSD","c":"0.61447","o":"0.64631","h":"0.65259","l":"0.60408","v":"7642134","q":"121333448.45021203"},{"e":"24hrMiniTicker","E":1654860761565,"s":"BNBUSD_220930","ps":"BNBUSD","c":"283.444","o":"285.624","h":"287.142","l":"278.663","v":"144709","q":"5099.13855397"}]'
asserted_result = "{'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'data': [{'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654860761238, 'symbol': 'ADAUSD_220624', 'close_price': '0.61334', 'open_price': '0.64463', 'high_price': '0.65206', 'low_price': '0.60329', 'total_traded_base_asset_volume': '467658', 'total_traded_quote_asset_volume': '7450443.33739747', 'pair': 'ADAUSD'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654860761236, 'symbol': 'BTCUSD_PERP', 'close_price': '29999.4', 'open_price': '30383.9', 'high_price': '30419.7', 'low_price': '29500.2', 'total_traded_base_asset_volume': '26130970', 'total_traded_quote_asset_volume': '86942.12137913', 'pair': 'BTCUSD'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654860761230, 'symbol': 'ETHUSD_PERP', 'close_price': '1772.43', 'open_price': '1810.89', 'high_price': '1817.65', 'low_price': '1740.61', 'total_traded_base_asset_volume': '159030061', 'total_traded_quote_asset_volume': '890649.89736103', 'pair': 'ETHUSD'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654860761653, 'symbol': 'ADAUSD_PERP', 'close_price': '0.61447', 'open_price': '0.64631', 'high_price': '0.65259', 'low_price': '0.60408', 'total_traded_base_asset_volume': '7642134', 'total_traded_quote_asset_volume': '121333448.45021203', 'pair': 'ADAUSD'}, {'stream_type': '!miniTicker@arr', 'event_type': '24hrMiniTicker', 'event_time': 1654860761565, 'symbol': 'BNBUSD_220930', 'close_price': '283.444', 'open_price': '285.624', 'high_price': '287.142', 'low_price': '278.663', 'total_traded_base_asset_volume': '144709', 'total_traded_quote_asset_volume': '5099.13855397', 'pair': 'BNBUSD'}], 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_miniTicker_single(self):
data = '{"stream":"btcusd_perp@miniTicker","data":{"e":"24hrMiniTicker","E":1654860720712,"s":"BTCUSD_PERP","ps":"BTCUSD","c":"29986.0","o":"30383.9","h":"30419.7","l":"29500.2","v":"26124208","q":"86919.57359637"}}'
asserted_result = "{'stream_type': 'btcusd_perp@miniTicker', 'event_type': '24hrMiniTicker', 'data': [{'stream_type': 'btcusd_perp@miniTicker', 'event_type': '24hrMiniTicker', 'event_time': 1654860720712, 'symbol': 'BTCUSD_PERP', 'close_price': '29986.0', 'open_price': '30383.9', 'high_price': '30419.7', 'low_price': '29500.2', 'total_traded_base_asset_volume': '26124208', 'total_traded_quote_asset_volume': '86919.57359637', 'pair': 'BTCUSD'}], 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_ticker_arr(self):
data = '[{"e":"24hrTicker","E":1654860968280,"s":"ADAUSD_PERP","ps":"ADAUSD","p":"-0.03180","P":"-4.920","w":"0.62978119","c":"0.61456","Q":"75","o":"0.64636","h":"0.65259","l":"0.60408","v":"7642536","q":"121352243.91177693","O":1654774560000,"C":1654860968274,"F":112137197,"L":112256137,"n":118941},{"e":"24hrTicker","E":1654860968604,"s":"SOLUSD_PERP","ps":"SOLUSD","p":"-2.173","P":"-5.219","w":"40.07866506","c":"39.463","Q":"40","o":"41.636","h":"41.649","l":"38.828","v":"11196184","q":"2793552.12638377","O":1654774560000,"C":1654860968594,"F":70174970,"L":70350674,"n":175705}]'
asserted_result = "{'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'data': [{'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654860968280, 'symbol': 'ADAUSD_PERP', 'price_change': '-0.03180', 'price_change_percent': '-4.920', 'weighted_average_price': '0.62978119', 'last_price': '0.61456', 'last_quantity': '75', 'open_price': '0.64636', 'high_price': '0.65259', 'low_price': '0.60408', 'total_traded_base_asset_volume': '7642536', 'total_traded_quote_asset_volume': '121352243.91177693', 'statistics_open_time': 1654774560000, 'statistics_close_time': 1654860968274, 'first_trade_id': 112137197, 'last_trade_id': 112256137, 'total_nr_of_trades': 118941, 'pair': 'ADAUSD'}, {'stream_type': '!ticker@arr', 'event_type': '24hrTicker', 'event_time': 1654860968604, 'symbol': 'SOLUSD_PERP', 'price_change': '-2.173', 'price_change_percent': '-5.219', 'weighted_average_price': '40.07866506', 'last_price': '39.463', 'last_quantity': '40', 'open_price': '41.636', 'high_price': '41.649', 'low_price': '38.828', 'total_traded_base_asset_volume': '11196184', 'total_traded_quote_asset_volume': '2793552.12638377', 'statistics_open_time': 1654774560000, 'statistics_close_time': 1654860968594, 'first_trade_id': 70174970, 'last_trade_id': 70350674, 'total_nr_of_trades': 175705, 'pair': 'SOLUSD'}], 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_ticker_single(self):
data = '{"stream":"btcusd_perp@ticker","data":{"e":"24hrTicker","E":1654861022999,"s":"BTCUSD_PERP","ps":"BTCUSD","p":"-353.7","P":"-1.164","w":"30054.90285469","c":"30025.1","Q":"48","o":"30378.8","h":"30419.7","l":"29500.2","v":"26128574","q":"86936.14524835","O":1654774620000,"C":1654861022993,"F":447799573,"L":448216180,"n":416590}}'
asserted_result = "{'stream_type': 'btcusd_perp@ticker', 'event_type': '24hrTicker', 'data': [{'stream_type': 'btcusd_perp@ticker', 'event_type': '24hrTicker', 'event_time': 1654861022999, 'symbol': 'BTCUSD_PERP', 'price_change': '-353.7', 'price_change_percent': '-1.164', 'weighted_average_price': '30054.90285469', 'last_price': '30025.1', 'last_quantity': '48', 'open_price': '30378.8', 'high_price': '30419.7', 'low_price': '29500.2', 'total_traded_base_asset_volume': '26128574', 'total_traded_quote_asset_volume': '86936.14524835', 'statistics_open_time': 1654774620000, 'statistics_close_time': 1654861022993, 'first_trade_id': 447799573, 'last_trade_id': 448216180, 'total_nr_of_trades': 416590, 'pair': 'BTCUSD'}], 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_bookTicker(self):
data = '{"stream":"btcusd_perp@bookTicker","data":{"u":473188030574,"e":"bookTicker","s":"BTCUSD_PERP","ps":"BTCUSD","b":"30008.5","B":"6771","a":"30008.6","A":"4265","T":1654861398836,"E":1654861398843}}'
asserted_result = "{'stream_type': 'bookTicker', 'order_book_update_id': 473188030574, 'symbol': 'BTCUSD_PERP', 'best_bid_price': '30008.5', 'best_bid_quantity': '6771', 'best_ask_price': '30008.6', 'best_ask_quantity': '4265', 'event_type': 'bookTicker', 'pair': 'BTCUSD', 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_liquidation_order(self):
data = '{"stream":"btcusd_perp@forceOrder","data":{"e":"forceOrder","E":1654852759373,"o":{"s":"BTCUSD_PERP","ps":"BTCUSD","S":"SELL","o":"LIMIT","f":"IOC","q":"100","p":"0.0719248","ap":"0.0736000","X":"FILLED","l":"100","z":"100","T":1654852759361}}}'
asserted_result = "{'stream_type': 'forceOrder', 'event_type': 'forceOrder', 'event_time': 1654852759373, 'symbol': 'BTCUSD_PERP', 'side': 'SELL', 'order_type': 'LIMIT', 'time_in_force': 'IOC', 'original_quantity': '100', 'price': '0.0719248', 'avg_price': '0.0736000', 'order_status': 'FILLED', 'last_executed_quantity': '100', 'cumulative_filled_quantity': '100', 'transaction_time': 1654852759361, 'pair': 'BTCUSD', 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_depth(self):
data = '{"stream":"btcusd_perp@depth5","data":{"e":"depthUpdate","E":1654862108308,"T":1654862108300,"s":"BTCUSD_PERP","ps":"BTCUSD","U":473192702036,"u":473192705093,"pu":473192702034,"b":[["29987.0","289"],["29986.6","1"],["29986.4","200"],["29986.0","1"],["29985.5","9"]],"a":[["29987.1","13789"],["29987.2","1"],["29987.3","1243"],["29987.4","500"],["29987.7","1"]]}}'
asserted_result = "{'stream_type': 'btcusd_perp@depth5', 'event_type': 'depthUpdate', 'event_time': 1654862108308, 'transaction_time': 1654862108300, 'symbol': 'BTCUSD_PERP', 'depth_level': 5, 'first_update_id_in_event': 473192702036, 'final_update_id_in_event': 473192705093, 'final_update_id_in_previous_event': 473192702034, 'asks': [['29987.1', '13789'], ['29987.2', '1'], ['29987.3', '1243'], ['29987.4', '500'], ['29987.7', '1']], 'bids': [['29987.0', '289'], ['29986.6', '1'], ['29986.4', '200'], ['29986.0', '1'], ['29985.5', '9']], 'pair': 'BTCUSD', 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result),
def test_diff_depth(self):
data = '{"stream":"btcusd_perp@depth","data":{"e":"depthUpdate","E":1654862193470,"T":1654862193413,"s":"BTCUSD_PERP","ps":"BTCUSD","U":473193097891,"u":473193098348,"pu":473193097844,"b":[["12500.0","2"],["29754.5","11644"],["29860.9","0"],["29963.5","2"],["29973.3","1"],["29974.1","200"],["29980.9","569"],["29981.3","12574"],["29981.4","0"],["29981.9","0"]],"a":[["29981.4","1966"],["29991.0","897"],["29991.7","410"],["29993.6","92"],["29996.6","78"],["29999.6","10"],["30002.6","13"],["30124.2","90"],["30124.3","50"],["30253.0","1"]]}}'
asserted_result = "{'stream_type': 'btcusd_perp@depth', 'event_type': 'depthUpdate', 'event_time': 1654862193470, 'transaction_time': 1654862193413, 'symbol': 'BTCUSD_PERP', 'depth_level': False, 'first_update_id_in_event': 473193097891, 'final_update_id_in_event': 473193098348, 'final_update_id_in_previous_event': 473193097844, 'asks': [['29981.4', '1966'], ['29991.0', '897'], ['29991.7', '410'], ['29993.6', '92'], ['29996.6', '78'], ['29999.6', '10'], ['30002.6', '13'], ['30124.2', '90'], ['30124.3', '50'], ['30253.0', '1']], 'bids': [['12500.0', '2'], ['29754.5', '11644'], ['29860.9', '0'], ['29963.5', '2'], ['29973.3', '1'], ['29974.1', '200'], ['29980.9', '569'], ['29981.3', '12574'], ['29981.4', '0'], ['29981.9', '0']], 'pair': 'BTCUSD', 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_margin_call(self):
data = '{"e":"MARGIN_CALL","E":1587727187525,"i": "SfsR","cw":"3.16812045","p":[{"s":"BTCUSD_200925","ps":"LONG","pa":"132","mt":"CROSSED","mp":"9187.17127000","up":"-1.166074","mm":"1.614445"}]}'
asserted_result = "{'stream_type': 'MARGIN_CALL', 'event_type': 'MARGIN_CALL', 'event_time': 1587727187525, 'positions': [{'symbol': 'BTCUSD_200925', 'side': 'LONG', 'amount': '132', 'type': 'CROSSED', 'price': '9187.17127000', 'pnl': '-1.166074', 'margin': '1.614445'}], 'account_alias': 'SfsR', 'cross_wallet': '3.16812045', 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_account_update(self):
data = '{"e": "ACCOUNT_UPDATE","E": 1564745798939,"T": 1564745798938,"i": "SfsR","a":{"m":"ORDER","B":[{"a":"BTC","wb":"122624.12345678","cw":"100.12345678","bc":"50.12345678"},{"a":"ETH","wb":"1.00000000","cw":"0.00000000","bc":"-49.12345678"}],"P":[{"s":"BTCUSD_200925","pa":"0","ep":"0.0","cr":"200","up":"0","mt":"isolated","iw":"0.00000000","ps":"BOTH"},{"s":"BTCUSD_200925","pa":"20","ep":"6563.6","cr":"0","up":"2850.21200000","mt":"isolated","iw":"13200.70726908","ps":"LONG"},{"s":"BTCUSD_200925","pa":"-10","ep":"6563.8","cr":"-45.04000000","up":"-1423.15600000","mt":"isolated","iw":"6570.42511771","ps":"SHORT"}]}}'
asserted_result = "{'stream_type': 'ACCOUNT_UPDATE', 'event_type': 'ACCOUNT_UPDATE', 'event_time': 1564745798939, 'transaction': 1564745798938, 'event_reason': 'ORDER', 'balances': [{'asset': 'BTC', 'wallet_balance': '122624.12345678', 'cross_wallet_balance': '100.12345678', 'balance_change': '50.12345678'}, {'asset': 'ETH', 'wallet_balance': '1.00000000', 'cross_wallet_balance': '0.00000000', 'balance_change': '-49.12345678'}], 'positions': [{'symbol': 'BTCUSD_200925', 'position_amount': '0', 'entry_price': '0.0', 'accumulated_realized': '200', 'upnl': '0', 'margin_type': 'isolated', 'isolated_wallet': '0.00000000', 'position_side': 'BOTH'}, {'symbol': 'BTCUSD_200925', 'position_amount': '20', 'entry_price': '6563.6', 'accumulated_realized': '0', 'upnl': '2850.21200000', 'margin_type': 'isolated', 'isolated_wallet': '13200.70726908', 'position_side': 'LONG'}, {'symbol': 'BTCUSD_200925', 'position_amount': '-10', 'entry_price': '6563.8', 'accumulated_realized': '-45.04000000', 'upnl': '-1423.15600000', 'margin_type': 'isolated', 'isolated_wallet': '6570.42511771', 'position_side': 'SHORT'}], 'account_alias': 'SfsR', 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_order_update(self):
data = '{"e":"ORDER_TRADE_UPDATE","E":1591274595442,"T":1591274595453,"i":"SfsR","o":{ "s":"BTCUSD_200925","c":"TEST","S":"SELL","o":"TRAILING_STOP_MARKET","f":"GTC","q":"2","p":"0","ap":"0","sp":"9103.1","x":"NEW","X":"NEW","i":8888888,"l":"0","z":"0","L":"0","ma": "BTC","N":"BTC","n":"0","T":1591274595442,"t":0,"rp": "0","b":"0","a":"0","m":false,"R":false,"wt":"CONTRACT_PRICE","ot":"TRAILING_STOP_MARKET","ps":"LONG","cp":false,"AP":"9476.8","cr":"5.0","pP": false}}'
asserted_result = "{'stream_type': 'ORDER_TRADE_UPDATE', 'event_type': 'ORDER_TRADE_UPDATE', 'event_time': 1591274595442, 'symbol': 'BTCUSD_200925', 'client_order_id': 'TEST', 'side': 'SELL', 'order_type': 'TRAILING_STOP_MARKET', 'time_in_force': 'GTC', 'order_quantity': '2', 'order_price': '0', 'order_avg_price': '0', 'order_stop_price': '9103.1', 'current_execution_type': 'NEW', 'current_order_status': 'NEW', 'order_id': 8888888, 'last_executed_quantity': '0', 'cumulative_filled_quantity': '0', 'last_executed_price': '0', 'transaction_time': 1591274595442, 'trade_id': 0, 'net_pay': '0', 'net_selling_order_value': '0', 'is_trade_maker_side': False, 'reduce_only': False, 'trigger_price_type': 'CONTRACT_PRICE', 'order_price_type': 'TRAILING_STOP_MARKET', 'position_side': 'LONG', 'order_realized_profit': '0', 'account_alias': 'SfsR', 'margin_asset': 'BTC', 'commission_asset': 'BTC', 'commission': '0', 'close_all': False, 'activation_price': '9476.8', 'callback_rate': '5.0', 'unicorn_fied': ['binance.com-coin_futures', '" + self.unicorn_fy_version + "']}"
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def test_template(self):
data = ''
asserted_result = ""
self.assertEqual(str(self.unicorn_fy.binance_com_coin_futures_websocket(data)), asserted_result)
def tearDown(self):
del self.unicorn_fy
class TestBinanceComMarginWebsocket(unittest.TestCase):
def setUp(self):
self.unicorn_fy = UnicornFy()
self.unicorn_fy_version = str(self.unicorn_fy.get_version())
def test_template(self):
data = ''
asserted_result = ""
self.assertEqual(str(self.unicorn_fy.binance_com_margin_websocket(data)), asserted_result)
def tearDown(self):
del self.unicorn_fy
class TestBinanceComIsolatedMarginWebsocket(unittest.TestCase):
def setUp(self):
self.unicorn_fy = UnicornFy()
self.unicorn_fy_version = str(self.unicorn_fy.get_version())
def test_template(self):
data = ''
asserted_result = ""
self.assertEqual(str(self.unicorn_fy.binance_com_isolated_margin_websocket(data)), asserted_result)
def tearDown(self):
del self.unicorn_fy
class TestBinanceUsWebsocket(unittest.TestCase):
def setUp(self):
self.unicorn_fy = UnicornFy()
self.unicorn_fy_version = str(self.unicorn_fy.get_version())
def test_template(self):
data = ''
asserted_result = ""
self.assertEqual(str(self.unicorn_fy.binance_us_websocket(data)), asserted_result)
def tearDown(self):
del self.unicorn_fy
class TestBinanceTRWebsocket(unittest.TestCase):
def setUp(self):
self.unicorn_fy = UnicornFy()
self.unicorn_fy_version = str(self.unicorn_fy.get_version())
def test_template(self):
data = ''
asserted_result = ""
self.assertEqual(str(self.unicorn_fy.trbinance_com_websocket(data)), asserted_result)
def tearDown(self):
del self.unicorn_fy
class TestBinanceOrgWebsocket(unittest.TestCase):
def setUp(self):
self.unicorn_fy = UnicornFy()
self.unicorn_fy_version = str(self.unicorn_fy.get_version())
def test_template(self):
data = ''
asserted_result = ""
self.assertEqual(str(self.unicorn_fy.binance_org_websocket(data)), asserted_result)
def tearDown(self):
del self.unicorn_fy
UBWA = unicorn_binance_websocket_api.BinanceWebSocketApiManager(exchange="binance.us")
class TestLiveBinanceCom(unittest.TestCase):
def setUp(self):
print("\n\rStarting live test binance.com (us)")
self.unicorn_fy = UnicornFy()
ubwa = UBWA
worker_thread = threading.Thread(target=print_stream_data_from_stream_buffer,
args=(ubwa,))
worker_thread.start()
channels = {'aggTrade', 'trade', 'kline_1m', 'kline_5m', 'kline_15m', 'kline_30m', 'kline_1h', 'kline_2h',
'kline_4h',
'kline_6h', 'kline_8h', 'kline_12h', 'kline_1d', 'kline_3d', 'kline_1w', 'kline_1M', 'miniTicker',
'ticker', 'bookTicker', 'depth5', 'depth10', 'depth20', 'depth', 'depth@100ms'}
arr_channels = {'!miniTicker', '!ticker', '!bookTicker'}
markets = {'bnbbtc', 'ethbtc', 'btcusdt', 'bchabcusdt', 'xrpusdt', 'rvnbtc', 'ltcusdt', 'adausdt', 'eosusdt',
'wanbnb', 'zrxbnb', 'agibnb', 'funeth', 'arketh', 'engeth'}
for channel in channels:
ubwa.create_stream(channel, markets, stream_label=channel)
ubwa.create_stream(arr_channels, "arr")
stream_id_trade = ubwa.get_stream_id_by_label("trade")
ubwa.get_stream_subscriptions(stream_id_trade)
time.sleep(10)
ubwa.stop_manager_with_all_streams()
def test_template(self):
data = ''
asserted_result = ""
self.assertEqual(str(self.unicorn_fy.binance_org_websocket(data)), asserted_result)
def tearDown(self):
del self.unicorn_fy
UBWA2 = unicorn_binance_websocket_api.BinanceWebSocketApiManager(exchange="binance.us")
class TestLiveBinanceComFutures(unittest.TestCase):
def setUp(self):
print("\n\rStarting live test binance.com-futures (us)")
self.unicorn_fy = UnicornFy()
ubwa = UBWA2
worker_thread = threading.Thread(target=print_stream_data_from_stream_buffer_futures,
args=(ubwa,))
worker_thread.start()
channels = {'aggTrade', 'trade', 'kline_1m', 'kline_5m', 'kline_15m', 'kline_30m', 'kline_1h', 'kline_2h',
'kline_4h',
'kline_6h', 'kline_8h', 'kline_12h', 'kline_1d', 'kline_3d', 'kline_1w', 'kline_1M', 'miniTicker',
'ticker', 'bookTicker', 'depth5', 'depth10', 'depth20', 'depth', 'depth@100ms'}
arr_channels = {'!miniTicker', '!ticker', '!bookTicker'}
markets = {'bnbbtc', 'ethbtc', 'btcusdt', 'bchabcusdt', 'xrpusdt', 'rvnbtc', 'ltcusdt', 'adausdt', 'eosusdt',
'wanbnb', 'zrxbnb', 'agibnb', 'funeth', 'arketh', 'engeth'}
for channel in channels:
ubwa.create_stream(channel, markets, stream_label=channel)
ubwa.create_stream(arr_channels, "arr")
stream_id_trade = ubwa.get_stream_id_by_label("trade")
ubwa.get_stream_subscriptions(stream_id_trade)
time.sleep(10)
ubwa.stop_manager_with_all_streams()
def test_template(self):
data = ''
asserted_result = ""
self.assertEqual(str(self.unicorn_fy.binance_org_websocket(data)), asserted_result)
def test_with_context(self):
with UnicornFy() as ufy:
self.assertIsInstance(ufy.get_version(), str)
def tearDown(self):
del self.unicorn_fy
if __name__ == '__main__':
unittest.main()