ccxt 4.2.83__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 (152) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/bybit.py +1 -1
  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 +12 -9
  12. ccxt/async_support/bit2c.py +1 -1
  13. ccxt/async_support/bitbank.py +8 -8
  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 +39 -28
  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 +34 -87
  28. ccxt/async_support/coincheck.py +4 -4
  29. ccxt/async_support/coinex.py +12 -13
  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 +12 -34
  45. ccxt/async_support/huobijp.py +3 -3
  46. ccxt/async_support/idex.py +2 -2
  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 +14 -2
  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 +13 -13
  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 +12 -9
  80. ccxt/bit2c.py +1 -1
  81. ccxt/bitbank.py +8 -8
  82. ccxt/bitbns.py +5 -5
  83. ccxt/bitfinex.py +1 -1
  84. ccxt/bitfinex2.py +1 -1
  85. ccxt/bitget.py +39 -28
  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 +34 -87
  96. ccxt/coincheck.py +4 -4
  97. ccxt/coinex.py +12 -13
  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 +12 -34
  113. ccxt/huobijp.py +3 -3
  114. ccxt/idex.py +2 -2
  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 +14 -2
  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 +13 -13
  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/kucoin.py +6 -7
  139. ccxt/pro/okx.py +12 -1
  140. ccxt/probit.py +11 -11
  141. ccxt/test/base/test_market.py +3 -0
  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.83.dist-info → ccxt-4.2.85.dist-info}/METADATA +4 -4
  150. {ccxt-4.2.83.dist-info → ccxt-4.2.85.dist-info}/RECORD +152 -152
  151. {ccxt-4.2.83.dist-info → ccxt-4.2.85.dist-info}/WHEEL +0 -0
  152. {ccxt-4.2.83.dist-info → ccxt-4.2.85.dist-info}/top_level.txt +0 -0
ccxt/async_support/okx.py CHANGED
@@ -1139,14 +1139,6 @@ class okx(Exchange, ImplicitAPI):
1139
1139
  exchangeTypes = self.safe_value(self.options, 'exchangeType', {})
1140
1140
  return self.safe_string(exchangeTypes, type, type)
1141
1141
 
1142
- def convert_expire_date(self, date):
1143
- # parse YYMMDD to timestamp
1144
- year = date[0:2]
1145
- month = date[2:4]
1146
- day = date[4:6]
1147
- reconstructedDate = '20' + year + '-' + month + '-' + day + 'T00:00:00Z'
1148
- return reconstructedDate
1149
-
1150
1142
  def create_expired_option_market(self, symbol: str):
1151
1143
  # support expired option contracts
1152
1144
  quote = 'USD'
@@ -1833,7 +1825,7 @@ class okx(Exchange, ImplicitAPI):
1833
1825
  # }
1834
1826
  #
1835
1827
  data = self.safe_value(response, 'data', [])
1836
- first = self.safe_value(data, 0, {})
1828
+ first = self.safe_dict(data, 0, {})
1837
1829
  return self.parse_ticker(first, market)
1838
1830
 
1839
1831
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
@@ -2046,7 +2038,7 @@ class okx(Exchange, ImplicitAPI):
2046
2038
  # "msg": ""
2047
2039
  # }
2048
2040
  #
2049
- data = self.safe_value(response, 'data', [])
2041
+ data = self.safe_list(response, 'data', [])
2050
2042
  return self.parse_trades(data, market, since, limit)
2051
2043
 
2052
2044
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -2162,7 +2154,7 @@ class okx(Exchange, ImplicitAPI):
2162
2154
  # ]
2163
2155
  # }
2164
2156
  #
2165
- data = self.safe_value(response, 'data', [])
2157
+ data = self.safe_list(response, 'data', [])
2166
2158
  return self.parse_ohlcvs(data, market, timeframe, since, limit)
2167
2159
 
2168
2160
  async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -2803,7 +2795,7 @@ class okx(Exchange, ImplicitAPI):
2803
2795
  # "msg": "",
2804
2796
  # "outTime": "1697979038586493"
2805
2797
  # }
2806
- data = self.safe_value(response, 'data', [])
2798
+ data = self.safe_list(response, 'data', [])
2807
2799
  return self.parse_orders(data)
2808
2800
 
