Removed old datetime keys and added timestamp

This commit is contained in:
மனோஜ்குமார் பழனிச்சாமி 2022-03-23 20:47:55 +05:30
parent e7418cdcdb
commit 094676def4

View File

@ -1019,7 +1019,6 @@ def limit_buy_order_open():
'type': 'limit',
'side': 'buy',
'symbol': 'mocked',
'datetime': arrow.utcnow().isoformat(),
'timestamp': arrow.utcnow().int_timestamp,
'price': 0.00001099,
'amount': 90.99181073,
@ -1046,7 +1045,7 @@ def market_buy_order():
'type': 'market',
'side': 'buy',
'symbol': 'mocked',
'datetime': arrow.utcnow().isoformat(),
'timestamp': arrow.utcnow().int_timestamp,
'price': 0.00004099,
'amount': 91.99181073,
'filled': 91.99181073,
@ -1062,7 +1061,7 @@ def market_sell_order():
'type': 'market',
'side': 'sell',
'symbol': 'mocked',
'datetime': arrow.utcnow().isoformat(),
'timestamp': arrow.utcnow().int_timestamp,
'price': 0.00004173,
'amount': 91.99181073,
'filled': 91.99181073,
@ -1078,7 +1077,7 @@ def limit_buy_order_old():
'type': 'limit',
'side': 'buy',
'symbol': 'mocked',
'datetime': str(arrow.utcnow().shift(minutes=-601).datetime),
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'price': 0.00001099,
'amount': 90.99181073,
'filled': 0.0,
@ -1094,7 +1093,7 @@ def limit_sell_order_old():
'type': 'limit',
'side': 'sell',
'symbol': 'ETH/BTC',
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'price': 0.00001099,
'amount': 90.99181073,
'filled': 0.0,
@ -1110,7 +1109,7 @@ def limit_buy_order_old_partial():
'type': 'limit',
'side': 'buy',
'symbol': 'ETH/BTC',
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'price': 0.00001099,
'amount': 90.99181073,
'filled': 23.0,
@ -1140,7 +1139,7 @@ def limit_buy_order_canceled_empty(request):
'id': '1234512345',
'clientOrderId': None,
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'lastTradeTimestamp': None,
'symbol': 'LTC/USDT',
'type': 'limit',
@ -1161,7 +1160,7 @@ def limit_buy_order_canceled_empty(request):
'id': 'AZNPFF-4AC4N-7MKTAT',
'clientOrderId': None,
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'lastTradeTimestamp': None,
'status': 'canceled',
'symbol': 'LTC/USDT',
@ -1182,7 +1181,7 @@ def limit_buy_order_canceled_empty(request):
'id': '1234512345',
'clientOrderId': 'alb1234123',
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'lastTradeTimestamp': None,
'symbol': 'LTC/USDT',
'type': 'limit',
@ -1203,7 +1202,7 @@ def limit_buy_order_canceled_empty(request):
'id': '1234512345',
'clientOrderId': 'alb1234123',
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'lastTradeTimestamp': None,
'symbol': 'LTC/USDT',
'type': 'limit',
@ -1227,7 +1226,7 @@ def limit_sell_order_open():
'type': 'limit',
'side': 'sell',
'symbol': 'mocked',
'datetime': arrow.utcnow().isoformat(),
'timestamp': arrow.utcnow().int_timestamp,
'timestamp': arrow.utcnow().int_timestamp,
'price': 0.00001173,
'amount': 90.99181073,
@ -1274,7 +1273,6 @@ def order_book_l2():
[0.04402, 37.64]
],
'timestamp': None,
'datetime': None,
'nonce': 288004540
})
@ -1308,7 +1306,6 @@ def order_book_l2_usd():
[25.578, 78.614]
],
'timestamp': None,
'datetime': None,
'nonce': 2372149736
})
@ -1355,7 +1352,6 @@ def tickers():
'ETH/BTC': {
'symbol': 'ETH/BTC',
'timestamp': 1522014806207,
'datetime': '2018-03-25T21:53:26.207Z',
'high': 0.061697,
'low': 0.060531,
'bid': 0.061588,
@ -1377,7 +1373,6 @@ def tickers():
'TKN/BTC': {
'symbol': 'TKN/BTC',
'timestamp': 1522014806169,
'datetime': '2018-03-25T21:53:26.169Z',
'high': 0.01885,
'low': 0.018497,
'bid': 0.018799,
@ -1394,7 +1389,6 @@ def tickers():
'BLK/BTC': {
'symbol': 'BLK/BTC',
'timestamp': 1522014806072,
'datetime': '2018-03-25T21:53:26.720Z',
'high': 0.007745,
'low': 0.007512,
'bid': 0.007729,
@ -1416,7 +1410,6 @@ def tickers():
'LTC/BTC': {
'symbol': 'LTC/BTC',
'timestamp': 1523787258992,
'datetime': '2018-04-15T10:14:19.992Z',
'high': 0.015978,
'low': 0.0157,
'bid': 0.015954,
@ -1438,7 +1431,6 @@ def tickers():
'BTT/BTC': {
'symbol': 'BTT/BTC',
'timestamp': 1550936557206,
'datetime': '2019-02-23T15:42:37.206Z',
'high': 0.00000026,
'low': 0.00000024,
'bid': 0.00000024,
@ -1460,7 +1452,6 @@ def tickers():
'HOT/BTC': {
'symbol': 'HOT/BTC',
'timestamp': 1572273518661,
'datetime': '2019-10-28T14:38:38.661Z',
'high': 0.00000011,
'low': 0.00000009,
'bid': 0.0000001,
@ -1482,7 +1473,6 @@ def tickers():
'FUEL/BTC': {
'symbol': 'FUEL/BTC',
'timestamp': 1572340250771,
'datetime': '2019-10-29T09:10:50.771Z',
'high': 0.00000040,
'low': 0.00000035,
'bid': 0.00000036,
@ -1504,7 +1494,6 @@ def tickers():
'BTC/USDT': {
'symbol': 'BTC/USDT',
'timestamp': 1573758371399,
'datetime': '2019-11-14T19:06:11.399Z',
'high': 8800.0,
'low': 8582.6,
'bid': 8648.16,
@ -1526,7 +1515,6 @@ def tickers():
'ETH/USDT': {
'symbol': 'ETH/USDT',
'timestamp': 1522014804118,
'datetime': '2018-03-25T21:53:24.118Z',
'high': 530.88,
'low': 512.0,
'bid': 529.73,
@ -1548,7 +1536,6 @@ def tickers():
'TKN/USDT': {
'symbol': 'TKN/USDT',
'timestamp': 1522014806198,
'datetime': '2018-03-25T21:53:26.198Z',
'high': 8718.0,
'low': 8365.77,
'bid': 8603.64,
@ -1570,7 +1557,6 @@ def tickers():
'BLK/USDT': {
'symbol': 'BLK/USDT',
'timestamp': 1522014806145,
'datetime': '2018-03-25T21:53:26.145Z',
'high': 66.95,
'low': 63.38,
'bid': 66.473,
@ -1592,7 +1578,6 @@ def tickers():
'LTC/USDT': {
'symbol': 'LTC/USDT',
'timestamp': 1523787257812,
'datetime': '2018-04-15T10:14:18.812Z',
'high': 129.94,
'low': 124.0,
'bid': 129.28,
@ -1614,7 +1599,6 @@ def tickers():
'XRP/BTC': {
'symbol': 'XRP/BTC',
'timestamp': 1573758257534,
'datetime': '2019-11-14T19:04:17.534Z',
'high': 3.126e-05,
'low': 3.061e-05,
'bid': 3.093e-05,
@ -1726,7 +1710,6 @@ def trades_for_order():
'isBestMatch': True
},
'timestamp': 1521663363189,
'datetime': '2018-03-21T20:16:03.189Z',
'symbol': 'LTC/USDT',
'id': '34567',
'order': '123456',
@ -1762,7 +1745,6 @@ def fetch_trades_result():
'm': False,
'M': True},
'timestamp': 1565798399463,
'datetime': '2019-08-14T15:59:59.463Z',
'symbol': 'ETH/BTC',
'id': '126181329',
'order': None,
@ -1782,7 +1764,6 @@ def fetch_trades_result():
'm': False,
'M': True},
'timestamp': 1565798399629,
'datetime': '2019-08-14T15:59:59.629Z',
'symbol': 'ETH/BTC',
'id': '126181330',
'order': None,
@ -1802,7 +1783,6 @@ def fetch_trades_result():
'm': True,
'M': True},
'timestamp': 1565798399752,
'datetime': '2019-08-14T15:59:59.752Z',
'symbol': 'ETH/BTC',
'id': '126181331',
'order': None,
@ -1822,7 +1802,6 @@ def fetch_trades_result():
'm': True,
'M': True},
'timestamp': 1565798399862,
'datetime': '2019-08-14T15:59:59.862Z',
'symbol': 'ETH/BTC',
'id': '126181332',
'order': None,
@ -1842,7 +1821,6 @@ def fetch_trades_result():
'm': True,
'M': True},
'timestamp': 1565798399872,
'datetime': '2019-08-14T15:59:59.872Z',
'symbol': 'ETH/BTC',
'id': '126181333',
'order': None,
@ -1859,7 +1837,6 @@ def fetch_trades_result():
def trades_for_order2():
return [{'info': {},
'timestamp': 1521663363189,
'datetime': '2018-03-21T20:16:03.189Z',
'symbol': 'LTC/ETH',
'id': '34567',
'order': '123456',
@ -1871,7 +1848,6 @@ def trades_for_order2():
'fee': {'cost': 0.004, 'currency': 'LTC'}},
{'info': {},
'timestamp': 1521663363189,
'datetime': '2018-03-21T20:16:03.189Z',
'symbol': 'LTC/ETH',
'id': '34567',
'order': '123456',
@ -1890,7 +1866,7 @@ def buy_order_fee():
'type': 'limit',
'side': 'buy',
'symbol': 'mocked',
'datetime': str(arrow.utcnow().shift(minutes=-601).datetime),
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
'price': 0.245441,
'amount': 8.0,
'cost': 1.963528,
@ -2187,7 +2163,7 @@ def limit_buy_order_usdt_open():
'type': 'limit',
'side': 'buy',
'symbol': 'mocked',
'datetime': arrow.utcnow().isoformat(),
'timestamp': arrow.utcnow().int_timestamp,
'timestamp': arrow.utcnow().int_timestamp,
'price': 2.00,
'amount': 30.0,
@ -2214,7 +2190,7 @@ def limit_sell_order_usdt_open():
'type': 'limit',
'side': 'sell',
'symbol': 'mocked',
'datetime': arrow.utcnow().isoformat(),
'timestamp': arrow.utcnow().int_timestamp,
'timestamp': arrow.utcnow().int_timestamp,
'price': 2.20,
'amount': 30.0,
@ -2240,7 +2216,7 @@ def market_buy_order_usdt():
'type': 'market',
'side': 'buy',
'symbol': 'mocked',
'datetime': arrow.utcnow().isoformat(),
'timestamp': arrow.utcnow().int_timestamp,
'price': 2.00,
'amount': 30.0,
'filled': 30.0,
@ -2261,7 +2237,6 @@ def market_buy_order_usdt_doublefee(market_buy_order_usdt):
]
order['trades'] = [{
'timestamp': None,
'datetime': None,
'symbol': 'ETH/USDT',
'id': None,
'order': '123',
@ -2274,7 +2249,6 @@ def market_buy_order_usdt_doublefee(market_buy_order_usdt):
'fee': {'cost': 0.00025125, 'currency': 'BNB'}
}, {
'timestamp': None,
'datetime': None,
'symbol': 'ETH/USDT',
'id': None,
'order': '123',
@ -2296,7 +2270,7 @@ def market_sell_order_usdt():
'type': 'market',
'side': 'sell',
'symbol': 'mocked',
'datetime': arrow.utcnow().isoformat(),
'timestamp': arrow.utcnow().int_timestamp,
'price': 2.20,
'amount': 30.0,
'filled': 30.0,