ccxt 4.2.84__py2.py3-none-any.whl → 4.2.85__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 (150) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ace.py +5 -5
  3. ccxt/ascendex.py +8 -8
  4. ccxt/async_support/__init__.py +1 -1
  5. ccxt/async_support/ace.py +5 -5
  6. ccxt/async_support/ascendex.py +8 -8
  7. ccxt/async_support/base/exchange.py +3 -27
  8. ccxt/async_support/bigone.py +12 -12
  9. ccxt/async_support/binance.py +20 -32
  10. ccxt/async_support/bingx.py +12 -9
  11. ccxt/async_support/bit2c.py +1 -1
  12. ccxt/async_support/bitbank.py +8 -8
  13. ccxt/async_support/bitbns.py +5 -5
  14. ccxt/async_support/bitfinex.py +1 -1
  15. ccxt/async_support/bitfinex2.py +1 -1
  16. ccxt/async_support/bitget.py +29 -24
  17. ccxt/async_support/bithumb.py +5 -5
  18. ccxt/async_support/bitmart.py +16 -16
  19. ccxt/async_support/bitopro.py +1 -1
  20. ccxt/async_support/bitrue.py +4 -4
  21. ccxt/async_support/bitso.py +5 -5
  22. ccxt/async_support/bitstamp.py +1 -1
  23. ccxt/async_support/bitteam.py +8 -8
  24. ccxt/async_support/bl3p.py +1 -1
  25. ccxt/async_support/btcturk.py +6 -6
  26. ccxt/async_support/bybit.py +30 -83
  27. ccxt/async_support/coincheck.py +4 -4
  28. ccxt/async_support/coinex.py +11 -11
  29. ccxt/async_support/coinlist.py +7 -7
  30. ccxt/async_support/coinmate.py +4 -4
  31. ccxt/async_support/coinmetro.py +3 -3
  32. ccxt/async_support/coinone.py +5 -5
  33. ccxt/async_support/coinspot.py +2 -2
  34. ccxt/async_support/cryptocom.py +17 -17
  35. ccxt/async_support/currencycom.py +1 -1
  36. ccxt/async_support/delta.py +0 -8
  37. ccxt/async_support/deribit.py +16 -80
  38. ccxt/async_support/digifinex.py +8 -8
  39. ccxt/async_support/exmo.py +8 -8
  40. ccxt/async_support/gate.py +0 -8
  41. ccxt/async_support/hitbtc.py +5 -4
  42. ccxt/async_support/hollaex.py +7 -7
  43. ccxt/async_support/htx.py +7 -7
  44. ccxt/async_support/huobijp.py +3 -3
  45. ccxt/async_support/idex.py +2 -2
  46. ccxt/async_support/independentreserve.py +2 -2
  47. ccxt/async_support/indodax.py +2 -2
  48. ccxt/async_support/kraken.py +8 -8
  49. ccxt/async_support/krakenfutures.py +6 -6
  50. ccxt/async_support/kucoin.py +4 -1
  51. ccxt/async_support/kucoinfutures.py +8 -8
  52. ccxt/async_support/kuna.py +16 -16
  53. ccxt/async_support/latoken.py +2 -2
  54. ccxt/async_support/lbank.py +10 -10
  55. ccxt/async_support/luno.py +4 -4
  56. ccxt/async_support/mercado.py +5 -5
  57. ccxt/async_support/mexc.py +6 -6
  58. ccxt/async_support/ndax.py +1 -1
  59. ccxt/async_support/novadax.py +9 -9
  60. ccxt/async_support/oceanex.py +7 -7
  61. ccxt/async_support/okcoin.py +13 -13
  62. ccxt/async_support/okx.py +23 -31
  63. ccxt/async_support/onetrading.py +4 -4
  64. ccxt/async_support/p2b.py +7 -7
  65. ccxt/async_support/phemex.py +12 -12
  66. ccxt/async_support/poloniexfutures.py +5 -5
  67. ccxt/async_support/probit.py +11 -11
  68. ccxt/async_support/timex.py +7 -7
  69. ccxt/async_support/tokocrypto.py +9 -9
  70. ccxt/async_support/wavesexchange.py +3 -3
  71. ccxt/async_support/whitebit.py +5 -5
  72. ccxt/async_support/woo.py +1 -1
  73. ccxt/async_support/zaif.py +1 -1
  74. ccxt/async_support/zonda.py +7 -7
  75. ccxt/base/exchange.py +66 -23
  76. ccxt/bigone.py +12 -12
  77. ccxt/binance.py +20 -32
  78. ccxt/bingx.py +12 -9
  79. ccxt/bit2c.py +1 -1
  80. ccxt/bitbank.py +8 -8
  81. ccxt/bitbns.py +5 -5
  82. ccxt/bitfinex.py +1 -1
  83. ccxt/bitfinex2.py +1 -1
  84. ccxt/bitget.py +29 -24
  85. ccxt/bithumb.py +5 -5
  86. ccxt/bitmart.py +16 -16
  87. ccxt/bitopro.py +1 -1
  88. ccxt/bitrue.py +4 -4
  89. ccxt/bitso.py +5 -5
  90. ccxt/bitstamp.py +1 -1
  91. ccxt/bitteam.py +8 -8
  92. ccxt/bl3p.py +1 -1
  93. ccxt/btcturk.py +6 -6
  94. ccxt/bybit.py +30 -83
  95. ccxt/coincheck.py +4 -4
  96. ccxt/coinex.py +11 -11
  97. ccxt/coinlist.py +7 -7
  98. ccxt/coinmate.py +4 -4
  99. ccxt/coinmetro.py +3 -3
  100. ccxt/coinone.py +5 -5
  101. ccxt/coinspot.py +2 -2
  102. ccxt/cryptocom.py +17 -17
  103. ccxt/currencycom.py +1 -1
  104. ccxt/delta.py +0 -8
  105. ccxt/deribit.py +16 -80
  106. ccxt/digifinex.py +8 -8
  107. ccxt/exmo.py +8 -8
  108. ccxt/gate.py +0 -8
  109. ccxt/hitbtc.py +5 -4
  110. ccxt/hollaex.py +7 -7
  111. ccxt/htx.py +7 -7
  112. ccxt/huobijp.py +3 -3
  113. ccxt/idex.py +2 -2
  114. ccxt/independentreserve.py +2 -2
  115. ccxt/indodax.py +2 -2
  116. ccxt/kraken.py +8 -8
  117. ccxt/krakenfutures.py +6 -6
  118. ccxt/kucoin.py +4 -1
  119. ccxt/kucoinfutures.py +8 -8
  120. ccxt/kuna.py +16 -16
  121. ccxt/latoken.py +2 -2
  122. ccxt/lbank.py +10 -10
  123. ccxt/luno.py +4 -4
  124. ccxt/mercado.py +5 -5
  125. ccxt/mexc.py +6 -6
  126. ccxt/ndax.py +1 -1
  127. ccxt/novadax.py +9 -9
  128. ccxt/oceanex.py +7 -7
  129. ccxt/okcoin.py +13 -13
  130. ccxt/okx.py +23 -31
  131. ccxt/onetrading.py +4 -4
  132. ccxt/p2b.py +7 -7
  133. ccxt/phemex.py +12 -12
  134. ccxt/poloniexfutures.py +5 -5
  135. ccxt/pro/__init__.py +1 -1
  136. ccxt/pro/binance.py +150 -112
  137. ccxt/pro/kucoin.py +6 -7
  138. ccxt/pro/okx.py +12 -1
  139. ccxt/probit.py +11 -11
  140. ccxt/timex.py +7 -7
  141. ccxt/tokocrypto.py +9 -9
  142. ccxt/wavesexchange.py +3 -3
  143. ccxt/whitebit.py +5 -5
  144. ccxt/woo.py +1 -1
  145. ccxt/zaif.py +1 -1
  146. ccxt/zonda.py +7 -7
  147. {ccxt-4.2.84.dist-info → ccxt-4.2.85.dist-info}/METADATA +4 -4
  148. {ccxt-4.2.84.dist-info → ccxt-4.2.85.dist-info}/RECORD +150 -150
  149. {ccxt-4.2.84.dist-info → ccxt-4.2.85.dist-info}/WHEEL +0 -0
  150. {ccxt-4.2.84.dist-info → ccxt-4.2.85.dist-info}/top_level.txt +0 -0
