ccxt 4.4.14__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 (150) 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 +16 -6
  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 +8 -7
  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/vertex.py +8 -0
  65. ccxt/async_support/wavesexchange.py +9 -9
  66. ccxt/async_support/wazirx.py +24 -4
  67. ccxt/async_support/whitebit.py +6 -4
  68. ccxt/async_support/woo.py +6 -4
  69. ccxt/async_support/xt.py +7 -5
  70. ccxt/async_support/yobit.py +32 -23
  71. ccxt/async_support/zonda.py +31 -6
  72. ccxt/base/exchange.py +2 -2
  73. ccxt/base/types.py +8 -0
  74. ccxt/bigone.py +6 -4
  75. ccxt/binance.py +58 -7
  76. ccxt/bingx.py +7 -6
  77. ccxt/bit2c.py +6 -4
  78. ccxt/bitbank.py +6 -4
  79. ccxt/bitbns.py +6 -4
  80. ccxt/bitfinex.py +4 -2
  81. ccxt/bitfinex2.py +4 -2
  82. ccxt/bitget.py +6 -5
  83. ccxt/bitmart.py +5 -4
  84. ccxt/bitmex.py +4 -4
  85. ccxt/bitso.py +5 -4
  86. ccxt/bitstamp.py +6 -4
  87. ccxt/bitvavo.py +6 -4
  88. ccxt/blockchaincom.py +11 -8
  89. ccxt/blofin.py +21 -0
  90. ccxt/bybit.py +6 -6
  91. ccxt/cex.py +5 -4
  92. ccxt/coinbase.py +4 -4
  93. ccxt/coinex.py +5 -5
  94. ccxt/coinone.py +6 -3
  95. ccxt/coinsph.py +5 -5
  96. ccxt/cryptocom.py +5 -4
  97. ccxt/currencycom.py +5 -5
  98. ccxt/delta.py +7 -5
  99. ccxt/deribit.py +6 -4
  100. ccxt/digifinex.py +6 -4
  101. ccxt/exmo.py +6 -4
  102. ccxt/gate.py +5 -4
  103. ccxt/gemini.py +4 -3
  104. ccxt/hashkey.py +7 -5
  105. ccxt/hitbtc.py +6 -5
  106. ccxt/hollaex.py +6 -5
  107. ccxt/htx.py +16 -6
  108. ccxt/hyperliquid.py +8 -7
  109. ccxt/idex.py +4 -4
  110. ccxt/independentreserve.py +4 -4
  111. ccxt/indodax.py +3 -3
  112. ccxt/kraken.py +7 -5
  113. ccxt/kucoin.py +6 -5
  114. ccxt/kucoinfutures.py +5 -3
  115. ccxt/kuna.py +5 -3
  116. ccxt/lbank.py +14 -12
  117. ccxt/lykke.py +6 -4
  118. ccxt/mexc.py +6 -6
  119. ccxt/ndax.py +33 -5
  120. ccxt/oceanex.py +4 -4
  121. ccxt/okcoin.py +8 -6
  122. ccxt/okx.py +17 -6
  123. ccxt/onetrading.py +8 -7
  124. ccxt/oxfun.py +6 -6
  125. ccxt/paymium.py +6 -5
  126. ccxt/phemex.py +8 -6
  127. ccxt/poloniex.py +6 -4
  128. ccxt/pro/__init__.py +1 -1
  129. ccxt/pro/binance.py +1 -1
  130. ccxt/pro/upbit.py +42 -1
  131. ccxt/pro/vertex.py +11 -0
  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 +4 -4
  136. ccxt/tokocrypto.py +5 -5
  137. ccxt/upbit.py +7 -6
  138. ccxt/vertex.py +8 -0
  139. ccxt/wavesexchange.py +9 -9
  140. ccxt/wazirx.py +24 -4
  141. ccxt/whitebit.py +6 -4
  142. ccxt/woo.py +6 -4
  143. ccxt/xt.py +7 -5
  144. ccxt/yobit.py +32 -23
  145. ccxt/zonda.py +31 -6
  146. {ccxt-4.4.14.dist-info → ccxt-4.4.16.dist-info}/METADATA +4 -4
  147. {ccxt-4.4.14.dist-info → ccxt-4.4.16.dist-info}/RECORD +150 -150
  148. {ccxt-4.4.14.dist-info → ccxt-4.4.16.dist-info}/LICENSE.txt +0 -0
  149. {ccxt-4.4.14.dist-info → ccxt-4.4.16.dist-info}/WHEEL +0 -0
  150. {ccxt-4.4.14.dist-info → ccxt-4.4.16.dist-info}/top_level.txt +0 -0
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.bitso import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TradingFees, Transaction
9
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -53,6 +53,7 @@ class bitso(Exchange, ImplicitAPI):
53
53
  'fetchDeposit': True,
