ccxt 4.4.15__py2.py3-none-any.whl → 4.4.17__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 (149) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/mexc.py +1 -0
  3. ccxt/ascendex.py +5 -5
  4. ccxt/async_support/__init__.py +1 -1
  5. ccxt/async_support/ascendex.py +5 -5
  6. ccxt/async_support/base/exchange.py +1 -1
  7. ccxt/async_support/bigone.py +6 -4
  8. ccxt/async_support/binance.py +66 -10
  9. ccxt/async_support/bingx.py +61 -6
  10. ccxt/async_support/bit2c.py +6 -4
  11. ccxt/async_support/bitbank.py +6 -4
  12. ccxt/async_support/bitbns.py +6 -4
  13. ccxt/async_support/bitfinex.py +4 -2
  14. ccxt/async_support/bitfinex2.py +4 -2
  15. ccxt/async_support/bitget.py +6 -5
  16. ccxt/async_support/bitmart.py +5 -4
  17. ccxt/async_support/bitmex.py +4 -4
  18. ccxt/async_support/bitso.py +5 -4
  19. ccxt/async_support/bitstamp.py +6 -4
  20. ccxt/async_support/bitvavo.py +8 -6
  21. ccxt/async_support/blockchaincom.py +11 -8
  22. ccxt/async_support/blofin.py +21 -0
  23. ccxt/async_support/bybit.py +12 -9
  24. ccxt/async_support/cex.py +5 -4
  25. ccxt/async_support/coinbase.py +4 -4
  26. ccxt/async_support/coinbaseinternational.py +4 -8
  27. ccxt/async_support/coinex.py +5 -5
  28. ccxt/async_support/coinone.py +6 -3
  29. ccxt/async_support/coinsph.py +5 -5
  30. ccxt/async_support/cryptocom.py +5 -4
  31. ccxt/async_support/currencycom.py +5 -5
  32. ccxt/async_support/delta.py +7 -5
  33. ccxt/async_support/deribit.py +6 -4
  34. ccxt/async_support/digifinex.py +6 -4
  35. ccxt/async_support/exmo.py +6 -4
  36. ccxt/async_support/gate.py +5 -4
  37. ccxt/async_support/gemini.py +4 -3
  38. ccxt/async_support/hashkey.py +7 -5
  39. ccxt/async_support/hitbtc.py +6 -5
  40. ccxt/async_support/hollaex.py +6 -5
  41. ccxt/async_support/htx.py +15 -5
  42. ccxt/async_support/hyperliquid.py +8 -7
  43. ccxt/async_support/idex.py +4 -4
  44. ccxt/async_support/independentreserve.py +4 -4
  45. ccxt/async_support/indodax.py +3 -3
  46. ccxt/async_support/kraken.py +7 -5
  47. ccxt/async_support/kucoin.py +6 -5
  48. ccxt/async_support/kucoinfutures.py +5 -3
  49. ccxt/async_support/kuna.py +9 -15
  50. ccxt/async_support/lbank.py +14 -12
  51. ccxt/async_support/lykke.py +6 -4
  52. ccxt/async_support/mexc.py +7 -6
  53. ccxt/async_support/ndax.py +33 -5
  54. ccxt/async_support/oceanex.py +4 -4
  55. ccxt/async_support/okcoin.py +8 -6
  56. ccxt/async_support/okx.py +50 -7
  57. ccxt/async_support/onetrading.py +6 -5
  58. ccxt/async_support/oxfun.py +6 -6
  59. ccxt/async_support/paymium.py +6 -5
  60. ccxt/async_support/phemex.py +8 -6
  61. ccxt/async_support/poloniex.py +6 -4
  62. ccxt/async_support/probit.py +7 -6
  63. ccxt/async_support/timex.py +8 -12
  64. ccxt/async_support/tokocrypto.py +5 -5
  65. ccxt/async_support/upbit.py +7 -6
  66. ccxt/async_support/wavesexchange.py +9 -9
  67. ccxt/async_support/wazirx.py +24 -4
  68. ccxt/async_support/whitebit.py +6 -4
  69. ccxt/async_support/woo.py +6 -4
  70. ccxt/async_support/xt.py +7 -5
  71. ccxt/async_support/yobit.py +32 -23
  72. ccxt/async_support/zonda.py +31 -6
  73. ccxt/base/exchange.py +14 -2
  74. ccxt/base/types.py +8 -0
  75. ccxt/bigone.py +6 -4
  76. ccxt/binance.py +66 -10
  77. ccxt/bingx.py +61 -6
  78. ccxt/bit2c.py +6 -4
  79. ccxt/bitbank.py +6 -4
  80. ccxt/bitbns.py +6 -4
  81. ccxt/bitfinex.py +4 -2
  82. ccxt/bitfinex2.py +4 -2
  83. ccxt/bitget.py +6 -5
  84. ccxt/bitmart.py +5 -4
  85. ccxt/bitmex.py +4 -4
  86. ccxt/bitso.py +5 -4
  87. ccxt/bitstamp.py +6 -4
  88. ccxt/bitvavo.py +8 -6
  89. ccxt/blockchaincom.py +11 -8
  90. ccxt/blofin.py +21 -0
  91. ccxt/bybit.py +12 -9
  92. ccxt/cex.py +5 -4
  93. ccxt/coinbase.py +4 -4
  94. ccxt/coinbaseinternational.py +4 -8
  95. ccxt/coinex.py +5 -5
  96. ccxt/coinone.py +6 -3
  97. ccxt/coinsph.py +5 -5
  98. ccxt/cryptocom.py +5 -4
  99. ccxt/currencycom.py +5 -5
  100. ccxt/delta.py +7 -5
  101. ccxt/deribit.py +6 -4
  102. ccxt/digifinex.py +6 -4
  103. ccxt/exmo.py +6 -4
  104. ccxt/gate.py +5 -4
  105. ccxt/gemini.py +4 -3
  106. ccxt/hashkey.py +7 -5
  107. ccxt/hitbtc.py +6 -5
  108. ccxt/hollaex.py +6 -5
  109. ccxt/htx.py +15 -5
  110. ccxt/hyperliquid.py +8 -7
  111. ccxt/idex.py +4 -4
  112. ccxt/independentreserve.py +4 -4
  113. ccxt/indodax.py +3 -3
  114. ccxt/kraken.py +7 -5
  115. ccxt/kucoin.py +6 -5
  116. ccxt/kucoinfutures.py +5 -3
  117. ccxt/kuna.py +9 -15
  118. ccxt/lbank.py +14 -12
  119. ccxt/lykke.py +6 -4
  120. ccxt/mexc.py +7 -6
  121. ccxt/ndax.py +33 -5
  122. ccxt/oceanex.py +4 -4
  123. ccxt/okcoin.py +8 -6
  124. ccxt/okx.py +50 -7
  125. ccxt/onetrading.py +6 -5
  126. ccxt/oxfun.py +6 -6
  127. ccxt/paymium.py +6 -5
  128. ccxt/phemex.py +8 -6
  129. ccxt/poloniex.py +6 -4
  130. ccxt/pro/__init__.py +1 -1
  131. ccxt/pro/bitvavo.py +1 -1
  132. ccxt/probit.py +7 -6
  133. ccxt/test/tests_async.py +1 -0
  134. ccxt/test/tests_sync.py +1 -0
  135. ccxt/timex.py +8 -12
  136. ccxt/tokocrypto.py +5 -5
  137. ccxt/upbit.py +7 -6
  138. ccxt/wavesexchange.py +9 -9
  139. ccxt/wazirx.py +24 -4
  140. ccxt/whitebit.py +6 -4
  141. ccxt/woo.py +6 -4
  142. ccxt/xt.py +7 -5
  143. ccxt/yobit.py +32 -23
  144. ccxt/zonda.py +31 -6
  145. {ccxt-4.4.15.dist-info → ccxt-4.4.17.dist-info}/METADATA +4 -4
  146. {ccxt-4.4.15.dist-info → ccxt-4.4.17.dist-info}/RECORD +149 -149
  147. {ccxt-4.4.15.dist-info → ccxt-4.4.17.dist-info}/LICENSE.txt +0 -0
  148. {ccxt-4.4.15.dist-info → ccxt-4.4.17.dist-info}/WHEEL +0 -0
  149. {ccxt-4.4.15.dist-info → ccxt-4.4.17.dist-info}/top_level.txt +0 -0