ccxt/bitget.py CHANGED
@@ -2148,7 +2148,7 @@ class bitget(Exchange, ImplicitAPI):
2148
2148
  # ]
2149
2149
  # }
2150
2150
  #
2151
- rawTransactions = self.safe_value(response, 'data', [])
2151
+ rawTransactions = self.safe_list(response, 'data', [])
2152
2152
  return self.parse_transactions(rawTransactions, currency, since, limit)
2153
2153
 
2154
2154
  def withdraw(self, code: str, amount: float, address, tag=None, params={}):
@@ -2285,7 +2285,7 @@ class bitget(Exchange, ImplicitAPI):
2285
2285
  # ]
2286
2286
  # }
2287
2287
  #
2288
- rawTransactions = self.safe_value(response, 'data', [])
2288
+ rawTransactions = self.safe_list(response, 'data', [])
2289
2289
  return self.parse_transactions(rawTransactions, currency, since, limit)
2290
2290
 
2291
2291
  def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
@@ -2408,7 +2408,7 @@ class bitget(Exchange, ImplicitAPI):
2408
2408
  # }
2409
2409
  # }
2410
2410
  #
2411
- data = self.safe_value(response, 'data', {})
2411
+ data = self.safe_dict(response, 'data', {})
2412
2412
  return self.parse_deposit_address(data, currency)
2413
2413
 
2414
2414
  def parse_deposit_address(self, depositAddress, currency: Currency = None):
@@ -2681,7 +2681,7 @@ class bitget(Exchange, ImplicitAPI):
2681
2681
  # ]