54
54
  'fetchDepositAddress': True,
55
55
  'fetchDepositAddresses': False,
56
+ 'fetchDepositAddressesByNetwork': False,
56
57
  'fetchDeposits': True,
57
58
  'fetchDepositsWithdrawals': False,
58
59
  'fetchDepositWithdrawFee': 'emulated',
@@ -1247,7 +1248,7 @@ class bitso(Exchange, ImplicitAPI):
1247
1248
  transactions = self.safe_list(response, 'payload', [])
1248
1249
  return self.parse_transactions(transactions, currency, since, limit, params)
1249
1250
 
1250
- async def fetch_deposit_address(self, code: str, params={}):
1251
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1251
1252
  """
1252
1253
  fetch the deposit address for a currency associated with self account
1253
1254
  :param str code: unified currency code
@@ -1268,11 +1269,11 @@ class bitso(Exchange, ImplicitAPI):
1268
1269
  tag = self.safe_string(parts, 1)
1269
1270
  self.check_address(address)
1270
1271
  return {
1272
+ 'info': response,
1271
1273
  'currency': code,
1274
+ 'network': None,
1272
1275
  'address': address,
1273
1276
  'tag': tag,
1274
- 'network': None,
1275
- 'info': response,
1276
1277
  }
1277
1278
 
1278
1279
  async def fetch_transaction_fees(self, codes: Strings = None, params={}):
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.bitstamp 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, TradingFeeInterface, TradingFees, 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, TradingFeeInterface, 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
@@ -60,6 +60,8 @@ class bitstamp(Exchange, ImplicitAPI):
60
60
  'fetchCrossBorrowRates': False,
61
61
  'fetchCurrencies': True,
62
62
  'fetchDepositAddress': True,
63
+ 'fetchDepositAddresses': False,
64
+ 'fetchDepositAddressesByNetwork': False,
63
65
  'fetchDepositsWithdrawals': True,
64
66
  'fetchDepositWithdrawFee': 'emulated',
65
67
  'fetchDepositWithdrawFees': True,
@@ -1983,7 +1985,7 @@ class bitstamp(Exchange, ImplicitAPI):
1983
1985
  def is_fiat(self, code):
1984
1986
  return code == 'USD' or code == 'EUR' or code == 'GBP'
1985
1987
 
1986
- async def fetch_deposit_address(self, code: str, params={}):
1988
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1987
1989
  """
1988
1990
  fetch the deposit address for a currency associated with self account
1989
1991
  :see: https://www.bitstamp.net/api/#tag/Deposits/operation/GetCryptoDepositAddress
@@ -2000,11 +2002,11 @@ class bitstamp(Exchange, ImplicitAPI):
2000
2002
  tag = self.safe_string_2(response, 'memo_id', 'destination_tag')
2001
2003
  self.check_address(address)
2002
2004
  return {
2005
+ 'info': response,
2003
2006
  'currency': code,
2007
+ 'network': None,
2004
2008
  'address': address,
2005
2009
  'tag': tag,
2006
- 'network': None,
2007
- 'info': response,
2008
2010
  }
2009
2011
 
2010
2012
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.bitvavo 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
9
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -65,6 +65,8 @@ class bitvavo(Exchange, ImplicitAPI):
65
65
  'fetchCrossBorrowRates': False,
66
66
  'fetchCurrencies': True,
67
67
  'fetchDepositAddress': True,
68
+ 'fetchDepositAddresses': False,
69
+ 'fetchDepositAddressesByNetwork': False,
68
70
  'fetchDeposits': True,
69
71
  'fetchDepositWithdrawFee': 'emulated',
70
72
  'fetchDepositWithdrawFees': True,