ccxt/oxfun.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.oxfun import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -76,7 +76,7 @@ class oxfun(Exchange, ImplicitAPI):
76
76
  'fetchCrossBorrowRates': False,
77
77
  'fetchCurrencies': True,
78
78
  'fetchDeposit': False,
79
- 'fetchDepositAddress': False,
79
+ 'fetchDepositAddress': True,
80
80
  'fetchDepositAddresses': False,
81
81
  'fetchDepositAddressesByNetwork': False,
82
82
  'fetchDeposits': True,
@@ -1709,7 +1709,7 @@ class oxfun(Exchange, ImplicitAPI):
1709
1709
  }
1710
1710
  return self.safe_string(statuses, status, status)
1711
1711
 
1712
- def fetch_deposit_address(self, code: str, params={}):
1712
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1713
1713
  """
1714
1714
  fetch the deposit address for a currency associated with self account
1715
1715
  :see: https://docs.ox.fun/?json#get-v3-deposit-addresses
@@ -1736,18 +1736,18 @@ class oxfun(Exchange, ImplicitAPI):
1736
1736
  data = self.safe_dict(response, 'data', {})
1737
1737
  return self.parse_deposit_address(data, currency)
1738
1738
 
1739
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1739
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1740
1740
  #
1741
1741
  # {"address":"0x998dEc76151FB723963Bd8AFD517687b38D33dE8"}
1742
1742
  #
1743
1743
  address = self.safe_string(depositAddress, 'address')
1744
1744
  self.check_address(address)
1745
1745
  return {
1746
+ 'info': depositAddress,
1746
1747
  'currency': currency['code'],
1748
+ 'network': None,
1747
1749
  'address': address,
1748
1750
  'tag': None,
1749
- 'network': None,
1750
- 'info': depositAddress,
1751
1751
  }
1752
1752
 
1753
1753
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
ccxt/paymium.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.paymium import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TransferEntry
9
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.decimal_to_precision import TICK_SIZE
@@ -35,6 +35,7 @@ class paymium(Exchange, ImplicitAPI):
35
35
  'fetchBalance': True,
36
36
  'fetchDepositAddress': True,
37
37
  'fetchDepositAddresses': True,
38
+ 'fetchDepositAddressesByNetwork': False,
38
39
  'fetchFundingHistory': False,
39
40
  'fetchFundingRate': False,
40
41
  'fetchFundingRateHistory': False,
@@ -302,7 +303,7 @@ class paymium(Exchange, ImplicitAPI):
302
303
  #
303
304
  return self.parse_deposit_address(response)
304
305
 
305
- def fetch_deposit_address(self, code: str, params={}):
306
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
306
307
  """