2809
2801
  def edit_order_request(self, id: str, symbol, type, side, amount=None, price=None, params={}):
@@ -2980,7 +2972,7 @@ class okx(Exchange, ImplicitAPI):
2980
2972
  response = await self.privatePostTradeCancelOrder(self.extend(request, query))
2981
2973
  # {"code":"0","data":[{"clOrdId":"","ordId":"317251910906576896","sCode":"0","sMsg":""}],"msg":""}
2982
2974
  data = self.safe_value(response, 'data', [])
2983
- order = self.safe_value(data, 0)
2975
+ order = self.safe_dict(data, 0)
2984
2976
  return self.parse_order(order, market)
2985
2977
 
2986
2978
  def parse_ids(self, ids):
@@ -3080,7 +3072,7 @@ class okx(Exchange, ImplicitAPI):
3080
3072
  # "msg": ""
3081
3073
  # }
3082
3074
  #
3083
- ordersData = self.safe_value(response, 'data', [])
3075
+ ordersData = self.safe_list(response, 'data', [])
3084
3076
  return self.parse_orders(ordersData, market, None, None, params)
3085
3077
 
3086
3078
  def parse_order_status(self, status):
@@ -3434,7 +3426,7 @@ class okx(Exchange, ImplicitAPI):
3434
3426
  # }
3435
3427
  #
3436
3428
  data = self.safe_value(response, 'data', [])
3437
- order = self.safe_value(data, 0)
3429
+ order = self.safe_dict(data, 0)
3438
3430
  return self.parse_order(order, market)
3439
3431
 
3440
3432
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -3588,7 +3580,7 @@ class okx(Exchange, ImplicitAPI):
3588
3580
  # "msg": ""
3589
3581
  # }
3590
3582
  #
3591
- data = self.safe_value(response, 'data', [])
3583
+ data = self.safe_list(response, 'data', [])
3592
3584
  return self.parse_orders(data, market, since, limit)
3593
3585
 
3594
3586
  async def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -3761,7 +3753,7 @@ class okx(Exchange, ImplicitAPI):
3761
3753
  # "msg": ""
3762
3754
  # }
3763
3755
  #
3764
- data = self.safe_value(response, 'data', [])
3756
+ data = self.safe_list(response, 'data', [])
3765
3757
  return self.parse_orders(data, market, since, limit)
3766
3758
 
3767
3759
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -3935,7 +3927,7 @@ class okx(Exchange, ImplicitAPI):
3935
3927
  # "msg": ""
3936
3928
  # }
3937
3929
  #
3938
- data = self.safe_value(response, 'data', [])
3930
+ data = self.safe_list(response, 'data', [])
3939
3931
  return self.parse_orders(data, market, since, limit)
3940
3932
 
3941
3933
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -4001,7 +3993,7 @@ class okx(Exchange, ImplicitAPI):
4001
3993
  # "msg": ""
4002
3994
  # }
4003
3995
  #
4004
- data = self.safe_value(response, 'data', [])
3996
+ data = self.safe_list(response, 'data', [])
4005
3997
  return self.parse_trades(data, market, since, limit, query)
4006
3998
 
4007
3999
  async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -4451,7 +4443,7 @@ class okx(Exchange, ImplicitAPI):
4451
4443
  # }
4452
4444
  #
4453
4445
  data = self.safe_value(response, 'data', [])
4454
- transaction = self.safe_value(data, 0)
4446
+ transaction = self.safe_dict(data, 0)
4455
4447
  return self.parse_transaction(transaction, currency)
4456
4448
 
4457
4449
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -4526,7 +4518,7 @@ class okx(Exchange, ImplicitAPI):
4526
4518
  # ]
4527
4519
  # }
4528
4520
  #
4529
- data = self.safe_value(response, 'data', [])
4521
+ data = self.safe_list(response, 'data', [])
4530
4522
  return self.parse_transactions(data, currency, since, limit, params)
4531
4523
 
4532
4524
  async def fetch_deposit(self, id: str, code: Str = None, params={}):
@@ -4548,7 +4540,7 @@ class okx(Exchange, ImplicitAPI):
4548
4540
  request['ccy'] = currency['id']
4549
4541
  response = await self.privateGetAssetDepositHistory(self.extend(request, params))
