ccxt 4.4.15__py2.py3-none-any.whl → 4.4.16__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 (145) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ascendex.py +5 -5
  3. ccxt/async_support/__init__.py +1 -1
  4. ccxt/async_support/ascendex.py +5 -5
  5. ccxt/async_support/base/exchange.py +1 -1
  6. ccxt/async_support/bigone.py +6 -4
  7. ccxt/async_support/binance.py +58 -7
  8. ccxt/async_support/bingx.py +7 -6
  9. ccxt/async_support/bit2c.py +6 -4
  10. ccxt/async_support/bitbank.py +6 -4
  11. ccxt/async_support/bitbns.py +6 -4
  12. ccxt/async_support/bitfinex.py +4 -2
  13. ccxt/async_support/bitfinex2.py +4 -2
  14. ccxt/async_support/bitget.py +6 -5
  15. ccxt/async_support/bitmart.py +5 -4
  16. ccxt/async_support/bitmex.py +4 -4
  17. ccxt/async_support/bitso.py +5 -4
  18. ccxt/async_support/bitstamp.py +6 -4
  19. ccxt/async_support/bitvavo.py +6 -4
  20. ccxt/async_support/blockchaincom.py +11 -8
  21. ccxt/async_support/blofin.py +21 -0
  22. ccxt/async_support/bybit.py +6 -6
  23. ccxt/async_support/cex.py +5 -4
  24. ccxt/async_support/coinbase.py +4 -4
  25. ccxt/async_support/coinex.py +5 -5
  26. ccxt/async_support/coinone.py +6 -3
  27. ccxt/async_support/coinsph.py +5 -5
  28. ccxt/async_support/cryptocom.py +5 -4
  29. ccxt/async_support/currencycom.py +5 -5
  30. ccxt/async_support/delta.py +7 -5
  31. ccxt/async_support/deribit.py +6 -4
  32. ccxt/async_support/digifinex.py +6 -4
  33. ccxt/async_support/exmo.py +6 -4
  34. ccxt/async_support/gate.py +5 -4
  35. ccxt/async_support/gemini.py +4 -3
  36. ccxt/async_support/hashkey.py +7 -5
  37. ccxt/async_support/hitbtc.py +6 -5
  38. ccxt/async_support/hollaex.py +6 -5
  39. ccxt/async_support/htx.py +15 -5
  40. ccxt/async_support/hyperliquid.py +8 -7
  41. ccxt/async_support/idex.py +4 -4
  42. ccxt/async_support/independentreserve.py +4 -4
  43. ccxt/async_support/indodax.py +3 -3
  44. ccxt/async_support/kraken.py +7 -5
  45. ccxt/async_support/kucoin.py +6 -5
  46. ccxt/async_support/kucoinfutures.py +5 -3
  47. ccxt/async_support/kuna.py +5 -3
  48. ccxt/async_support/lbank.py +14 -12
  49. ccxt/async_support/lykke.py +6 -4
  50. ccxt/async_support/mexc.py +6 -6
  51. ccxt/async_support/ndax.py +33 -5
  52. ccxt/async_support/oceanex.py +4 -4
  53. ccxt/async_support/okcoin.py +8 -6
  54. ccxt/async_support/okx.py +17 -6
  55. ccxt/async_support/onetrading.py +6 -5
  56. ccxt/async_support/oxfun.py +6 -6
  57. ccxt/async_support/paymium.py +6 -5
  58. ccxt/async_support/phemex.py +8 -6
  59. ccxt/async_support/poloniex.py +6 -4
  60. ccxt/async_support/probit.py +7 -6
  61. ccxt/async_support/timex.py +4 -4
  62. ccxt/async_support/tokocrypto.py +5 -5
  63. ccxt/async_support/upbit.py +7 -6
  64. ccxt/async_support/wavesexchange.py +9 -9
  65. ccxt/async_support/wazirx.py +24 -4
  66. ccxt/async_support/whitebit.py +6 -4
  67. ccxt/async_support/woo.py +6 -4
  68. ccxt/async_support/xt.py +7 -5
  69. ccxt/async_support/yobit.py +32 -23
  70. ccxt/async_support/zonda.py +31 -6
  71. ccxt/base/exchange.py +2 -2
  72. ccxt/base/types.py +8 -0
  73. ccxt/bigone.py +6 -4
  74. ccxt/binance.py +58 -7
  75. ccxt/bingx.py +7 -6
  76. ccxt/bit2c.py +6 -4
  77. ccxt/bitbank.py +6 -4
  78. ccxt/bitbns.py +6 -4
  79. ccxt/bitfinex.py +4 -2
  80. ccxt/bitfinex2.py +4 -2
  81. ccxt/bitget.py +6 -5
  82. ccxt/bitmart.py +5 -4
  83. ccxt/bitmex.py +4 -4
  84. ccxt/bitso.py +5 -4
  85. ccxt/bitstamp.py +6 -4
  86. ccxt/bitvavo.py +6 -4
  87. ccxt/blockchaincom.py +11 -8
  88. ccxt/blofin.py +21 -0
  89. ccxt/bybit.py +6 -6
  90. ccxt/cex.py +5 -4
  91. ccxt/coinbase.py +4 -4
  92. ccxt/coinex.py +5 -5
  93. ccxt/coinone.py +6 -3
  94. ccxt/coinsph.py +5 -5
  95. ccxt/cryptocom.py +5 -4
  96. ccxt/currencycom.py +5 -5
  97. ccxt/delta.py +7 -5
  98. ccxt/deribit.py +6 -4
  99. ccxt/digifinex.py +6 -4
  100. ccxt/exmo.py +6 -4
  101. ccxt/gate.py +5 -4
  102. ccxt/gemini.py +4 -3
  103. ccxt/hashkey.py +7 -5
  104. ccxt/hitbtc.py +6 -5
  105. ccxt/hollaex.py +6 -5
  106. ccxt/htx.py +15 -5
  107. ccxt/hyperliquid.py +8 -7
  108. ccxt/idex.py +4 -4
  109. ccxt/independentreserve.py +4 -4
  110. ccxt/indodax.py +3 -3
  111. ccxt/kraken.py +7 -5
  112. ccxt/kucoin.py +6 -5
  113. ccxt/kucoinfutures.py +5 -3
  114. ccxt/kuna.py +5 -3
  115. ccxt/lbank.py +14 -12
  116. ccxt/lykke.py +6 -4
  117. ccxt/mexc.py +6 -6
  118. ccxt/ndax.py +33 -5
  119. ccxt/oceanex.py +4 -4
  120. ccxt/okcoin.py +8 -6
  121. ccxt/okx.py +17 -6
  122. ccxt/onetrading.py +6 -5
  123. ccxt/oxfun.py +6 -6
  124. ccxt/paymium.py +6 -5
  125. ccxt/phemex.py +8 -6
  126. ccxt/poloniex.py +6 -4
  127. ccxt/pro/__init__.py +1 -1
  128. ccxt/probit.py +7 -6
  129. ccxt/test/tests_async.py +1 -0
  130. ccxt/test/tests_sync.py +1 -0
  131. ccxt/timex.py +4 -4
  132. ccxt/tokocrypto.py +5 -5
  133. ccxt/upbit.py +7 -6
  134. ccxt/wavesexchange.py +9 -9
  135. ccxt/wazirx.py +24 -4
  136. ccxt/whitebit.py +6 -4
  137. ccxt/woo.py +6 -4
  138. ccxt/xt.py +7 -5
  139. ccxt/yobit.py +32 -23
  140. ccxt/zonda.py +31 -6
  141. {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/METADATA +4 -4
  142. {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/RECORD +145 -145
  143. {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/LICENSE.txt +0 -0
  144. {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/WHEEL +0 -0
  145. {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/top_level.txt +0 -0
ccxt/indodax.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.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
- def fetch_deposit_addresses(self, codes: Strings = None, params={}):
1151
+ 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
ccxt/kraken.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.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
- def fetch_deposit_address(self, code: str, params={}):
2628
+ 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
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
ccxt/kucoin.py CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.kucoin import ImplicitAPI
8
8
  import hashlib
9
9
  import math
10
10
  import json
11
- 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
11
+ 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
12
12
  from typing import List
13
13
  from ccxt.base.errors import ExchangeError
14
14
  from ccxt.base.errors import AuthenticationError
@@ -78,6 +78,7 @@ class kucoin(Exchange, ImplicitAPI):
78
78
  'fetchCrossBorrowRates': False,
79
79
  'fetchCurrencies': True,
80
80
  'fetchDepositAddress': True,
81
+ 'fetchDepositAddresses': False,
81
82
  'fetchDepositAddressesByNetwork': True,
82
83
  'fetchDeposits': True,
83
84
  'fetchDepositWithdrawFee': True,
@@ -1891,7 +1892,7 @@ class kucoin(Exchange, ImplicitAPI):
1891
1892
  data = self.safe_dict(response, 'data', {})
1892
1893
  return self.parse_deposit_address(data, currency)
1893
1894
 
1894
- def fetch_deposit_address(self, code: str, params={}):
1895
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1895
1896
  """
1896
1897
  fetch the deposit address for a currency associated with self account
1897
1898
  :see: https://docs.kucoin.com/#get-deposit-addresses-v2
@@ -1923,7 +1924,7 @@ class kucoin(Exchange, ImplicitAPI):
1923
1924
  raise ExchangeError(self.id + ' fetchDepositAddress() returned an empty response, you might try to run createDepositAddress() first and try again')
1924
1925
  return self.parse_deposit_address(data, currency)
1925
1926
 
1926
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1927
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1927
1928
  address = self.safe_string(depositAddress, 'address')
1928
1929
  # BCH/BSV is returned with a "bitcoincash:" prefix, which we cut off here and only keep the address
1929
1930
  if address is not None:
@@ -1937,12 +1938,12 @@ class kucoin(Exchange, ImplicitAPI):
1937
1938
  return {
1938
1939
  'info': depositAddress,
1939
1940
  'currency': code,
1941
+ 'network': self.network_id_to_code(self.safe_string(depositAddress, 'chain')),
1940
1942
  'address': address,
1941
1943
  'tag': self.safe_string(depositAddress, 'memo'),
1942
- 'network': self.network_id_to_code(self.safe_string(depositAddress, 'chain')),
1943
1944
  }
1944
1945
 
1945
- def fetch_deposit_addresses_by_network(self, code: str, params={}):
1946
+ def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
1946
1947
  """
1947
1948
  :see: https://docs.kucoin.com/#get-deposit-addresses-v2
1948
1949
  fetch the deposit address for a currency associated with self account
ccxt/kucoinfutures.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.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
- def fetch_deposit_address(self, code: str, params={}):
645
+ 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
  def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
ccxt/kuna.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.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,
@@ -1511,7 +1513,7 @@ class kuna(Exchange, ImplicitAPI):
1511
1513
  data = self.safe_dict(response, 'data', {})
1512
1514
  return self.parse_deposit_address(data, currency)
1513
1515
 
1514
- def fetch_deposit_address(self, code: str, params={}):
1516
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1515
1517
  """
1516
1518
  fetch the deposit address for a currency associated with self account
1517
1519
  :see: https://docs.kuna.io/docs/find-crypto-address-for-deposit
@@ -1537,7 +1539,7 @@ class kuna(Exchange, ImplicitAPI):
1537
1539
  data = self.safe_dict(response, 'data', {})
1538
1540
  return self.parse_deposit_address(data, currency)
1539
1541
 
1540
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1542
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1541
1543
  #
1542
1544
  # {
1543
1545
  # "id": "c52b6646-fb91-4760-b147-a4f952e8652c", # ID of the address.
ccxt/lbank.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.lbank import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
9
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, 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,8 @@ class lbank(Exchange, ImplicitAPI):
62
62
  'fetchCrossBorrowRate': False,
63
63
  'fetchCrossBorrowRates': False,
64
64
  'fetchDepositAddress': True,
65
+ 'fetchDepositAddresses': False,
66
+ 'fetchDepositAddressesByNetwork': False,
65
67
  'fetchDepositWithdrawFee': 'emulated',
66
68
  'fetchDepositWithdrawFees': True,
67
69
  'fetchFundingHistory': False,
@@ -1831,7 +1833,7 @@ class lbank(Exchange, ImplicitAPI):
1831
1833
  network = self.safe_string(networks, network, network) # handle ERC20>ETH alias
1832
1834
  return network
1833
1835
 
1834
- def fetch_deposit_address(self, code: str, params={}):
1836
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1835
1837
  """
1836
1838
  fetch the deposit address for a currency associated with self account
1837
1839
  :see: https://www.lbank.com/en-US/docs/index.html#get-deposit-address
@@ -1852,7 +1854,7 @@ class lbank(Exchange, ImplicitAPI):
1852
1854
  response = self.fetch_deposit_address_default(code, params)
1853
1855
  return response
1854
1856
 
1855
- def fetch_deposit_address_default(self, code: str, params={}):
1857
+ def fetch_deposit_address_default(self, code: str, params={}) -> DepositAddress:
1856
1858
  self.load_markets()
1857
1859
  currency = self.currency(code)
1858
1860
  request: dict = {
@@ -1883,14 +1885,14 @@ class lbank(Exchange, ImplicitAPI):
1883
1885
  inverseNetworks = self.safe_value(self.options, 'inverse-networks', {})
1884
1886
  networkCode = self.safe_string_upper(inverseNetworks, networkId, networkId)
1885
1887
  return {
1888
+ 'info': response,
1886
1889
  'currency': code,
1890
+ 'network': networkCode,
1887
1891
  'address': address,
1888
1892
  'tag': tag,
1889
- 'network': networkCode,
1890
- 'info': response,
1891
1893
  }
1892
1894
 
1893
- def fetch_deposit_address_supplement(self, code: str, params={}):
1895
+ def fetch_deposit_address_supplement(self, code: str, params={}) -> DepositAddress:
1894
1896
  # returns the address for whatever the default network is...
1895
1897
  self.load_markets()
1896
1898
  currency = self.currency(code)
@@ -1922,11 +1924,11 @@ class lbank(Exchange, ImplicitAPI):
1922
1924
  inverseNetworks = self.safe_value(self.options, 'inverse-networks', {})
1923
1925
  networkCode = self.safe_string_upper(inverseNetworks, network, network)
1924
1926
  return {
1927
+ 'info': response,
1925
1928
  'currency': code,
1929
+ 'network': networkCode, # will be None if not specified in request
1926
1930
  'address': address,
1927
1931
  'tag': tag,
1928
- 'network': networkCode, # will be None if not specified in request
1929
- 'info': response,
1930
1932
  }
1931
1933
 
1932
1934
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
@@ -2328,7 +2330,7 @@ class lbank(Exchange, ImplicitAPI):
2328
2330
  when using private endpoint, only returns information for currencies with non-zero balance, use public method by specifying self.options['fetchDepositWithdrawFees']['method'] = 'fetchPublicDepositWithdrawFees'
2329
2331
  :see: https://www.lbank.com/en-US/docs/index.html#get-all-coins-information
2330
2332
  :see: https://www.lbank.com/en-US/docs/index.html#withdrawal-configurations
2331
- :param str[]|None codes: array of unified currency codes
2333
+ :param str[] [codes]: array of unified currency codes
2332
2334
  :param dict [params]: extra parameters specific to the exchange API endpoint
2333
2335
  :returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
2334
2336
  """
@@ -2341,11 +2343,11 @@ class lbank(Exchange, ImplicitAPI):
2341
2343
  method = self.safe_string(params, 'method', defaultMethod)
2342
2344
  params = self.omit(params, 'method')
2343
2345
  if method == 'fetchPublicDepositWithdrawFees':
2344
- self.fetch_public_deposit_withdraw_fees(codes, params)
2346
+ response = self.fetch_public_deposit_withdraw_fees(codes, params)
2345
2347
  else:
2346
- self.fetch_private_deposit_withdraw_fees(codes, params)
2348
+ response = self.fetch_private_deposit_withdraw_fees(codes, params)
2347
2349
  else:
2348
- self.fetch_public_deposit_withdraw_fees(codes, params)
2350
+ response = self.fetch_public_deposit_withdraw_fees(codes, params)
2349
2351
  return response
2350
2352
 
2351
2353
  def fetch_private_deposit_withdraw_fees(self, codes=None, params={}):
ccxt/lykke.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.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
- def fetch_deposit_address(self, code: str, params={}):
1077
+ 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:
ccxt/mexc.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.mexc import ImplicitAPI
8
8
  import hashlib
9
- 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
9
+ 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
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -4220,7 +4220,7 @@ class mexc(Exchange, ImplicitAPI):
4220
4220
  floor = cap
4221
4221
  return tiers
4222
4222
 
4223
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
4223
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
4224
4224
  #
4225
4225
  # {
4226
4226
  # coin: "USDT",
@@ -4234,14 +4234,14 @@ class mexc(Exchange, ImplicitAPI):
4234
4234
  networkId = self.safe_string(depositAddress, 'netWork')
4235
4235
  self.check_address(address)
4236
4236
  return {
4237
+ 'info': depositAddress,
4237
4238
  'currency': self.safe_currency_code(currencyId, currency),
4239
+ 'network': self.network_id_to_code(networkId),
4238
4240
  'address': address,
4239
4241
  'tag': self.safe_string(depositAddress, 'memo'),
4240
- 'network': self.network_id_to_code(networkId),
4241
- 'info': depositAddress,
4242
4242
  }
4243
4243
 
4244
- def fetch_deposit_addresses_by_network(self, code: str, params={}):
4244
+ def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
4245
4245
  """
4246
4246
  fetch a dictionary of addresses for a currency, indexed by network
4247
4247
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
@@ -4323,7 +4323,7 @@ class mexc(Exchange, ImplicitAPI):
4323
4323
  # }
4324
4324
  return self.parse_deposit_address(response, currency)
4325
4325
 
4326
- def fetch_deposit_address(self, code: str, params={}):
4326
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
4327
4327
  """
4328
4328
  fetch the deposit address for a currency associated with self account
4329
4329
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
ccxt/ndax.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.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
- def fetch_deposit_address(self, code: str, params={}):
1902
+ 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
  def create_deposit_address(self, code: str, params={}):
ccxt/oceanex.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.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
- def fetch_deposit_addresses_by_network(self, code: str, params={}):
866
+ 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):
ccxt/okcoin.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.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
- def fetch_deposit_address(self, code: str, params={}):
2111
+ 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
- def fetch_deposit_addresses_by_network(self, code: str, params={}):
2130
+ 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
ccxt/okx.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.okx import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Conversion, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Greeks, Int, LedgerEntry, Leverage, LeverageTier, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Conversion, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, LeverageTier, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from typing import Any
12
12
  from ccxt.base.errors import ExchangeError
@@ -1813,6 +1813,16 @@ class okx(Exchange, ImplicitAPI):
1813
1813
  # "sodUtc0": "0.07872",
1814
1814
  # "sodUtc8": "0.07345"
1815
1815
  # }
1816
+ # {
1817
+ # instId: 'LTC-USDT',
1818
+ # idxPx: '65.74',
1819
+ # open24h: '65.37',
1820
+ # high24h: '66.15',
1821
+ # low24h: '64.97',
1822
+ # sodUtc0: '65.68',
1823
+ # sodUtc8: '65.54',
1824
+ # ts: '1728467346900'
1825
+ # },
1816
1826
  #
1817
1827
  timestamp = self.safe_integer(ticker, 'ts')
1818
1828
  marketId = self.safe_string(ticker, 'instId')
@@ -1846,6 +1856,7 @@ class okx(Exchange, ImplicitAPI):
1846
1856
  'baseVolume': baseVolume,
1847
1857
  'quoteVolume': quoteVolume,
1848
1858
  'markPrice': self.safe_string(ticker, 'markPx'),
1859
+ 'indexPrice': self.safe_string(ticker, 'idxPx'),
1849
1860
  'info': ticker,
1850
1861
  }, market)
1851
1862
 
@@ -4424,7 +4435,7 @@ class okx(Exchange, ImplicitAPI):
4424
4435
  'fee': fee,
4425
4436
  }, currency)
4426
4437
 
4427
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
4438
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
4428
4439
  #
4429
4440
  # {
4430
4441
  # "addr": "okbtothemoon",
@@ -4512,14 +4523,14 @@ class okx(Exchange, ImplicitAPI):
4512
4523
  networkCode = self.network_id_to_code(network, code)
4513
4524
  self.check_address(address)
4514
4525
  return {
4526
+ 'info': depositAddress,
4515
4527
  'currency': code,
4528
+ 'network': networkCode,
4516
4529
  'address': address,
4517
4530
  'tag': tag,
4518
- 'network': networkCode,
4519
- 'info': depositAddress,
4520
4531
  }
4521
4532
 
4522
- def fetch_deposit_addresses_by_network(self, code: str, params={}):
4533
+ def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
4523
4534
  """
4524
4535
  fetch a dictionary of addresses for a currency, indexed by network
4525
4536
  :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
@@ -4559,7 +4570,7 @@ class okx(Exchange, ImplicitAPI):
4559
4570
  parsed = self.parse_deposit_addresses(filtered, [currency['code']], False)
4560
4571
  return self.index_by(parsed, 'network')
4561
4572
 
4562
- def fetch_deposit_address(self, code: str, params={}):
4573
+ def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
4563
4574
  """
4564
4575
  fetch the deposit address for a currency associated with self account
4565
4576
  :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address