ccxt 4.4.49__py2.py3-none-any.whl → 4.4.51__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccxt/__init__.py +1 -1
- ccxt/abstract/binance.py +1 -0
- ccxt/abstract/binancecoinm.py +1 -0
- ccxt/abstract/binanceus.py +1 -0
- ccxt/abstract/binanceusdm.py +1 -0
- ccxt/alpaca.py +63 -2
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/alpaca.py +63 -2
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +39 -20
- ccxt/async_support/blofin.py +5 -1
- ccxt/async_support/coinex.py +4 -4
- ccxt/async_support/coinmetro.py +16 -3
- ccxt/async_support/deribit.py +11 -3
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/hollaex.py +14 -17
- ccxt/async_support/htx.py +5 -3
- ccxt/async_support/kucoin.py +49 -69
- ccxt/async_support/mexc.py +24 -8
- ccxt/async_support/okcoin.py +13 -5
- ccxt/async_support/onetrading.py +1 -1
- ccxt/async_support/paradex.py +1 -1
- ccxt/async_support/paymium.py +42 -0
- ccxt/async_support/probit.py +77 -8
- ccxt/async_support/timex.py +67 -0
- ccxt/async_support/tokocrypto.py +81 -4
- ccxt/async_support/tradeogre.py +58 -1
- ccxt/async_support/vertex.py +65 -2
- ccxt/async_support/wavesexchange.py +73 -0
- ccxt/async_support/wazirx.py +59 -3
- ccxt/async_support/whitebit.py +79 -4
- ccxt/async_support/xt.py +112 -0
- ccxt/async_support/yobit.py +56 -0
- ccxt/async_support/zaif.py +55 -0
- ccxt/async_support/zonda.py +58 -0
- ccxt/base/exchange.py +72 -4
- ccxt/binance.py +39 -20
- ccxt/blofin.py +5 -1
- ccxt/coinex.py +4 -4
- ccxt/coinmetro.py +16 -3
- ccxt/deribit.py +11 -3
- ccxt/gate.py +1 -1
- ccxt/hollaex.py +14 -17
- ccxt/htx.py +5 -3
- ccxt/kucoin.py +49 -69
- ccxt/mexc.py +24 -8
- ccxt/okcoin.py +13 -5
- ccxt/onetrading.py +1 -1
- ccxt/paradex.py +1 -1
- ccxt/paymium.py +42 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +2 -0
- ccxt/pro/blofin.py +8 -0
- ccxt/pro/coinex.py +4 -1
- ccxt/probit.py +77 -8
- ccxt/timex.py +67 -0
- ccxt/tokocrypto.py +81 -4
- ccxt/tradeogre.py +58 -1
- ccxt/vertex.py +65 -2
- ccxt/wavesexchange.py +73 -0
- ccxt/wazirx.py +59 -3
- ccxt/whitebit.py +79 -4
- ccxt/xt.py +112 -0
- ccxt/yobit.py +56 -0
- ccxt/zaif.py +55 -0
- ccxt/zonda.py +58 -0
- {ccxt-4.4.49.dist-info → ccxt-4.4.51.dist-info}/METADATA +18 -18
- {ccxt-4.4.49.dist-info → ccxt-4.4.51.dist-info}/RECORD +71 -71
- {ccxt-4.4.49.dist-info → ccxt-4.4.51.dist-info}/WHEEL +1 -1
- {ccxt-4.4.49.dist-info → ccxt-4.4.51.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.49.dist-info → ccxt-4.4.51.dist-info}/top_level.txt +0 -0
ccxt/async_support/tokocrypto.py
CHANGED
@@ -619,6 +619,79 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
619
619
|
'MAX_POSITION': InvalidOrder, # {"code":-2010,"msg":"Filter failure: MAX_POSITION"}
|
620
620
|
},
|
621
621
|
},
|
622
|
+
'features': {
|
623
|
+
'spot': {
|
624
|
+
'sandbox': False,
|
625
|
+
'createOrder': {
|
626
|
+
'marginMode': False,
|
627
|
+
'triggerPrice': True,
|
628
|
+
'triggerDirection': False,
|
629
|
+
'triggerPriceType': None,
|
630
|
+
'stopLossPrice': False, # todo
|
631
|
+
'takeProfitPrice': False, # todo
|
632
|
+
'attachedStopLossTakeProfit': None,
|
633
|
+
'timeInForce': {
|
634
|
+
'IOC': True,
|
635
|
+
'FOK': True,
|
636
|
+
'PO': True,
|
637
|
+
'GTD': False,
|
638
|
+
},
|
639
|
+
'hedged': False,
|
640
|
+
'trailing': False,
|
641
|
+
'leverage': False,
|
642
|
+
'marketBuyByCost': True,
|
643
|
+
'marketBuyRequiresPrice': True,
|
644
|
+
'selfTradePrevention': True, # todo
|
645
|
+
'iceberg': True, # todo
|
646
|
+
},
|
647
|
+
'createOrders': None,
|
648
|
+
'fetchMyTrades': {
|
649
|
+
'marginMode': False,
|
650
|
+
'limit': 1000,
|
651
|
+
'daysBack': 100000, # todo
|
652
|
+
'untilDays': 100000, # todo
|
653
|
+
},
|
654
|
+
'fetchOrder': {
|
655
|
+
'marginMode': False,
|
656
|
+
'trigger': False,
|
657
|
+
'trailing': False,
|
658
|
+
},
|
659
|
+
'fetchOpenOrders': {
|
660
|
+
'marginMode': False,
|
661
|
+
'limit': 1000,
|
662
|
+
'trigger': False,
|
663
|
+
'trailing': False,
|
664
|
+
},
|
665
|
+
'fetchOrders': {
|
666
|
+
'marginMode': False,
|
667
|
+
'limit': 1000,
|
668
|
+
'daysBack': 100000,
|
669
|
+
'untilDays': 100000,
|
670
|
+
'trigger': False,
|
671
|
+
'trailing': False,
|
672
|
+
},
|
673
|
+
'fetchClosedOrders': {
|
674
|
+
'marginMode': False,
|
675
|
+
'limit': 1000,
|
676
|
+
'daysBack': 100000, # todo
|
677
|
+
'daysBackCanceled': 1, # todo
|
678
|
+
'untilDays': 100000, # todo
|
679
|
+
'trigger': False,
|
680
|
+
'trailing': False,
|
681
|
+
},
|
682
|
+
'fetchOHLCV': {
|
683
|
+
'limit': 1000,
|
684
|
+
},
|
685
|
+
},
|
686
|
+
'swap': {
|
687
|
+
'linear': None,
|
688
|
+
'inverse': None,
|
689
|
+
},
|
690
|
+
'future': {
|
691
|
+
'linear': None,
|
692
|
+
'inverse': None,
|
693
|
+
},
|
694
|
+
},
|
622
695
|
})
|
623
696
|
|
624
697
|
def nonce(self):
|
@@ -635,9 +708,14 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
635
708
|
"""
|
636
709
|
response = await self.publicGetOpenV1CommonTime(params)
|
637
710
|
#
|
711
|
+
# {
|
712
|
+
# "code": 0,
|
713
|
+
# "msg": "Success",
|
714
|
+
# "data": null,
|
715
|
+
# "timestamp": 1737378074159
|
716
|
+
# }
|
638
717
|
#
|
639
|
-
|
640
|
-
return self.safe_integer(response, 'serverTime')
|
718
|
+
return self.safe_integer(response, 'timestamp')
|
641
719
|
|
642
720
|
async def fetch_markets(self, params={}) -> List[Market]:
|
643
721
|
"""
|
@@ -1575,7 +1653,6 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1575
1653
|
create a trade order
|
1576
1654
|
|
1577
1655
|
https://www.tokocrypto.com/apidocs/#new-order--signed
|
1578
|
-
https://www.tokocrypto.com/apidocs/#account-trade-list-signed
|
1579
1656
|
|
1580
1657
|
:param str symbol: unified symbol of the market to create an order in
|
1581
1658
|
:param str type: 'market' or 'limit'
|
@@ -1733,7 +1810,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1733
1810
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1734
1811
|
"""
|
1735
1812
|
|
1736
|
-
https://www.tokocrypto.com/apidocs/#
|
1813
|
+
https://www.tokocrypto.com/apidocs/#query-order-signed
|
1737
1814
|
|
1738
1815
|
fetches information on an order made by the user
|
1739
1816
|
:param str id: order id
|
ccxt/async_support/tradeogre.py
CHANGED
@@ -164,6 +164,57 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
164
164
|
},
|
165
165
|
'options': {
|
166
166
|
},
|
167
|
+
'features': {
|
168
|
+
'spot': {
|
169
|
+
'sandbox': False,
|
170
|
+
'createOrder': {
|
171
|
+
'marginMode': False,
|
172
|
+
'triggerPrice': False,
|
173
|
+
'triggerDirection': False,
|
174
|
+
'triggerPriceType': None,
|
175
|
+
'stopLossPrice': False,
|
176
|
+
'takeProfitPrice': False,
|
177
|
+
'attachedStopLossTakeProfit': None,
|
178
|
+
'timeInForce': {
|
179
|
+
'IOC': False,
|
180
|
+
'FOK': False,
|
181
|
+
'PO': False,
|
182
|
+
'GTD': False,
|
183
|
+
},
|
184
|
+
'hedged': False,
|
185
|
+
'trailing': False,
|
186
|
+
'leverage': False,
|
187
|
+
'marketBuyByCost': False,
|
188
|
+
'marketBuyRequiresPrice': False,
|
189
|
+
'selfTradePrevention': False,
|
190
|
+
'iceberg': False,
|
191
|
+
},
|
192
|
+
'createOrders': None,
|
193
|
+
'fetchMyTrades': None,
|
194
|
+
'fetchOrder': {
|
195
|
+
'marginMode': False,
|
196
|
+
'trigger': False,
|
197
|
+
'trailing': False,
|
198
|
+
},
|
199
|
+
'fetchOpenOrders': {
|
200
|
+
'marginMode': False,
|
201
|
+
'limit': None,
|
202
|
+
'trigger': False,
|
203
|
+
'trailing': False,
|
204
|
+
},
|
205
|
+
'fetchOrders': None,
|
206
|
+
'fetchClosedOrders': None,
|
207
|
+
'fetchOHLCV': None, # todo
|
208
|
+
},
|
209
|
+
'swap': {
|
210
|
+
'linear': None,
|
211
|
+
'inverse': None,
|
212
|
+
},
|
213
|
+
'future': {
|
214
|
+
'linear': None,
|
215
|
+
'inverse': None,
|
216
|
+
},
|
217
|
+
},
|
167
218
|
})
|
168
219
|
|
169
220
|
async def fetch_markets(self, params={}) -> List[Market]:
|
@@ -442,6 +493,9 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
442
493
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
443
494
|
"""
|
444
495
|
create a trade order
|
496
|
+
|
497
|
+
https://tradeogre.com/help/api#:~:text=u%20%27%7Bpublic%7D%3A%7Bprivate%7D%27-,Submit%20Buy%20Order
|
498
|
+
|
445
499
|
:param str symbol: unified symbol of the market to create an order in
|
446
500
|
:param str type: must be 'limit'
|
447
501
|
:param str side: 'buy' or 'sell'
|
@@ -499,6 +553,9 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
499
553
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
500
554
|
"""
|
501
555
|
fetch all unfilled currently open orders
|
556
|
+
|
557
|
+
https://tradeogre.com/help/api#:~:text=%7B%22success%22%3Atrue%7D-,Get%20Orders,-Method%20(POST)
|
558
|
+
|
502
559
|
:param str symbol: unified market symbol of the market orders were made in
|
503
560
|
:param int [since]: the earliest time in ms to fetch orders for
|
504
561
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -519,7 +576,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
519
576
|
"""
|
520
577
|
fetches information on an order made by the user
|
521
578
|
|
522
|
-
https://
|
579
|
+
https://tradeogre.com/help/api#:~:text=market%22%3A%22XMR%2DBTC%22%7D%5D-,Get%20Order,-Method%20(GET)
|
523
580
|
|
524
581
|
:param str id: order id
|
525
582
|
:param str symbol: unified symbol of the market the order was made in
|
ccxt/async_support/vertex.py
CHANGED
@@ -330,6 +330,69 @@ class vertex(Exchange, ImplicitAPI):
|
|
330
330
|
'timeDifference': 0, # the difference between system clock and exchange server clock
|
331
331
|
'brokerId': 5930043274845996,
|
332
332
|
},
|
333
|
+
'features': {
|
334
|
+
'default': {
|
335
|
+
'sandbox': True,
|
336
|
+
'createOrder': {
|
337
|
+
'marginMode': False,
|
338
|
+
'triggerPrice': True, # todo
|
339
|
+
'triggerDirection': False,
|
340
|
+
'triggerPriceType': None,
|
341
|
+
'stopLossPrice': True, # todo
|
342
|
+
'takeProfitPrice': True, # todo
|
343
|
+
'attachedStopLossTakeProfit': None,
|
344
|
+
'timeInForce': {
|
345
|
+
'IOC': False,
|
346
|
+
'FOK': False,
|
347
|
+
'PO': True,
|
348
|
+
'GTD': True,
|
349
|
+
},
|
350
|
+
'hedged': False,
|
351
|
+
'trailing': False,
|
352
|
+
'leverage': False,
|
353
|
+
'marketBuyByCost': True, # todo
|
354
|
+
'marketBuyRequiresPrice': True, # todo fix implementation
|
355
|
+
'selfTradePrevention': False,
|
356
|
+
'iceberg': False,
|
357
|
+
},
|
358
|
+
'createOrders': None,
|
359
|
+
'fetchMyTrades': {
|
360
|
+
'marginMode': False,
|
361
|
+
'limit': 500,
|
362
|
+
'daysBack': 100000, # todo
|
363
|
+
'untilDays': None,
|
364
|
+
},
|
365
|
+
'fetchOrder': {
|
366
|
+
'marginMode': False,
|
367
|
+
'trigger': False,
|
368
|
+
'trailing': False,
|
369
|
+
},
|
370
|
+
'fetchOpenOrders': {
|
371
|
+
'marginMode': False,
|
372
|
+
'limit': 500,
|
373
|
+
'trigger': True,
|
374
|
+
'trailing': False,
|
375
|
+
},
|
376
|
+
'fetchOrders': None, # todo, only for trigger
|
377
|
+
'fetchClosedOrders': None, # todo through fetchOrders
|
378
|
+
'fetchOHLCV': {
|
379
|
+
'limit': 1000,
|
380
|
+
},
|
381
|
+
},
|
382
|
+
'spot': {
|
383
|
+
'extends': 'default',
|
384
|
+
},
|
385
|
+
'swap': {
|
386
|
+
'linear': {
|
387
|
+
'extends': 'default',
|
388
|
+
},
|
389
|
+
'inverse': None,
|
390
|
+
},
|
391
|
+
'future': {
|
392
|
+
'linear': None,
|
393
|
+
'inverse': None,
|
394
|
+
},
|
395
|
+
},
|
333
396
|
})
|
334
397
|
|
335
398
|
def set_sandbox_mode(self, enabled):
|
@@ -2104,7 +2167,7 @@ class vertex(Exchange, ImplicitAPI):
|
|
2104
2167
|
# "product_id": 1,
|
2105
2168
|
# "orders": [
|
2106
2169
|
# {
|
2107
|
-
# "product_id":
|
2170
|
+
# "product_id": 2,
|
2108
2171
|
# "sender": "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000",
|
2109
2172
|
# "price_x18": "1000000000000000000",
|
2110
2173
|
# "amount": "1000000000000000000",
|
@@ -2113,7 +2176,7 @@ class vertex(Exchange, ImplicitAPI):
|
|
2113
2176
|
# "order_type": "default",
|
2114
2177
|
# "unfilled_amount": "1000000000000000000",
|
2115
2178
|
# "digest": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
2116
|
-
# "placed_at":
|
2179
|
+
# "placed_at": 1682437737,
|
2117
2180
|
# "order_type": "ioc"
|
2118
2181
|
# }
|
2119
2182
|
# ]
|
@@ -358,6 +358,79 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
358
358
|
'BEP20': 'BSC',
|
359
359
|
},
|
360
360
|
},
|
361
|
+
'features': {
|
362
|
+
'spot': {
|
363
|
+
'sandbox': True,
|
364
|
+
'createOrder': {
|
365
|
+
'marginMode': False,
|
366
|
+
'triggerPrice': True, # todo
|
367
|
+
'triggerDirection': False,
|
368
|
+
'triggerPriceType': None,
|
369
|
+
'stopLossPrice': False, # todo
|
370
|
+
'takeProfitPrice': False, # todo
|
371
|
+
'attachedStopLossTakeProfit': None,
|
372
|
+
'timeInForce': {
|
373
|
+
'IOC': False,
|
374
|
+
'FOK': False,
|
375
|
+
'PO': False,
|
376
|
+
'GTD': True, # todo
|
377
|
+
},
|
378
|
+
'hedged': False,
|
379
|
+
'trailing': False,
|
380
|
+
'leverage': False,
|
381
|
+
'marketBuyByCost': False, # todo
|
382
|
+
'marketBuyRequiresPrice': True,
|
383
|
+
'selfTradePrevention': False,
|
384
|
+
'iceberg': False,
|
385
|
+
},
|
386
|
+
'createOrders': None,
|
387
|
+
'fetchMyTrades': {
|
388
|
+
'marginMode': False,
|
389
|
+
'limit': 100, # todo
|
390
|
+
'daysBack': 100000, # todo
|
391
|
+
'untilDays': 100000, # todo
|
392
|
+
},
|
393
|
+
'fetchOrder': {
|
394
|
+
'marginMode': False,
|
395
|
+
'trigger': False,
|
396
|
+
'trailing': False,
|
397
|
+
},
|
398
|
+
'fetchOpenOrders': {
|
399
|
+
'marginMode': False,
|
400
|
+
'limit': 100, # todo
|
401
|
+
'trigger': False,
|
402
|
+
'trailing': False,
|
403
|
+
},
|
404
|
+
'fetchOrders': {
|
405
|
+
'marginMode': False,
|
406
|
+
'limit': 100, # todo
|
407
|
+
'daysBack': None,
|
408
|
+
'untilDays': None,
|
409
|
+
'trigger': False,
|
410
|
+
'trailing': False,
|
411
|
+
}, # todo
|
412
|
+
'fetchClosedOrders': {
|
413
|
+
'marginMode': False,
|
414
|
+
'limit': 100,
|
415
|
+
'daysBack': 100000, # todo
|
416
|
+
'daysBackCanceled': 1, # todo
|
417
|
+
'untilDays': 100000, # todo
|
418
|
+
'trigger': False,
|
419
|
+
'trailing': False,
|
420
|
+
},
|
421
|
+
'fetchOHLCV': {
|
422
|
+
'limit': None, # todo
|
423
|
+
},
|
424
|
+
},
|
425
|
+
'swap': {
|
426
|
+
'linear': None,
|
427
|
+
'inverse': None,
|
428
|
+
},
|
429
|
+
'future': {
|
430
|
+
'linear': None,
|
431
|
+
'inverse': None,
|
432
|
+
},
|
433
|
+
},
|
361
434
|
'commonCurrencies': {
|
362
435
|
'EGG': 'Waves Ducks',
|
363
436
|
},
|
ccxt/async_support/wazirx.py
CHANGED
@@ -217,6 +217,62 @@ class wazirx(Exchange, ImplicitAPI):
|
|
217
217
|
# You can get network from fetchCurrencies
|
218
218
|
},
|
219
219
|
},
|
220
|
+
'features': {
|
221
|
+
'spot': {
|
222
|
+
'sandbox': False,
|
223
|
+
'createOrder': {
|
224
|
+
'marginMode': False,
|
225
|
+
'triggerPrice': True,
|
226
|
+
'triggerDirection': False,
|
227
|
+
'triggerPriceType': None,
|
228
|
+
'stopLossPrice': False, # todo
|
229
|
+
'takeProfitPrice': False, # todo
|
230
|
+
'attachedStopLossTakeProfit': None,
|
231
|
+
'timeInForce': {
|
232
|
+
'IOC': False,
|
233
|
+
'FOK': False,
|
234
|
+
'PO': False,
|
235
|
+
'GTD': False,
|
236
|
+
},
|
237
|
+
'hedged': False,
|
238
|
+
'trailing': False,
|
239
|
+
'leverage': False,
|
240
|
+
'marketBuyByCost': False,
|
241
|
+
'marketBuyRequiresPrice': False,
|
242
|
+
'selfTradePrevention': False,
|
243
|
+
'iceberg': False,
|
244
|
+
},
|
245
|
+
'createOrders': None,
|
246
|
+
'fetchMyTrades': None,
|
247
|
+
'fetchOrder': None, # todo
|
248
|
+
'fetchOpenOrders': {
|
249
|
+
'marginMode': False,
|
250
|
+
'limit': None,
|
251
|
+
'trigger': False,
|
252
|
+
'trailing': False,
|
253
|
+
},
|
254
|
+
'fetchOrders': {
|
255
|
+
'marginMode': False,
|
256
|
+
'limit': 1000,
|
257
|
+
'daysBack': 100000, # todo
|
258
|
+
'untilDays': 100000, # todo
|
259
|
+
'trigger': False,
|
260
|
+
'trailing': False,
|
261
|
+
},
|
262
|
+
'fetchClosedOrders': None,
|
263
|
+
'fetchOHLCV': {
|
264
|
+
'limit': 2000,
|
265
|
+
},
|
266
|
+
},
|
267
|
+
'swap': {
|
268
|
+
'linear': None,
|
269
|
+
'inverse': None,
|
270
|
+
},
|
271
|
+
'future': {
|
272
|
+
'linear': None,
|
273
|
+
'inverse': None,
|
274
|
+
},
|
275
|
+
},
|
220
276
|
})
|
221
277
|
|
222
278
|
async def fetch_markets(self, params={}) -> List[Market]:
|
@@ -878,10 +934,10 @@ class wazirx(Exchange, ImplicitAPI):
|
|
878
934
|
'type': 'limit',
|
879
935
|
}
|
880
936
|
request['price'] = self.price_to_precision(symbol, price)
|
881
|
-
|
882
|
-
if
|
937
|
+
triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
|
938
|
+
if triggerPrice is not None:
|
883
939
|
request['type'] = 'stop_limit'
|
884
|
-
request['stopPrice'] = self.price_to_precision(symbol,
|
940
|
+
request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
|
885
941
|
response = await self.privatePostOrder(self.extend(request, params))
|
886
942
|
# {
|
887
943
|
# "id": 28,
|
ccxt/async_support/whitebit.py
CHANGED
@@ -272,6 +272,8 @@ class whitebit(Exchange, ImplicitAPI):
|
|
272
272
|
},
|
273
273
|
},
|
274
274
|
'options': {
|
275
|
+
'timeDifference': 0, # the difference between system clock and exchange clock
|
276
|
+
'adjustForTimeDifference': False, # controls the adjustment logic upon instantiation
|
275
277
|
'fiatCurrencies': ['EUR', 'USD', 'RUB', 'UAH'],
|
276
278
|
'fetchBalance': {
|
277
279
|
'account': 'spot',
|
@@ -289,6 +291,75 @@ class whitebit(Exchange, ImplicitAPI):
|
|
289
291
|
'defaultType': 'spot',
|
290
292
|
'brokerId': 'ccxt',
|
291
293
|
},
|
294
|
+
'features': {
|
295
|
+
'default': {
|
296
|
+
'sandbox': False,
|
297
|
+
'createOrder': {
|
298
|
+
'marginMode': True,
|
299
|
+
'triggerPrice': True,
|
300
|
+
'triggerDirection': False,
|
301
|
+
'triggerPriceType': None,
|
302
|
+
'stopLossPrice': False, # todo
|
303
|
+
'takeProfitPrice': False, # todo
|
304
|
+
'attachedStopLossTakeProfit': None,
|
305
|
+
'timeInForce': {
|
306
|
+
'IOC': True, # todo
|
307
|
+
'FOK': False,
|
308
|
+
'PO': True, # todo
|
309
|
+
'GTD': False,
|
310
|
+
},
|
311
|
+
'hedged': False,
|
312
|
+
'trailing': False,
|
313
|
+
'leverage': False,
|
314
|
+
'marketBuyByCost': True,
|
315
|
+
'marketBuyRequiresPrice': False,
|
316
|
+
'selfTradePrevention': False,
|
317
|
+
'iceberg': False,
|
318
|
+
},
|
319
|
+
'createOrders': None,
|
320
|
+
'fetchMyTrades': {
|
321
|
+
'marginMode': False,
|
322
|
+
'limit': 100,
|
323
|
+
'daysBack': None,
|
324
|
+
'untilDays': None,
|
325
|
+
},
|
326
|
+
'fetchOrder': None,
|
327
|
+
'fetchOpenOrders': {
|
328
|
+
'marginMode': False,
|
329
|
+
'limit': 100,
|
330
|
+
'trigger': False,
|
331
|
+
'trailing': False,
|
332
|
+
},
|
333
|
+
'fetchOrders': None, # todo
|
334
|
+
'fetchClosedOrders': {
|
335
|
+
'marginMode': False,
|
336
|
+
'limit': 100,
|
337
|
+
'daysBack': None,
|
338
|
+
'daysBackCanceled': None,
|
339
|
+
'untilDays': None,
|
340
|
+
'trigger': False,
|
341
|
+
'trailing': False,
|
342
|
+
},
|
343
|
+
'fetchOHLCV': {
|
344
|
+
'limit': 1440,
|
345
|
+
},
|
346
|
+
},
|
347
|
+
'spot': {
|
348
|
+
'extends': 'default',
|
349
|
+
},
|
350
|
+
'swap': {
|
351
|
+
'linear': {
|
352
|
+
'extends': 'default',
|
353
|
+
},
|
354
|
+
'inverse': {
|
355
|
+
'extends': 'default',
|
356
|
+
},
|
357
|
+
},
|
358
|
+
'future': {
|
359
|
+
'linear': None,
|
360
|
+
'inverse': None,
|
361
|
+
},
|
362
|
+
},
|
292
363
|
'precisionMode': TICK_SIZE,
|
293
364
|
'exceptions': {
|
294
365
|
'exact': {
|
@@ -328,6 +399,8 @@ class whitebit(Exchange, ImplicitAPI):
|
|
328
399
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
329
400
|
:returns dict[]: an array of objects representing market data
|
330
401
|
"""
|
402
|
+
if self.options['adjustForTimeDifference']:
|
403
|
+
await self.load_time_difference()
|
331
404
|
markets = await self.v4PublicGetMarkets()
|
332
405
|
#
|
333
406
|
# [
|
@@ -1227,7 +1300,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1227
1300
|
response = await self.v4PublicGetTime(params)
|
1228
1301
|
#
|
1229
1302
|
# {
|
1230
|
-
# "time":
|
1303
|
+
# "time":1737380046
|
1231
1304
|
# }
|
1232
1305
|
#
|
1233
1306
|
return self.safe_integer(response, 'time')
|
@@ -2514,7 +2587,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2514
2587
|
return self.in_array(currency, fiatCurrencies)
|
2515
2588
|
|
2516
2589
|
def nonce(self):
|
2517
|
-
return self.milliseconds()
|
2590
|
+
return self.milliseconds() - self.options['timeDifference']
|
2518
2591
|
|
2519
2592
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
2520
2593
|
query = self.omit(params, self.extract_params(path))
|
@@ -2527,10 +2600,12 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2527
2600
|
url += '?' + self.urlencode(query)
|
2528
2601
|
if accessibility == 'private':
|
2529
2602
|
self.check_required_credentials()
|
2530
|
-
nonce =
|
2603
|
+
nonce = self.nonce()
|
2604
|
+
timestamp = self.parse_to_int(nonce / 1000)
|
2605
|
+
timestampString = str(timestamp)
|
2531
2606
|
secret = self.encode(self.secret)
|
2532
2607
|
request = '/' + 'api' + '/' + version + pathWithParams
|
2533
|
-
body = self.json(self.extend({'request': request, 'nonce':
|
2608
|
+
body = self.json(self.extend({'request': request, 'nonce': timestampString}, params))
|
2534
2609
|
payload = self.string_to_base64(body)
|
2535
2610
|
signature = self.hmac(self.encode(payload), secret, hashlib.sha512)
|
2536
2611
|
headers = {
|