@@ -998,7 +1000,7 @@ class bitvavo(Exchange, ImplicitAPI):
998
1000
  #
999
1001
  return self.parse_balance(response)
1000
1002
 
1001
- async def fetch_deposit_address(self, code: str, params={}):
1003
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1002
1004
  """
1003
1005
  fetch the deposit address for a currency associated with self account
1004
1006
  :param str code: unified currency code
@@ -1021,11 +1023,11 @@ class bitvavo(Exchange, ImplicitAPI):
1021
1023
  tag = self.safe_string(response, 'paymentId')
1022
1024
  self.check_address(address)
1023
1025
  return {
1026
+ 'info': response,
1024
1027
  'currency': code,
1028
+ 'network': None,
1025
1029
  'address': address,
1026
1030
  'tag': tag,
1027
- 'network': None,
1028
- 'info': response,
1029
1031
  }
1030
1032
 
1031
1033
  def create_order_request(self, symbol: Str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.blockchaincom import ImplicitAPI
8
- from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
8
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import AuthenticationError
@@ -45,6 +45,8 @@ class blockchaincom(Exchange, ImplicitAPI):
45
45
  'fetchClosedOrders': True,
46
46
  'fetchDeposit': True,
47
47
  'fetchDepositAddress': True,
48
+ 'fetchDepositAddresses': False,
49
+ 'fetchDepositAddressesByNetwork': False,
48
50
  'fetchDeposits': True,
49
51
  'fetchFundingHistory': False,
50
52
  'fetchFundingRate': False,
@@ -770,7 +772,7 @@ class blockchaincom(Exchange, ImplicitAPI):
770
772
  trades = await self.privateGetFills(self.extend(request, params))
771
773
  return self.parse_trades(trades, market, since, limit, params) # need to define
772
774
 
773
- async def fetch_deposit_address(self, code: str, params={}):
775
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
774
776
  """
775
777
  fetch the deposit address for a currency associated with self account
776
778
  :see: https://api.blockchain.com/v3/#getdepositaddress
@@ -792,12 +794,13 @@ class blockchaincom(Exchange, ImplicitAPI):
792
794
  # if a tag or memo is used it is separated by a colon in the 'address' value
793
795
  tag = self.safe_string(addressParts, 0)
794
796
  address = self.safe_string(addressParts, 1)
795
- result: dict = {'info': response}
796
- result['currency'] = currency['code']
797
- result['address'] = address
798
- if tag is not None:
799
- result['tag'] = tag
800
- return result
797
+ return {
798
+ 'info': response,
799
+ 'currency': currency['code'],
800
+ 'network': None,
801
+ 'address': address,
802
+ 'tag': tag,
803
+ }
801
804
 
802
805
  def parse_transaction_state(self, state):
803
806
  states: dict = {
@@ -543,6 +543,8 @@ class blofin(Exchange, ImplicitAPI):
543
543
  'average': None,
544
544
  'baseVolume': baseVolume,
545
545
  'quoteVolume': quoteVolume,
546
+ 'indexPrice': self.safe_string(ticker, 'indexPrice'),
547
+ 'markPrice': self.safe_string(ticker, 'markPrice'),
546
548
  'info': ticker,
547
549
  }, market)
548
550
 
@@ -564,6 +566,25 @@ class blofin(Exchange, ImplicitAPI):
564
566
  first = self.safe_dict(data, 0, {})
565
567
  return self.parse_ticker(first, market)
566
568
 
