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
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.indodax import ImplicitAPI
8
8
  import hashlib
9
9
  import math
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
@@ -1148,7 +1148,7 @@ class indodax(Exchange, ImplicitAPI):
1148
1148
  }
1149
1149
  return self.safe_string(statuses, status, status)
1150
1150
 
1151
- async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
1151
+ async def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
1152
1152
  """
1153
1153
  fetch deposit addresses for multiple currencies and chain types
1154
1154
  :see: https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#general-information-on-endpoints
@@ -1219,8 +1219,8 @@ class indodax(Exchange, ImplicitAPI):
1219
1219
  result[code] = {
1220
1220
  'info': {},
1221
1221
  'currency': code,
1222
- 'address': address,
1223
1222
  'network': network,
1223
+ 'address': address,
1224
1224
  'tag': None,
1225
1225
  }
1226
1226
  return result
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.kraken import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Currency, IndexType, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, IndexType, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -77,6 +77,8 @@ class kraken(Exchange, ImplicitAPI):
77
77
  'fetchCrossBorrowRates': False,
78
78
  'fetchCurrencies': True,
79
79
  'fetchDepositAddress': True,
80
+ 'fetchDepositAddresses': False,
81
+ 'fetchDepositAddressesByNetwork': False,
80
82
  'fetchDeposits': True,
81
83
  'fetchFundingHistory': False,
82
84
  'fetchFundingRate': False,
@@ -2623,7 +2625,7 @@ class kraken(Exchange, ImplicitAPI):
2623
2625
  #
2624
2626
  return self.safe_value(response, 'result')
2625
2627
 
2626
- async def fetch_deposit_address(self, code: str, params={}):
2628
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
2627
2629
  """
2628
2630
  fetch the deposit address for a currency associated with self account
2629
2631
  :see: https://docs.kraken.com/rest/#tag/Funding/operation/getDepositAddresses
@@ -2676,7 +2678,7 @@ class kraken(Exchange, ImplicitAPI):
2676
2678
  raise InvalidAddress(self.id + ' privatePostDepositAddresses() returned no addresses for ' + code)
2677
2679
  return self.parse_deposit_address(firstResult, currency)
2678
2680
 
2679
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
2681
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
2680
2682
  #
2681
2683
  # {
2682
2684
  # "address":"0x77b5051f97efa9cc52c9ad5b023a53fc15c200d3",
@@ -2689,11 +2691,11 @@ class kraken(Exchange, ImplicitAPI):
2689
2691
  code = currency['code']
2690
2692
  self.check_address(address)
2691
2693
  return {
2694
+ 'info': depositAddress,
2692
2695
  'currency': code,
2696
+ 'network': None,
2693
2697
  'address': address,
2694
2698
  'tag': tag,
2695
- 'network': None,
2696
- 'info': depositAddress,
2697
2699
  }
2698
2700
 
2699
2701
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
@@ -9,7 +9,7 @@ import asyncio
9
9
  import hashlib
10
10
  import math
11
11
  import json
12
- from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
12
+ from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
13
13
  from typing import List
14
14
  from ccxt.base.errors import ExchangeError
15
15
  from ccxt.base.errors import AuthenticationError
@@ -79,6 +79,7 @@ class kucoin(Exchange, ImplicitAPI):
79
79
  'fetchCrossBorrowRates': False,
80
80
  'fetchCurrencies': True,
81
81
  'fetchDepositAddress': True,
82
+ 'fetchDepositAddresses': False,
82
83
  'fetchDepositAddressesByNetwork': True,
83
84
  'fetchDeposits': True,
84
85
  'fetchDepositWithdrawFee': True,
@@ -1892,7 +1893,7 @@ class kucoin(Exchange, ImplicitAPI):
1892
1893
  data = self.safe_dict(response, 'data', {})
1893
1894
  return self.parse_deposit_address(data, currency)
1894
1895
 
