ccxt 4.2.84__py2.py3-none-any.whl → 4.2.86__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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

Files changed (152) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/coinex.py +232 -123
  3. ccxt/ace.py +5 -5
  4. ccxt/ascendex.py +8 -8
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ace.py +5 -5
  7. ccxt/async_support/ascendex.py +8 -8
  8. ccxt/async_support/base/exchange.py +3 -27
  9. ccxt/async_support/bigone.py +12 -12
  10. ccxt/async_support/binance.py +20 -32
  11. ccxt/async_support/bingx.py +45 -28
  12. ccxt/async_support/bit2c.py +1 -1
  13. ccxt/async_support/bitbank.py +27 -29
  14. ccxt/async_support/bitbns.py +5 -5
  15. ccxt/async_support/bitfinex.py +1 -1
  16. ccxt/async_support/bitfinex2.py +1 -1
  17. ccxt/async_support/bitget.py +29 -24
  18. ccxt/async_support/bithumb.py +5 -5
  19. ccxt/async_support/bitmart.py +16 -16
  20. ccxt/async_support/bitopro.py +1 -1
  21. ccxt/async_support/bitrue.py +4 -4
  22. ccxt/async_support/bitso.py +5 -5
  23. ccxt/async_support/bitstamp.py +1 -1
  24. ccxt/async_support/bitteam.py +8 -8
  25. ccxt/async_support/bl3p.py +1 -1
  26. ccxt/async_support/btcturk.py +6 -6
  27. ccxt/async_support/bybit.py +30 -83
  28. ccxt/async_support/coincheck.py +4 -4
  29. ccxt/async_support/coinex.py +404 -262
  30. ccxt/async_support/coinlist.py +7 -7
  31. ccxt/async_support/coinmate.py +4 -4
  32. ccxt/async_support/coinmetro.py +3 -3
  33. ccxt/async_support/coinone.py +5 -5
  34. ccxt/async_support/coinspot.py +2 -2
  35. ccxt/async_support/cryptocom.py +17 -17
  36. ccxt/async_support/currencycom.py +1 -1
  37. ccxt/async_support/delta.py +0 -8
  38. ccxt/async_support/deribit.py +16 -80
  39. ccxt/async_support/digifinex.py +8 -8
  40. ccxt/async_support/exmo.py +8 -8
  41. ccxt/async_support/gate.py +0 -8
  42. ccxt/async_support/hitbtc.py +5 -4
  43. ccxt/async_support/hollaex.py +7 -7
  44. ccxt/async_support/htx.py +7 -7
  45. ccxt/async_support/huobijp.py +3 -3
  46. ccxt/async_support/idex.py +12 -12
  47. ccxt/async_support/independentreserve.py +2 -2
  48. ccxt/async_support/indodax.py +2 -2
  49. ccxt/async_support/kraken.py +8 -8
  50. ccxt/async_support/krakenfutures.py +6 -6
  51. ccxt/async_support/kucoin.py +4 -1
  52. ccxt/async_support/kucoinfutures.py +8 -8
  53. ccxt/async_support/kuna.py +16 -16
  54. ccxt/async_support/latoken.py +2 -2
  55. ccxt/async_support/lbank.py +10 -10
  56. ccxt/async_support/luno.py +4 -4
  57. ccxt/async_support/mercado.py +5 -5
  58. ccxt/async_support/mexc.py +6 -6
  59. ccxt/async_support/ndax.py +1 -1
  60. ccxt/async_support/novadax.py +9 -9
  61. ccxt/async_support/oceanex.py +7 -7
  62. ccxt/async_support/okcoin.py +15 -14
  63. ccxt/async_support/okx.py +23 -31
  64. ccxt/async_support/onetrading.py +4 -4
  65. ccxt/async_support/p2b.py +7 -7
  66. ccxt/async_support/phemex.py +12 -12
  67. ccxt/async_support/poloniexfutures.py +5 -5
  68. ccxt/async_support/probit.py +11 -11
  69. ccxt/async_support/timex.py +7 -7
  70. ccxt/async_support/tokocrypto.py +9 -9
  71. ccxt/async_support/wavesexchange.py +3 -3
  72. ccxt/async_support/whitebit.py +5 -5
  73. ccxt/async_support/woo.py +1 -1
  74. ccxt/async_support/zaif.py +1 -1
  75. ccxt/async_support/zonda.py +7 -7
  76. ccxt/base/exchange.py +66 -23
  77. ccxt/bigone.py +12 -12
  78. ccxt/binance.py +20 -32
  79. ccxt/bingx.py +45 -28
  80. ccxt/bit2c.py +1 -1
  81. ccxt/bitbank.py +27 -29
  82. ccxt/bitbns.py +5 -5
  83. ccxt/bitfinex.py +1 -1
  84. ccxt/bitfinex2.py +1 -1
  85. ccxt/bitget.py +29 -24
  86. ccxt/bithumb.py +5 -5
  87. ccxt/bitmart.py +16 -16
  88. ccxt/bitopro.py +1 -1
  89. ccxt/bitrue.py +4 -4
  90. ccxt/bitso.py +5 -5
  91. ccxt/bitstamp.py +1 -1
  92. ccxt/bitteam.py +8 -8
  93. ccxt/bl3p.py +1 -1
  94. ccxt/btcturk.py +6 -6
  95. ccxt/bybit.py +30 -83
  96. ccxt/coincheck.py +4 -4
  97. ccxt/coinex.py +404 -262
  98. ccxt/coinlist.py +7 -7
  99. ccxt/coinmate.py +4 -4
  100. ccxt/coinmetro.py +3 -3
  101. ccxt/coinone.py +5 -5
  102. ccxt/coinspot.py +2 -2
  103. ccxt/cryptocom.py +17 -17
  104. ccxt/currencycom.py +1 -1
  105. ccxt/delta.py +0 -8
  106. ccxt/deribit.py +16 -80
  107. ccxt/digifinex.py +8 -8
  108. ccxt/exmo.py +8 -8
  109. ccxt/gate.py +0 -8
  110. ccxt/hitbtc.py +5 -4
  111. ccxt/hollaex.py +7 -7
  112. ccxt/htx.py +7 -7
  113. ccxt/huobijp.py +3 -3
  114. ccxt/idex.py +12 -12
  115. ccxt/independentreserve.py +2 -2
  116. ccxt/indodax.py +2 -2
  117. ccxt/kraken.py +8 -8
  118. ccxt/krakenfutures.py +6 -6
  119. ccxt/kucoin.py +4 -1
  120. ccxt/kucoinfutures.py +8 -8
  121. ccxt/kuna.py +16 -16
  122. ccxt/latoken.py +2 -2
  123. ccxt/lbank.py +10 -10
  124. ccxt/luno.py +4 -4
  125. ccxt/mercado.py +5 -5
  126. ccxt/mexc.py +6 -6
  127. ccxt/ndax.py +1 -1
  128. ccxt/novadax.py +9 -9
  129. ccxt/oceanex.py +7 -7
  130. ccxt/okcoin.py +15 -14
  131. ccxt/okx.py +23 -31
  132. ccxt/onetrading.py +4 -4
  133. ccxt/p2b.py +7 -7
  134. ccxt/phemex.py +12 -12
  135. ccxt/poloniexfutures.py +5 -5
  136. ccxt/pro/__init__.py +1 -1
  137. ccxt/pro/binance.py +150 -112
  138. ccxt/pro/bitget.py +1 -0
  139. ccxt/pro/kucoin.py +6 -7
  140. ccxt/pro/okx.py +12 -1
  141. ccxt/probit.py +11 -11
  142. ccxt/timex.py +7 -7
  143. ccxt/tokocrypto.py +9 -9
  144. ccxt/wavesexchange.py +3 -3
  145. ccxt/whitebit.py +5 -5
  146. ccxt/woo.py +1 -1
  147. ccxt/zaif.py +1 -1
  148. ccxt/zonda.py +7 -7
  149. {ccxt-4.2.84.dist-info → ccxt-4.2.86.dist-info}/METADATA +6 -6
  150. {ccxt-4.2.84.dist-info → ccxt-4.2.86.dist-info}/RECORD +152 -152
  151. {ccxt-4.2.84.dist-info → ccxt-4.2.86.dist-info}/WHEEL +0 -0
  152. {ccxt-4.2.84.dist-info → ccxt-4.2.86.dist-info}/top_level.txt +0 -0