307
308
  fetch the deposit address for a currency associated with self account
308
309
  :see: https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses~1%7Baddress%7D/get
@@ -325,7 +326,7 @@ class paymium(Exchange, ImplicitAPI):
325
326
  #
326
327
  return self.parse_deposit_address(response)
327
328
 
328
- def fetch_deposit_addresses(self, codes: Strings = None, params={}):
329
+ def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
329
330
  """
330
331
  fetch deposit addresses for multiple currencies and chain types
331
332
  :see: https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses/get
@@ -347,7 +348,7 @@ class paymium(Exchange, ImplicitAPI):
347
348
  #
348
349
  return self.parse_deposit_addresses(response, codes)
349
350
 
350
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
351
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
351
352
  #
352
353
  # {
353
354
  # "address": "1HdjGr6WCTcnmW1tNNsHX7fh4Jr5C2PeKe",
@@ -361,9 +362,9 @@ class paymium(Exchange, ImplicitAPI):
361
362
  return {
362
363
  'info': depositAddress,
363
364
  'currency': self.safe_currency_code(currencyId, currency),
365
+ 'network': None,
364
366
  'address': address,
365
367
  'tag': None,
366
- 'network': None,
367
368
  }
368
369
 
369
370
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
ccxt/phemex.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.phemex import ImplicitAPI
8
8
  import hashlib
9
9
  import numbers
10
- from ccxt.base.types import Balances, Currencies, Currency, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -64,6 +64,8 @@ class phemex(Exchange, ImplicitAPI):
64
64
  'fetchCrossBorrowRates': False,
65
65
  'fetchCurrencies': True,
66
66
  'fetchDepositAddress': True,
67
+ 'fetchDepositAddresses': False,
68
+ 'fetchDepositAddressesByNetwork': False,
67
69
  'fetchDeposits': True,
68
70
  'fetchFundingHistory': True,
69
71
  'fetchFundingRate': True,
@@ -3145,7 +3147,7 @@ class phemex(Exchange, ImplicitAPI):
3145
3147
  data = self.safe_value(data, 'rows', [])
3146
3148
  return self.parse_trades(data, market, since, limit)
3147
3149
 
3148
- def fetch_deposit_address(self, code: str, params={}):
3150
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
3149
3151
  """
