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.
- ccxt/__init__.py +1 -1
- ccxt/ascendex.py +5 -5
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ascendex.py +5 -5
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bigone.py +6 -4
- ccxt/async_support/binance.py +58 -7
- ccxt/async_support/bingx.py +7 -6
- ccxt/async_support/bit2c.py +6 -4
- ccxt/async_support/bitbank.py +6 -4
- ccxt/async_support/bitbns.py +6 -4
- ccxt/async_support/bitfinex.py +4 -2
- ccxt/async_support/bitfinex2.py +4 -2
- ccxt/async_support/bitget.py +6 -5
- ccxt/async_support/bitmart.py +5 -4
- ccxt/async_support/bitmex.py +4 -4
- ccxt/async_support/bitso.py +5 -4
- ccxt/async_support/bitstamp.py +6 -4
- ccxt/async_support/bitvavo.py +6 -4
- ccxt/async_support/blockchaincom.py +11 -8
- ccxt/async_support/blofin.py +21 -0
- ccxt/async_support/bybit.py +6 -6
- ccxt/async_support/cex.py +5 -4
- ccxt/async_support/coinbase.py +4 -4
- ccxt/async_support/coinex.py +5 -5
- ccxt/async_support/coinone.py +6 -3
- ccxt/async_support/coinsph.py +5 -5
- ccxt/async_support/cryptocom.py +5 -4
- ccxt/async_support/currencycom.py +5 -5
- ccxt/async_support/delta.py +7 -5
- ccxt/async_support/deribit.py +6 -4
- ccxt/async_support/digifinex.py +6 -4
- ccxt/async_support/exmo.py +6 -4
- ccxt/async_support/gate.py +5 -4
- ccxt/async_support/gemini.py +4 -3
- ccxt/async_support/hashkey.py +7 -5
- ccxt/async_support/hitbtc.py +6 -5
- ccxt/async_support/hollaex.py +6 -5
- ccxt/async_support/htx.py +15 -5
- ccxt/async_support/hyperliquid.py +8 -7
- ccxt/async_support/idex.py +4 -4
- ccxt/async_support/independentreserve.py +4 -4
- ccxt/async_support/indodax.py +3 -3
- ccxt/async_support/kraken.py +7 -5
- ccxt/async_support/kucoin.py +6 -5
- ccxt/async_support/kucoinfutures.py +5 -3
- ccxt/async_support/kuna.py +5 -3
- ccxt/async_support/lbank.py +14 -12
- ccxt/async_support/lykke.py +6 -4
- ccxt/async_support/mexc.py +6 -6
- ccxt/async_support/ndax.py +33 -5
- ccxt/async_support/oceanex.py +4 -4
- ccxt/async_support/okcoin.py +8 -6
- ccxt/async_support/okx.py +17 -6
- ccxt/async_support/onetrading.py +6 -5
- ccxt/async_support/oxfun.py +6 -6
- ccxt/async_support/paymium.py +6 -5
- ccxt/async_support/phemex.py +8 -6
- ccxt/async_support/poloniex.py +6 -4
- ccxt/async_support/probit.py +7 -6
- ccxt/async_support/timex.py +4 -4
- ccxt/async_support/tokocrypto.py +5 -5
- ccxt/async_support/upbit.py +7 -6
- ccxt/async_support/wavesexchange.py +9 -9
- ccxt/async_support/wazirx.py +24 -4
- ccxt/async_support/whitebit.py +6 -4
- ccxt/async_support/woo.py +6 -4
- ccxt/async_support/xt.py +7 -5
- ccxt/async_support/yobit.py +32 -23
- ccxt/async_support/zonda.py +31 -6
- ccxt/base/exchange.py +2 -2
- ccxt/base/types.py +8 -0
- ccxt/bigone.py +6 -4
- ccxt/binance.py +58 -7
- ccxt/bingx.py +7 -6
- ccxt/bit2c.py +6 -4
- ccxt/bitbank.py +6 -4
- ccxt/bitbns.py +6 -4
- ccxt/bitfinex.py +4 -2
- ccxt/bitfinex2.py +4 -2
- ccxt/bitget.py +6 -5
- ccxt/bitmart.py +5 -4
- ccxt/bitmex.py +4 -4
- ccxt/bitso.py +5 -4
- ccxt/bitstamp.py +6 -4
- ccxt/bitvavo.py +6 -4
- ccxt/blockchaincom.py +11 -8
- ccxt/blofin.py +21 -0
- ccxt/bybit.py +6 -6
- ccxt/cex.py +5 -4
- ccxt/coinbase.py +4 -4
- ccxt/coinex.py +5 -5
- ccxt/coinone.py +6 -3
- ccxt/coinsph.py +5 -5
- ccxt/cryptocom.py +5 -4
- ccxt/currencycom.py +5 -5
- ccxt/delta.py +7 -5
- ccxt/deribit.py +6 -4
- ccxt/digifinex.py +6 -4
- ccxt/exmo.py +6 -4
- ccxt/gate.py +5 -4
- ccxt/gemini.py +4 -3
- ccxt/hashkey.py +7 -5
- ccxt/hitbtc.py +6 -5
- ccxt/hollaex.py +6 -5
- ccxt/htx.py +15 -5
- ccxt/hyperliquid.py +8 -7
- ccxt/idex.py +4 -4
- ccxt/independentreserve.py +4 -4
- ccxt/indodax.py +3 -3
- ccxt/kraken.py +7 -5
- ccxt/kucoin.py +6 -5
- ccxt/kucoinfutures.py +5 -3
- ccxt/kuna.py +5 -3
- ccxt/lbank.py +14 -12
- ccxt/lykke.py +6 -4
- ccxt/mexc.py +6 -6
- ccxt/ndax.py +33 -5
- ccxt/oceanex.py +4 -4
- ccxt/okcoin.py +8 -6
- ccxt/okx.py +17 -6
- ccxt/onetrading.py +6 -5
- ccxt/oxfun.py +6 -6
- ccxt/paymium.py +6 -5
- ccxt/phemex.py +8 -6
- ccxt/poloniex.py +6 -4
- ccxt/pro/__init__.py +1 -1
- ccxt/probit.py +7 -6
- ccxt/test/tests_async.py +1 -0
- ccxt/test/tests_sync.py +1 -0
- ccxt/timex.py +4 -4
- ccxt/tokocrypto.py +5 -5
- ccxt/upbit.py +7 -6
- ccxt/wavesexchange.py +9 -9
- ccxt/wazirx.py +24 -4
- ccxt/whitebit.py +6 -4
- ccxt/woo.py +6 -4
- ccxt/xt.py +7 -5
- ccxt/yobit.py +32 -23
- ccxt/zonda.py +31 -6
- {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/METADATA +4 -4
- {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/RECORD +145 -145
- {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/WHEEL +0 -0
- {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/top_level.txt +0 -0
ccxt/async_support/digifinex.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.digifinex import ImplicitAPI
|
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
10
|
import json
|
11
|
-
from ccxt.base.types import Balances, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Int, LedgerEntry, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
|
11
|
+
from ccxt.base.types import Balances, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, DepositAddress, Int, LedgerEntry, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, 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
|
@@ -68,6 +68,8 @@ class digifinex(Exchange, ImplicitAPI):
|
|
68
68
|
'fetchCrossBorrowRates': True,
|
69
69
|
'fetchCurrencies': True,
|
70
70
|
'fetchDepositAddress': True,
|
71
|
+
'fetchDepositAddresses': False,
|
72
|
+
'fetchDepositAddressesByNetwork': False,
|
71
73
|
'fetchDeposits': True,
|
72
74
|
'fetchDepositWithdrawFee': 'emulated',
|
73
75
|
'fetchDepositWithdrawFees': True,
|
@@ -2517,7 +2519,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2517
2519
|
ledger = self.safe_value(data, 'finance', [])
|
2518
2520
|
return self.parse_ledger(ledger, currency, since, limit)
|
2519
2521
|
|
2520
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
2522
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
2521
2523
|
#
|
2522
2524
|
# {
|
2523
2525
|
# "addressTag":"",
|
@@ -2533,12 +2535,12 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2533
2535
|
return {
|
2534
2536
|
'info': depositAddress,
|
2535
2537
|
'currency': code,
|
2538
|
+
'network': None,
|
2536
2539
|
'address': address,
|
2537
2540
|
'tag': tag,
|
2538
|
-
'network': None,
|
2539
2541
|
}
|
2540
2542
|
|
2541
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
2543
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2542
2544
|
"""
|
2543
2545
|
fetch the deposit address for a currency associated with self account
|
2544
2546
|
:param str code: unified currency code
|
ccxt/async_support/exmo.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.exmo import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, MarginModification, 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
|
@@ -54,6 +54,8 @@ class exmo(Exchange, ImplicitAPI):
|
|
54
54
|
'fetchCurrencies': True,
|
55
55
|
'fetchDeposit': True,
|
56
56
|
'fetchDepositAddress': True,
|
57
|
+
'fetchDepositAddresses': False,
|
58
|
+
'fetchDepositAddressesByNetwork': False,
|
57
59
|
'fetchDeposits': True,
|
58
60
|
'fetchDepositsWithdrawals': True,
|
59
61
|
'fetchDepositWithdrawFee': 'emulated',
|
@@ -1943,7 +1945,7 @@ class exmo(Exchange, ImplicitAPI):
|
|
1943
1945
|
response = await self.privatePostMarginUserOrderUpdate(self.extend(request, params))
|
1944
1946
|
return self.parse_order(response)
|
1945
1947
|
|
1946
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1948
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1947
1949
|
"""
|
1948
1950
|
fetch the deposit address for a currency associated with self account
|
1949
1951
|
:see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#c8f9ced9-7ab6-4383-a6a4-bc54469ba60e
|
@@ -1970,11 +1972,11 @@ class exmo(Exchange, ImplicitAPI):
|
|
1970
1972
|
tag = addressAndTag[1]
|
1971
1973
|
self.check_address(address)
|
1972
1974
|
return {
|
1975
|
+
'info': response,
|
1973
1976
|
'currency': code,
|
1977
|
+
'network': None,
|
1974
1978
|
'address': address,
|
1975
1979
|
'tag': tag,
|
1976
|
-
'network': None,
|
1977
|
-
'info': response,
|
1978
1980
|
}
|
1979
1981
|
|
1980
1982
|
def get_market_from_trades(self, trades):
|
ccxt/async_support/gate.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.gate import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Balances, Currencies, Currency, FundingHistory, Greeks, Int, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginModification, 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, Currencies, Currency, DepositAddress, FundingHistory, Greeks, Int, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginModification, 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
|
@@ -125,6 +125,8 @@ class gate(Exchange, ImplicitAPI):
|
|
125
125
|
'fetchCrossBorrowRates': False,
|
126
126
|
'fetchCurrencies': True,
|
127
127
|
'fetchDepositAddress': True,
|
128
|
+
'fetchDepositAddresses': False,
|
129
|
+
'fetchDepositAddressesByNetwork': False,
|
128
130
|
'fetchDeposits': True,
|
129
131
|
'fetchDepositWithdrawFee': 'emulated',
|
130
132
|
'fetchDepositWithdrawFees': True,
|
@@ -1885,7 +1887,7 @@ class gate(Exchange, ImplicitAPI):
|
|
1885
1887
|
}
|
1886
1888
|
return result
|
1887
1889
|
|
1888
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1890
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1889
1891
|
"""
|
1890
1892
|
fetch the deposit address for a currency associated with self account
|
1891
1893
|
:see: https://www.gate.io/docs/developers/apiv4/en/#generate-currency-deposit-address
|
@@ -1950,11 +1952,10 @@ class gate(Exchange, ImplicitAPI):
|
|
1950
1952
|
self.check_address(address)
|
1951
1953
|
return {
|
1952
1954
|
'info': response,
|
1953
|
-
'code': code, # kept here for backward-compatibility, but will be removed soon
|
1954
1955
|
'currency': code,
|
1956
|
+
'network': network,
|
1955
1957
|
'address': address,
|
1956
1958
|
'tag': tag,
|
1957
|
-
'network': network,
|
1958
1959
|
}
|
1959
1960
|
|
1960
1961
|
async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
ccxt/async_support/gemini.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.gemini import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
10
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, 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
|
@@ -62,6 +62,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
62
62
|
'fetchCrossBorrowRates': False,
|
63
63
|
'fetchCurrencies': True,
|
64
64
|
'fetchDepositAddress': True,
|
65
|
+
'fetchDepositAddresses': False,
|
65
66
|
'fetchDepositAddressesByNetwork': True,
|
66
67
|
'fetchDepositsWithdrawals': True,
|
67
68
|
'fetchFundingHistory': False,
|
@@ -1681,7 +1682,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1681
1682
|
'info': depositAddress,
|
1682
1683
|
}
|
1683
1684
|
|
1684
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1685
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1685
1686
|
"""
|
1686
1687
|
:see: https://docs.gemini.com/rest-api/#get-deposit-addresses
|
1687
1688
|
fetch the deposit address for a currency associated with self account
|
@@ -1697,7 +1698,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1697
1698
|
networkGroup = self.index_by(self.safe_value(groupedByNetwork, networkCode), 'currency')
|
1698
1699
|
return self.safe_value(networkGroup, code)
|
1699
1700
|
|
1700
|
-
async def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
1701
|
+
async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
1701
1702
|
"""
|
1702
1703
|
fetch a dictionary of addresses for a currency, indexed by network
|
1703
1704
|
:see: https://docs.gemini.com/rest-api/#get-deposit-addresses
|
ccxt/async_support/hashkey.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.hashkey import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, Int, LastPrice, LastPrices, LedgerEntry, Leverage, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, DepositAddress, Int, LastPrice, LastPrices, LedgerEntry, Leverage, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, 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
|
@@ -90,6 +90,8 @@ class hashkey(Exchange, ImplicitAPI):
|
|
90
90
|
'fetchConvertTradeHistory': False,
|
91
91
|
'fetchCurrencies': True,
|
92
92
|
'fetchDepositAddress': True,
|
93
|
+
'fetchDepositAddresses': False,
|
94
|
+
'fetchDepositAddressesByNetwork': False,
|
93
95
|
'fetchDeposits': True,
|
94
96
|
'fetchDepositsWithdrawals': False,
|
95
97
|
'fetchFundingHistory': False,
|
@@ -1716,7 +1718,7 @@ class hashkey(Exchange, ImplicitAPI):
|
|
1716
1718
|
result[code] = account
|
1717
1719
|
return self.safe_balance(result)
|
1718
1720
|
|
1719
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1721
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1720
1722
|
"""
|
1721
1723
|
fetch the deposit address for a currency associated with self account
|
1722
1724
|
:see: https://hashkeyglobal-apidoc.readme.io/reference/get-deposit-address
|
@@ -1752,7 +1754,7 @@ class hashkey(Exchange, ImplicitAPI):
|
|
1752
1754
|
depositAddress['network'] = networkCode
|
1753
1755
|
return depositAddress
|
1754
1756
|
|
1755
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1757
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1756
1758
|
#
|
1757
1759
|
# {
|
1758
1760
|
# "canDeposit": True,
|
@@ -1771,11 +1773,11 @@ class hashkey(Exchange, ImplicitAPI):
|
|
1771
1773
|
if tag == '':
|
1772
1774
|
tag = None
|
1773
1775
|
return {
|
1776
|
+
'info': depositAddress,
|
1774
1777
|
'currency': currency['code'],
|
1778
|
+
'network': None,
|
1775
1779
|
'address': address,
|
1776
1780
|
'tag': tag,
|
1777
|
-
'network': None,
|
1778
|
-
'info': depositAddress,
|
1779
1781
|
}
|
1780
1782
|
|
1781
1783
|
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
ccxt/async_support/hitbtc.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.hitbtc import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Leverage, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, 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
|
@@ -66,6 +66,8 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
66
66
|
'fetchCrossBorrowRates': False,
|
67
67
|
'fetchCurrencies': True,
|
68
68
|
'fetchDepositAddress': True,
|
69
|
+
'fetchDepositAddresses': False,
|
70
|
+
'fetchDepositAddressesByNetwork': False,
|
69
71
|
'fetchDeposits': True,
|
70
72
|
'fetchDepositsWithdrawals': True,
|
71
73
|
'fetchDepositWithdrawFee': 'emulated',
|
@@ -948,7 +950,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
948
950
|
'info': response,
|
949
951
|
}
|
950
952
|
|
951
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
953
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
952
954
|
"""
|
953
955
|
fetch the deposit address for a currency associated with self account
|
954
956
|
:see: https://api.hitbtc.com/#get-deposit-crypto-address
|
@@ -979,11 +981,10 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
979
981
|
parsedCode = self.safe_currency_code(currencyId)
|
980
982
|
return {
|
981
983
|
'info': response,
|
982
|
-
'address': address,
|
983
|
-
'tag': tag,
|
984
|
-
'code': parsedCode, # kept here for backward-compatibility, but will be removed soon
|
985
984
|
'currency': parsedCode,
|
986
985
|
'network': None,
|
986
|
+
'address': address,
|
987
|
+
'tag': tag,
|
987
988
|
}
|
988
989
|
|
989
990
|
def parse_balance(self, response) -> Balances:
|
ccxt/async_support/hollaex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.hollaex 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 AuthenticationError
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -59,6 +59,7 @@ class hollaex(Exchange, ImplicitAPI):
|
|
59
59
|
'fetchCurrencies': True,
|
60
60
|
'fetchDepositAddress': 'emulated',
|
61
61
|
'fetchDepositAddresses': True,
|
62
|
+
'fetchDepositAddressesByNetwork': False,
|
62
63
|
'fetchDeposits': True,
|
63
64
|
'fetchFundingHistory': False,
|
64
65
|
'fetchFundingRate': False,
|
@@ -1270,7 +1271,7 @@ class hollaex(Exchange, ImplicitAPI):
|
|
1270
1271
|
data = self.safe_list(response, 'data', [])
|
1271
1272
|
return self.parse_trades(data, market, since, limit)
|
1272
1273
|
|
1273
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1274
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1274
1275
|
#
|
1275
1276
|
# {
|
1276
1277
|
# "currency":"usdt",
|
@@ -1292,14 +1293,14 @@ class hollaex(Exchange, ImplicitAPI):
|
|
1292
1293
|
currency = self.safe_currency(currencyId, currency)
|
1293
1294
|
network = self.safe_string(depositAddress, 'network')
|
1294
1295
|
return {
|
1296
|
+
'info': depositAddress,
|
1295
1297
|
'currency': currency['code'],
|
1298
|
+
'network': network,
|
1296
1299
|
'address': address,
|
1297
1300
|
'tag': tag,
|
1298
|
-
'network': network,
|
1299
|
-
'info': depositAddress,
|
1300
1301
|
}
|
1301
1302
|
|
1302
|
-
async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
1303
|
+
async def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
|
1303
1304
|
"""
|
1304
1305
|
fetch deposit addresses for multiple currencies and chain types
|
1305
1306
|
:see: https://apidocs.hollaex.com/#get-user
|
ccxt/async_support/htx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.htx import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -5779,7 +5779,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5779
5779
|
'info': depositAddress,
|
5780
5780
|
}
|
5781
5781
|
|
5782
|
-
async def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
5782
|
+
async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
5783
5783
|
"""
|
5784
5784
|
:see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
|
5785
5785
|
fetch a dictionary of addresses for a currency, indexed by network
|
@@ -5810,10 +5810,10 @@ class htx(Exchange, ImplicitAPI):
|
|
5810
5810
|
parsed = self.parse_deposit_addresses(data, [currency['code']], False)
|
5811
5811
|
return self.index_by(parsed, 'network')
|
5812
5812
|
|
5813
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
5813
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
5814
5814
|
"""
|
5815
|
-
:see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
|
5816
5815
|
fetch the deposit address for a currency associated with self account
|
5816
|
+
:see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
|
5817
5817
|
:param str code: unified currency code
|
5818
5818
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5819
5819
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -6532,6 +6532,8 @@ class htx(Exchange, ImplicitAPI):
|
|
6532
6532
|
async def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
6533
6533
|
"""
|
6534
6534
|
fetch the interest owed by the user for borrowing currency for margin trading
|
6535
|
+
:see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-cross
|
6536
|
+
:see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-isolated
|
6535
6537
|
:param str code: unified currency code
|
6536
6538
|
:param str symbol: unified market symbol when fetch interest in isolated markets
|
6537
6539
|
:param int [since]: the earliest time in ms to fetch borrrow interest for
|
@@ -7051,7 +7053,11 @@ class htx(Exchange, ImplicitAPI):
|
|
7051
7053
|
async def fetch_positions(self, symbols: Strings = None, params={}):
|
7052
7054
|
"""
|
7053
7055
|
fetch all open positions
|
7054
|
-
:
|
7056
|
+
:see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-user-39-s-position-information
|
7057
|
+
:see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-user-s-position-information
|
7058
|
+
:see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-user-s-position-information
|
7059
|
+
:see: https://huobiapi.github.io/docs/dm/v1/en/#query-user-s-position-information
|
7060
|
+
:param str[] [symbols]: list of unified market symbols
|
7055
7061
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7056
7062
|
:param str [params.subType]: 'linear' or 'inverse'
|
7057
7063
|
:param str [params.type]: *inverse only* 'future', or 'swap'
|
@@ -7181,6 +7187,10 @@ class htx(Exchange, ImplicitAPI):
|
|
7181
7187
|
async def fetch_position(self, symbol: str, params={}):
|
7182
7188
|
"""
|
7183
7189
|
fetch data on a single open contract trade position
|
7190
|
+
:see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-assets-and-positions
|
7191
|
+
:see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-assets-and-positions
|
7192
|
+
:see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-assets-and-positions
|
7193
|
+
:see: https://huobiapi.github.io/docs/dm/v1/en/#query-assets-and-positions
|
7184
7194
|
:param str symbol: unified market symbol of the market the position is held in, default is None
|
7185
7195
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7186
7196
|
:returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
|
@@ -2107,11 +2107,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2107
2107
|
market = self.safe_market(marketId, None)
|
2108
2108
|
symbol = market['symbol']
|
2109
2109
|
leverage = self.safe_dict(entry, 'leverage', {})
|
2110
|
-
|
2111
|
-
|
2110
|
+
marginMode = self.safe_string(leverage, 'type')
|
2111
|
+
isIsolated = (marginMode == 'isolated')
|
2112
|
+
size = self.safe_number(entry, 'szi')
|
2112
2113
|
side = None
|
2113
|
-
if
|
2114
|
-
side = '
|
2114
|
+
if size is not None:
|
2115
|
+
side = 'long' if (size > 0) else 'short'
|
2115
2116
|
unrealizedPnl = self.safe_number(entry, 'unrealizedPnl')
|
2116
2117
|
initialMargin = self.safe_number(entry, 'marginUsed')
|
2117
2118
|
percentage = unrealizedPnl / initialMargin * 100
|
@@ -2124,20 +2125,20 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2124
2125
|
'isolated': isIsolated,
|
2125
2126
|
'hedged': None,
|
2126
2127
|
'side': side,
|
2127
|
-
'contracts':
|
2128
|
+
'contracts': size,
|
2128
2129
|
'contractSize': None,
|
2129
2130
|
'entryPrice': self.safe_number(entry, 'entryPx'),
|
2130
2131
|
'markPrice': None,
|
2131
2132
|
'notional': self.safe_number(entry, 'positionValue'),
|
2132
2133
|
'leverage': self.safe_number(leverage, 'value'),
|
2133
|
-
'collateral':
|
2134
|
+
'collateral': self.safe_number(entry, 'marginUsed'),
|
2134
2135
|
'initialMargin': initialMargin,
|
2135
2136
|
'maintenanceMargin': None,
|
2136
2137
|
'initialMarginPercentage': None,
|
2137
2138
|
'maintenanceMarginPercentage': None,
|
2138
2139
|
'unrealizedPnl': unrealizedPnl,
|
2139
2140
|
'liquidationPrice': self.safe_number(entry, 'liquidationPx'),
|
2140
|
-
'marginMode':
|
2141
|
+
'marginMode': marginMode,
|
2141
2142
|
'percentage': percentage,
|
2142
2143
|
})
|
2143
2144
|
|
ccxt/async_support/idex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.idex 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
|
@@ -1655,7 +1655,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1655
1655
|
authenticated = hasApiKey and hasSecret and hasWalletAddress and hasPrivateKey
|
1656
1656
|
return(defaultCost / 2) if authenticated else defaultCost
|
1657
1657
|
|
1658
|
-
async def fetch_deposit_address(self, code: Str = None, params={}):
|
1658
|
+
async def fetch_deposit_address(self, code: Str = None, params={}) -> DepositAddress:
|
1659
1659
|
"""
|
1660
1660
|
fetch the Polygon address of the wallet
|
1661
1661
|
:see: https://api-docs-v3.idex.io/#get-wallets
|
@@ -1682,7 +1682,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1682
1682
|
#
|
1683
1683
|
return self.parse_deposit_address(response)
|
1684
1684
|
|
1685
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1685
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1686
1686
|
#
|
1687
1687
|
# [
|
1688
1688
|
# {
|
@@ -1704,9 +1704,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1704
1704
|
return {
|
1705
1705
|
'info': depositAddress,
|
1706
1706
|
'currency': None,
|
1707
|
+
'network': 'MATIC',
|
1707
1708
|
'address': address,
|
1708
1709
|
'tag': None,
|
1709
|
-
'network': 'MATIC',
|
1710
1710
|
}
|
1711
1711
|
|
1712
1712
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.independentreserve 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, Ticker, Trade, TradingFees, Transaction
|
10
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import BadRequest
|
13
13
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
@@ -713,7 +713,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
713
713
|
#
|
714
714
|
return self.parse_order(response)
|
715
715
|
|
716
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
716
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
717
717
|
"""
|
718
718
|
fetch the deposit address for a currency associated with self account
|
719
719
|
:see: https://www.independentreserve.com/features/api#GetDigitalCurrencyDepositAddress
|
@@ -737,7 +737,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
737
737
|
#
|
738
738
|
return self.parse_deposit_address(response)
|
739
739
|
|
740
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
740
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
741
741
|
#
|
742
742
|
# {
|
743
743
|
# Tag: '3307446684',
|
@@ -751,9 +751,9 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
751
751
|
return {
|
752
752
|
'info': depositAddress,
|
753
753
|
'currency': self.safe_string(currency, 'code'),
|
754
|
+
'network': None,
|
754
755
|
'address': address,
|
755
756
|
'tag': self.safe_string(depositAddress, 'Tag'),
|
756
|
-
'network': None,
|
757
757
|
}
|
758
758
|
|
759
759
|
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
ccxt/async_support/indodax.py
CHANGED
@@ -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
|
ccxt/async_support/kraken.py
CHANGED
@@ -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={}):
|
ccxt/async_support/kucoin.py
CHANGED
@@ -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:
|