4550
4542
  data = self.safe_value(response, 'data')
4551
- deposit = self.safe_value(data, 0, {})
4543
+ deposit = self.safe_dict(data, 0, {})
4552
4544
  return self.parse_transaction(deposit, currency)
4553
4545
 
4554
4546
  async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -4615,7 +4607,7 @@ class okx(Exchange, ImplicitAPI):
4615
4607
  # ]
4616
4608
  # }
4617
4609
  #
4618
- data = self.safe_value(response, 'data', [])
4610
+ data = self.safe_list(response, 'data', [])
4619
4611
  return self.parse_transactions(data, currency, since, limit, params)
4620
4612
 
4621
4613
  async def fetch_withdrawal(self, id: str, code: Str = None, params={}):
@@ -4658,7 +4650,7 @@ class okx(Exchange, ImplicitAPI):
4658
4650
  # }
4659
4651
  #
4660
4652
  data = self.safe_value(response, 'data')
4661
- withdrawal = self.safe_value(data, 0, {})
4653
+ withdrawal = self.safe_dict(data, 0, {})
4662
4654
  return self.parse_transaction(withdrawal)
4663
4655
 
4664
4656
  def parse_transaction_status(self, status):
@@ -5242,7 +5234,7 @@ class okx(Exchange, ImplicitAPI):
5242
5234
  # }
5243
5235
  #
5244
5236
  data = self.safe_value(response, 'data', [])
5245
- rawTransfer = self.safe_value(data, 0, {})
5237
+ rawTransfer = self.safe_dict(data, 0, {})
5246
5238
  return self.parse_transfer(rawTransfer, currency)
5247
5239
 
5248
5240
  def parse_transfer(self, transfer, currency: Currency = None):
@@ -5355,7 +5347,7 @@ class okx(Exchange, ImplicitAPI):
5355
5347
  # }
5356
5348
  #
5357
5349
  data = self.safe_value(response, 'data', [])
5358
- transfer = self.safe_value(data, 0)
5350
+ transfer = self.safe_dict(data, 0)
5359
5351
  return self.parse_transfer(transfer)
5360
5352
 
5361
5353
  async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -5413,7 +5405,7 @@ class okx(Exchange, ImplicitAPI):
5413
5405
  # "msg": ""
5414
5406
  # }
5415
5407
  #
5416
- transfers = self.safe_value(response, 'data', [])
5408
+ transfers = self.safe_list(response, 'data', [])
5417
5409
  return self.parse_transfers(transfers, currency, since, limit, params)
5418
5410
 
5419
5411
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
@@ -6384,7 +6376,7 @@ class okx(Exchange, ImplicitAPI):
6384
6376
  # "msg": ""
6385
6377
  # }
6386
6378
  #
6387
- data = self.safe_value(response, 'data', [])
6379
+ data = self.safe_list(response, 'data', [])
6388
6380
  return self.parse_open_interest(data[0], market)
6389
6381
 
6390
6382
  async def fetch_open_interest_history(self, symbol: str, timeframe='1d', since: Int = None, limit: Int = None, params={}):
@@ -6446,7 +6438,7 @@ class okx(Exchange, ImplicitAPI):
6446
6438
  # "msg": ''
6447
6439
  # }
6448
6440
  #
6449
- data = self.safe_value(response, 'data', [])
6441
+ data = self.safe_list(response, 'data', [])
6450
6442
  return self.parse_open_interests(data, None, since, limit)
6451
6443
 
6452
6444
  def parse_open_interest(self, interest, market: Market = None):
@@ -6561,7 +6553,7 @@ class okx(Exchange, ImplicitAPI):
6561
6553
  # "msg": ""
6562
6554
  # }
6563
6555
  #
6564
- data = self.safe_value(response, 'data')
6556
+ data = self.safe_list(response, 'data')
6565
6557
  return self.parse_deposit_withdraw_fees(data, codes)
6566
6558
 
6567
6559
  def parse_deposit_withdraw_fees(self, response, codes=None, currencyIdKey=None):
@@ -6909,7 +6901,7 @@ class okx(Exchange, ImplicitAPI):
6909
6901
  # }
6910
6902
  #
6911
6903
  data = self.safe_value(response, 'data')