2682
2682
  # }
2683
2683
  #
2684
- data = self.safe_value(response, 'data', [])
2684
+ data = self.safe_list(response, 'data', [])
2685
2685
  return self.parse_ticker(data[0], market)
2686
2686
 
2687
2687
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
@@ -2778,7 +2778,7 @@ class bitget(Exchange, ImplicitAPI):
2778
2778
  # ]
2779
2779
  # }
2780
2780
  #
2781
- data = self.safe_value(response, 'data', [])
2781
+ data = self.safe_list(response, 'data', [])
2782
2782
  return self.parse_tickers(data, symbols)
2783
2783
 
2784
2784
  def parse_trade(self, trade, market: Market = None) -> Trade:
@@ -2999,7 +2999,7 @@ class bitget(Exchange, ImplicitAPI):
2999
2999
  # ]
3000
3000
  # }
3001
3001
  #
3002
- data = self.safe_value(response, 'data', [])
3002
+ data = self.safe_list(response, 'data', [])
3003
3003
  return self.parse_trades(data, market, since, limit)
3004
3004
 
3005
3005
  def fetch_trading_fee(self, symbol: str, params={}):
@@ -4007,7 +4007,7 @@ class bitget(Exchange, ImplicitAPI):
4007
4007
  # }
4008
4008
  # }
4009
4009
  #
4010
- data = self.safe_value(response, 'data', {})
4010
+ data = self.safe_dict(response, 'data', {})
4011
4011
  return self.parse_order(data, market)
4012
4012
 
4013
4013
  def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
@@ -4424,7 +4424,7 @@ class bitget(Exchange, ImplicitAPI):
4424
4424
  # }
4425
4425
  # }
4426
4426
  #
4427
- data = self.safe_value(response, 'data', {})
4427
+ data = self.safe_dict(response, 'data', {})
4428
4428
  return self.parse_order(data, market)
4429
4429
 
4430
4430
  def cancel_order(self, id: str, symbol: Str = None, params={}):
@@ -4625,7 +4625,7 @@ class bitget(Exchange, ImplicitAPI):
4625
4625
  # }
4626
4626
  #
4627
4627
  data = self.safe_value(response, 'data', {})
4628
- orders = self.safe_value(data, 'successList', [])
4628
+ orders = self.safe_list(data, 'successList', [])
4629
4629
  return self.parse_orders(orders, market)
4630
4630
 
4631
4631
  def cancel_all_orders(self, symbol: Str = None, params={}):
@@ -4832,9 +4832,14 @@ class bitget(Exchange, ImplicitAPI):
4832
4832
  #
4833
4833
  if isinstance(response, str):
4834
4834
  response = json.loads(response)
4835
- data = self.safe_value(response, 'data')
4836
- first = self.safe_value(data, 0, data)
4835
+ data = self.safe_dict(response, 'data')
4836
+ if (data is not None) and not isinstance(data, list):
4837
+ return self.parse_order(data, market)
4838
+ dataList = self.safe_list(response, 'data', [])
4839
+ first = self.safe_dict(dataList, 0, {})
4837
4840
  return self.parse_order(first, market)
4841
+ # first = self.safe_dict(data, 0, data)
4842
+ # return self.parse_order(first, market)
4838
4843
 
4839
4844
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4840
4845
  """
@@ -5111,10 +5116,10 @@ class bitget(Exchange, ImplicitAPI):
5111
5116
  data = self.safe_value(response, 'data')
5112
5117
  if type == 'spot':
5113
5118
  if (marginMode is not None) or stop:
5114
- resultList = self.safe_value(data, 'orderList', [])
5119
+ resultList = self.safe_list(data, 'orderList', [])
5115
5120
  return self.parse_orders(resultList, market, since, limit)
5116
5121
  else:
5117
- result = self.safe_value(data, 'entrustedList', [])
5122
+ result = self.safe_list(data, 'entrustedList', [])
5118
5123
  return self.parse_orders(result, market, since, limit)
5119
5124
  return self.parse_orders(data, market, since, limit)
5120
5125
 
@@ -5444,7 +5449,7 @@ class bitget(Exchange, ImplicitAPI):
5444
5449
  return self.parse_orders(self.safe_value(data, 'entrustedList', []), market, since, limit)
5445
5450
  if isinstance(response, str):
5446
5451
  response = json.loads(response)
5447
- orders = self.safe_value(response, 'data', [])
5452
+ orders = self.safe_list(response, 'data', [])
5448
5453
  return self.parse_orders(orders, market, since, limit)
5449
5454
 
5450
5455
  def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -5815,10 +5820,10 @@ class bitget(Exchange, ImplicitAPI):
5815
5820
  #
5816
5821
  data = self.safe_value(response, 'data')
5817
5822
  if (market['swap']) or (market['future']):
5818
- fillList = self.safe_value(data, 'fillList', [])
5823
+ fillList = self.safe_list(data, 'fillList', [])
5819
5824
  return self.parse_trades(fillList, market, since, limit)
5820
5825
  elif marginMode is not None:
5821
- fills = self.safe_value(data, 'fills', [])
5826
+ fills = self.safe_list(data, 'fills', [])
5822
5827
  return self.parse_trades(fills, market, since, limit)
5823
5828
  return self.parse_trades(data, market, since, limit)
5824
5829
 
@@ -5876,8 +5881,8 @@ class bitget(Exchange, ImplicitAPI):
5876
5881
  # ]
5877
5882
  # }
5878
5883
  #
5879
- data = self.safe_value(response, 'data', [])
5880
- first = self.safe_value(data, 0, {})
5884
+ data = self.safe_list(response, 'data', [])
5885
+ first = self.safe_dict(data, 0, {})
5881
5886
  return self.parse_position(first, market)
5882
5887
 
5883
5888
  def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
@@ -6738,7 +6743,7 @@ class bitget(Exchange, ImplicitAPI):
6738
6743
  # }
6739
6744
  # }
6740
6745
  #
6741
- data = self.safe_value(response, 'data', {})
6746
+ data = self.safe_dict(response, 'data', {})
6742
6747
  return self.parse_open_interest(data, market)
6743
6748
 
6744
6749
  def parse_open_interest(self, interest, market: Market = None):
@@ -6817,7 +6822,7 @@ class bitget(Exchange, ImplicitAPI):
6817
6822
  # ]
6818
6823
  # }
6819
6824
  #
6820
- data = self.safe_value(response, 'data', [])
6825
+ data = self.safe_list(response, 'data', [])
6821
6826
  return self.parse_transfers(data, currency, since, limit)
6822
6827
 
6823
6828
  def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
@@ -7007,7 +7012,7 @@ class bitget(Exchange, ImplicitAPI):
7007
7012
  # "requestTime": "1700120731773"
7008
7013
  # }
7009
7014
  #
7010
- data = self.safe_value(response, 'data', [])
7015
+ data = self.safe_list(response, 'data', [])
7011
7016
  return self.parse_deposit_withdraw_fees(data, codes, 'coin')
7012
7017
 
7013
7018
  def borrow_cross_margin(self, code: str, amount: float, params={}):
@@ -7294,7 +7299,7 @@ class bitget(Exchange, ImplicitAPI):
7294
7299
  # }
7295
7300
  #
7296
7301
  data = self.safe_value(response, 'data', {})
7297
- liquidations = self.safe_value(data, 'resultList', [])
7302
+ liquidations = self.safe_list(data, 'resultList', [])
7298
7303
  return self.parse_liquidations(liquidations, market, since, limit)
7299
7304
 
7300
7305
  def parse_liquidation(self, liquidation, market: Market = None):
@@ -7722,7 +7727,7 @@ class bitget(Exchange, ImplicitAPI):
7722
7727
  # }
7723
7728
  #
7724
7729
  data = self.safe_value(response, 'data', {})
7725
- order = self.safe_value(data, 'successList', [])
7730
+ order = self.safe_list(data, 'successList', [])
7726
7731
  return self.parse_order(order[0], market)
7727
7732
 
7728
7733
  def close_all_positions(self, params={}) -> List[Position]:
@@ -7758,7 +7763,7 @@ class bitget(Exchange, ImplicitAPI):
7758
7763
  # }
7759
7764
  #
7760
7765
  data = self.safe_value(response, 'data', {})
7761
- orderInfo = self.safe_value(data, 'successList', [])
7766
+ orderInfo = self.safe_list(data, 'successList', [])
7762
7767
  return self.parse_positions(orderInfo, None, params)
7763
7768
 
7764
7769
  def fetch_margin_mode(self, symbol: str, params={}) -> MarginMode:
ccxt/bithumb.py CHANGED
@@ -487,7 +487,7 @@ class bithumb(Exchange, ImplicitAPI):
487
487
  # }
488
488
  # }
489
489
  #
490
- data = self.safe_value(response, 'data', {})
490
+ data = self.safe_dict(response, 'data', {})
491
491
  return self.parse_ticker(data, market)
492
492
 
493
493
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -552,7 +552,7 @@ class bithumb(Exchange, ImplicitAPI):
552
552
  # }
553
553
  # }
554
554
  #
555
- data = self.safe_value(response, 'data', [])
555
+ data = self.safe_list(response, 'data', [])
556
556
  return self.parse_ohlcvs(data, market, timeframe, since, limit)
557
557
 
558
558
  def parse_trade(self, trade, market: Market = None) -> Trade:
@@ -660,7 +660,7 @@ class bithumb(Exchange, ImplicitAPI):
660
660
  # ]
661
661
  # }
662
662
  #
663
- data = self.safe_value(response, 'data', [])
663
+ data = self.safe_list(response, 'data', [])
664
664
  return self.parse_trades(data, market, since, limit)
665
665
 
666
666
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
@@ -748,7 +748,7 @@ class bithumb(Exchange, ImplicitAPI):
748
748
  # }
749
749
  # }
750
750
  #
751
- data = self.safe_value(response, 'data')
751
+ data = self.safe_dict(response, 'data')
752
752
  return self.parse_order(self.extend(data, {'order_id': id}), market)
753
753
 
754
754
  def parse_order_status(self, status):
@@ -893,7 +893,7 @@ class bithumb(Exchange, ImplicitAPI):
893
893
  # ]
894
894
  # }
895
895
  #
896
- data = self.safe_value(response, 'data', [])
896
+ data = self.safe_list(response, 'data', [])
897
897
  return self.parse_orders(data, market, since, limit)
898
898
 
899
899
  def cancel_order(self, id: str, symbol: Str = None, params={}):
ccxt/bitmart.py CHANGED
@@ -1302,7 +1302,7 @@ class bitmart(Exchange, ImplicitAPI):
1302
1302
  tickersById = self.index_by(tickers, 'symbol')
1303
1303
  elif market['swap']:
1304
1304
  tickersById = self.index_by(tickers, 'contract_symbol')
1305
- ticker = self.safe_value(tickersById, market['id'])
1305
+ ticker = self.safe_dict(tickersById, market['id'])
1306
1306
  return self.parse_ticker(ticker, market)
1307
1307
 
1308
1308
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
@@ -1549,7 +1549,7 @@ class bitmart(Exchange, ImplicitAPI):
1549
1549
  # }
1550
1550
  #
1551
1551
  data = self.safe_value(response, 'data', {})
1552
- trades = self.safe_value(data, 'trades', [])
1552
+ trades = self.safe_list(data, 'trades', [])
1553
1553
  return self.parse_trades(trades, market, since, limit)
1554
1554
 
1555
1555
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -1703,7 +1703,7 @@ class bitmart(Exchange, ImplicitAPI):
1703
1703
  # "trace": "96c989db-e0f5-46f5-bba6-60cfcbde699b"
1704
1704
  # }
1705
1705
  #
1706
- ohlcv = self.safe_value(response, 'data', [])
1706
+ ohlcv = self.safe_list(response, 'data', [])
1707
1707
  return self.parse_ohlcvs(ohlcv, market, timeframe, since, limit)
1708
1708
 
1709
1709
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -1806,7 +1806,7 @@ class bitmart(Exchange, ImplicitAPI):
1806
1806
  # "trace": "4cad855074634097ac6ba5257c47305d.62.16959616054873723"
1807
1807
  # }
1808
1808
  #
1809
- data = self.safe_value(response, 'data', [])
1809
+ data = self.safe_list(response, 'data', [])
1810
1810
  return self.parse_trades(data, market, since, limit)
1811
1811
 
1812
1812
  def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -1825,7 +1825,7 @@ class bitmart(Exchange, ImplicitAPI):
1825
1825
  'orderId': id,
1826
1826
  }
1827
1827
  response = self.privatePostSpotV4QueryOrderTrades(self.extend(request, params))
1828
- data = self.safe_value(response, 'data', {})
1828
+ data = self.safe_list(response, 'data', [])
1829
1829
  return self.parse_trades(data, None, since, limit)
1830
1830
 
1831
1831
  def custom_parse_balance(self, response, marketType) -> Balances:
@@ -2616,7 +2616,7 @@ class bitmart(Exchange, ImplicitAPI):
2616
2616
  # }
2617
2617
  #
2618
2618
  data = self.safe_value(response, 'data', {})
2619
- orders = self.safe_value(data, 'orders', [])
2619
+ orders = self.safe_list(data, 'orders', [])
2620
2620
  return self.parse_orders(orders, market, since, limit)
2621
2621
 
2622
2622
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -2731,7 +2731,7 @@ class bitmart(Exchange, ImplicitAPI):
2731
2731
  # "trace": "7f9d94g10f9d4513bc08a7rfc3a5559a.71.16957022303515933"
2732
2732
  # }
2733
2733
  #
2734
- data = self.safe_value(response, 'data', [])
2734
+ data = self.safe_list(response, 'data', [])
2735
2735
  return self.parse_orders(data, market, since, limit)
2736
2736
 
2737
2737
  def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -2775,7 +2775,7 @@ class bitmart(Exchange, ImplicitAPI):
2775
2775
  response = self.privatePostSpotV4QueryHistoryOrders(self.extend(request, params))
2776
2776
  else:
2777
2777
  response = self.privateGetContractPrivateOrderHistory(self.extend(request, params))
2778
- data = self.safe_value(response, 'data', [])
2778
+ data = self.safe_list(response, 'data', [])
2779
2779
  return self.parse_orders(data, market, since, limit)
2780
2780
 
2781
2781
  def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -2882,7 +2882,7 @@ class bitmart(Exchange, ImplicitAPI):
2882
2882
  # "trace": "4cad855075664097af6ba5257c47605d.63.14957831547451715"
2883
2883
  # }
2884
2884
  #
2885
- data = self.safe_value(response, 'data', {})
2885
+ data = self.safe_dict(response, 'data', {})
2886
2886
  return self.parse_order(data, market)
2887
2887
 
2888
2888
  def fetch_deposit_address(self, code: str, params={}):
@@ -2921,7 +2921,7 @@ class bitmart(Exchange, ImplicitAPI):
2921
2921
  # }
2922
2922
  # }
2923
2923
  #
2924
- data = self.safe_value(response, 'data', {})
2924
+ data = self.safe_dict(response, 'data', {})
2925
2925
  return self.parse_deposit_address(data, currency)
2926
2926
 
2927
2927
  def parse_deposit_address(self, depositAddress, currency=None):
@@ -3058,7 +3058,7 @@ class bitmart(Exchange, ImplicitAPI):
3058
3058
  # }
3059
3059
  #
3060
3060
  data = self.safe_value(response, 'data', {})
3061
- records = self.safe_value(data, 'records', [])
3061
+ records = self.safe_list(data, 'records', [])
3062
3062
  return self.parse_transactions(records, currency, since, limit)
3063
3063
 
3064
3064
  def fetch_deposit(self, id: str, code: Str = None, params={}):
@@ -3097,7 +3097,7 @@ class bitmart(Exchange, ImplicitAPI):
3097
3097
  # }
3098
3098
  #
3099
3099
  data = self.safe_value(response, 'data', {})
3100
- record = self.safe_value(data, 'record', {})
3100
+ record = self.safe_dict(data, 'record', {})
3101
3101
  return self.parse_transaction(record)
3102
3102
 
3103
3103
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -3147,7 +3147,7 @@ class bitmart(Exchange, ImplicitAPI):
3147
3147
  # }
3148
3148
  #
3149
3149
  data = self.safe_value(response, 'data', {})
3150
- record = self.safe_value(data, 'record', {})
3150
+ record = self.safe_dict(data, 'record', {})
3151
3151
  return self.parse_transaction(record)
3152
3152
 
3153
3153
  def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -3665,7 +3665,7 @@ class bitmart(Exchange, ImplicitAPI):
3665
3665
  # }
3666
3666
  #
3667
3667
  data = self.safe_value(response, 'data', {})
3668
- records = self.safe_value(data, 'records', [])
3668
+ records = self.safe_list(data, 'records', [])
3669
3669
  return self.parse_transfers(records, currency, since, limit)
3670
3670
 
3671
3671
  def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -3774,7 +3774,7 @@ class bitmart(Exchange, ImplicitAPI):
3774
3774
  # "trace": "7f9c94e10f9d4513bc08a7bfc2a5559a.72.16946575108274991"
3775
3775
  # }
3776
3776
  #
3777
- data = self.safe_value(response, 'data', {})
3777
+ data = self.safe_dict(response, 'data', {})
3778
3778
  return self.parse_open_interest(data, market)
3779
3779
 
3780
3780
  def parse_open_interest(self, interest, market: Market = None):
@@ -3930,7 +3930,7 @@ class bitmart(Exchange, ImplicitAPI):
3930
3930
  # }
3931
3931
  #
3932
3932
  data = self.safe_value(response, 'data', [])
3933
- first = self.safe_value(data, 0, {})
3933
+ first = self.safe_dict(data, 0, {})
3934
3934
  return self.parse_position(first, market)
3935
3935
 
3936
3936
  def fetch_positions(self, symbols: Strings = None, params={}):
ccxt/bitopro.py CHANGED
@@ -1574,7 +1574,7 @@ class bitopro(Exchange, ImplicitAPI):
1574
1574
  # ]
1575
1575
  # }
1576
1576
  #
1577
- data = self.safe_value(response, 'data', [])
1577
+ data = self.safe_list(response, 'data', [])
1578
1578
  return self.parse_deposit_withdraw_fees(data, codes, 'currency')
1579
1579
 
1580
1580
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
ccxt/bitrue.py CHANGED
@@ -2403,7 +2403,7 @@ class bitrue(Exchange, ImplicitAPI):
2403
2403
  # ]
2404
2404
  # }
2405
2405
  #
2406
- data = self.safe_value(response, 'data', [])
2406
+ data = self.safe_list(response, 'data', [])
2407
2407
  return self.parse_transactions(data, currency, since, limit)
2408
2408
 
2409
2409
  def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -2641,7 +2641,7 @@ class bitrue(Exchange, ImplicitAPI):
2641
2641
  # }
2642
2642
  # }
2643
2643
  #
2644
- data = self.safe_value(response, 'data', {})
2644
+ data = self.safe_dict(response, 'data', {})
2645
2645
  return self.parse_transaction(data, currency)
2646
2646
 
2647
2647
  def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
@@ -2692,7 +2692,7 @@ class bitrue(Exchange, ImplicitAPI):
2692
2692
  """
2693
2693
  self.load_markets()
2694
2694
  response = self.spotV1PublicGetExchangeInfo(params)
2695
- coins = self.safe_value(response, 'coins')
2695
+ coins = self.safe_list(response, 'coins')
2696
2696
  return self.parse_deposit_withdraw_fees(coins, codes, 'coin')
2697
2697
 
2698
2698
  def parse_transfer(self, transfer, currency=None):
@@ -2810,7 +2810,7 @@ class bitrue(Exchange, ImplicitAPI):
2810
2810
  # 'data': null
2811
2811
  # }
2812
2812
  #
2813
- data = self.safe_value(response, 'data', {})
2813
+ data = self.safe_dict(response, 'data', {})
2814
2814
  return self.parse_transfer(data, currency)
2815
2815
 
2816
2816
  def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
ccxt/bitso.py CHANGED
@@ -670,7 +670,7 @@ class bitso(Exchange, ImplicitAPI):
670
670
  # ]
671
671
  # }
672
672
  #
673
- payload = self.safe_value(response, 'payload', [])
673
+ payload = self.safe_list(response, 'payload', [])
674
674
  return self.parse_ohlcvs(payload, market, timeframe, since, limit)
675
675
 
676
676
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -1183,7 +1183,7 @@ class bitso(Exchange, ImplicitAPI):
1183
1183
  # }