ccxt/coinlist.py CHANGED
@@ -708,7 +708,7 @@ class coinlist(Exchange, ImplicitAPI):
708
708
  # ]
709
709
  # }
710
710
  #
711
- candles = self.safe_value(response, 'candles', [])
711
+ candles = self.safe_list(response, 'candles', [])
712
712
  return self.parse_ohlcvs(candles, market, timeframe, since, limit)
713
713
 
714
714
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -781,7 +781,7 @@ class coinlist(Exchange, ImplicitAPI):
781
781
  # ]
782
782
  # }
783
783
  #
784
- auctions = self.safe_value(response, 'auctions', [])
784
+ auctions = self.safe_list(response, 'auctions', [])
785
785
  return self.parse_trades(auctions, market, since, limit)
786
786
 
787
787
  def parse_trade(self, trade, market: Market = None) -> Trade:
@@ -1163,7 +1163,7 @@ class coinlist(Exchange, ImplicitAPI):
1163
1163
  # ]
1164
1164
  # }
1165
1165
  #
1166
- fills = self.safe_value(response, 'fills', [])
1166
+ fills = self.safe_list(response, 'fills', [])
1167
1167
  return self.parse_trades(fills, market, since, limit)
1168
1168
 
1169
1169
  def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
@@ -1240,7 +1240,7 @@ class coinlist(Exchange, ImplicitAPI):
1240
1240
  # ]