6912
- order = self.safe_value(data, 0)
6904
+ order = self.safe_dict(data, 0)
6913
6905
  return self.parse_order(order, market)
6914
6906
 
6915
6907
  async def fetch_option(self, symbol: str, params={}) -> Option:
@@ -1117,7 +1117,7 @@ class onetrading(Exchange, ImplicitAPI):
1117
1117
  # "cursor": "eyJhY2NvdW50X2lkIjp7InMiOiJlMzY5YWM4MC00NTc3LTExZTktYWUwOC05YmVkYzQ3OTBiODQiLCJzcyI6W10sIm5zIjpbXSwiYnMiOltdLCJtIjp7fSwibCI6W119LCJpdGVtX2tleSI6eyJzIjoiV0lUSERSQVdBTDo6MmFlMjYwY2ItOTk3MC00YmNiLTgxNmEtZGY4MDVmY2VhZTY1Iiwic3MiOltdLCJucyI6W10sImJzIjpbXSwibSI6e30sImwiOltdfSwiZ2xvYmFsX3dpdGhkcmF3YWxfaW5kZXhfaGFzaF9rZXkiOnsicyI6ImUzNjlhYzgwLTQ1NzctMTFlOS1hZTA4LTliZWRjNDc5MGI4NCIsInNzIjpbXSwibnMiOltdLCJicyI6W10sIm0iOnt9LCJsIjpbXX0sInRpbWVzdGFtcCI6eyJuIjoiMTU4ODA1ODc2Nzk0OCIsInNzIjpbXSwibnMiOltdLCJicyI6W10sIm0iOnt9LCJsIjpbXX19"
1118
1118
  # }
1119
1119
  #
1120
- depositHistory = self.safe_value(response, 'deposit_history', [])
1120
+ depositHistory = self.safe_list(response, 'deposit_history', [])
1121
1121
  return self.parse_transactions(depositHistory, currency, since, limit, {'type': 'deposit'})
1122
1122
 
1123
1123
  async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -1176,7 +1176,7 @@ class onetrading(Exchange, ImplicitAPI):
1176
1176
  # "max_page_size": 2
1177
1177
  # }
1178
1178
  #
1179
- withdrawalHistory = self.safe_value(response, 'withdrawal_history', [])
1179
+ withdrawalHistory = self.safe_list(response, 'withdrawal_history', [])
1180
1180
  return self.parse_transactions(withdrawalHistory, currency, since, limit, {'type': 'withdrawal'})
1181
1181
 
1182
1182
  async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
@@ -1737,7 +1737,7 @@ class onetrading(Exchange, ImplicitAPI):
1737
1737
  # "max_page_size": 100
1738
1738
  # }
1739
1739
  #
1740
- orderHistory = self.safe_value(response, 'order_history', [])
1740
+ orderHistory = self.safe_list(response, 'order_history', [])
1741
1741
  return self.parse_orders(orderHistory, market, since, limit)
1742
1742
 
1743
1743
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -1868,7 +1868,7 @@ class onetrading(Exchange, ImplicitAPI):
1868
1868
  # "cursor": "string"
1869
1869
  # }
1870
1870
  #
1871
- tradeHistory = self.safe_value(response, 'trade_history', [])
1871
+ tradeHistory = self.safe_list(response, 'trade_history', [])
1872
1872
  return self.parse_trades(tradeHistory, market, since, limit)
1873
1873
 
1874
1874
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
ccxt/async_support/p2b.py CHANGED
@@ -564,7 +564,7 @@ class p2b(Exchange, ImplicitAPI):
564
564
  # current_time: '1699255571.413828'
565
565
  # }
566
566
  #
567
- result = self.safe_value(response, 'result', [])
567
+ result = self.safe_list(response, 'result', [])
568
568
  return self.parse_trades(result, market, since, limit)
569
569
 
570
570
  def parse_trade(self, trade, market: Market = None):
@@ -676,7 +676,7 @@ class p2b(Exchange, ImplicitAPI):
676
676
  # current_time: '1699256375.030494'
677
677
  # }
678
678
  #
679
- result = self.safe_value(response, 'result', [])
679
+ result = self.safe_list(response, 'result', [])
680
680
  return self.parse_ohlcvs(result, market, timeframe, since, limit)
681
681
 