1184
1184
  #
1185
1185
  transactions = self.safe_value(response, 'payload', [])
1186
- first = self.safe_value(transactions, 0, {})
1186
+ first = self.safe_dict(transactions, 0, {})
1187
1187
  return self.parse_transaction(first)
1188
1188
 
1189
1189
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -1224,7 +1224,7 @@ class bitso(Exchange, ImplicitAPI):
1224
1224
  # }]
1225
1225
  # }
1226
1226
  #
1227
- transactions = self.safe_value(response, 'payload', [])
1227
+ transactions = self.safe_list(response, 'payload', [])
1228
1228
  return self.parse_transactions(transactions, currency, since, limit, params)
1229
1229
 
1230
1230
  def fetch_deposit_address(self, code: str, params={}):
@@ -1396,7 +1396,7 @@ class bitso(Exchange, ImplicitAPI):
1396
1396
  # }
1397
1397
  # }
1398
1398
  #
1399
- payload = self.safe_value(response, 'payload', {})
1399
+ payload = self.safe_list(response, 'payload', [])
1400
1400
  return self.parse_deposit_withdraw_fees(payload, codes)
1401
1401
 
1402
1402
  def parse_deposit_withdraw_fees(self, response, codes=None, currencyIdKey=None):
@@ -1524,7 +1524,7 @@ class bitso(Exchange, ImplicitAPI):
1524
1524
  # }