3150
3152
  fetch the deposit address for a currency associated with self account
3151
3153
  :param str code: unified currency code
@@ -3157,9 +3159,9 @@ class phemex(Exchange, ImplicitAPI):
3157
3159
  request: dict = {
3158
3160
  'currency': currency['id'],
3159
3161
  }
3160
- defaultNetworks = self.safe_value(self.options, 'defaultNetworks')
3162
+ defaultNetworks = self.safe_dict(self.options, 'defaultNetworks')
3161
3163
  defaultNetwork = self.safe_string_upper(defaultNetworks, code)
3162
- networks = self.safe_value(self.options, 'networks', {})
3164
+ networks = self.safe_dict(self.options, 'networks', {})
3163
3165
  network = self.safe_string_upper(params, 'network', defaultNetwork)
3164
3166
  network = self.safe_string(networks, network, network)
3165
3167
  if network is None:
@@ -3182,11 +3184,11 @@ class phemex(Exchange, ImplicitAPI):
3182
3184
  tag = self.safe_string(data, 'tag')
3183
3185
  self.check_address(address)
3184
3186
  return {
3187
+ 'info': response,
3185
3188
  'currency': code,
3189
+ 'network': None,
3186
3190
  'address': address,
3187
3191
  'tag': tag,
3188
- 'network': None,
3189
- 'info': response,
3190
3192
  }
3191
3193
 
3192
3194
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
ccxt/poloniex.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.poloniex import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -56,6 +56,8 @@ class poloniex(Exchange, ImplicitAPI):
56
56
  'fetchClosedOrder': False,
57
57
  'fetchCurrencies': True,
58
58
  'fetchDepositAddress': True,
59
+ 'fetchDepositAddresses': False,
60
+ 'fetchDepositAddressesByNetwork': False,
59
61
  'fetchDeposits': True,
60
62
  'fetchDepositsWithdrawals': True,
61
63
  'fetchDepositWithdrawFee': 'emulated',
@@ -1700,7 +1702,7 @@ class poloniex(Exchange, ImplicitAPI):
1700
1702
  'info': response,
1701
1703
  }
1702
1704
 
1703
- def fetch_deposit_address(self, code: str, params={}):
1705
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1704
1706
  """
1705
1707
  fetch the deposit address for a currency associated with self account
1706
1708
  :see: https://api-docs.poloniex.com/spot/api/private/wallet#deposit-addresses
@@ -1737,11 +1739,11 @@ class poloniex(Exchange, ImplicitAPI):
1737
1739
  tag = address
1738
1740
  address = depositAddress
1739
1741
  return {
1742
+ 'info': response,
1740
1743
  'currency': code,
1744
+ 'network': network,
1741
1745
  'address': address,
1742
1746
  'tag': tag,
1743
- 'network': network,
1744
- 'info': response,
1745
1747
  }
1746
1748
 
1747
1749
  def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.15'
7
+ __version__ = '4.4.17'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
ccxt/pro/bitvavo.py CHANGED
@@ -978,7 +978,7 @@ class bitvavo(ccxt.async_support.bitvavo):
978
978
  action = self.safe_string(message, 'action')
979
979
  messageHash = self.build_message_hash(action, message)
980
980
  response = self.safe_value(message, 'response')
981
- currencies = self.parseCurrencies(response)
981
+ currencies = self.parse_currencies(response)
982
982
  client.resolve(currencies, messageHash)
983
983
 
984
984
  def handle_trading_fees(self, client, message):
ccxt/probit.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.probit import ImplicitAPI
8
8
  import math
9
- from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -62,6 +62,7 @@ class probit(Exchange, ImplicitAPI):
62
62
  'fetchCurrencies': True,
63
63
  'fetchDepositAddress': True,
64
64
  'fetchDepositAddresses': True,
65
+ 'fetchDepositAddressesByNetwork': False,
65
66
  'fetchDeposits': True,
66
67
  'fetchDepositsWithdrawals': True,
67
68
  'fetchFundingHistory': False,
@@ -1232,7 +1233,7 @@ class probit(Exchange, ImplicitAPI):
1232
1233
  data = self.safe_dict(response, 'data')
1233
1234
  return self.parse_order(data)
1234
1235
 
1235
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1236
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1236
1237
  address = self.safe_string(depositAddress, 'address')
1237
1238
  tag = self.safe_string(depositAddress, 'destination_tag')
1238
1239
  currencyId = self.safe_string(depositAddress, 'currency_id')
@@ -1241,14 +1242,14 @@ class probit(Exchange, ImplicitAPI):
1241
1242
  network = self.safe_string(depositAddress, 'platform_id')
1242
1243
  self.check_address(address)
1243
1244
  return {
1245
+ 'info': depositAddress,
1244
1246
  'currency': code,
1247
+ 'network': network,
1245
1248
  'address': address,
1246
1249
  'tag': tag,
1247
- 'network': network,
1248
- 'info': depositAddress,
1249
1250
  }
1250
1251
 
1251
- def fetch_deposit_address(self, code: str, params={}):
1252
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1252
1253
  """
