ccxt 4.4.51__py2.py3-none-any.whl → 4.4.53__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.
Files changed (224) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +0 -1
  3. ccxt/abstract/binancecoinm.py +0 -1
  4. ccxt/abstract/binanceus.py +0 -1
  5. ccxt/abstract/binanceusdm.py +0 -1
  6. ccxt/ace.py +3 -0
  7. ccxt/alpaca.py +5 -0
  8. ccxt/ascendex.py +2 -1
  9. ccxt/async_support/__init__.py +1 -1
  10. ccxt/async_support/ace.py +3 -0
  11. ccxt/async_support/alpaca.py +5 -0
  12. ccxt/async_support/ascendex.py +2 -1
  13. ccxt/async_support/base/exchange.py +20 -3
  14. ccxt/async_support/bigone.py +5 -0
  15. ccxt/async_support/binance.py +55 -69
  16. ccxt/async_support/bingx.py +25 -29
  17. ccxt/async_support/bit2c.py +3 -0
  18. ccxt/async_support/bitbank.py +3 -0
  19. ccxt/async_support/bitbns.py +3 -0
  20. ccxt/async_support/bitfinex.py +6 -1
  21. ccxt/async_support/bitflyer.py +6 -1
  22. ccxt/async_support/bitget.py +8 -4
  23. ccxt/async_support/bithumb.py +3 -1
  24. ccxt/async_support/bitmart.py +22 -12
  25. ccxt/async_support/bitmex.py +99 -93
  26. ccxt/async_support/bitopro.py +7 -2
  27. ccxt/async_support/bitrue.py +4 -0
  28. ccxt/async_support/bitso.py +5 -2
  29. ccxt/async_support/bitstamp.py +3 -0
  30. ccxt/async_support/bitteam.py +5 -0
  31. ccxt/async_support/bitvavo.py +4 -0
  32. ccxt/async_support/blockchaincom.py +4 -0
  33. ccxt/async_support/blofin.py +3 -0
  34. ccxt/async_support/btcalpha.py +5 -0
  35. ccxt/async_support/btcbox.py +3 -2
  36. ccxt/async_support/btcmarkets.py +5 -0
  37. ccxt/async_support/btcturk.py +3 -0
  38. ccxt/async_support/bybit.py +10 -4
  39. ccxt/async_support/cex.py +2 -0
  40. ccxt/async_support/coinbase.py +19 -12
  41. ccxt/async_support/coinbaseexchange.py +5 -0
  42. ccxt/async_support/coinbaseinternational.py +21 -2
  43. ccxt/async_support/coincatch.py +3 -0
  44. ccxt/async_support/coincheck.py +2 -0
  45. ccxt/async_support/coinex.py +5 -1
  46. ccxt/async_support/coinlist.py +5 -0
  47. ccxt/async_support/coinmate.py +4 -0
  48. ccxt/async_support/coinmetro.py +9 -5
  49. ccxt/async_support/coinone.py +3 -0
  50. ccxt/async_support/coinsph.py +4 -0
  51. ccxt/async_support/coinspot.py +1 -0
  52. ccxt/async_support/cryptocom.py +5 -0
  53. ccxt/async_support/currencycom.py +3 -0
  54. ccxt/async_support/defx.py +5 -0
  55. ccxt/async_support/delta.py +4 -1
  56. ccxt/async_support/deribit.py +16 -5
  57. ccxt/async_support/digifinex.py +10 -5
  58. ccxt/async_support/ellipx.py +9 -5
  59. ccxt/async_support/exmo.py +6 -3
  60. ccxt/async_support/gate.py +5 -1
  61. ccxt/async_support/gemini.py +3 -0
  62. ccxt/async_support/hashkey.py +5 -4
  63. ccxt/async_support/hitbtc.py +6 -2
  64. ccxt/async_support/hollaex.py +7 -2
  65. ccxt/async_support/htx.py +8 -1
  66. ccxt/async_support/huobijp.py +5 -0
  67. ccxt/async_support/hyperliquid.py +6 -1
  68. ccxt/async_support/idex.py +5 -1
  69. ccxt/async_support/independentreserve.py +4 -0
  70. ccxt/async_support/indodax.py +3 -0
  71. ccxt/async_support/kraken.py +6 -4
  72. ccxt/async_support/krakenfutures.py +5 -2
  73. ccxt/async_support/kucoin.py +13 -6
  74. ccxt/async_support/kucoinfutures.py +5 -1
  75. ccxt/async_support/kuna.py +3 -0
  76. ccxt/async_support/latoken.py +4 -0
  77. ccxt/async_support/lbank.py +6 -1
  78. ccxt/async_support/luno.py +6 -1
  79. ccxt/async_support/lykke.py +4 -0
  80. ccxt/async_support/mercado.py +4 -0
  81. ccxt/async_support/mexc.py +10 -9
  82. ccxt/async_support/ndax.py +6 -1
  83. ccxt/async_support/novadax.py +5 -0
  84. ccxt/async_support/oceanex.py +6 -2
  85. ccxt/async_support/okcoin.py +4 -0
  86. ccxt/async_support/okx.py +17 -5
  87. ccxt/async_support/onetrading.py +4 -0
  88. ccxt/async_support/oxfun.py +3 -0
  89. ccxt/async_support/p2b.py +3 -0
  90. ccxt/async_support/paradex.py +8 -2
  91. ccxt/async_support/phemex.py +10 -4
  92. ccxt/async_support/poloniex.py +6 -3
  93. ccxt/async_support/poloniexfutures.py +5 -1
  94. ccxt/async_support/probit.py +4 -0
  95. ccxt/async_support/timex.py +4 -0
  96. ccxt/async_support/tokocrypto.py +5 -0
  97. ccxt/async_support/tradeogre.py +2 -0
  98. ccxt/async_support/upbit.py +5 -2
  99. ccxt/async_support/vertex.py +6 -2
  100. ccxt/async_support/wavesexchange.py +20 -3
  101. ccxt/async_support/wazirx.py +2 -0
  102. ccxt/async_support/whitebit.py +5 -4
  103. ccxt/async_support/woo.py +15 -5
  104. ccxt/async_support/woofipro.py +21 -7
  105. ccxt/async_support/xt.py +5 -0
  106. ccxt/async_support/yobit.py +5 -2
  107. ccxt/async_support/zaif.py +2 -0
  108. ccxt/async_support/zonda.py +2 -0
  109. ccxt/base/exchange.py +113 -50
  110. ccxt/base/types.py +1 -1
  111. ccxt/bigone.py +5 -0
  112. ccxt/binance.py +55 -69
  113. ccxt/bingx.py +25 -29
  114. ccxt/bit2c.py +3 -0
  115. ccxt/bitbank.py +3 -0
  116. ccxt/bitbns.py +3 -0
  117. ccxt/bitfinex.py +6 -1
  118. ccxt/bitflyer.py +6 -1
  119. ccxt/bitget.py +8 -4
  120. ccxt/bithumb.py +3 -1
  121. ccxt/bitmart.py +22 -12
  122. ccxt/bitmex.py +99 -93
  123. ccxt/bitopro.py +7 -2
  124. ccxt/bitrue.py +4 -0
  125. ccxt/bitso.py +5 -2
  126. ccxt/bitstamp.py +3 -0
  127. ccxt/bitteam.py +5 -0
  128. ccxt/bitvavo.py +4 -0
  129. ccxt/blockchaincom.py +4 -0
  130. ccxt/blofin.py +3 -0
  131. ccxt/btcalpha.py +5 -0
  132. ccxt/btcbox.py +3 -2
  133. ccxt/btcmarkets.py +5 -0
  134. ccxt/btcturk.py +3 -0
  135. ccxt/bybit.py +10 -4
  136. ccxt/cex.py +2 -0
  137. ccxt/coinbase.py +19 -12
  138. ccxt/coinbaseexchange.py +5 -0
  139. ccxt/coinbaseinternational.py +21 -2
  140. ccxt/coincatch.py +3 -0
  141. ccxt/coincheck.py +2 -0
  142. ccxt/coinex.py +5 -1
  143. ccxt/coinlist.py +5 -0
  144. ccxt/coinmate.py +4 -0
  145. ccxt/coinmetro.py +9 -5
  146. ccxt/coinone.py +3 -0
  147. ccxt/coinsph.py +4 -0
  148. ccxt/coinspot.py +1 -0
  149. ccxt/cryptocom.py +5 -0
  150. ccxt/currencycom.py +3 -0
  151. ccxt/defx.py +5 -0
  152. ccxt/delta.py +4 -1
  153. ccxt/deribit.py +16 -5
  154. ccxt/digifinex.py +10 -5
  155. ccxt/ellipx.py +9 -5
  156. ccxt/exmo.py +6 -3
  157. ccxt/gate.py +5 -1
  158. ccxt/gemini.py +3 -0
  159. ccxt/hashkey.py +5 -4
  160. ccxt/hitbtc.py +6 -2
  161. ccxt/hollaex.py +7 -2
  162. ccxt/htx.py +8 -1
  163. ccxt/huobijp.py +5 -0
  164. ccxt/hyperliquid.py +6 -1
  165. ccxt/idex.py +5 -1
  166. ccxt/independentreserve.py +4 -0
  167. ccxt/indodax.py +3 -0
  168. ccxt/kraken.py +6 -4
  169. ccxt/krakenfutures.py +5 -2
  170. ccxt/kucoin.py +13 -6
  171. ccxt/kucoinfutures.py +5 -1
  172. ccxt/kuna.py +3 -0
  173. ccxt/latoken.py +4 -0
  174. ccxt/lbank.py +6 -1
  175. ccxt/luno.py +6 -1
  176. ccxt/lykke.py +4 -0
  177. ccxt/mercado.py +4 -0
  178. ccxt/mexc.py +10 -9
  179. ccxt/ndax.py +6 -1
  180. ccxt/novadax.py +5 -0
  181. ccxt/oceanex.py +6 -2
  182. ccxt/okcoin.py +4 -0
  183. ccxt/okx.py +17 -5
  184. ccxt/onetrading.py +4 -0
  185. ccxt/oxfun.py +3 -0
  186. ccxt/p2b.py +3 -0
  187. ccxt/paradex.py +8 -2
  188. ccxt/phemex.py +10 -4
  189. ccxt/poloniex.py +6 -3
  190. ccxt/poloniexfutures.py +5 -1
  191. ccxt/pro/__init__.py +1 -1
  192. ccxt/pro/bitcoincom.py +1 -4
  193. ccxt/pro/bitopro.py +1 -1
  194. ccxt/probit.py +4 -0
  195. ccxt/test/tests_async.py +57 -31
  196. ccxt/test/tests_sync.py +57 -31
  197. ccxt/timex.py +4 -0
  198. ccxt/tokocrypto.py +5 -0
  199. ccxt/tradeogre.py +2 -0
  200. ccxt/upbit.py +5 -2
  201. ccxt/vertex.py +6 -2
  202. ccxt/wavesexchange.py +20 -3
  203. ccxt/wazirx.py +2 -0
  204. ccxt/whitebit.py +5 -4
  205. ccxt/woo.py +15 -5
  206. ccxt/woofipro.py +21 -7
  207. ccxt/xt.py +5 -0
  208. ccxt/yobit.py +5 -2
  209. ccxt/zaif.py +2 -0
  210. ccxt/zonda.py +2 -0
  211. {ccxt-4.4.51.dist-info → ccxt-4.4.53.dist-info}/METADATA +225 -140
  212. {ccxt-4.4.51.dist-info → ccxt-4.4.53.dist-info}/RECORD +215 -224
  213. ccxt/static_dependencies/ethereum/abi/py.typed +0 -0
  214. ccxt/static_dependencies/ethereum/account/py.typed +0 -0
  215. ccxt/static_dependencies/ethereum/hexbytes/py.typed +0 -0
  216. ccxt/static_dependencies/ethereum/typing/py.typed +0 -0
  217. ccxt/static_dependencies/ethereum/utils/py.typed +0 -0
  218. ccxt/static_dependencies/lark/py.typed +0 -0
  219. ccxt/static_dependencies/marshmallow/py.typed +0 -0
  220. ccxt/static_dependencies/marshmallow_dataclass/py.typed +0 -0
  221. ccxt/static_dependencies/marshmallow_oneofschema/py.typed +0 -0
  222. {ccxt-4.4.51.dist-info → ccxt-4.4.53.dist-info}/LICENSE.txt +0 -0
  223. {ccxt-4.4.51.dist-info → ccxt-4.4.53.dist-info}/WHEEL +0 -0
  224. {ccxt-4.4.51.dist-info → ccxt-4.4.53.dist-info}/top_level.txt +0 -0