569
+ async def fetch_mark_price(self, symbol: str, params={}) -> Ticker:
570
+ """
571
+ fetches mark price for the market
572
+ :see: https://docs.blofin.com/index.html#get-mark-price
573
+ :param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
574
+ :param dict [params]: extra parameters specific to the exchange API endpoint
575
+ :param str [params.subType]: "linear" or "inverse"
576
+ :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
577
+ """
578
+ await self.load_markets()
579
+ market = self.market(symbol)
580
+ request = {
581
+ 'symbol': market['id'],
582
+ }
583
+ response = await self.publicGetMarketMarkPrice(self.extend(request, params))
584
+ data = self.safe_list(response, 'data', [])
585
+ first = self.safe_dict(data, 0, {})
586
+ return self.parse_ticker(first, market)
587
+
567
588
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
568
589
  """
569
590
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.bybit import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, Greeks, Int, LedgerEntry, Leverage, LeverageTier, LeverageTiers, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, LeverageTier, LeverageTiers, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, 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
@@ -5248,7 +5248,7 @@ class bybit(Exchange, ImplicitAPI):
5248
5248
  trades = self.add_pagination_cursor_to_result(response)
5249
5249
  return self.parse_trades(trades, market, since, limit)
5250
5250
 
5251
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
5251
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
5252
5252
  #
5253
5253
  # {
5254
5254
  # "chainType": "ERC20",
@@ -5263,14 +5263,14 @@ class bybit(Exchange, ImplicitAPI):
5263
5263
  chain = self.safe_string(depositAddress, 'chain')
5264
5264
  self.check_address(address)
5265
5265
  return {
5266
+ 'info': depositAddress,
5266
5267
  'currency': code,
5268
+ 'network': chain,
5267
5269
  'address': address,
5268
5270
  'tag': tag,
5269
- 'network': chain,
5270
- 'info': depositAddress,
5271
5271
  }
5272
5272
 
5273
- async def fetch_deposit_addresses_by_network(self, code: str, params={}):
5273
+ async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
5274
5274
  """
5275
5275
  fetch a dictionary of addresses for a currency, indexed by network
5276
5276
  :see: https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
@@ -5312,7 +5312,7 @@ class bybit(Exchange, ImplicitAPI):
5312
5312
  })
5313
5313
  return self.index_by(parsed, 'network')
5314
5314
 
5315
- async def fetch_deposit_address(self, code: str, params={}):
5315
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
5316
5316
  """
5317
5317
  fetch the deposit address for a currency associated with self account
5318
5318
  :see: https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
ccxt/async_support/cex.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.cex import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Currencies, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
10
+ from ccxt.base.types import Balances, Currencies, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -59,6 +59,7 @@ class cex(Exchange, ImplicitAPI):
59
59
  'fetchDeposit': False,
60
60
  'fetchDepositAddress': True,
61
61
  'fetchDepositAddresses': False,
62
+ 'fetchDepositAddressesByNetwork': False,
62
63
  'fetchDeposits': False,
63
64
  'fetchDepositsWithdrawals': False,
64
65
  'fetchFundingHistory': False,
@@ -1511,7 +1512,7 @@ class cex(Exchange, ImplicitAPI):
1511
1512
  response = await self.privatePostCancelReplaceOrderPair(self.extend(request, params))
1512
1513
  return self.parse_order(response, market)
1513
1514
 
1514
- async def fetch_deposit_address(self, code: str, params={}):
1515
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1515
1516
  """
1516
1517
  :see: https://docs.cex.io/#get-crypto-address
1517
1518
  fetch the deposit address for a currency associated with self account
@@ -1555,11 +1556,11 @@ class cex(Exchange, ImplicitAPI):
1555
1556
  address = self.safe_string_2(addressObject, 'address', 'destination')
1556
1557
  self.check_address(address)
1557
1558
  return {
1559
+ 'info': data,
1558
1560
  'currency': code,
1561
+ 'network': self.network_id_to_code(selectedNetworkId),
1559
1562
  'address': address,
1560
1563
  'tag': self.safe_string_2(addressObject, 'destinationTag', 'memo'),
1561
- 'network': self.network_id_to_code(selectedNetworkId),
1562
- 'info': data,
1563
1564
  }
1564
1565
 
1565
1566
  def nonce(self):
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.coinbase import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- from ccxt.base.types import Account, Balances, Conversion, Currencies, Currency, Int, LedgerEntry, Market, MarketInterface, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
10
+ from ccxt.base.types import Account, Balances, Conversion, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market, MarketInterface, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -3715,7 +3715,7 @@ class coinbase(Exchange, ImplicitAPI):
3715
3715
  data = self.safe_dict(response, 'data', {})
3716
3716
  return self.parse_transaction(data, currency)
3717
3717
 