1253
1254
  :see: https://docs-en.probit.com/reference/deposit_address
1254
1255
  fetch the deposit address for a currency associated with self account
@@ -1298,7 +1299,7 @@ class probit(Exchange, ImplicitAPI):
1298
1299
  raise InvalidAddress(self.id + ' fetchDepositAddress() returned an empty response')
1299
1300
  return self.parse_deposit_address(firstAddress, currency)
1300
1301
 
1301
- def fetch_deposit_addresses(self, codes: Strings = None, params={}):
1302
+ def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
1302
1303
  """
1303
1304
  :see: https://docs-en.probit.com/reference/deposit_address
1304
1305
  fetch deposit addresses for multiple currencies and chain types
ccxt/test/tests_async.py CHANGED
@@ -66,6 +66,7 @@ class testMainClass:
66
66
  'symbol': symbol_argv,
67
67
  'method': method_argv,
68
68
  'isWs': self.ws_tests,
69
+ 'useProxy': get_cli_arg_value('--useProxy'),
69
70
  }, new_line)
70
71
  exchange_args = {
71
72
  'verbose': self.verbose,
ccxt/test/tests_sync.py CHANGED
@@ -63,6 +63,7 @@ class testMainClass:
63
63
  'symbol': symbol_argv,
64
64
  'method': method_argv,
65
65
  'isWs': self.ws_tests,
66
+ 'useProxy': get_cli_arg_value('--useProxy'),
66
67
  }, new_line)
67
68
  exchange_args = {
68
69
  'verbose': self.verbose,
ccxt/timex.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.timex import ImplicitAPI
8
- from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction
8
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import AuthenticationError
@@ -359,11 +359,7 @@ class timex(Exchange, ImplicitAPI):
359
359
  # },
360
360
  # ]
361
361
  #
362
- result = []
363
- for i in range(0, len(response)):
364
- currency = response[i]
365
- result.append(self.parse_currency(currency))
366
- return self.index_by(result, 'code')
362
+ return self.parse_currencies(response)
367
363
 
368
364
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
369
365
  """
@@ -1239,7 +1235,7 @@ class timex(Exchange, ImplicitAPI):
1239
1235
  'info': market,
1240
1236
  }
1241
1237
 
1242
- def parse_currency(self, currency: dict):
1238
+ def parse_currency(self, currency: dict) -> Currency:
1243
1239
  #
1244
1240
  # {
1245
1241
  # "symbol": "BTC",
@@ -1300,7 +1296,7 @@ class timex(Exchange, ImplicitAPI):
1300
1296
  for i in range(0, -dotIndex):
1301
1297
  fraction += '0'
1302
1298
  fee = self.parse_number(fraction + feeString)
1303
- return {
1299
+ return self.safe_currency_structure({
1304
1300
  'id': code,
1305
1301
  'code': code,
1306
1302
  'info': currency,
@@ -1316,7 +1312,7 @@ class timex(Exchange, ImplicitAPI):
1316
1312
  'amount': {'min': None, 'max': None},
1317
1313
  },
1318
1314
  'networks': {},
1319
- }
1315
+ })
1320
1316
 
1321
1317
  def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
1322
1318
  #
@@ -1514,7 +1510,7 @@ class timex(Exchange, ImplicitAPI):
1514
1510
  'trades': rawTrades,
1515
1511
  }, market)
1516
1512
 