1525
1525
  #
1526
1526
  payload = self.safe_value(response, 'payload', [])
1527
- first = self.safe_value(payload, 0)
1527
+ first = self.safe_dict(payload, 0)
1528
1528
  return self.parse_transaction(first, currency)
1529
1529
 
1530
1530
  def safe_network(self, networkId):
ccxt/bitstamp.py CHANGED
@@ -1073,7 +1073,7 @@ class bitstamp(Exchange, ImplicitAPI):
1073
1073
  # }
1074
1074
  #
1075
1075
  data = self.safe_value(response, 'data', {})
1076
- ohlc = self.safe_value(data, 'ohlc', [])
1076
+ ohlc = self.safe_list(data, 'ohlc', [])
1077
1077
  return self.parse_ohlcvs(ohlc, market, timeframe, since, limit)
1078
1078
 
1079
1079
  def parse_balance(self, response) -> Balances:
ccxt/bitteam.py CHANGED
@@ -669,7 +669,7 @@ class bitteam(Exchange, ImplicitAPI):
669
669
  # }
670
670
  #
671
671
  result = self.safe_value(response, 'result', {})
672
- data = self.safe_value(result, 'data', [])
672
+ data = self.safe_list(result, 'data', [])
673
673
  return self.parse_ohlcvs(data, market, timeframe, since, limit)
674
674
 
675
675
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -844,7 +844,7 @@ class bitteam(Exchange, ImplicitAPI):
844
844
  # }
845
845
  #
846
846
  result = self.safe_value(response, 'result', {})
847
- orders = self.safe_value(result, 'orders', [])
847
+ orders = self.safe_list(result, 'orders', [])
848
848
  return self.parse_orders(orders, market, since, limit)
849
849
 
850
850
  def fetch_order(self, id: str, symbol: Str = None, params={}) -> Order:
@@ -901,7 +901,7 @@ class bitteam(Exchange, ImplicitAPI):
901
901
  # }
902
902
  # }
903
903
  #
904
- result = self.safe_value(response, 'result')
904
+ result = self.safe_dict(response, 'result')
905
905
  return self.parse_order(result, market)
906
906
 
907
907
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -1001,7 +1001,7 @@ class bitteam(Exchange, ImplicitAPI):
1001
1001
  # }
1002
1002
  # }
1003
1003
  #
1004
- order = self.safe_value(response, 'result', {})
1004
+ order = self.safe_dict(response, 'result', {})
1005
1005
  return self.parse_order(order, market)
1006
1006
 
1007
1007
  def cancel_order(self, id: str, symbol: Str = None, params={}):