ccxt/coinex.py CHANGED
@@ -546,17 +546,20 @@ class coinex(Exchange, ImplicitAPI):
546
546
  'limit': 1000,
547
547
  'daysBack': None,
548
548
  'untilDays': 100000,
549
+ 'symbolRequired': True,
549
550
  },
550
551
  'fetchOrder': {
551
552
  'marginMode': False,
552
553
  'trigger': False,
553
554
  'trailing': False,
555
+ 'symbolRequired': True,
554
556
  },
555
557
  'fetchOpenOrders': {
556
558
  'marginMode': True,
557
559
  'limit': 1000,
558
560
  'trigger': True,
559
561
  'trailing': False,
562
+ 'symbolRequired': False,
560
563
  },
561
564
  'fetchOrders': None,
562
565
  'fetchClosedOrders': {
@@ -567,6 +570,7 @@ class coinex(Exchange, ImplicitAPI):
567
570
  'untilDays': None,
568
571
  'trigger': True,
569
572
  'trailing': False,
573
+ 'symbolRequired': False,
570
574
  },
571
575
  'fetchOHLCV': {
572
576
  'limit': 1000,
@@ -813,7 +817,7 @@ class coinex(Exchange, ImplicitAPI):
813
817
  swapMarkets = promises[1]
814
818
  return self.array_concat(spotMarkets, swapMarkets)
815
819
 
816
- def fetch_spot_markets(self, params):
820
+ def fetch_spot_markets(self, params) -> List[Market]:
817
821
  response = self.v2PublicGetSpotMarket(params)
818
822
  #
819
823
  # {
ccxt/coinlist.py CHANGED
@@ -255,17 +255,20 @@ class coinlist(Exchange, ImplicitAPI):
255
255
  'limit': 500,
256
256
  'daysBack': 100000,
257
257
  'untilDays': 100000,
258
+ 'symbolRequired': False,
258
259
  },