1517
- def fetch_deposit_address(self, code: str, params={}):
1513
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1518
1514
  """
1519
1515
  fetch the deposit address for a currency associated with self account, does not accept params["network"]
1520
1516
  :see: https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Currency/selectCurrencyBySymbol
@@ -1548,7 +1544,7 @@ class timex(Exchange, ImplicitAPI):
1548
1544
  data = self.safe_dict(response, 'currency', {})
1549
1545
  return self.parse_deposit_address(data, currency)
1550
1546
 
1551
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1547
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1552
1548
  #
1553
1549
  # {
1554
1550
  # symbol: 'BTC',
@@ -1567,9 +1563,9 @@ class timex(Exchange, ImplicitAPI):
1567
1563
  return {
1568
1564
  'info': depositAddress,
1569
1565
  'currency': self.safe_currency_code(currencyId, currency),
1566
+ 'network': None,
1570
1567
  'address': self.safe_string(depositAddress, 'address'),
1571
1568
  'tag': None,
1572
- 'network': None,
1573
1569
  }
1574
1570
 
1575
1571
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
ccxt/tokocrypto.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.tokocrypto import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -1950,10 +1950,10 @@ class tokocrypto(Exchange, ImplicitAPI):
1950
1950
  trades = self.safe_list(data, 'list', [])
1951
1951
  return self.parse_trades(trades, market, since, limit)
1952
1952
 
1953
- def fetch_deposit_address(self, code: str, params={}):
1953
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1954
1954
  """
1955
- :see: https://www.tokocrypto.com/apidocs/#deposit-address-signed
1956
1955
  fetch the deposit address for a currency associated with self account
1956
+ :see: https://www.tokocrypto.com/apidocs/#deposit-address-signed
1957
1957
  :param str code: unified currency code
1958
1958
  :param dict [params]: extra parameters specific to the exchange API endpoint
1959
1959
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
@@ -1995,11 +1995,11 @@ class tokocrypto(Exchange, ImplicitAPI):
1995
1995
  tag = None
1996
1996
  self.check_address(address)
1997
1997
  return {
1998
+ 'info': response,
1998
1999
  'currency': code,
2000
+ 'network': self.safe_string(data, 'network'),
1999
2001
  'address': address,
2000
2002
  'tag': tag,
2001
- 'network': self.safe_string(data, 'network'),
2002
- 'info': response,
2003
2003
  }
2004
2004
 
2005
2005
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
ccxt/upbit.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.upbit import ImplicitAPI
8
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction
8
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import AuthenticationError
@@ -51,6 +51,7 @@ class upbit(Exchange, ImplicitAPI):
51
51
  'fetchDeposit': True,
52
52
  'fetchDepositAddress': True,
53
53
  'fetchDepositAddresses': True,
54
+ 'fetchDepositAddressesByNetwork': False,
54
55
  'fetchDeposits': True,
55
56
  'fetchFundingHistory': False,
56
57
  'fetchFundingRate': False,
@@ -1696,7 +1697,7 @@ class upbit(Exchange, ImplicitAPI):
1696
1697
  #
1697
1698
  return self.parse_order(response)
1698
1699
 
1699
- def fetch_deposit_addresses(self, codes: Strings = None, params={}):
1700
+ def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
1700
1701
  """
1701
1702
  :see: https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%A1%B0%ED%9A%8C
1702
1703
  fetch deposit addresses for multiple currencies and chain types
@@ -1727,7 +1728,7 @@ class upbit(Exchange, ImplicitAPI):
1727
1728
  #
1728
1729
  return self.parse_deposit_addresses(response, codes)
1729
1730
 
1730
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1731
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1731
1732
  #
1732
1733
  # {
1733
1734
  # currency: 'XRP',
@@ -1743,14 +1744,14 @@ class upbit(Exchange, ImplicitAPI):
1743
1744
  networkId = self.safe_string(depositAddress, 'net_type')
1744
1745
  self.check_address(address)
1745
1746
  return {
1747
+ 'info': depositAddress,
1746
1748
  'currency': code,
1749
+ 'network': self.network_id_to_code(networkId),
1747
1750
  'address': address,
1748
1751
  'tag': tag,
1749
- 'network': self.network_id_to_code(networkId),
1750
- 'info': depositAddress,
1751
1752
  }
1752
1753
 
1753
- def fetch_deposit_address(self, code: str, params={}):
1754
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1754
1755
  """
1755
1756
  :see: https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%A1%B0%ED%9A%8C
1756
1757
  fetch the deposit address for a currency associated with self account