1895
- async def fetch_deposit_address(self, code: str, params={}):
1896
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1896
1897
  """
1897
1898
  fetch the deposit address for a currency associated with self account
1898
1899
  :see: https://docs.kucoin.com/#get-deposit-addresses-v2
@@ -1924,7 +1925,7 @@ class kucoin(Exchange, ImplicitAPI):
1924
1925
  raise ExchangeError(self.id + ' fetchDepositAddress() returned an empty response, you might try to run createDepositAddress() first and try again')
1925
1926
  return self.parse_deposit_address(data, currency)
1926
1927
 
1927
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1928
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1928
1929
  address = self.safe_string(depositAddress, 'address')
1929
1930
  # BCH/BSV is returned with a "bitcoincash:" prefix, which we cut off here and only keep the address
1930
1931
  if address is not None:
@@ -1938,12 +1939,12 @@ class kucoin(Exchange, ImplicitAPI):
1938
1939
  return {
1939
1940
  'info': depositAddress,
1940
1941
  'currency': code,
1942
+ 'network': self.network_id_to_code(self.safe_string(depositAddress, 'chain')),
1941
1943
  'address': address,
1942
1944
  'tag': self.safe_string(depositAddress, 'memo'),
1943
- 'network': self.network_id_to_code(self.safe_string(depositAddress, 'chain')),
1944
1945
  }
1945
1946
 
1946
- async def fetch_deposit_addresses_by_network(self, code: str, params={}):
1947
+ async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
1947
1948
  """
1948
1949
  :see: https://docs.kucoin.com/#get-deposit-addresses-v2
1949
1950
  fetch the deposit address for a currency associated with self account
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.kucoin import kucoin
7
7
  from ccxt.abstract.kucoinfutures import ImplicitAPI
8
- from ccxt.base.types import Balances, Currency, Int, Leverage, LeverageTier, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
8
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, Leverage, LeverageTier, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
9
9
  from typing import List
10
10
  from ccxt.base.errors import AuthenticationError
11
11
  from ccxt.base.errors import PermissionDenied
@@ -69,6 +69,8 @@ class kucoinfutures(kucoin, ImplicitAPI):
69
69
  'fetchCrossBorrowRates': False,
70
70
  'fetchCurrencies': False,
71
71
  'fetchDepositAddress': True,
72
+ 'fetchDepositAddresses': False,
73
+ 'fetchDepositAddressesByNetwork': False,
72
74
  'fetchDeposits': True,
73
75
  'fetchDepositWithdrawFee': False,
74
76
  'fetchDepositWithdrawFees': False,
@@ -640,7 +642,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
640
642
  self.safe_number(ohlcv, 5),
641
643
  ]
642
644
 