259
260
  'fetchOrder': {
260
261
  'marginMode': False,
261
262
  'trigger': False,
262
263
  'trailing': False,
264
+ 'symbolRequired': False,
263
265
  },
264
266
  'fetchOpenOrders': {
265
267
  'marginMode': False,
266
268
  'limit': 500,
267
269
  'trigger': False,
268
270
  'trailing': False,
271
+ 'symbolRequired': False,
269
272
  },
270
273
  'fetchOrders': {
271
274
  'marginMode': False,
@@ -274,6 +277,7 @@ class coinlist(Exchange, ImplicitAPI):
274
277
  'untilDays': 100000,
275
278
  'trigger': False,
276
279
  'trailing': False,
280
+ 'symbolRequired': False,
277
281
  },
278
282
  'fetchClosedOrders': {
279
283
  'marginMode': False,
@@ -283,6 +287,7 @@ class coinlist(Exchange, ImplicitAPI):
283
287
  'untilDays': 100000,
284
288
  'trigger': False,
285
289
  'trailing': False,
290
+ 'symbolRequired': False,
286
291
  },
287
292
  'fetchOHLCV': {
288
293
  'limit': 300,
ccxt/coinmate.py CHANGED
@@ -248,17 +248,20 @@ class coinmate(Exchange, ImplicitAPI):
248
248
  'limit': 1000,
249
249
  'daysBack': 100000,
250
250
  'untilDays': 100000, # todo implement
251
+ 'symbolRequired': False,
251
252
  },