ccxt/wavesexchange.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.wavesexchange import ImplicitAPI
8
8
  import json
9
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from typing import Any
12
12
  from ccxt.base.errors import ExchangeError
@@ -58,6 +58,8 @@ class wavesexchange(Exchange, ImplicitAPI):
58
58
  'fetchCrossBorrowRate': False,
59
59
  'fetchCrossBorrowRates': False,
60
60
  'fetchDepositAddress': True,
61
+ 'fetchDepositAddresses': None,
62
+ 'fetchDepositAddressesByNetwork': None,
61
63
  'fetchDepositWithdrawFee': 'emulated',
62
64
  'fetchDepositWithdrawFees': True,
63
65
  'fetchFundingHistory': False,
@@ -1018,7 +1020,7 @@ class wavesexchange(Exchange, ImplicitAPI):
1018
1020
  self.safe_number(data, 'volume', 0),
1019
1021
  ]
1020
1022
 
1021
- def fetch_deposit_address(self, code: str, params={}):
1023
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1022
1024
  """
1023
1025
  fetch the deposit address for a currency associated with self account
1024
1026
  :param str code: unified currency code
@@ -1097,12 +1099,11 @@ class wavesexchange(Exchange, ImplicitAPI):
1097
1099
  responseInner = self.nodeGetAddressesPublicKeyPublicKey(self.extend(request, request))
1098
1100
  addressInner = self.safe_string(response, 'address')
1099
1101
  return {
1100
- 'address': addressInner,
1101
- 'code': code, # kept here for backward-compatibility, but will be removed soon
1102
+ 'info': responseInner,
1102
1103
  'currency': code,
1103
1104
  'network': network,
1105
+ 'address': addressInner,
1104
1106
  'tag': None,
1105
- 'info': responseInner,
1106
1107
  }
1107
1108
  else:
1108
1109
  request: dict = {
@@ -1140,12 +1141,11 @@ class wavesexchange(Exchange, ImplicitAPI):
1140
1141
  addresses = self.safe_value(response, 'deposit_addresses')
1141
1142
  address = self.safe_string(addresses, 0)
1142
1143
  return {
1143
- 'address': address,
1144
- 'code': code, # kept here for backward-compatibility, but will be removed soon
1144
+ 'info': response,
1145
1145
  'currency': code,
1146
- 'tag': None,
1147
1146
  'network': unifiedNetwork,
1148
- 'info': response,
1147
+ 'address': address,
1148
+ 'tag': None,
1149
1149
  }
1150
1150
 
1151
1151
  def get_matcher_public_key(self):
ccxt/wazirx.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.wazirx import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -50,34 +50,51 @@ class wazirx(Exchange, ImplicitAPI):
50
50
  'fetchBalance': True,
51
51
  'fetchBidsAsks': False,
52
52
  'fetchBorrowInterest': False,
53
+ 'fetchBorrowRate': False,
53
54
  'fetchBorrowRateHistories': False,
54
55
  'fetchBorrowRateHistory': False,
56
+ 'fetchBorrowRates': False,
57
+ 'fetchBorrowRatesPerSymbol': False,
55
58
  'fetchClosedOrders': False,
56
59
  'fetchCrossBorrowRate': False,
57
60
  'fetchCrossBorrowRates': False,
58
61
  'fetchCurrencies': True,
59
62
  'fetchDepositAddress': True,
63
+ 'fetchDepositAddresses': False,
60
64
  'fetchDepositAddressesByNetwork': False,
61
65
  'fetchDeposits': True,
62
66
  'fetchDepositsWithdrawals': False,
63
67
  'fetchFundingHistory': False,
68
+ 'fetchFundingInterval': False,
69
+ 'fetchFundingIntervals': False,
64
70
  'fetchFundingRate': False,
65
71
  'fetchFundingRateHistory': False,
66
72
  'fetchFundingRates': False,
73
+ 'fetchGreeks': False,
67
74
  'fetchIndexOHLCV': False,
68
75
  'fetchIsolatedBorrowRate': False,
69
76
  'fetchIsolatedBorrowRates': False,
70
77
  'fetchIsolatedPositions': False,
71
78
  'fetchLeverage': False,
79
+ 'fetchLeverages': False,
72
80
  'fetchLeverageTiers': False,
81
+ 'fetchLiquidations': False,
82
+ 'fetchMarginAdjustmentHistory': False,
73
83
  'fetchMarginMode': False,
84
+ 'fetchMarginModes': False,
74
85
  'fetchMarketLeverageTiers': False,
75
86
  'fetchMarkets': True,
76
87
  'fetchMarkOHLCV': False,
88
+ 'fetchMarkPrices': False,
89
+ 'fetchMyLiquidations': False,
90
+ 'fetchMySettlementHistory': False,
77
91
  'fetchMyTrades': False,
78
92
  'fetchOHLCV': True,
93
+ 'fetchOpenInterest': False,
79
94
  'fetchOpenInterestHistory': False,
80
95
  'fetchOpenOrders': True,
96
+ 'fetchOption': False,
97
+ 'fetchOptionChain': False,
81
98
  'fetchOrder': False,
82
99
  'fetchOrderBook': True,
83
100
  'fetchOrders': True,
@@ -89,6 +106,7 @@ class wazirx(Exchange, ImplicitAPI):
89
106
  'fetchPositionsHistory': False,
90
107
  'fetchPositionsRisk': False,
91
108
  'fetchPremiumIndexOHLCV': False,
109
+ 'fetchSettlementHistory': False,
92
110
  'fetchStatus': True,
93
111
  'fetchTicker': True,
94
112
  'fetchTickers': True,
@@ -99,6 +117,8 @@ class wazirx(Exchange, ImplicitAPI):
99
117
  'fetchTransactionFees': False,
100
118
  'fetchTransactions': False,
101
119
  'fetchTransfers': False,
120
+ 'fetchUnderlyingAssets': False,
121
+ 'fetchVolatilityHistory': False,
102
122
  'fetchWithdrawals': True,
103
123
  'reduceMargin': False,
104
124
  'repayCrossMargin': False,
@@ -1049,7 +1069,7 @@ class wazirx(Exchange, ImplicitAPI):
1049
1069
  }
1050
1070
  return result
1051
1071
 
1052
- def fetch_deposit_address(self, code: str, params={}):
1072
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1053
1073
  """