682
682
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -805,7 +805,7 @@ class p2b(Exchange, ImplicitAPI):
805
805
  # }
806
806
  # }
807
807
  #
808
- result = self.safe_value(response, 'result')
808
+ result = self.safe_dict(response, 'result')
809
809
  return self.parse_order(result, market)
810
810
 
811
811
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
@@ -848,7 +848,7 @@ class p2b(Exchange, ImplicitAPI):
848
848
  # }
849
849
  # }
850
850
  #
851
- result = self.safe_value(response, 'result')
851
+ result = self.safe_dict(response, 'result')
852
852
  return self.parse_order(result)
853
853
 
854
854
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -899,7 +899,7 @@ class p2b(Exchange, ImplicitAPI):
899
899
  # ]
900
900
  # }
901
901
  #
902
- result = self.safe_value(response, 'result', [])
902
+ result = self.safe_list(response, 'result', [])
903
903
  return self.parse_orders(result, market, since, limit)
904
904
 
905
905
  async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -948,7 +948,7 @@ class p2b(Exchange, ImplicitAPI):
948
948
  # }
949
949
  #
950
950
  result = self.safe_value(response, 'result', {})
951
- records = self.safe_value(result, 'records', [])
951
+ records = self.safe_list(result, 'records', [])
952
952
  return self.parse_trades(records, market, since, limit)
953
953
 
954
954
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -1015,7 +1015,7 @@ class p2b(Exchange, ImplicitAPI):
1015
1015
  # }
1016
1016
  #
1017
1017
  result = self.safe_value(response, 'result', {})
1018
- deals = self.safe_value(result, 'deals', [])
1018
+ deals = self.safe_list(result, 'deals', [])
1019
1019
  return self.parse_trades(deals, market, since, limit)
1020
1020
 
1021
1021
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -1266,7 +1266,7 @@ class phemex(Exchange, ImplicitAPI):
1266
1266
  # }
1267
1267
  #
1268
1268
  data = self.safe_value(response, 'data', {})
1269
- rows = self.safe_value(data, 'rows', [])
1269
+ rows = self.safe_list(data, 'rows', [])
1270
1270
  return self.parse_ohlcvs(rows, market, timeframe, since, userLimit)
1271
1271
 
1272
1272
  def parse_ticker(self, ticker, market: Market = None) -> Ticker:
@@ -1422,7 +1422,7 @@ class phemex(Exchange, ImplicitAPI):
1422
1422
  # }
1423
1423
  # }
1424
1424
  #
1425
- result = self.safe_value(response, 'result', {})
1425
+ result = self.safe_dict(response, 'result', {})
1426
1426
  return self.parse_ticker(result, market)
1427
1427
 
1428
1428
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
@@ -1452,7 +1452,7 @@ class phemex(Exchange, ImplicitAPI):
1452
1452
  response = await self.v1GetMdTicker24hrAll(query)
1453
1453
  else:
1454
1454
  response = await self.v2GetMdV2Ticker24hrAll(query)
1455
- result = self.safe_value(response, 'result', [])
1455
+ result = self.safe_list(response, 'result', [])
1456
1456
  return self.parse_tickers(result, symbols)
1457
1457
 
1458
1458
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
@@ -2587,7 +2587,7 @@ class phemex(Exchange, ImplicitAPI):
2587
2587
  # }
2588
2588
  # }
2589
2589
  #
2590
- data = self.safe_value(response, 'data', {})
2590
+ data = self.safe_dict(response, 'data', {})
2591
2591
  return self.parse_order(data, market)
2592
2592
 
2593
2593
  async def edit_order(self, id: str, symbol: str, type: OrderType = None, side: OrderSide = None, amount: Num = None, price: Num = None, params={}):
@@ -2648,7 +2648,7 @@ class phemex(Exchange, ImplicitAPI):
2648
2648
  response = await self.privatePutOrdersReplace(self.extend(request, params))
2649
2649
  else:
2650
2650
  response = await self.privatePutSpotOrders(self.extend(request, params))
2651
- data = self.safe_value(response, 'data', {})
2651
+ data = self.safe_dict(response, 'data', {})
2652
2652
  return self.parse_order(data, market)
2653
2653
 
2654
2654
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
@@ -2684,7 +2684,7 @@ class phemex(Exchange, ImplicitAPI):
2684
2684
  response = await self.privateDeleteOrdersCancel(self.extend(request, params))