3718
- async def fetch_deposit_addresses_by_network(self, code: str, params={}):
3718
+ async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
3719
3719
  """
3720
3720
  fetch the deposit address for a currency associated with self account
3721
3721
  :see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
@@ -3787,7 +3787,7 @@ class coinbase(Exchange, ImplicitAPI):
3787
3787
  addressStructures = self.parse_deposit_addresses(data, None, False)
3788
3788
  return self.index_by(addressStructures, 'network')
3789
3789
 
3790
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
3790
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
3791
3791
  #
3792
3792
  # {
3793
3793
  # id: '64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
@@ -3842,9 +3842,9 @@ class coinbase(Exchange, ImplicitAPI):
3842
3842
  return {
3843
3843
  'info': depositAddress,
3844
3844
  'currency': self.safe_currency_code(marketId, currency),
3845
+ 'network': self.network_id_to_code(networkId, code),
3845
3846
  'address': address,
3846
3847
  'tag': self.safe_string(addressInfo, 'destination_tag'),
3847
- 'network': self.network_id_to_code(networkId, code),
3848
3848
  }
3849
3849
 
3850
3850
  async def deposit(self, code: str, amount: float, id: str, params={}):
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.coinex import ImplicitAPI
8
8
  import asyncio
9
- from ccxt.base.types import Balances, Currencies, Currency, Int, IsolatedBorrowRate, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, IsolatedBorrowRate, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, 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
@@ -79,8 +79,8 @@ class coinex(Exchange, ImplicitAPI):
79
79
  'fetchCrossBorrowRates': False,
80
80
  'fetchCurrencies': True,
81
81
  'fetchDepositAddress': True,
82
- 'fetchDepositAddressByNetwork': False,
83
82
  'fetchDepositAddresses': False,
83
+ 'fetchDepositAddressesByNetwork': False,
84
84
  'fetchDeposits': True,
85
85
  'fetchDepositWithdrawFee': True,
86
86
  'fetchDepositWithdrawFees': False,
@@ -3534,7 +3534,7 @@ class coinex(Exchange, ImplicitAPI):
3534
3534
  data = self.safe_dict(response, 'data', {})
3535
3535
  return self.parse_deposit_address(data, currency)
3536
3536
 
3537
- async def fetch_deposit_address(self, code: str, params={}):
3537
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
3538
3538
  """
3539
3539
  fetch the deposit address for a currency associated with self account
3540
3540
  :see: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-address
@@ -3578,7 +3578,7 @@ class coinex(Exchange, ImplicitAPI):
3578
3578
  depositAddress['network'] = self.network_id_to_code(network, currency).upper()
3579
3579
  return depositAddress
3580
3580
 
3581
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
3581
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
3582
3582
  #
3583
3583
  # {
3584
3584
  # "address": "1P1JqozxioQwaqPwgMAQdNDYNyaVSqgARq",
@@ -3598,9 +3598,9 @@ class coinex(Exchange, ImplicitAPI):
3598
3598
  return {
3599
3599
  'info': depositAddress,
3600
3600
  'currency': self.safe_currency_code(None, currency),
3601
+ 'network': None,
3601
3602
  'address': address,
3602
3603
  'tag': tag,
3603
- 'network': None,
3604
3604
  }
3605
3605
 
3606
3606
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.coinone import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
9
+ from ccxt.base.types import Balances, Currencies, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -52,7 +52,9 @@ class coinone(Exchange, ImplicitAPI):
52
52
  'fetchCrossBorrowRate': False,
53
53
  'fetchCrossBorrowRates': False,
54
54
  'fetchCurrencies': True,
55
+ 'fetchDepositAddress': False,
55
56
  'fetchDepositAddresses': True,
57
+ 'fetchDepositAddressesByNetwork': False,
56
58
  'fetchFundingHistory': False,
57
59
  'fetchFundingRate': False,
58
60
  'fetchFundingRateHistory': False,
@@ -1021,7 +1023,7 @@ class coinone(Exchange, ImplicitAPI):
1021
1023
  #
1022
1024
  return self.safe_order(response)
1023
1025
 