252
253
  'fetchOrder': {
253
254
  'marginMode': False,
254
255
  'trigger': False,
255
256
  'trailing': False,
257
+ 'symbolRequired': False,
256
258
  },
257
259
  'fetchOpenOrders': {
258
260
  'marginMode': False,
259
261
  'limit': None,
260
262
  'trigger': False,
261
263
  'trailing': False,
264
+ 'symbolRequired': True,
262
265
  },
263
266
  'fetchOrders': {
264
267
  'marginMode': False,
@@ -267,6 +270,7 @@ class coinmate(Exchange, ImplicitAPI):
267
270
  'untilDays': None,
268
271
  'trigger': False,
269
272
  'trailing': False,
273
+ 'symbolRequired': True,
270
274
  },
271
275
  'fetchClosedOrders': None,
272
276
  'fetchOHLCV': None,
ccxt/coinmetro.py CHANGED
@@ -255,17 +255,20 @@ class coinmetro(Exchange, ImplicitAPI):
255
255
  'limit': None,
256
256
  'daysBack': 100000,
257
257
  'untilDays': None,
258
+ 'symbolRequired': False,
258
259
  },
259
260
  'fetchOrder': {
260
261
  'marginMode': False,
261
262
  'trigger': False,
262
263
  'trailing': False,
264
+ 'symbolRequired': False,
263
265
  },
264
266
  'fetchOpenOrders': {
265
267
  'marginMode': False,
266
268
  'limit': None,
267
269
  'trigger': False,
268
270
  'trailing': False,
271
+ 'symbolRequired': False,
269
272
  },
270
273
  'fetchOrders': {
271
274
  'marginMode': False,
@@ -274,6 +277,7 @@ class coinmetro(Exchange, ImplicitAPI):
274
277
  'untilDays': None,
275
278
  'trigger': False,
276
279
  'trailing': False,
280
+ 'symbolRequired': False,
277
281
  },
278
282
  'fetchClosedOrders': None,
279
283
  'fetchOHLCV': {
@@ -1261,24 +1265,24 @@ class coinmetro(Exchange, ImplicitAPI):
1261
1265
  request: dict = {
1262
1266
  }
1263
1267
  request['orderType'] = type
1264
- precisedAmount = None
1268
+ formattedAmount = None
1265
1269
  if amount is not None:
1266
- precisedAmount = self.amount_to_precision(symbol, amount)
1270
+ formattedAmount = self.amount_to_precision(symbol, amount)
1267
1271
  cost = self.safe_value(params, 'cost')
1268
1272
  params = self.omit(params, 'cost')
1269
1273
  if type == 'limit':
1270
1274
  if (price is None) and (cost is None):
1271
1275
  raise ArgumentsRequired(self.id + ' createOrder() requires a price or params.cost argument for a ' + type + ' order')
1272
1276
  elif (price is not None) and (amount is not None):
1273
- costString = Precise.string_mul(self.number_to_string(price), self.number_to_string(precisedAmount))
1277
+ costString = Precise.string_mul(self.number_to_string(price), self.number_to_string(formattedAmount))
1274
1278
  cost = self.parse_to_numeric(costString)
1275
1279
  precisedCost = None
1276
1280
  if cost is not None:
1277
1281
  precisedCost = self.cost_to_precision(symbol, cost)
1278
1282
  if side == 'sell':
1279
- request = self.handle_create_order_side(market['baseId'], market['quoteId'], precisedAmount, precisedCost, request)
1283
+ request = self.handle_create_order_side(market['baseId'], market['quoteId'], formattedAmount, precisedCost, request)
1280
1284
  elif side == 'buy':
1281
- request = self.handle_create_order_side(market['quoteId'], market['baseId'], precisedCost, precisedAmount, request)
1285
+ request = self.handle_create_order_side(market['quoteId'], market['baseId'], precisedCost, formattedAmount, request)
1282
1286
  timeInForce = self.safe_value(params, 'timeInForce')
1283
1287
  if timeInForce is not None:
1284
1288
  params = self.omit(params, 'timeInForce')
ccxt/coinone.py CHANGED
@@ -228,17 +228,20 @@ class coinone(Exchange, ImplicitAPI):
228
228
  'limit': 100, # todo implement
229
229
  'daysBack': 100000, # todo implement
230
230
  'untilDays': 100000, # todo implement
231
+ 'symbolRequired': True,
231
232
  },