1241
1241
  # }
1242
1242
  #
1243
- orders = self.safe_value(response, 'orders', [])
1243
+ orders = self.safe_list(response, 'orders', [])
1244
1244
  return self.parse_orders(orders, market, since, limit)
1245
1245
 
1246
1246
  def fetch_order(self, id: str, symbol: Str = None, params={}):
@@ -1458,7 +1458,7 @@ class coinlist(Exchange, ImplicitAPI):
1458
1458
  # "timestamp": "2023-10-26T11:30:55.376Z"
1459
1459
  # }
1460
1460
  #
1461
- order = self.safe_value(response, 'order', {})
1461
+ order = self.safe_dict(response, 'order', {})
1462
1462
  return self.parse_order(order, market)
1463
1463
 
1464
1464
  def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
@@ -1729,7 +1729,7 @@ class coinlist(Exchange, ImplicitAPI):
1729
1729
  # ]
1730
1730
  # }
1731
1731
  #
1732
- transfers = self.safe_value(response, 'transfers', [])
1732
+ transfers = self.safe_list(response, 'transfers', [])
1733
1733
  return self.parse_transfers(transfers, currency, since, limit)
1734
1734
 
1735
1735
  def parse_transfer(self, transfer, currency: Currency = None):
@@ -1889,7 +1889,7 @@ class coinlist(Exchange, ImplicitAPI):
1889
1889
  # "transfer_id": "d4a2d8dd-7def-4545-a062-761683b9aa05"
1890
1890
  # }
1891
1891
  #
1892
- data = self.safe_value(response, 'data', {})
1892
+ data = self.safe_dict(response, 'data', {})
1893
1893
  return self.parse_transaction(data, currency)
1894
1894
 
1895
1895
  def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
ccxt/coinmate.py CHANGED
@@ -395,7 +395,7 @@ class coinmate(Exchange, ImplicitAPI):
395
395
  # }
396
396
  # }
397
397
  #
398
- data = self.safe_value(response, 'data')
398
+ data = self.safe_dict(response, 'data')
399
399
  return self.parse_ticker(data, market)
400
400
 
401
401
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
@@ -660,7 +660,7 @@ class coinmate(Exchange, ImplicitAPI):
660
660
  if since is not None:
661
661
  request['timestampFrom'] = since
662
662
  response = self.privatePostTradeHistory(self.extend(request, params))
663
- data = self.safe_value(response, 'data', [])
663
+ data = self.safe_list(response, 'data', [])
664
664
  return self.parse_trades(data, None, since, limit)
665
665
 
666
666
  def parse_trade(self, trade, market: Market = None) -> Trade:
@@ -758,7 +758,7 @@ class coinmate(Exchange, ImplicitAPI):
758
758
  # ]
759
759
  # }
760
760
  #
761
- data = self.safe_value(response, 'data', [])
761
+ data = self.safe_list(response, 'data', [])
762
762
  return self.parse_trades(data, market, since, limit)
763
763
 
764
764
  def fetch_trading_fee(self, symbol: str, params={}):
@@ -985,7 +985,7 @@ class coinmate(Exchange, ImplicitAPI):
985
985
  if symbol:
986
986
  market = self.market(symbol)
987
987
  response = self.privatePostOrderById(self.extend(request, params))
988
- data = self.safe_value(response, 'data')
988
+ data = self.safe_dict(response, 'data')
989
989
  return self.parse_order(data, market)
990
990
 
991
991
  def cancel_order(self, id: str, symbol: Str = None, params={}):
ccxt/coinmetro.py CHANGED
@@ -532,7 +532,7 @@ class coinmetro(Exchange, ImplicitAPI):
532
532
  # ]
533
533
  # }
534
534
  #
535
- candleHistory = self.safe_value(response, 'candleHistory', [])
535
+ candleHistory = self.safe_list(response, 'candleHistory', [])
536
536
  return self.parse_ohlcvs(candleHistory, market, timeframe, since, limit)
537
537
 
538
538
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -594,7 +594,7 @@ class coinmetro(Exchange, ImplicitAPI):
594
594
  # ]
595
595
  # }
596
596
  #
597
- tickHistory = self.safe_value(response, 'tickHistory', [])
597
+ tickHistory = self.safe_list(response, 'tickHistory', [])
598
598
  return self.parse_trades(tickHistory, market, since, limit)
599
599
 