2685
2685
  else:
2686
2686
  response = await self.privateDeleteSpotOrders(self.extend(request, params))
2687
- data = self.safe_value(response, 'data', {})
2687
+ data = self.safe_dict(response, 'data', {})
2688
2688
  return self.parse_order(data, market)
2689
2689
 
2690
2690
  async def cancel_all_orders(self, symbol: Str = None, params={}):
@@ -2782,7 +2782,7 @@ class phemex(Exchange, ImplicitAPI):
2782
2782
  else:
2783
2783
  response = await self.privateGetSpotOrders(self.extend(request, params))
2784
2784
  data = self.safe_value(response, 'data', {})
2785
- rows = self.safe_value(data, 'rows', data)
2785
+ rows = self.safe_list(data, 'rows', data)
2786
2786
  return self.parse_orders(rows, market, since, limit)
2787
2787
 
2788
2788
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -2821,7 +2821,7 @@ class phemex(Exchange, ImplicitAPI):
2821
2821
  if isinstance(data, list):
2822
2822
  return self.parse_orders(data, market, since, limit)
2823
2823
  else:
2824
- rows = self.safe_value(data, 'rows', [])
2824
+ rows = self.safe_list(data, 'rows', [])
2825
2825
  return self.parse_orders(rows, market, since, limit)
2826
2826
 
2827
2827
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -2898,7 +2898,7 @@ class phemex(Exchange, ImplicitAPI):
2898
2898
  if isinstance(data, list):
2899
2899
  return self.parse_orders(data, market, since, limit)
2900
2900
  else:
2901
- rows = self.safe_value(data, 'rows', [])
2901
+ rows = self.safe_list(data, 'rows', [])
2902
2902
  return self.parse_orders(rows, market, since, limit)
2903
2903
 
2904
2904
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -3942,7 +3942,7 @@ class phemex(Exchange, ImplicitAPI):
3942
3942
  #
3943
3943
  #
3944
3944
  data = self.safe_value(response, 'data', {})
3945
- riskLimits = self.safe_value(data, 'riskLimits')
3945
+ riskLimits = self.safe_list(data, 'riskLimits')
3946
3946
  return self.parse_leverage_tiers(riskLimits, symbols, 'symbol')
3947
3947
 
3948
3948
  def parse_market_leverage_tiers(self, info, market: Market = None):
@@ -4173,7 +4173,7 @@ class phemex(Exchange, ImplicitAPI):
4173
4173
  # }
4174
4174
  #
4175
4175
  data = self.safe_value(response, 'data', {})
4176
- transfers = self.safe_value(data, 'rows', [])
4176
+ transfers = self.safe_list(data, 'rows', [])
4177
4177
  return self.parse_transfers(transfers, currency, since, limit)
4178
4178
 
4179
4179
  def parse_transfer(self, transfer, currency: Currency = None):
@@ -4375,7 +4375,7 @@ class phemex(Exchange, ImplicitAPI):
4375
4375
  # }
4376
4376
  # }
4377
4377
  #
4378
- data = self.safe_value(response, 'data', {})
4378
+ data = self.safe_dict(response, 'data', {})
4379
4379
  return self.parse_transaction(data, currency)
4380
4380
 
4381
4381
  def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
@@ -665,7 +665,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
665
665
  # },
666
666
  # }
667
667
  #
668
- trades = self.safe_value(response, 'data', [])
668
+ trades = self.safe_list(response, 'data', [])
669
669
  return self.parse_trades(trades, market, since, limit)
670
670
 
671
671
  async def fetch_time(self, params={}):
@@ -729,7 +729,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
729
729
  # ]
730
730
  # }
731
731
  #
732
- data = self.safe_value(response, 'data', [])
732
+ data = self.safe_list(response, 'data', [])
733
733
  return self.parse_ohlcvs(data, market, timeframe, since, limit)
734
734
 
735
735
  def parse_balance(self, response) -> Balances:
@@ -970,7 +970,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
970
970
  # ]
971
971
  # }
972
972
  #
973
- data = self.safe_value(response, 'data')
973
+ data = self.safe_list(response, 'data')
974
974
  return self.parse_positions(data, symbols)
975
975
 
976
976
  def parse_position(self, position, market: Market = None):
@@ -1389,7 +1389,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1389
1389
  # }
1390
1390
  #
1391
1391
  market = self.market(symbol) if (symbol is not None) else None
1392
- responseData = self.safe_value(response, 'data')
1392
+ responseData = self.safe_dict(response, 'data')
1393
1393
  return self.parse_order(responseData, market)
1394
1394
 
1395
1395
  def parse_order(self, order, market: Market = None) -> Order:
@@ -1616,7 +1616,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1616
1616
  # }
1617
1617
  #
1618
1618
  data = self.safe_value(response, 'data', {})
1619
- trades = self.safe_value(data, 'items', {})
1619
+ trades = self.safe_list(data, 'items', [])
1620
1620
  return self.parse_trades(trades, market, since, limit)
1621
1621
 
1622
1622
  async def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
@@ -616,7 +616,7 @@ class probit(Exchange, ImplicitAPI):
616
616
  # ]
617
617
  # }
618
618
  #
619
- data = self.safe_value(response, 'data', [])
619
+ data = self.safe_list(response, 'data', [])
620
620
  return self.parse_tickers(data, symbols)
621
621
 
622
622
  async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
@@ -744,7 +744,7 @@ class probit(Exchange, ImplicitAPI):
744
744
  # ]
745
745
  # }
746
746
  #
747
- data = self.safe_value(response, 'data', [])
747
+ data = self.safe_list(response, 'data', [])
748
748
  return self.parse_trades(data, market, since, limit)
749
749
 
750
750
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
@@ -793,7 +793,7 @@ class probit(Exchange, ImplicitAPI):
793
793
  # ]
794
794
  # }
795
795
  #
796
- data = self.safe_value(response, 'data', [])
796
+ data = self.safe_list(response, 'data', [])
797
797
  return self.parse_trades(data, market, since, limit)
798
798
 
799
799
  def parse_trade(self, trade, market: Market = None) -> Trade:
@@ -963,7 +963,7 @@ class probit(Exchange, ImplicitAPI):
963
963
  # ]
964
964
  # }
965
965
  #
966
- data = self.safe_value(response, 'data', [])
966
+ data = self.safe_list(response, 'data', [])
967
967
  return self.parse_ohlcvs(data, market, timeframe, since, limit)
968
968
 
969
969
  def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
@@ -1007,7 +1007,7 @@ class probit(Exchange, ImplicitAPI):
1007
1007
  market = self.market(symbol)
1008
1008
  request['market_id'] = market['id']
1009
1009
  response = await self.privateGetOpenOrder(self.extend(request, params))
1010
- data = self.safe_value(response, 'data')
1010
+ data = self.safe_list(response, 'data')
1011
1011
  return self.parse_orders(data, market, since, limit)
1012
1012
 
1013
1013
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -1035,7 +1035,7 @@ class probit(Exchange, ImplicitAPI):
1035
1035
  if limit:
1036
1036
  request['limit'] = limit
1037
1037
  response = await self.privateGetOrderHistory(self.extend(request, params))
1038
- data = self.safe_value(response, 'data')
1038
+ data = self.safe_list(response, 'data')
1039
1039
  return self.parse_orders(data, market, since, limit)
1040
1040
 
1041
1041
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
@@ -1061,7 +1061,7 @@ class probit(Exchange, ImplicitAPI):
1061
1061
  query = self.omit(params, ['clientOrderId', 'client_order_id'])
1062
1062
  response = await self.privateGetOrder(self.extend(request, query))
1063
1063
  data = self.safe_value(response, 'data', [])
1064
- order = self.safe_value(data, 0)
1064
+ order = self.safe_dict(data, 0)
1065
1065
  return self.parse_order(order, market)
1066
1066
 
1067
1067
  def parse_order_status(self, status):
@@ -1242,7 +1242,7 @@ class probit(Exchange, ImplicitAPI):
1242
1242
  'order_id': id,
1243
1243
  }
1244
1244
  response = await self.privatePostCancelOrder(self.extend(request, params))
1245
- data = self.safe_value(response, 'data')
1245
+ data = self.safe_dict(response, 'data')
1246
1246
  return self.parse_order(data)
1247
1247
 