@@ -1026,7 +1026,7 @@ class bitteam(Exchange, ImplicitAPI):
1026
1026
  # }
1027
1027
  # }
1028
1028
  #
1029
- result = self.safe_value(response, 'result', {})
1029
+ result = self.safe_dict(response, 'result', {})
1030
1030
  return self.parse_order(result)
1031
1031
 
1032
1032
  def cancel_all_orders(self, symbol: Str = None, params={}):
@@ -1475,7 +1475,7 @@ class bitteam(Exchange, ImplicitAPI):
1475
1475
  # }
1476
1476
  #
1477
1477
  result = self.safe_value(response, 'result', {})
1478
- pair = self.safe_value(result, 'pair', {})
1478
+ pair = self.safe_dict(result, 'pair', {})
1479
1479
  return self.parse_ticker(pair, market)
1480
1480
 
1481
1481
  def parse_ticker(self, ticker, market: Market = None) -> Ticker:
@@ -1796,7 +1796,7 @@ class bitteam(Exchange, ImplicitAPI):
1796
1796
  # }
1797
1797
  #
1798
1798
  result = self.safe_value(response, 'result', {})
1799
- trades = self.safe_value(result, 'trades', [])
1799
+ trades = self.safe_list(result, 'trades', [])
1800
1800
  return self.parse_trades(trades, market, since, limit)
1801
1801
 
1802
1802
  def parse_trade(self, trade, market: Market = None) -> Trade:
@@ -2087,7 +2087,7 @@ class bitteam(Exchange, ImplicitAPI):
2087
2087
  # }
2088
2088
  #
2089
2089
  result = self.safe_value(response, 'result', {})
2090
- transactions = self.safe_value(result, 'transactions', [])
2090
+ transactions = self.safe_list(result, 'transactions', [])
2091
2091
  return self.parse_transactions(transactions, currency, since, limit)
2092
2092
 
2093
2093
  def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
ccxt/bl3p.py CHANGED
@@ -172,7 +172,7 @@ class bl3p(Exchange, ImplicitAPI):
172
172
  'market': market['id'],
173
173
  }
174
174
  response = self.publicGetMarketOrderbook(self.extend(request, params))
175
- orderbook = self.safe_value(response, 'data')
175
+ orderbook = self.safe_dict(response, 'data')
176
176
  return self.parse_order_book(orderbook, market['symbol'], None, 'bids', 'asks', 'price_int', 'amount_int')
177
177
 
178
178
  def parse_ticker(self, ticker, market: Market = None) -> Ticker:
ccxt/btcturk.py CHANGED
@@ -410,7 +410,7 @@ class btcturk(Exchange, ImplicitAPI):
410
410
  """
411
411
  self.load_markets()
412
412
  response = self.publicGetTicker(params)
413
- tickers = self.safe_value(response, 'data')
413
+ tickers = self.safe_list(response, 'data')
414
414
  return self.parse_tickers(tickers, symbols)
415
415
 
416
416
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
@@ -522,7 +522,7 @@ class btcturk(Exchange, ImplicitAPI):
522
522
  # ]
523
523
  # }
524
524
  #
525
- data = self.safe_value(response, 'data')
525
+ data = self.safe_list(response, 'data')
526
526
  return self.parse_trades(data, market, since, limit)
527
527
 
528
528
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -665,7 +665,7 @@ class btcturk(Exchange, ImplicitAPI):
665
665
  elif not ('newClientOrderId' in params):
666
666
  request['newClientOrderId'] = self.uuid()
667
667
  response = self.privatePostOrder(self.extend(request, params))
668
- data = self.safe_value(response, 'data')
668
+ data = self.safe_dict(response, 'data')
669
669
  return self.parse_order(data, market)
670
670
 
671
671
  def cancel_order(self, id: str, symbol: Str = None, params={}):
@@ -701,7 +701,7 @@ class btcturk(Exchange, ImplicitAPI):
701
701
  response = self.privateGetOpenOrders(self.extend(request, params))
702
702
  data = self.safe_value(response, 'data')
703
703
  bids = self.safe_value(data, 'bids', [])
704
- asks = self.safe_value(data, 'asks', [])
704
+ asks = self.safe_list(data, 'asks', [])
705
705
  return self.parse_orders(self.array_concat(bids, asks), market, since, limit)
706
706
 
707
707
  def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -745,7 +745,7 @@ class btcturk(Exchange, ImplicitAPI):
745
745
  # }
746
746
  # ]
747
747
  # }
748
- data = self.safe_value(response, 'data')
748
+ data = self.safe_list(response, 'data')
749
749
  return self.parse_orders(data, market, since, limit)
750
750
 
751
751
  def parse_order_status(self, status):
@@ -859,7 +859,7 @@ class btcturk(Exchange, ImplicitAPI):
859
859
  # "code": "0"
860
860
  # }
861
861
  #
862
- data = self.safe_value(response, 'data')
862
+ data = self.safe_list(response, 'data')
863
863
  return self.parse_trades(data, market, since, limit)
864
864
 
865
865
  def nonce(self):