600
600
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -851,7 +851,7 @@ class coinmetro(Exchange, ImplicitAPI):
851
851
  """
852
852
  self.load_markets()
853
853
  response = self.publicGetExchangePrices(params)
854
- latestPrices = self.safe_value(response, 'latestPrices', [])
854
+ latestPrices = self.safe_list(response, 'latestPrices', [])
855
855
  return self.parse_tickers(latestPrices, symbols)
856
856
 
857
857
  def parse_ticker(self, ticker, market: Market = None) -> Ticker:
ccxt/coinone.py CHANGED
@@ -503,7 +503,7 @@ class coinone(Exchange, ImplicitAPI):
503
503
  # ]
504
504
  # }
505
505
  #
506
- data = self.safe_value(response, 'tickers', [])
506
+ data = self.safe_list(response, 'tickers', [])
507
507
  return self.parse_tickers(data, symbols)
508
508
 
509
509
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
@@ -555,7 +555,7 @@ class coinone(Exchange, ImplicitAPI):
555
555
  # }
556
556
  #
557
557
  data = self.safe_value(response, 'tickers', [])
558
- ticker = self.safe_value(data, 0, {})
558
+ ticker = self.safe_dict(data, 0, {})
559
559
  return self.parse_ticker(ticker, market)
560
560
 
561
561
  def parse_ticker(self, ticker, market: Market = None) -> Ticker:
@@ -714,7 +714,7 @@ class coinone(Exchange, ImplicitAPI):
714
714
  # ]
715
715
  # }
716
716
  #
717
- data = self.safe_value(response, 'transactions', [])
717
+ data = self.safe_list(response, 'transactions', [])
718
718
  return self.parse_trades(data, market, since, limit)
719
719
 
720
720
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
@@ -942,7 +942,7 @@ class coinone(Exchange, ImplicitAPI):
942
942
  # ]
943
943
  # }
944
944
  #
945
- limitOrders = self.safe_value(response, 'limitOrders', [])
945
+ limitOrders = self.safe_list(response, 'limitOrders', [])
946
946
  return self.parse_orders(limitOrders, market, since, limit)
947
947
 
948
948
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -982,7 +982,7 @@ class coinone(Exchange, ImplicitAPI):
982
982
  # ]
983
983
  # }
984
984
  #
985
- completeOrders = self.safe_value(response, 'completeOrders', [])
985
+ completeOrders = self.safe_list(response, 'completeOrders', [])
986
986
  return self.parse_trades(completeOrders, market, since, limit)
987
987
 
988
988
  def cancel_order(self, id: str, symbol: Str = None, params={}):
ccxt/coinspot.py CHANGED
@@ -274,7 +274,7 @@ class coinspot(Exchange, ImplicitAPI):
274
274
  # }
275
275
  # }
276
276
  #
277
- ticker = self.safe_value(prices, id)
277
+ ticker = self.safe_dict(prices, id)
278
278
  return self.parse_ticker(ticker, market)
279
279
 
280
280
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
@@ -340,7 +340,7 @@ class coinspot(Exchange, ImplicitAPI):
340
340
  # ],
341
341
  # }
342
342
  #
343
- trades = self.safe_value(response, 'orders', [])
343
+ trades = self.safe_list(response, 'orders', [])
344
344
  return self.parse_trades(trades, market, since, limit)
345
345
 
346
346
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
ccxt/cryptocom.py CHANGED
@@ -625,7 +625,7 @@ class cryptocom(Exchange, ImplicitAPI):
625
625
  # }
626
626
  #
627
627
  result = self.safe_value(response, 'result', {})
628
- data = self.safe_value(result, 'data', [])
628
+ data = self.safe_list(result, 'data', [])
629
629
  return self.parse_tickers(data, symbols)
630
630
 
631
631
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
@@ -712,7 +712,7 @@ class cryptocom(Exchange, ImplicitAPI):
712
712
  # }
713
713
  #
714
714
  data = self.safe_value(response, 'result', {})
715
- orders = self.safe_value(data, 'data', [])
715
+ orders = self.safe_list(data, 'data', [])
716
716
  return self.parse_orders(orders, market, since, limit)
717
717
 
718
718
  def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
@@ -766,7 +766,7 @@ class cryptocom(Exchange, ImplicitAPI):
766
766
  # }
767
767
  #
768
768
  result = self.safe_value(response, 'result', {})
769
- trades = self.safe_value(result, 'data', [])
769
+ trades = self.safe_list(result, 'data', [])
770
770
  return self.parse_trades(trades, market, since, limit)
771
771
 
772
772
  def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
@@ -823,7 +823,7 @@ class cryptocom(Exchange, ImplicitAPI):
823
823
  # }
824
824
  #
825
825
  result = self.safe_value(response, 'result', {})
826
- data = self.safe_value(result, 'data', [])
826
+ data = self.safe_list(result, 'data', [])
827
827
  return self.parse_ohlcvs(data, market, timeframe, since, limit)
828
828
 
829
829
  def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
@@ -985,7 +985,7 @@ class cryptocom(Exchange, ImplicitAPI):
985
985
  # }
986
986
  # }
987
987
  #
988
- order = self.safe_value(response, 'result', {})
988
+ order = self.safe_dict(response, 'result', {})
989
989
  return self.parse_order(order, market)
990
990
 
991
991
  def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
@@ -1102,7 +1102,7 @@ class cryptocom(Exchange, ImplicitAPI):
1102
1102
  # }
1103
1103
  # }
1104
1104
  #
1105
- result = self.safe_value(response, 'result', {})
1105
+ result = self.safe_dict(response, 'result', {})
1106
1106
  return self.parse_order(result, market)
1107
1107
 
1108
1108
  def create_orders(self, orders: List[OrderRequest], params={}):
@@ -1320,7 +1320,7 @@ class cryptocom(Exchange, ImplicitAPI):
1320
1320
  # }
1321
1321
  # }
1322
1322
  #
1323
- result = self.safe_value(response, 'result', {})
1323
+ result = self.safe_dict(response, 'result', {})
1324
1324
  return self.parse_order(result, market)
1325
1325
 
1326
1326
  def cancel_orders(self, ids, symbol: Str = None, params={}):
@@ -1349,7 +1349,7 @@ class cryptocom(Exchange, ImplicitAPI):
1349
1349
  'order_list': orderRequests,
1350
1350
  }
1351
1351
  response = self.v1PrivatePostPrivateCancelOrderList(self.extend(request, params))
1352
- result = self.safe_value(response, 'result', [])
1352
+ result = self.safe_list(response, 'result', [])
1353
1353
  return self.parse_orders(result, market, None, None, params)
1354
1354
 
1355
1355
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -1407,7 +1407,7 @@ class cryptocom(Exchange, ImplicitAPI):
1407
1407
  # }
1408
1408
  #
1409
1409
  data = self.safe_value(response, 'result', {})
1410
- orders = self.safe_value(data, 'data', [])
1410
+ orders = self.safe_list(data, 'data', [])
1411
1411
  return self.parse_orders(orders, market, since, limit)
1412
1412
 
1413
1413
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -1471,7 +1471,7 @@ class cryptocom(Exchange, ImplicitAPI):
1471
1471
  # }
1472
1472
  #
1473
1473
  result = self.safe_value(response, 'result', {})
1474
- trades = self.safe_value(result, 'data', [])
1474
+ trades = self.safe_list(result, 'data', [])
1475
1475
  return self.parse_trades(trades, market, since, limit)
1476
1476
 
1477
1477
  def parse_address(self, addressString):
@@ -1529,7 +1529,7 @@ class cryptocom(Exchange, ImplicitAPI):
1529
1529
  # }
1530
1530
  # }
1531
1531
  #
1532
- result = self.safe_value(response, 'result')
1532
+ result = self.safe_dict(response, 'result')
1533
1533
  return self.parse_transaction(result, currency)
1534
1534
 
1535
1535
  def fetch_deposit_addresses_by_network(self, code: str, params={}):
@@ -1667,7 +1667,7 @@ class cryptocom(Exchange, ImplicitAPI):
1667
1667
  # }
1668
1668
  #
1669
1669
  data = self.safe_value(response, 'result', {})
1670
- depositList = self.safe_value(data, 'deposit_list', [])
1670
+ depositList = self.safe_list(data, 'deposit_list', [])
1671
1671
  return self.parse_transactions(depositList, currency, since, limit)
1672
1672
 
1673
1673
  def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -1722,7 +1722,7 @@ class cryptocom(Exchange, ImplicitAPI):
1722
1722
  # }
1723
1723
  #
1724
1724
  data = self.safe_value(response, 'result', {})
1725
- withdrawalList = self.safe_value(data, 'withdrawal_list', [])
1725
+ withdrawalList = self.safe_list(data, 'withdrawal_list', [])
1726
1726
  return self.parse_transactions(withdrawalList, currency, since, limit)
1727
1727
 
1728
1728
  def parse_ticker(self, ticker, market: Market = None) -> Ticker:
@@ -2160,7 +2160,7 @@ class cryptocom(Exchange, ImplicitAPI):
2160
2160
  self.load_markets()
2161
2161
  response = self.v1PrivatePostPrivateGetCurrencyNetworks(params)
2162
2162
  data = self.safe_value(response, 'result')
2163
- currencyMap = self.safe_value(data, 'currency_map')
2163
+ currencyMap = self.safe_list(data, 'currency_map')
2164
2164
  return self.parse_deposit_withdraw_fees(currencyMap, codes, 'full_name')
2165
2165
 
2166
2166
  def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -2563,8 +2563,8 @@ class cryptocom(Exchange, ImplicitAPI):
2563
2563
  # }
2564
2564
  # }
2565
2565
  #
2566
- result = self.safe_value(response, 'result', {})
2567
- data = self.safe_value(result, 'data', [])
2566
+ result = self.safe_dict(response, 'result', {})
2567
+ data = self.safe_list(result, 'data', [])
2568
2568
  return self.parse_position(data[0], market)
2569
2569
 
2570
2570
  def fetch_positions(self, symbols: Strings = None, params={}):
@@ -2737,7 +2737,7 @@ class cryptocom(Exchange, ImplicitAPI):
2737
2737
  # }
2738
2738
  # }
2739
2739
  #
2740
- result = self.safe_value(response, 'result')
2740
+ result = self.safe_dict(response, 'result')
2741
2741
  return self.parse_order(result, market)
2742
2742
 
2743
2743
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
ccxt/currencycom.py CHANGED
@@ -1847,7 +1847,7 @@ class currencycom(Exchange, ImplicitAPI):
1847
1847
  # ]
1848
1848
  # }
1849
1849
  #
1850
- data = self.safe_value(response, 'positions', [])
1850
+ data = self.safe_list(response, 'positions', [])
1851
1851
  return self.parse_positions(data, symbols)
1852
1852
 
1853
1853
  def parse_position(self, position, market: Market = None):
ccxt/delta.py CHANGED
@@ -254,14 +254,6 @@ class delta(Exchange, ImplicitAPI):
254
254
  },
255
255
  })
256
256
 
257
- def convert_expire_date(self, date):
258
- # parse YYMMDD to timestamp
259
- year = date[0:2]
260
- month = date[2:4]
261
- day = date[4:6]
262
- reconstructedDate = '20' + year + '-' + month + '-' + day + 'T00:00:00Z'
263
- return reconstructedDate
264
-
265
257
  def create_expired_option_market(self, symbol: str):
266
258
  # support expired option contracts
267
259
  quote = 'USDT'
ccxt/deribit.py CHANGED
@@ -417,70 +417,6 @@ class deribit(Exchange, ImplicitAPI):
417
417
  },
418
418
  })
419
419
 
420
- def convert_expire_date(self, date):
421
- # parse YYMMDD to timestamp
422
- year = date[0:2]
423
- month = date[2:4]
424
- day = date[4:6]
425
- reconstructedDate = '20' + year + '-' + month + '-' + day + 'T00:00:00Z'
426
- return reconstructedDate
427
-
428
- def convert_market_id_expire_date(self, date):
429
- # parse 19JAN24 to 240119
430
- monthMappping = {
431
- 'JAN': '01',
432
- 'FEB': '02',
433
- 'MAR': '03',
434
- 'APR': '04',
435
- 'MAY': '05',
436
- 'JUN': '06',
437
- 'JUL': '07',
438
- 'AUG': '08',
439
- 'SEP': '09',
440
- 'OCT': '10',
441
- 'NOV': '11',
442
- 'DEC': '12',
443
- }
444
- year = date[0:2]
445
- monthName = date[2:5]
446
- month = self.safe_string(monthMappping, monthName)
447
- day = date[5:7]
448
- reconstructedDate = day + month + year
449
- return reconstructedDate
450
-
451
- def convert_expire_date_to_market_id_date(self, date):
452
- # parse 240119 to 19JAN24
453
- year = date[0:2]
454
- monthRaw = date[2:4]
455
- month = None
456
- day = date[4:6]
457
- if monthRaw == '01':
458
- month = 'JAN'
459
- elif monthRaw == '02':
460
- month = 'FEB'
461
- elif monthRaw == '03':
462
- month = 'MAR'
463
- elif monthRaw == '04':
464
- month = 'APR'
465
- elif monthRaw == '05':
466
- month = 'MAY'
467
- elif monthRaw == '06':
468
- month = 'JUN'
469
- elif monthRaw == '07':
470
- month = 'JUL'
471
- elif monthRaw == '08':
472
- month = 'AUG'
473
- elif monthRaw == '09':
474
- month = 'SEP'
475
- elif monthRaw == '10':
476
- month = 'OCT'
477
- elif monthRaw == '11':
478
- month = 'NOV'
479
- elif monthRaw == '12':
480
- month = 'DEC'
481
- reconstructedDate = day + month + year
482
- return reconstructedDate
483
-
484
420
  def create_expired_option_market(self, symbol: str):
485
421
  # support expired option contracts
486
422
  quote = 'USD'
@@ -1231,7 +1167,7 @@ class deribit(Exchange, ImplicitAPI):
1231
1167
  # "testnet": False
1232
1168
  # }
1233
1169
  #
1234
- result = self.safe_value(response, 'result')
1170
+ result = self.safe_dict(response, 'result')
1235
1171
  return self.parse_ticker(result, market)
1236
1172
 
1237
1173
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
@@ -1496,7 +1432,7 @@ class deribit(Exchange, ImplicitAPI):
1496
1432
  # }
1497
1433
  #
1498
1434
  result = self.safe_value(response, 'result', {})
1499
- trades = self.safe_value(result, 'trades', [])
1435
+ trades = self.safe_list(result, 'trades', [])
1500
1436
  return self.parse_trades(trades, market, since, limit)
1501
1437
 
1502
1438
  def fetch_trading_fees(self, params={}):
@@ -1836,7 +1772,7 @@ class deribit(Exchange, ImplicitAPI):
1836
1772
  # }
1837
1773
  # }
1838
1774
  #
1839
- result = self.safe_value(response, 'result')
1775
+ result = self.safe_dict(response, 'result')
1840
1776
  return self.parse_order(result, market)
1841
1777
 
1842
1778
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
@@ -2050,7 +1986,7 @@ class deribit(Exchange, ImplicitAPI):
2050
1986
  'order_id': id,
2051
1987
  }
2052
1988
  response = self.privateGetCancel(self.extend(request, params))
2053
- result = self.safe_value(response, 'result', {})
1989
+ result = self.safe_dict(response, 'result', {})
2054
1990
  return self.parse_order(result)
2055
1991
 
2056
1992
  def cancel_all_orders(self, symbol: Str = None, params={}):
@@ -2097,7 +2033,7 @@ class deribit(Exchange, ImplicitAPI):
2097
2033
  market = self.market(symbol)
2098
2034
  request['instrument_name'] = market['id']
2099
2035
  response = self.privateGetGetOpenOrdersByInstrument(self.extend(request, params))
2100
- result = self.safe_value(response, 'result', [])
2036
+ result = self.safe_list(response, 'result', [])
2101
2037
  return self.parse_orders(result, market, since, limit)
2102
2038
 
2103
2039
  def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -2124,7 +2060,7 @@ class deribit(Exchange, ImplicitAPI):
2124
2060
  market = self.market(symbol)
2125
2061
  request['instrument_name'] = market['id']
2126
2062
  response = self.privateGetGetOrderHistoryByInstrument(self.extend(request, params))
2127
- result = self.safe_value(response, 'result', [])
2063
+ result = self.safe_list(response, 'result', [])
2128
2064
  return self.parse_orders(result, market, since, limit)
2129
2065
 
2130
2066
  def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -2176,7 +2112,7 @@ class deribit(Exchange, ImplicitAPI):
2176
2112
  # }
2177
2113
  # }
2178
2114
  #
2179
- result = self.safe_value(response, 'result', {})
2115
+ result = self.safe_list(response, 'result', [])
2180
2116
  return self.parse_trades(result, None, since, limit)
2181
2117
 
2182
2118
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -2251,7 +2187,7 @@ class deribit(Exchange, ImplicitAPI):
2251
2187
  # }
2252
2188
  #
2253
2189
  result = self.safe_value(response, 'result', {})
2254
- trades = self.safe_value(result, 'trades', [])
2190
+ trades = self.safe_list(result, 'trades', [])
2255
2191
  return self.parse_trades(trades, market, since, limit)
2256
2192
 
2257
2193
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -2295,7 +2231,7 @@ class deribit(Exchange, ImplicitAPI):
2295
2231
  # }
2296
2232
  #
2297
2233
  result = self.safe_value(response, 'result', {})
2298
- data = self.safe_value(result, 'data', [])
2234
+ data = self.safe_list(result, 'data', [])
2299
2235
  return self.parse_transactions(data, currency, since, limit, params)
2300
2236
 
2301
2237
  def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -2343,7 +2279,7 @@ class deribit(Exchange, ImplicitAPI):
2343
2279
  # }
2344
2280
  #
2345
2281
  result = self.safe_value(response, 'result', {})
2346
- data = self.safe_value(result, 'data', [])
2282
+ data = self.safe_list(result, 'data', [])
2347
2283
  return self.parse_transactions(data, currency, since, limit, params)
2348
2284
 
2349
2285
  def parse_transaction_status(self, status):
@@ -2527,7 +2463,7 @@ class deribit(Exchange, ImplicitAPI):
2527
2463
  # }
2528
2464
  # }
2529
2465
  #
2530
- result = self.safe_value(response, 'result')
2466
+ result = self.safe_dict(response, 'result')
2531
2467
  return self.parse_position(result)
2532
2468
 
2533
2469
  def fetch_positions(self, symbols: Strings = None, params={}):
@@ -2592,7 +2528,7 @@ class deribit(Exchange, ImplicitAPI):
2592
2528
  # ]
2593
2529
  # }
2594
2530
  #
2595
- result = self.safe_value(response, 'result')
2531
+ result = self.safe_list(response, 'result')
2596
2532
  return self.parse_positions(result, symbols)
2597
2533
 
2598
2534
  def fetch_volatility_history(self, code: str, params={}):
@@ -2707,7 +2643,7 @@ class deribit(Exchange, ImplicitAPI):
2707
2643
  # }
2708
2644
  #
2709
2645
  result = self.safe_value(response, 'result', {})
2710
- transfers = self.safe_value(result, 'data', [])
2646
+ transfers = self.safe_list(result, 'data', [])
2711
2647
  return self.parse_transfers(transfers, currency, since, limit, params)
2712
2648
 
2713
2649
  def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
@@ -2756,7 +2692,7 @@ class deribit(Exchange, ImplicitAPI):
2756
2692
  # }
2757
2693
  # }
2758
2694
  #
2759
- result = self.safe_value(response, 'result', {})
2695
+ result = self.safe_dict(response, 'result', {})
2760
2696
  return self.parse_transfer(result, currency)
2761
2697
 
2762
2698
  def parse_transfer(self, transfer, currency: Currency = None):
@@ -2884,7 +2820,7 @@ class deribit(Exchange, ImplicitAPI):
2884
2820
  # "testnet": True
2885
2821
  # }
2886
2822
  #
2887
- data = self.safe_value(response, 'result', {})
2823
+ data = self.safe_list(response, 'result', [])
2888
2824
  return self.parse_deposit_withdraw_fees(data, codes, 'currency')
2889
2825
 
2890
2826
  def fetch_funding_rate(self, symbol: str, params={}):
@@ -3129,7 +3065,7 @@ class deribit(Exchange, ImplicitAPI):
3129
3065
  # }
3130
3066
  #
3131
3067
  result = self.safe_value(response, 'result', {})
3132
- settlements = self.safe_value(result, 'settlements', [])
3068
+ settlements = self.safe_list(result, 'settlements', [])
3133
3069
  return self.parse_liquidations(settlements, market, since, limit)
3134
3070
 
3135
3071
  def parse_liquidation(self, liquidation, market: Market = None):
ccxt/digifinex.py CHANGED
@@ -1396,7 +1396,7 @@ class digifinex(Exchange, ImplicitAPI):
1396
1396
  # ]
1397
1397
  # }
1398
1398
  #
1399
- data = self.safe_value(response, 'data', [])
1399
+ data = self.safe_list(response, 'data', [])
1400
1400
  return self.parse_trades(data, market, since, limit)
1401
1401
 
1402
1402
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -2079,7 +2079,7 @@ class digifinex(Exchange, ImplicitAPI):
2079
2079
  # ]
2080
2080
  # }
2081
2081
  #
2082
- data = self.safe_value(response, 'data', [])
2082
+ data = self.safe_list(response, 'data', [])
2083
2083
  return self.parse_orders(data, market, since, limit)
2084
2084
 
2085
2085
  def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -2174,7 +2174,7 @@ class digifinex(Exchange, ImplicitAPI):
2174
2174
  # ]
2175
2175
  # }
2176
2176
  #
2177
- data = self.safe_value(response, 'data', [])
2177
+ data = self.safe_list(response, 'data', [])
2178
2178
  return self.parse_orders(data, market, since, limit)
2179
2179
 
2180
2180
  def fetch_order(self, id: str, symbol: Str = None, params={}):
@@ -2353,7 +2353,7 @@ class digifinex(Exchange, ImplicitAPI):
2353
2353
  # }
2354
2354
  #
2355
2355
  responseRequest = 'data' if (marketType == 'swap') else 'list'
2356
- data = self.safe_value(response, responseRequest, [])
2356
+ data = self.safe_list(response, responseRequest, [])
2357
2357
  return self.parse_trades(data, market, since, limit)
2358
2358
 
2359
2359
  def parse_ledger_entry_type(self, type):
@@ -2580,7 +2580,7 @@ class digifinex(Exchange, ImplicitAPI):
2580
2580
  # ]
2581
2581
  # }
2582
2582
  #
2583
- data = self.safe_value(response, 'data', [])
2583
+ data = self.safe_list(response, 'data', [])
2584
2584
  return self.parse_transactions(data, currency, since, limit, {'type': type})
2585
2585
 
2586
2586
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -3472,7 +3472,7 @@ class digifinex(Exchange, ImplicitAPI):
3472
3472
  # ]
3473
3473
  # }
3474
3474
  #
3475
- transfers = self.safe_value(response, 'data', [])
3475
+ transfers = self.safe_list(response, 'data', [])
3476
3476
  return self.parse_transfers(transfers, currency, since, limit)
3477
3477
 
3478
3478
  def fetch_leverage_tiers(self, symbols: Strings = None, params={}):
@@ -3708,7 +3708,7 @@ class digifinex(Exchange, ImplicitAPI):
3708
3708
  # "code": 200,
3709
3709
  # }
3710
3710
  #
3711
- data = self.safe_value(response, 'data')
3711
+ data = self.safe_list(response, 'data')
3712
3712
  return self.parse_deposit_withdraw_fees(data, codes)
3713
3713
 
3714
3714
  def parse_deposit_withdraw_fees(self, response, codes=None, currencyIdKey=None):
@@ -3890,7 +3890,7 @@ class digifinex(Exchange, ImplicitAPI):
3890
3890
  # ]
3891
3891
  # }
3892
3892
  #
3893
- data = self.safe_value(response, 'data', [])
3893
+ data = self.safe_list(response, 'data', [])
3894
3894
  return self.parse_incomes(data, market, since, limit)
3895
3895
 
3896
3896
  def parse_income(self, income, market: Market = None):