1054
1074
  fetch the deposit address for a currency associated with self account
1055
1075
  :see: https://docs.wazirx.com/#deposit-address-supporting-network-user_data
@@ -1077,11 +1097,11 @@ class wazirx(Exchange, ImplicitAPI):
1077
1097
  # }
1078
1098
  #
1079
1099
  return {
1100
+ 'info': response,
1080
1101
  'currency': code,
1102
+ 'network': self.network_code_to_id(networkCode, code),
1081
1103
  'address': self.safe_string(response, 'address'),
1082
1104
  'tag': None,
1083
- 'network': self.network_code_to_id(networkCode, code),
1084
- 'info': response,
1085
1105
  }
1086
1106
 
1087
1107
  def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
ccxt/whitebit.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.whitebit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Bool, Currencies, Currency, Int, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Bool, Currencies, Currency, DepositAddress, Int, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -62,6 +62,8 @@ class whitebit(Exchange, ImplicitAPI):
62
62
  'fetchCurrencies': True,
63
63
  'fetchDeposit': True,
64
64
  'fetchDepositAddress': True,
65
+ 'fetchDepositAddresses': False,
66
+ 'fetchDepositAddressesByNetwork': False,
65
67
  'fetchDeposits': True,
66
68
  'fetchDepositsWithdrawals': True,
67
69
  'fetchDepositWithdrawFee': 'emulated',
@@ -1758,7 +1760,7 @@ class whitebit(Exchange, ImplicitAPI):
1758
1760
  data = self.safe_list(response, 'records', [])
1759
1761
  return self.parse_trades(data, market)
1760
1762
 
1761
- def fetch_deposit_address(self, code: str, params={}):
1763
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1762
1764
  """
1763
1765
  fetch the deposit address for a currency associated with self account
1764
1766
  :see: https://docs.whitebit.com/private/http-main-v4/#get-fiat-deposit-address
@@ -1820,11 +1822,11 @@ class whitebit(Exchange, ImplicitAPI):
1820
1822
  tag = self.safe_string(account, 'memo')
1821
1823
  self.check_address(address)
1822
1824
  return {
1825
+ 'info': response,
1823
1826
  'currency': code,
1827
+ 'network': None,
1824
1828
  'address': address,
1825
1829
  'tag': tag,
1826
- 'network': None,
1827
- 'info': response,
1828
1830
  }
1829
1831
 
1830
1832
  def set_leverage(self, leverage: Int, symbol: Str = None, params={}):