643
- async def fetch_deposit_address(self, code: str, params={}):
645
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
644
646
  """
645
647
  fetch the deposit address for a currency associated with self account
646
648
  :see: https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-address
@@ -672,9 +674,9 @@ class kucoinfutures(kucoin, ImplicitAPI):
672
674
  return {
673
675
  'info': response,
674
676
  'currency': currencyId,
677
+ 'network': self.safe_string(data, 'chain'),
675
678
  'address': address,
676
679
  'tag': self.safe_string(data, 'memo'),
677
- 'network': self.safe_string(data, 'chain'),
678
680
  }
679
681
 
680
682
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.kuna import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
+ from ccxt.base.types import Balances, Currencies, 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 ArgumentsRequired
@@ -58,6 +58,8 @@ class kuna(Exchange, ImplicitAPI):
58
58
  'fetchCurrencies': True,
59
59
  'fetchDeposit': True,
60
60
  'fetchDepositAddress': True,
61
+ 'fetchDepositAddresses': False,
62
+ 'fetchDepositAddressesByNetwork': False,
61
63
  'fetchDeposits': True,
62
64
  'fetchDepositsWithdrawals': False,
63
65
  'fetchFundingHistory': False,
@@ -460,15 +462,7 @@ class kuna(Exchange, ImplicitAPI):
460
462
  data = self.safe_value(response, 'data', [])
461
463
  return self.parse_currencies(data)
462
464
 
463
- def parse_currencies(self, currencies, params={}):
464
- currencies = self.to_array(currencies)
465
- result: dict = {}
466
- for i in range(0, len(currencies)):
467
- currency = self.parse_currency(currencies[i])
468
- result[currency['code']] = currency
469
- return result
470
-
471
- def parse_currency(self, currency: dict):
465
+ def parse_currency(self, currency: dict) -> Currency:
472
466
  #
473
467
  # {
474
468
  # "code": "BTC",
@@ -492,7 +486,7 @@ class kuna(Exchange, ImplicitAPI):
492
486
  currencyId = self.safe_string(currency, 'code')
493
487
  precision = self.safe_string(currency, 'precision')
494
488
  tradePrecision = self.safe_string(currency, 'tradePrecision')
495
- return {
489
+ return self.safe_currency_structure({
496
490
  'info': currency,
497
491
  'id': currencyId,
498
492
  'code': self.safe_currency_code(currencyId),
@@ -503,7 +497,7 @@ class kuna(Exchange, ImplicitAPI):
503
497
  'deposit': None,
504
498
  'withdraw': None,
505
499
  'fee': None,
506
- 'precision': Precise.string_min(precision, tradePrecision),
500
+ 'precision': self.parse_number(Precise.string_min(precision, tradePrecision)),
507
501
  'limits': {
508
502
  'amount': {
509
503
  'min': None,
@@ -515,7 +509,7 @@ class kuna(Exchange, ImplicitAPI):
515
509
  },
516
510
  },
517
511
  'networks': {},
518
- }
512
+ })
519
513
 
520
514
  async def fetch_markets(self, params={}) -> List[Market]:
521
515
  """
@@ -1511,7 +1505,7 @@ class kuna(Exchange, ImplicitAPI):
1511
1505
  data = self.safe_dict(response, 'data', {})
1512
1506
  return self.parse_deposit_address(data, currency)
1513
1507
 
1514
- async def fetch_deposit_address(self, code: str, params={}):
1508
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1515
1509
  """
1516
1510
  fetch the deposit address for a currency associated with self account
1517
1511
  :see: https://docs.kuna.io/docs/find-crypto-address-for-deposit
@@ -1537,7 +1531,7 @@ class kuna(Exchange, ImplicitAPI):
1537
1531
  data = self.safe_dict(response, 'data', {})
1538
1532
  return self.parse_deposit_address(data, currency)
1539
1533
 
1540
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1534
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1541
1535
  #
1542
1536
  # {
1543
1537
  # "id": "c52b6646-fb91-4760-b147-a4f952e8652c", # ID of the address.
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.lbank import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
10
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -63,6 +63,8 @@ class lbank(Exchange, ImplicitAPI):
63
63
  'fetchCrossBorrowRate': False,
64
64
  'fetchCrossBorrowRates': False,
65
65
  'fetchDepositAddress': True,
66
+ 'fetchDepositAddresses': False,
67
+ 'fetchDepositAddressesByNetwork': False,
66
68
  'fetchDepositWithdrawFee': 'emulated',
67
69
  'fetchDepositWithdrawFees': True,
68
70
  'fetchFundingHistory': False,
@@ -1832,7 +1834,7 @@ class lbank(Exchange, ImplicitAPI):
1832
1834
  network = self.safe_string(networks, network, network) # handle ERC20>ETH alias
1833
1835
  return network
1834
1836
 
1835
- async def fetch_deposit_address(self, code: str, params={}):
1837
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1836
1838
  """
1837
1839
  fetch the deposit address for a currency associated with self account
1838
1840
  :see: https://www.lbank.com/en-US/docs/index.html#get-deposit-address
@@ -1853,7 +1855,7 @@ class lbank(Exchange, ImplicitAPI):
1853
1855
  response = await self.fetch_deposit_address_default(code, params)
1854
1856
  return response
1855
1857
 
1856
- async def fetch_deposit_address_default(self, code: str, params={}):
1858
+ async def fetch_deposit_address_default(self, code: str, params={}) -> DepositAddress:
1857
1859
  await self.load_markets()
1858
1860
  currency = self.currency(code)
1859
1861
  request: dict = {
@@ -1884,14 +1886,14 @@ class lbank(Exchange, ImplicitAPI):
1884
1886
  inverseNetworks = self.safe_value(self.options, 'inverse-networks', {})
1885
1887
  networkCode = self.safe_string_upper(inverseNetworks, networkId, networkId)
1886
1888
  return {
1889
+ 'info': response,
1887
1890
  'currency': code,
1891
+ 'network': networkCode,
1888
1892
  'address': address,
1889
1893
  'tag': tag,
1890
- 'network': networkCode,
1891
- 'info': response,
1892
1894
  }
1893
1895
 
1894
- async def fetch_deposit_address_supplement(self, code: str, params={}):
1896
+ async def fetch_deposit_address_supplement(self, code: str, params={}) -> DepositAddress:
1895
1897
  # returns the address for whatever the default network is...
1896
1898
  await self.load_markets()
1897
1899
  currency = self.currency(code)
@@ -1923,11 +1925,11 @@ class lbank(Exchange, ImplicitAPI):
1923
1925
  inverseNetworks = self.safe_value(self.options, 'inverse-networks', {})
1924
1926
  networkCode = self.safe_string_upper(inverseNetworks, network, network)
1925
1927
  return {
1928
+ 'info': response,
1926
1929
  'currency': code,
1930
+ 'network': networkCode, # will be None if not specified in request
1927
1931
  'address': address,
1928
1932
  'tag': tag,
1929
- 'network': networkCode, # will be None if not specified in request
1930
- 'info': response,
1931
1933
  }
1932
1934
 
1933
1935
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
@@ -2329,7 +2331,7 @@ class lbank(Exchange, ImplicitAPI):
2329
2331
  when using private endpoint, only returns information for currencies with non-zero balance, use public method by specifying self.options['fetchDepositWithdrawFees']['method'] = 'fetchPublicDepositWithdrawFees'
2330
2332
  :see: https://www.lbank.com/en-US/docs/index.html#get-all-coins-information
2331
2333
  :see: https://www.lbank.com/en-US/docs/index.html#withdrawal-configurations
2332
- :param str[]|None codes: array of unified currency codes
2334
+ :param str[] [codes]: array of unified currency codes
2333
2335
  :param dict [params]: extra parameters specific to the exchange API endpoint
2334
2336
  :returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
2335
2337
  """
@@ -2342,11 +2344,11 @@ class lbank(Exchange, ImplicitAPI):
2342
2344
  method = self.safe_string(params, 'method', defaultMethod)
2343
2345
  params = self.omit(params, 'method')
2344
2346
  if method == 'fetchPublicDepositWithdrawFees':
2345
- await self.fetch_public_deposit_withdraw_fees(codes, params)
2347
+ response = await self.fetch_public_deposit_withdraw_fees(codes, params)
2346
2348
  else:
2347
- await self.fetch_private_deposit_withdraw_fees(codes, params)
2349
+ response = await self.fetch_private_deposit_withdraw_fees(codes, params)
2348
2350
  else:
2349
- await self.fetch_public_deposit_withdraw_fees(codes, params)
2351
+ response = await self.fetch_public_deposit_withdraw_fees(codes, params)
2350
2352
  return response
2351
2353
 
2352
2354
  async def fetch_private_deposit_withdraw_fees(self, codes=None, params={}):
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.lykke import ImplicitAPI
8
- from ccxt.base.types import Balances, Currencies, Currency, IndexType, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
8
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, IndexType, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import BadRequest
@@ -50,6 +50,8 @@ class lykke(Exchange, ImplicitAPI):
50
50
  'fetchCrossBorrowRates': False,
51
51
  'fetchCurrencies': True,
52
52
  'fetchDepositAddress': True,
53
+ 'fetchDepositAddresses': False,
54
+ 'fetchDepositAddressesByNetwork': False,
53
55
  'fetchDeposits': False,
54
56
  'fetchDepositsWithdrawals': True,
55
57
  'fetchFundingHistory': False,
@@ -1072,7 +1074,7 @@ class lykke(Exchange, ImplicitAPI):
1072
1074
  amount = Precise.string_abs(self.safe_string(bidask, amountKey))
1073
1075
  return [self.parse_number(price), self.parse_number(amount)]
1074
1076
 
1075
- async def fetch_deposit_address(self, code: str, params={}):
1077
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1076
1078
  """
1077
1079
  fetch the deposit address for a currency associated with self account
1078
1080
  :see: https://lykkecity.github.io/Trading-API/#get-deposit-address-for-a-given-asset
@@ -1100,11 +1102,11 @@ class lykke(Exchange, ImplicitAPI):
1100
1102
  tag = self.safe_string(response, 'addressExtension')
1101
1103
  self.check_address(address)
1102
1104
  return {
1105
+ 'info': response,
1103
1106
  'currency': code,
1107
+ 'network': None,
1104
1108
  'address': address,
1105
1109
  'tag': tag,
1106
- 'network': None,
1107
- 'info': response,
1108
1110
  }
1109
1111
 
1110
1112
  def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.mexc import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- from ccxt.base.types import Account, Balances, Currencies, Currency, IndexType, Int, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFees, Transaction, TransferEntry
10
+ from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, IndexType, Int, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFees, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -243,6 +243,7 @@ class mexc(Exchange, ImplicitAPI):
243
243
  'rebate/affiliate/commission/detail': 1,
244
244
  'mxDeduct/enable': 1,
245
245
  'userDataStream': 1,
246
+ 'selfSymbols': 1,
246
247
  },
247
248
  'post': {
248
249
  'order': 1,
@@ -4221,7 +4222,7 @@ class mexc(Exchange, ImplicitAPI):
4221
4222
  floor = cap
4222
4223
  return tiers
4223
4224
 
4224
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
4225
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
4225
4226
  #
4226
4227
  # {
4227
4228
  # coin: "USDT",
@@ -4235,14 +4236,14 @@ class mexc(Exchange, ImplicitAPI):
4235
4236
  networkId = self.safe_string(depositAddress, 'netWork')
4236
4237
  self.check_address(address)
4237
4238
  return {
4239
+ 'info': depositAddress,
4238
4240
  'currency': self.safe_currency_code(currencyId, currency),
4241
+ 'network': self.network_id_to_code(networkId),
4239
4242
  'address': address,
4240
4243
  'tag': self.safe_string(depositAddress, 'memo'),
4241
- 'network': self.network_id_to_code(networkId),
4242
- 'info': depositAddress,
4243
4244
  }
4244
4245
 
4245
- async def fetch_deposit_addresses_by_network(self, code: str, params={}):
4246
+ async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
4246
4247
  """
4247
4248
  fetch a dictionary of addresses for a currency, indexed by network
4248
4249
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
@@ -4324,7 +4325,7 @@ class mexc(Exchange, ImplicitAPI):
4324
4325
  # }
4325
4326
  return self.parse_deposit_address(response, currency)
4326
4327
 
4327
- async def fetch_deposit_address(self, code: str, params={}):
4328
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
4328
4329
  """
4329
4330
  fetch the deposit address for a currency associated with self account
4330
4331
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.ndax import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Account, Balances, Currencies, Currency, IndexType, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction
10
+ from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, IndexType, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -48,29 +48,51 @@ class ndax(Exchange, ImplicitAPI):
48
48
  'editOrder': True,
49
49
  'fetchAccounts': True,
50
50
  'fetchBalance': True,
51
+ 'fetchBorrowInterest': False,
52
+ 'fetchBorrowRate': False,
51
53
  'fetchBorrowRateHistories': False,
52
54
  'fetchBorrowRateHistory': False,
55
+ 'fetchBorrowRates': False,
56
+ 'fetchBorrowRatesPerSymbol': False,
53
57
  'fetchCrossBorrowRate': False,
54
58
  'fetchCrossBorrowRates': False,
55
59
  'fetchCurrencies': True,
56
60
  'fetchDepositAddress': True,
61
+ 'fetchDepositAddresses': False,
62
+ 'fetchDepositAddressesByNetwork': False,
57
63
  'fetchDeposits': True,
58
64
  'fetchFundingHistory': False,
65
+ 'fetchFundingInterval': False,
66
+ 'fetchFundingIntervals': False,
59
67
  'fetchFundingRate': False,
60
68
  'fetchFundingRateHistory': False,
61
69
  'fetchFundingRates': False,
70
+ 'fetchGreeks': False,
62
71
  'fetchIndexOHLCV': False,
63
72
  'fetchIsolatedBorrowRate': False,
64
73
  'fetchIsolatedBorrowRates': False,
74
+ 'fetchIsolatedPositions': False,
65
75
  'fetchLedger': True,
66
76
  'fetchLeverage': False,
77
+ 'fetchLeverages': False,
67
78
  'fetchLeverageTiers': False,
79
+ 'fetchLiquidations': False,
80
+ 'fetchMarginAdjustmentHistory': False,
81
+ 'fetchMarginMode': False,
82
+ 'fetchMarginModes': False,
83
+ 'fetchMarketLeverageTiers': False,
68
84
  'fetchMarkets': True,
69
85
  'fetchMarkOHLCV': False,
86
+ 'fetchMarkPrices': False,
87
+ 'fetchMyLiquidations': False,
88
+ 'fetchMySettlementHistory': False,
70
89
  'fetchMyTrades': True,
71
90
  'fetchOHLCV': True,
91
+ 'fetchOpenInterest': False,
72
92
  'fetchOpenInterestHistory': False,
73
93
  'fetchOpenOrders': True,
94
+ 'fetchOption': False,
95
+ 'fetchOptionChain': False,
74
96
  'fetchOrder': True,
75
97
  'fetchOrderBook': True,
76
98
  'fetchOrders': True,
@@ -83,16 +105,22 @@ class ndax(Exchange, ImplicitAPI):
83
105
  'fetchPositionsHistory': False,
84
106
  'fetchPositionsRisk': False,
85
107
  'fetchPremiumIndexOHLCV': False,
108
+ 'fetchSettlementHistory': False,
86
109
  'fetchTicker': True,
87
110
  'fetchTickers': False,
88
111
  'fetchTime': False,
89
112
  'fetchTrades': True,
90
113
  'fetchTradingFee': False,
91
114
  'fetchTradingFees': False,
115
+ 'fetchUnderlyingAssets': False,
116
+ 'fetchVolatilityHistory': False,
92
117
  'fetchWithdrawals': True,
93
118
  'reduceMargin': False,
119
+ 'repayCrossMargin': False,
120
+ 'repayIsolatedMargin': False,
94
121
  'sandbox': True,
95
122
  'setLeverage': False,
123
+ 'setMargin': False,
96
124
  'setMarginMode': False,
97
125
  'setPositionMode': False,
98
126
  'signIn': True,
@@ -1871,7 +1899,7 @@ class ndax(Exchange, ImplicitAPI):
1871
1899
  trades = self.safe_list(grouped, 'Trade', [])
1872
1900
  return self.parse_trades(trades, market, since, limit)
1873
1901
 
1874
- async def fetch_deposit_address(self, code: str, params={}):
1902
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1875
1903
  """
1876
1904
  fetch the deposit address for a currency associated with self account
1877
1905
  :param str code: unified currency code
@@ -1906,7 +1934,7 @@ class ndax(Exchange, ImplicitAPI):
1906
1934
  #
1907
1935
  return self.parse_deposit_address(response, currency)
1908
1936
 
1909
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1937
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1910
1938
  #
1911
1939
  # fetchDepositAddress, createDepositAddress
1912
1940
  #
@@ -1933,11 +1961,11 @@ class ndax(Exchange, ImplicitAPI):
1933
1961
  code = currency['code']
1934
1962
  self.check_address(address)
1935
1963
  return {
1964
+ 'info': depositAddress,
1936
1965
  'currency': code,
1966
+ 'network': None,
1937
1967
  'address': address,
1938
1968
  'tag': tag,
1939
- 'network': None,
1940
- 'info': depositAddress,
1941
1969
  }
1942
1970
 
1943
1971
  async def create_deposit_address(self, code: str, params={}):
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.oceanex import ImplicitAPI
8
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
8
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import AuthenticationError
@@ -863,7 +863,7 @@ class oceanex(Exchange, ImplicitAPI):
863
863
  data = self.safe_list(response, 'data')
864
864
  return self.parse_orders(data)
865
865
 
866
- async def fetch_deposit_addresses_by_network(self, code: str, params={}):
866
+ async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
867
867
  """
868
868
  fetch the deposit addresses for a currency associated with self account
869
869
  :see: https://api.oceanex.pro/doc/v1/#deposit-addresses-post
@@ -912,7 +912,7 @@ class oceanex(Exchange, ImplicitAPI):
912
912
  result[parsedAddress['currency']] = parsedAddress
913
913
  return result
914
914
 
915
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
915
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
916
916
  #
917
917
  # {
918
918
  # chain_name: 'TRC20',
@@ -929,9 +929,9 @@ class oceanex(Exchange, ImplicitAPI):
929
929
  return {
930
930
  'info': depositAddress,
931
931
  'currency': self.safe_currency_code(currencyId, currency),
932
+ 'network': self.network_id_to_code(networkId),
932
933
  'address': address,
933
934
  'tag': self.safe_string(depositAddress, 'memo'),
934
- 'network': self.network_id_to_code(networkId),
935
935
  }
936
936
 
937
937
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.okcoin import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Currency, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, 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
@@ -66,6 +66,8 @@ class okcoin(Exchange, ImplicitAPI):
66
66
  'fetchClosedOrders': True,
67
67
  'fetchCurrencies': True, # see below
68
68
  'fetchDepositAddress': True,
69
+ 'fetchDepositAddresses': False,
70
+ 'fetchDepositAddressesByNetwork': False,
69
71
  'fetchDeposits': True,
70
72
  'fetchFundingHistory': False,
71
73
  'fetchFundingRate': False,
@@ -2016,7 +2018,7 @@ class okcoin(Exchange, ImplicitAPI):
2016
2018
  data = self.safe_list(response, 'data', [])
2017
2019
  return self.parse_orders(data, market, since, limit)
2018
2020
 
2019
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
2021
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
2020
2022
  #
2021
2023
  # {
2022
2024
  # "addr": "okbtothemoon",
@@ -2099,14 +2101,14 @@ class okcoin(Exchange, ImplicitAPI):
2099
2101
  #
2100
2102
  self.check_address(address)
2101
2103
  return {
2104
+ 'info': depositAddress,
2102
2105
  'currency': code,
2106
+ 'network': network,
2103
2107
  'address': address,
2104
2108
  'tag': tag,
2105
- 'network': network,
2106
- 'info': depositAddress,
2107
2109
  }
2108
2110
 
2109
- async def fetch_deposit_address(self, code: str, params={}):
2111
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
2110
2112
  """
2111
2113
  fetch the deposit address for a currency associated with self account
2112
2114
  :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
@@ -2125,7 +2127,7 @@ class okcoin(Exchange, ImplicitAPI):
2125
2127
  raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find ' + networkCode + ' deposit address for ' + code)
2126
2128
  return result
2127
2129
 
2128
- async def fetch_deposit_addresses_by_network(self, code: str, params={}):
2130
+ async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
2129
2131
  """
2130
2132
  fetch a dictionary of addresses for a currency, indexed by network
2131
2133
  :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address