232
233
  'fetchOrder': {
233
234
  'marginMode': False,
234
235
  'trigger': False,
235
236
  'trailing': False,
237
+ 'symbolRequired': True,
236
238
  },
237
239
  'fetchOpenOrders': {
238
240
  'marginMode': False,
239
241
  'limit': None,
240
242
  'trigger': False,
241
243
  'trailing': False,
244
+ 'symbolRequired': True,
242
245
  },
243
246
  'fetchOrders': None,
244
247
  'fetchClosedOrders': None, # todo implement
ccxt/coinsph.py CHANGED
@@ -344,17 +344,20 @@ class coinsph(Exchange, ImplicitAPI):
344
344
  'limit': 1000,
345
345
  'daysBack': 100000,
346
346
  'untilDays': 100000, # todo implement
347
+ 'symbolRequired': True,
347
348
  },
348
349
  'fetchOrder': {
349
350
  'marginMode': False,
350
351
  'trigger': False,
351
352
  'trailing': False,
353
+ 'symbolRequired': False,
352
354
  },
353
355
  'fetchOpenOrders': {
354
356
  'marginMode': False,
355
357
  'limit': None,
356
358
  'trigger': False,
357
359
  'trailing': False,
360
+ 'symbolRequired': False,
358
361
  },
359
362
  'fetchOrders': None,
360
363
  'fetchClosedOrders': {
@@ -365,6 +368,7 @@ class coinsph(Exchange, ImplicitAPI):
365
368
  'untilDays': 100000,
366
369
  'trigger': False,
367
370
  'trailing': False,
371
+ 'symbolRequired': True,
368
372
  },
369
373
  'fetchOHLCV': {
370
374
  'limit': 1000,
ccxt/coinspot.py CHANGED
@@ -175,6 +175,7 @@ class coinspot(Exchange, ImplicitAPI):
175
175
  'limit': None,
176
176
  'daysBack': 100000,
177
177
  'untilDays': 100000, # todo implement
178
+ 'symbolRequired': False,
178
179
  },
179
180
  'fetchOrder': None,
180
181
  'fetchOpenOrders': None, # todo implement
ccxt/cryptocom.py CHANGED
@@ -404,17 +404,20 @@ class cryptocom(Exchange, ImplicitAPI):
404
404
  'limit': 100,
405
405
  'daysBack': None,
406
406
  'untilDays': 1,
407
+ 'symbolRequired': False,
407
408
  },
408
409
  'fetchOrder': {
409
410
  'marginMode': False,
410
411
  'trigger': False,
411
412
  'trailing': False,
413
+ 'symbolRequired': False,
412
414
  },
413
415
  'fetchOpenOrders': {
414
416
  'marginMode': True,
415
417
  'limit': 100,
416
418
  'trigger': False,
417
419
  'trailing': False,
420
+ 'symbolRequired': False,
418
421
  },
419
422
  'fetchOrders': {
420
423
  'marginMode': False,
@@ -423,6 +426,7 @@ class cryptocom(Exchange, ImplicitAPI):
423
426
  'untilDays': 1,
424
427
  'trigger': False,
425
428
  'trailing': False,
429
+ 'symbolRequired': False,
426
430
  },
427
431
  'fetchClosedOrders': {
428
432
  'marginMode': False,
@@ -432,6 +436,7 @@ class cryptocom(Exchange, ImplicitAPI):
432
436
  'untilDays': 1,
433
437
  'trigger': False,
434
438
  'trailing': False,
439
+ 'symbolRequired': False,
435
440
  },
436
441
  'fetchOHLCV': {
437
442
  'limit': 300,
ccxt/currencycom.py CHANGED
@@ -295,17 +295,20 @@ class currencycom(Exchange, ImplicitAPI):
295
295
  'limit': 500,
296
296
  'daysBack': 100000,
297
297
  'untilDays': 100000, # todo implementation
298
+ 'symbolRequired': False,
298
299
  },
299
300
  'fetchOrder': {
300
301
  'marginMode': False,
301
302
  'trigger': False,
302
303
  'trailing': False,
304
+ 'symbolRequired': False,
303
305
  },
304
306
  'fetchOpenOrders': {
305
307
  'marginMode': True,
306
308
  'limit': 100,
307
309
  'trigger': False,
308
310
  'trailing': False,
311
+ 'symbolRequired': False,
309
312
  },
310
313
  'fetchOrders': None,
311
314
  'fetchClosedOrders': None,
ccxt/defx.py CHANGED
@@ -294,17 +294,20 @@ class defx(Exchange, ImplicitAPI):
294
294
  'limit': 1000,
295
295
  'daysBack': None,
296
296
  'untilDays': None,
297
+ 'symbolRequired': False,
297
298
  },