1024
- async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
1026
+ async def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
1025
1027
  """
1026
1028
  fetch deposit addresses for multiple currencies and chain types
1027
1029
  :param str[]|None codes: list of unified currency codes, default is None
@@ -1059,10 +1061,11 @@ class coinone(Exchange, ImplicitAPI):
1059
1061
  depositAddress = self.safe_value(result, code)
1060
1062
  if depositAddress is None:
1061
1063
  depositAddress = {
1064
+ 'info': value,
1062
1065
  'currency': code,
1066
+ 'network': None,
1063
1067
  'address': None,
1064
1068
  'tag': None,
1065
- 'info': value,
1066
1069
  }
1067
1070
  address = self.safe_string(depositAddress, 'address', value)
1068
1071
  self.check_address(address)
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.coinsph 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
@@ -1740,7 +1740,7 @@ class coinsph(Exchange, ImplicitAPI):
1740
1740
  }
1741
1741
  return self.safe_string(statuses, status, status)
1742
1742
 
1743
- async def fetch_deposit_address(self, code: str, params={}):
1743
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1744
1744
  """
1745
1745
  fetch the deposit address for a currency associated with self account
1746
1746
  :see: https://coins-docs.github.io/rest-api/#deposit-address-user_data
@@ -1770,7 +1770,7 @@ class coinsph(Exchange, ImplicitAPI):
1770
1770
  #
1771
1771
  return self.parse_deposit_address(response, currency)
1772
1772
 
1773
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1773
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1774
1774
  #
1775
1775
  # {
1776
1776
  # "coin": "ETH",
@@ -1781,11 +1781,11 @@ class coinsph(Exchange, ImplicitAPI):
1781
1781
  currencyId = self.safe_string(depositAddress, 'coin')
1782
1782
  parsedCurrency = self.safe_currency_code(currencyId, currency)
1783
1783
  return {
1784
+ 'info': depositAddress,
1784
1785
  'currency': parsedCurrency,
1786
+ 'network': None,
1785
1787
  'address': self.safe_string(depositAddress, 'address'),
1786
1788
  'tag': self.safe_string(depositAddress, 'addressTag'),
1787
- 'network': None,
1788
- 'info': depositAddress,
1789
1789
  }
1790
1790
 
1791
1791
  def url_encode_query(self, query={}):
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.cryptocom import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currency, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
9
+ from ccxt.base.types import Account, Balances, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderRequest, CancellationRequest, 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
@@ -69,6 +69,7 @@ class cryptocom(Exchange, ImplicitAPI):
69
69
  'fetchCrossBorrowRates': False,
70
70
  'fetchCurrencies': False,
71
71
  'fetchDepositAddress': True,
72
+ 'fetchDepositAddresses': False,
72
73
  'fetchDepositAddressesByNetwork': True,
73
74
  'fetchDeposits': True,
74
75
  'fetchDepositsWithdrawals': False,
@@ -1601,7 +1602,7 @@ class cryptocom(Exchange, ImplicitAPI):
1601
1602
  result = self.safe_dict(response, 'result')
1602
1603
  return self.parse_transaction(result, currency)
1603
1604
 
1604
- async def fetch_deposit_addresses_by_network(self, code: str, params={}):
1605
+ async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
1605
1606
  """
1606
1607
  fetch a dictionary of addresses for a currency, indexed by network
1607
1608
  :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-address
@@ -1652,13 +1653,13 @@ class cryptocom(Exchange, ImplicitAPI):
1652
1653
  result[network] = {
1653
1654
  'info': value,
1654
1655
  'currency': responseCode,
1656
+ 'network': network,
1655
1657
  'address': address,
1656
1658
  'tag': tag,
1657
- 'network': network,
1658
1659
  }
1659
1660
  return result
1660
1661
 
1661
- async def fetch_deposit_address(self, code: str, params={}):
1662
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1662
1663
  """
1663
1664
  fetch the deposit address for a currency associated with self account
1664
1665
  :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-address
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.currencycom import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currencies, Currency, Int, LedgerEntry, Leverage, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
9
+ from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, Int, LedgerEntry, Leverage, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -1747,7 +1747,7 @@ class currencycom(Exchange, ImplicitAPI):
1747
1747
  'shortLeverage': leverageValue,
1748
1748
  }
1749
1749
 