1248
1248
  def parse_deposit_address(self, depositAddress, currency: Currency = None):
@@ -1328,7 +1328,7 @@ class probit(Exchange, ImplicitAPI):
1328
1328
  currencyIds.append(currency['id'])
1329
1329
  request['currency_id'] = ','.join(codes)
1330
1330
  response = await self.privateGetDepositAddress(self.extend(request, params))
1331
- data = self.safe_value(response, 'data', [])
1331
+ data = self.safe_list(response, 'data', [])
1332
1332
  return self.parse_deposit_addresses(data, codes)
1333
1333
 
1334
1334
  async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
@@ -1371,7 +1371,7 @@ class probit(Exchange, ImplicitAPI):
1371
1371
  request['platform_id'] = network
1372
1372
  params = self.omit(params, 'network')
1373
1373
  response = await self.privatePostWithdrawal(self.extend(request, params))
1374
- data = self.safe_value(response, 'data')
1374
+ data = self.safe_dict(response, 'data')
1375
1375
  return self.parse_transaction(data, currency)
1376
1376
 
1377
1377
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
@@ -1605,7 +1605,7 @@ class probit(Exchange, ImplicitAPI):
1605
1605
  # ]
1606
1606
  # }
1607
1607
  #
1608
- data = self.safe_value(response, 'data')
1608
+ data = self.safe_list(response, 'data')
1609
1609
  return self.parse_deposit_withdraw_fees(data, codes, 'id')
1610
1610
 
1611
1611
  def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
@@ -541,7 +541,7 @@ class timex(Exchange, ImplicitAPI):
541
541
  # }
542
542
  # ]
543
543
  #
544
- ticker = self.safe_value(response, 0)
544
+ ticker = self.safe_dict(response, 0)
545
545
  return self.parse_ticker(ticker, market)
546
546
 
547
547
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
@@ -779,7 +779,7 @@ class timex(Exchange, ImplicitAPI):
779
779
  # }
780
780
  #
781
781
  orders = self.safe_value(response, 'orders', [])
782
- order = self.safe_value(orders, 0, {})
782
+ order = self.safe_dict(orders, 0, {})
783
783
  return self.parse_order(order, market)
784
784
 
785
785
  async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
@@ -827,7 +827,7 @@ class timex(Exchange, ImplicitAPI):
827
827
  })
828
828
  orders = self.safe_value(response, 'changedOrders', [])
829
829
  firstOrder = self.safe_value(orders, 0, {})
830
- order = self.safe_value(firstOrder, 'newOrder', {})
830
+ order = self.safe_dict(firstOrder, 'newOrder', {})
831
831
  return self.parse_order(order, market)
832
832
 
833
833
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
@@ -929,7 +929,7 @@ class timex(Exchange, ImplicitAPI):
929
929
  # }
930
930
  #
931
931
  order = self.safe_value(response, 'order', {})
932
- trades = self.safe_value(response, 'trades', [])
932
+ trades = self.safe_list(response, 'trades', [])
933
933
  return self.parse_order(self.extend(order, {'trades': trades}))
934
934
 
935
935
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -980,7 +980,7 @@ class timex(Exchange, ImplicitAPI):
980
980
  # ]
981
981
  # }
982
982
  #
983
- orders = self.safe_value(response, 'orders', [])
983
+ orders = self.safe_list(response, 'orders', [])
984
984
  return self.parse_orders(orders, market, since, limit)
985
985
 
986
986
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
@@ -1035,7 +1035,7 @@ class timex(Exchange, ImplicitAPI):
1035
1035
  # ]
1036
1036
  # }
1037
1037
  #
1038
- orders = self.safe_value(response, 'orders', [])
1038
+ orders = self.safe_list(response, 'orders', [])
1039
1039
  return self.parse_orders(orders, market, since, limit)
1040
1040
 
1041
1041
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -1093,7 +1093,7 @@ class timex(Exchange, ImplicitAPI):
1093
1093
  # ]
1094
1094
  # }
1095
1095
  #
1096
- trades = self.safe_value(response, 'trades', [])
1096
+ trades = self.safe_list(response, 'trades', [])
1097
1097
  return self.parse_trades(trades, market, since, limit)
1098
1098
 
1099
1099
  def parse_trading_fee(self, fee, market: Market = None):