298
299
  'fetchOrder': {
299
300
  'marginMode': False,
300
301
  'trigger': False,
301
302
  'trailing': False,
303
+ 'symbolRequired': False,
302
304
  },
303
305
  'fetchOpenOrders': {
304
306
  'marginMode': True,
305
307
  'limit': 100,
306
308
  'trigger': False,
307
309
  'trailing': False,
310
+ 'symbolRequired': False,
308
311
  },
309
312
  'fetchOrders': {
310
313
  'marginMode': False,
@@ -313,6 +316,7 @@ class defx(Exchange, ImplicitAPI):
313
316
  'untilDays': 100000,
314
317
  'trigger': False,
315
318
  'trailing': False,
319
+ 'symbolRequired': False,
316
320
  },
317
321
  'fetchClosedOrders': {
318
322
  'marginMode': False,
@@ -322,6 +326,7 @@ class defx(Exchange, ImplicitAPI):
322
326
  'untilDays': 100000,
323
327
  'trigger': False,
324
328
  'trailing': False,
329
+ 'symbolRequired': False,
325
330
  },
326
331
  'fetchOHLCV': {
327
332
  'limit': 1000,
ccxt/delta.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.delta import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, MarginMode, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade
9
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, MarginMode, MarginModification, Market, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, MarketInterface
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -269,6 +269,7 @@ class delta(Exchange, ImplicitAPI):
269
269
  'limit': 100, # todo: revise
270
270
  'daysBack': 100000,
271
271
  'untilDays': 100000,
272
+ 'symbolRequired': False,
272
273
  },
273
274
  'fetchOrder': None,
274
275
  'fetchOpenOrders': {
@@ -276,6 +277,7 @@ class delta(Exchange, ImplicitAPI):
276
277
  'limit': 100, # todo: revise
277
278
  'trigger': False,
278
279
  'trailing': False,
280
+ 'symbolRequired': False,
279
281
  },
280
282
  'fetchOrders': None,
281
283
  'fetchClosedOrders': {
@@ -286,6 +288,7 @@ class delta(Exchange, ImplicitAPI):
286
288
  'untilDays': 100000,
287
289
  'trigger': False,
288
290
  'trailing': False,
291
+ 'symbolRequired': False,
289
292
  },
290
293
  'fetchOHLCV': {
291
294
  'limit': 2000, # todo: recheck
ccxt/deribit.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.deribit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, Greeks, Int, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, Greeks, Int, Market, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFees, Transaction, MarketInterface, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -327,17 +327,20 @@ class deribit(Exchange, ImplicitAPI):
327
327
  'limit': 100, # todo: revise
328
328
  'daysBack': 100000,
329
329
  'untilDays': 100000,
330
+ 'symbolRequired': True, # todo
330
331
  },
331
332
  'fetchOrder': {
332
333
  'marginMode': False,
333
334
  'trigger': False,
334
335
  'trailing': False,
336
+ 'symbolRequired': True, # todo
335
337
  },
336
338
  'fetchOpenOrders': {
337
339
  'marginMode': False,
338
340
  'limit': None,
339
341
  'trigger': False,
340
342
  'trailing': False,
343
+ 'symbolRequired': True, # todo
341
344
  },
342
345
  'fetchOrders': None,
343
346
  'fetchClosedOrders': {
@@ -348,6 +351,7 @@ class deribit(Exchange, ImplicitAPI):
348
351
  'untilDays': 100000,
349
352
  'trigger': False,
350
353
  'trailing': False,
354
+ 'symbolRequired': True, # todo
351
355
  },
352
356
  'fetchOHLCV': {
353
357
  'limit': 1000, # todo: recheck
@@ -760,7 +764,7 @@ class deribit(Exchange, ImplicitAPI):
760
764
  result = self.safe_value(response, 'result', [])
761
765
  return self.parse_accounts(result)
762
766
 
763
- def parse_account(self, account, currency: Currency = None):
767
+ def parse_account(self, account):
764
768
  #
765
769
  # {
766
770
  # "username": "someusername_1",
@@ -779,7 +783,7 @@ class deribit(Exchange, ImplicitAPI):
779
783
  'info': account,
780
784
  'id': self.safe_string(account, 'id'),
781
785
  'type': self.safe_string(account, 'type'),
782
- 'code': self.safe_currency_code(None, currency),
786
+ 'code': None,
783
787
  }
784
788
 
785
789
  def fetch_markets(self, params={}) -> List[Market]:
@@ -3071,9 +3075,12 @@ class deribit(Exchange, ImplicitAPI):
3071
3075
  market = self.market(symbol)
3072
3076
  paginate = False
3073
3077
  paginate, params = self.handle_option_and_params(params, 'fetchFundingRateHistory', 'paginate')
3078
+ maxEntriesPerRequest = 744 # seems exchange returns max 744 items per request
3079
+ eachItemDuration = '1h'
3074
3080
  if paginate:
3075
- # 1h needed to fix : https://github.com/ccxt/ccxt/issues/25040
3076
- return self.fetch_paginated_call_deterministic('fetchFundingRateHistory', symbol, since, limit, '1h', params, 720)
3081
+ # fix for: https://github.com/ccxt/ccxt/issues/25040
3082
+ return self.fetch_paginated_call_deterministic('fetchFundingRateHistory', symbol, since, limit, eachItemDuration, self.extend(params, {'isDeribitPaginationCall': True}), maxEntriesPerRequest)
3083
+ duration = self.parse_timeframe(eachItemDuration) * 1000
3077
3084
  time = self.milliseconds()
3078
3085
  month = 30 * 24 * 60 * 60 * 1000
3079
3086
  if since is None:
@@ -3090,6 +3097,10 @@ class deribit(Exchange, ImplicitAPI):
3090
3097
  request['end_timestamp'] = until
3091
3098
  else:
3092
3099
  request['end_timestamp'] = time
3100
+ if 'isDeribitPaginationCall' in params:
3101
+ params = self.omit(params, 'isDeribitPaginationCall')
3102
+ maxUntil = self.sum(since, limit * duration)
3103
+ request['end_timestamp'] = min(request['end_timestamp'], maxUntil)
3093
3104
  response = self.publicGetGetFundingRateHistory(self.extend(request, params))
3094
3105
  #
3095
3106
  # {
ccxt/digifinex.py CHANGED
@@ -280,25 +280,27 @@ class digifinex(Exchange, ImplicitAPI):
280
280
  },
281
281
  'createOrders': {
282
282
  'max': 10,
283
- 'marginMode': True,
284
283
  },
285
284
  'fetchMyTrades': {
286
285
  'marginMode': True,
287
286
  'limit': 500,
288
287
  'daysBack': 100000, # todo
289
288
  'untilDays': 30,
289
+ 'symbolRequired': False,
290
290
  },
291
291
  'fetchOrder': {
292
292
  'marginMode': True,
293
293
  'trigger': False,
294
294
  'trailing': False,
295
295
  'marketType': True,
296
+ 'symbolRequired': True,
296
297
  },
297
298
  'fetchOpenOrders': {
298
299
  'marginMode': True,
299
300
  'limit': None,
300
301
  'trigger': False,
301
302
  'trailing': False,
303
+ 'symbolRequired': False,
302
304
  },
303
305
  'fetchOrders': {
304
306
  'marginMode': True,
@@ -307,6 +309,7 @@ class digifinex(Exchange, ImplicitAPI):
307
309
  'untilDays': 30,
308
310
  'trigger': False,
309
311
  'trailing': False,
312
+ 'symbolRequired': False,
310
313
  },
311
314
  'fetchClosedOrders': None,
312
315
  'fetchOHLCV': {
@@ -566,10 +569,11 @@ class digifinex(Exchange, ImplicitAPI):
566
569
  },
567
570
  }
568
571
  if code in result:
569
- if isinstance(result[code]['info'], list):
570
- result[code]['info'].append(currency)
572
+ resultCodeInfo = result[code]['info']
573
+ if isinstance(resultCodeInfo, list):
574
+ resultCodeInfo.append(currency)
571
575
  else:
572
- result[code]['info'] = [result[code]['info'], currency]
576
+ resultCodeInfo = [resultCodeInfo, currency]
573
577
  if withdraw:
574
578
  result[code]['withdraw'] = True
575
579
  result[code]['limits']['withdraw']['min'] = min(result[code]['limits']['withdraw']['min'], minWithdraw)
@@ -3970,7 +3974,8 @@ class digifinex(Exchange, ImplicitAPI):
3970
3974
  if depositWithdrawFee is None:
3971
3975
  depositWithdrawFees[code] = self.deposit_withdraw_fee({})
3972
3976
  depositWithdrawFees[code]['info'] = []
3973
- depositWithdrawFees[code]['info'].append(entry)
3977
+ depositWithdrawInfo = depositWithdrawFees[code]['info']
3978
+ depositWithdrawInfo.append(entry)
3974
3979
  networkId = self.safe_string(entry, 'chain')
3975
3980
  withdrawFee = self.safe_value(entry, 'min_withdraw_fee')
3976
3981
  withdrawResult: dict = {
ccxt/ellipx.py CHANGED
@@ -266,12 +266,14 @@ class ellipx(Exchange, ImplicitAPI):
266
266
  'marginMode': False,
267
267
  'trigger': False,
268
268
  'trailing': False,
269
+ 'symbolRequired': False,
269
270
  },
270
271
  'fetchOpenOrders': {
271
272
  'marginMode': False,
272
273
  'limit': None,
273
274
  'trigger': False,
274
275
  'trailing': False,
276
+ 'symbolRequired': True,
275
277
  },
276
278
  'fetchOrders': {
277
279
  'marginMode': False,
@@ -280,6 +282,7 @@ class ellipx(Exchange, ImplicitAPI):
280
282
  'untilDays': None, # todo
281
283
  'trigger': False,
282
284
  'trailing': False,
285
+ 'symbolRequired': True,
283
286
  },
284
287
  'fetchClosedOrders': None,
285
288
  'fetchOHLCV': {
@@ -1621,7 +1624,7 @@ class ellipx(Exchange, ImplicitAPI):
1621
1624
  'info': response,
1622
1625
  }
1623
1626
 
1624
- def fetch_trading_fee(self, symbol: str = None, params={}) -> TradingFeeInterface:
1627
+ def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
1625
1628
  """
1626
1629
  Fetches the current trading fees(maker and taker) applicable to the user.
1627
1630
 
@@ -1855,10 +1858,11 @@ class ellipx(Exchange, ImplicitAPI):
1855
1858
  e = self.safe_integer(amount, 'e', None)
1856
1859
  if v is None or e is None:
1857
1860
  return None
1858
- preciseAmount = Precise(v)
1859
- preciseAmount.decimals = e
1860
- preciseAmount.reduce()
1861
- return str(preciseAmount)
1861
+ precise = Precise(v)
1862
+ precise.decimals = e
1863
+ precise.reduce()
1864
+ amountString = str(precise)
1865
+ return amountString
1862
1866
 
1863
1867
  def to_amount(self, amount: float, precision: float) -> dict:
1864
1868
  v = str(amount)
ccxt/exmo.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.exmo import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
9
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, OrderBooks, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -251,17 +251,20 @@ class exmo(Exchange, ImplicitAPI):
251
251
  'limit': 100,
252
252
  'daysBack': None,
253
253
  'untilDays': None,
254
+ 'symbolRequired': True,
254
255
  },
255
256
  'fetchOrder': {
256
257
  'marginMode': False,
257
258
  'trigger': False,
258
259
  'trailing': False,
260
+ 'symbolRequired': False,
259
261
  },
260
262
  'fetchOpenOrders': {
261
263
  'marginMode': False,
262
264
  'limit': None,
263
265
  'trigger': False,
264
266
  'trailing': False,
267
+ 'symbolRequired': False,
265
268
  },
266
269
  'fetchOrders': None,
267
270
  'fetchClosedOrders': None,
@@ -1068,7 +1071,7 @@ class exmo(Exchange, ImplicitAPI):
1068
1071
  result = self.safe_dict(response, market['id'])
1069
1072
  return self.parse_order_book(result, market['symbol'], None, 'bid', 'ask')
1070
1073
 
1071
- def fetch_order_books(self, symbols: Strings = None, limit: Int = None, params={}):
1074
+ def fetch_order_books(self, symbols: Strings = None, limit: Int = None, params={}) -> OrderBooks:
1072
1075
  """
1073
1076
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data for multiple markets
1074
1077
 
@@ -2477,7 +2480,7 @@ class exmo(Exchange, ImplicitAPI):
2477
2480
  first = self.safe_dict(items, 0, {})
2478
2481
  return self.parse_transaction(first, currency)
2479
2482
 
2480
- def fetch_deposit(self, id=None, code: Str = None, params={}):
2483
+ def fetch_deposit(self, id: str, code: Str = None, params={}):
2481
2484
  """
2482
2485
  fetch information on a deposit
2483
2486
 
ccxt/gate.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.gate import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, BorrowInterest, Bool, Currencies, Currency, DepositAddress, FundingHistory, Greeks, Int, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, BorrowInterest, Bool, Currencies, Currency, DepositAddress, FundingHistory, Greeks, Int, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginModification, Market, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, MarketInterface, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -757,17 +757,20 @@ class gate(Exchange, ImplicitAPI):
757
757
  'limit': 1000,
758
758
  'daysBack': None,
759
759
  'untilDays': 30,
760
+ 'symbolRequired': False,
760
761
  },
761
762
  'fetchOrder': {
762
763
  'marginMode': False,
763
764
  'trigger': True,
764
765
  'trailing': False,
766
+ 'symbolRequired': True,
765
767
  },
766
768
  'fetchOpenOrders': {
767
769
  'marginMode': True,
768
770
  'trigger': True,
769
771
  'trailing': False,
770
772
  'limit': 100,
773
+ 'symbolRequired': False,
771
774
  },
772
775
  'fetchOrders': None,
773
776
  'fetchClosedOrders': {
@@ -778,6 +781,7 @@ class gate(Exchange, ImplicitAPI):
778
781
  'untilDays': 30,
779
782
  'daysBack': None,
780
783
  'daysBackCanceled': None,
784
+ 'symbolRequired': False,
781
785
  },
782
786
  'fetchOHLCV': {
783
787
  'limit': 1000,
ccxt/gemini.py CHANGED
@@ -341,17 +341,20 @@ class gemini(Exchange, ImplicitAPI):
341
341
  'limit': 500,
342
342
  'daysBack': None,
343
343
  'untilDays': None,
344
+ 'symbolRequired': True,
344
345
  },
345
346
  'fetchOrder': {
346
347
  'marginMode': False,
347
348
  'trigger': False,
348
349
  'trailing': False,
350
+ 'symbolRequired': False,
349
351
  },
350
352
  'fetchOpenOrders': {
351
353
  'marginMode': False,
352
354
  'limit': None,
353
355
  'trigger': False,
354
356
  'trailing': False,
357
+ 'symbolRequired': False,
355
358
  },
356
359
  'fetchOrders': None,
357
360
  'fetchClosedOrders': None, # todo: implement