1750
- async def fetch_deposit_address(self, code: str, params={}):
1750
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1751
1751
  """
1752
1752
  fetch the deposit address for a currency associated with self account
1753
1753
  :see: https://apitradedoc.currency.com/swagger-ui.html#/rest-api/getDepositAddressUsingGET
@@ -1766,16 +1766,16 @@ class currencycom(Exchange, ImplicitAPI):
1766
1766
  #
1767
1767
  return self.parse_deposit_address(response, currency)
1768
1768
 
1769
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
1769
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
1770
1770
  address = self.safe_string(depositAddress, 'address')
1771
1771
  self.check_address(address)
1772
1772
  currency = self.safe_currency(None, currency)
1773
1773
  return {
1774
+ 'info': depositAddress,
1774
1775
  'currency': currency['code'],
1776
+ 'network': None,
1775
1777
  'address': address,
1776
1778
  'tag': None,
1777
- 'network': None,
1778
- 'info': depositAddress,
1779
1779
  }
1780
1780
 
1781
1781
  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.delta import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Currency, Greeks, Int, LedgerEntry, Leverage, MarginMode, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade
9
+ from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, MarginMode, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -51,6 +51,8 @@ class delta(Exchange, ImplicitAPI):
51
51
  'fetchCurrencies': True,
52
52
  'fetchDeposit': None,
53
53
  'fetchDepositAddress': True,
54
+ 'fetchDepositAddresses': False,
55
+ 'fetchDepositAddressesByNetwork': False,
54
56
  'fetchDeposits': None,
55
57
  'fetchFundingHistory': False,
56
58
  'fetchFundingRate': True,
@@ -2225,7 +2227,7 @@ class delta(Exchange, ImplicitAPI):
2225
2227
  'fee': None,
2226
2228
  }, currency)
2227
2229
 
2228
- async def fetch_deposit_address(self, code: str, params={}):
2230
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
2229
2231
  """
2230
2232
  fetch the deposit address for a currency associated with self account
2231
2233
  :param str code: unified currency code
@@ -2263,7 +2265,7 @@ class delta(Exchange, ImplicitAPI):
2263
2265
  result = self.safe_dict(response, 'result', {})
2264
2266
  return self.parse_deposit_address(result, currency)
2265
2267
 
2266
- def parse_deposit_address(self, depositAddress, currency: Currency = None):
2268
+ def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
2267
2269
  #
2268
2270
  # {
2269
2271
  # "id": 1915615,
@@ -2283,11 +2285,11 @@ class delta(Exchange, ImplicitAPI):
2283
2285
  networkId = self.safe_string(depositAddress, 'network')
2284
2286
  self.check_address(address)
2285
2287
  return {
2288
+ 'info': depositAddress,
2286
2289
  'currency': self.safe_currency_code(marketId, currency),
2290
+ 'network': self.network_id_to_code(networkId),
2287
2291
  'address': address,
2288
2292
  'tag': self.safe_string(depositAddress, 'memo'),
2289
- 'network': self.network_id_to_code(networkId),
2290
- 'info': depositAddress,
2291
2293
  }
2292
2294
 
2293
2295
  async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.deribit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currencies, Currency, Greeks, Int, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, Greeks, Int, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, 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
@@ -65,6 +65,8 @@ class deribit(Exchange, ImplicitAPI):
65
65
  'fetchCurrencies': True,
66
66
  'fetchDeposit': False,
67
67
  'fetchDepositAddress': True,
68
+ 'fetchDepositAddresses': False,
69
+ 'fetchDepositAddressesByNetwork': False,
68
70
  'fetchDeposits': True,
69
71
  'fetchDepositWithdrawFees': True,
70
72
  'fetchFundingRate': True,
@@ -1019,7 +1021,7 @@ class deribit(Exchange, ImplicitAPI):
1019
1021
  'info': response,
1020
1022
  }
1021
1023
 
1022
- async def fetch_deposit_address(self, code: str, params={}):
1024
+ async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1023
1025
  """
1024
1026
  fetch the deposit address for a currency associated with self account
1025
1027
  :see: https://docs.deribit.com/#private-get_current_deposit_address
@@ -1054,11 +1056,11 @@ class deribit(Exchange, ImplicitAPI):
1054
1056
  address = self.safe_string(result, 'address')
1055
1057
  self.check_address(address)
1056
1058
  return {
1059
+ 'info': response,
1057
1060
  'currency': code,
1061
+ 'network': None,
1058
1062
  'address': address,
1059
1063
  'tag': None,
1060
- 'network': None,
1061
- 'info': response,
1062
1064
  }
1063
1065
 
1064
1066
  def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker: