ccxt 4.3.29__py2.py3-none-any.whl → 4.3.31__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/abstract/binance.py +2 -0
- ccxt/abstract/binancecoinm.py +2 -0
- ccxt/abstract/binanceus.py +2 -0
- ccxt/abstract/binanceusdm.py +2 -0
- ccxt/ace.py +14 -14
- ccxt/alpaca.py +16 -16
- ccxt/ascendex.py +46 -46
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +14 -14
- ccxt/async_support/alpaca.py +16 -16
- ccxt/async_support/ascendex.py +46 -46
- ccxt/async_support/base/exchange.py +23 -23
- ccxt/async_support/base/ws/aiohttp_client.py +1 -0
- ccxt/async_support/base/ws/future.py +27 -29
- ccxt/async_support/bigone.py +32 -32
- ccxt/async_support/binance.py +105 -96
- ccxt/async_support/bingx.py +22 -22
- ccxt/async_support/bit2c.py +13 -13
- ccxt/async_support/bitbank.py +19 -19
- ccxt/async_support/bitbns.py +17 -17
- ccxt/async_support/bitfinex.py +24 -24
- ccxt/async_support/bitfinex2.py +142 -109
- ccxt/async_support/bitflyer.py +23 -23
- ccxt/async_support/bitget.py +76 -76
- ccxt/async_support/bithumb.py +20 -20
- ccxt/async_support/bitmart.py +55 -55
- ccxt/async_support/bitmex.py +41 -41
- ccxt/async_support/bitopro.py +30 -30
- ccxt/async_support/bitrue.py +37 -37
- ccxt/async_support/bitso.py +30 -30
- ccxt/async_support/bitstamp.py +31 -31
- ccxt/async_support/bitteam.py +26 -26
- ccxt/async_support/bitvavo.py +27 -27
- ccxt/async_support/bl3p.py +8 -8
- ccxt/async_support/blockchaincom.py +24 -24
- ccxt/async_support/blofin.py +37 -37
- ccxt/async_support/btcalpha.py +19 -19
- ccxt/async_support/btcbox.py +11 -11
- ccxt/async_support/btcmarkets.py +22 -22
- ccxt/async_support/btcturk.py +13 -13
- ccxt/async_support/bybit.py +96 -96
- ccxt/async_support/cex.py +21 -21
- ccxt/async_support/coinbase.py +53 -53
- ccxt/async_support/coinbaseexchange.py +29 -29
- ccxt/async_support/coinbaseinternational.py +32 -32
- ccxt/async_support/coincheck.py +14 -14
- ccxt/async_support/coinex.py +424 -448
- ccxt/async_support/coinlist.py +35 -35
- ccxt/async_support/coinmate.py +22 -22
- ccxt/async_support/coinmetro.py +22 -22
- ccxt/async_support/coinone.py +18 -18
- ccxt/async_support/coinsph.py +32 -32
- ccxt/async_support/coinspot.py +8 -8
- ccxt/async_support/cryptocom.py +43 -43
- ccxt/async_support/currencycom.py +33 -33
- ccxt/async_support/delta.py +35 -35
- ccxt/async_support/deribit.py +54 -54
- ccxt/async_support/digifinex.py +56 -56
- ccxt/async_support/exmo.py +34 -34
- ccxt/async_support/gate.py +60 -60
- ccxt/async_support/gemini.py +24 -24
- ccxt/async_support/hitbtc.py +51 -51
- ccxt/async_support/hollaex.py +29 -29
- ccxt/async_support/htx.py +73 -73
- ccxt/async_support/huobijp.py +30 -30
- ccxt/async_support/hyperliquid.py +58 -58
- ccxt/async_support/idex.py +33 -33
- ccxt/async_support/independentreserve.py +12 -12
- ccxt/async_support/indodax.py +21 -21
- ccxt/async_support/kraken.py +46 -51
- ccxt/async_support/krakenfutures.py +29 -29
- ccxt/async_support/kucoin.py +51 -51
- ccxt/async_support/kucoinfutures.py +33 -33
- ccxt/async_support/kuna.py +27 -27
- ccxt/async_support/latoken.py +27 -27
- ccxt/async_support/lbank.py +35 -35
- ccxt/async_support/luno.py +19 -19
- ccxt/async_support/lykke.py +20 -20
- ccxt/async_support/mercado.py +17 -17
- ccxt/async_support/mexc.py +64 -64
- ccxt/async_support/ndax.py +38 -38
- ccxt/async_support/novadax.py +26 -26
- ccxt/async_support/oceanex.py +21 -21
- ccxt/async_support/okcoin.py +35 -35
- ccxt/async_support/okx.py +85 -85
- ccxt/async_support/onetrading.py +32 -32
- ccxt/async_support/p2b.py +14 -14
- ccxt/async_support/paymium.py +12 -12
- ccxt/async_support/phemex.py +50 -50
- ccxt/async_support/poloniex.py +35 -35
- ccxt/async_support/poloniexfutures.py +25 -21
- ccxt/async_support/probit.py +30 -30
- ccxt/async_support/timex.py +22 -22
- ccxt/async_support/tokocrypto.py +26 -26
- ccxt/async_support/tradeogre.py +12 -12
- ccxt/async_support/upbit.py +28 -28
- ccxt/async_support/wavesexchange.py +33 -33
- ccxt/async_support/wazirx.py +21 -21
- ccxt/async_support/whitebit.py +80 -40
- ccxt/async_support/woo.py +51 -51
- ccxt/async_support/woofipro.py +46 -46
- ccxt/async_support/yobit.py +20 -20
- ccxt/async_support/zaif.py +12 -12
- ccxt/async_support/zonda.py +22 -22
- ccxt/base/exchange.py +39 -35
- ccxt/base/types.py +13 -0
- ccxt/bigone.py +32 -32
- ccxt/binance.py +105 -96
- ccxt/bingx.py +22 -22
- ccxt/bit2c.py +13 -13
- ccxt/bitbank.py +19 -19
- ccxt/bitbns.py +17 -17
- ccxt/bitfinex.py +24 -24
- ccxt/bitfinex2.py +142 -109
- ccxt/bitflyer.py +23 -23
- ccxt/bitget.py +76 -76
- ccxt/bithumb.py +20 -20
- ccxt/bitmart.py +55 -55
- ccxt/bitmex.py +41 -41
- ccxt/bitopro.py +30 -30
- ccxt/bitrue.py +37 -37
- ccxt/bitso.py +30 -30
- ccxt/bitstamp.py +31 -31
- ccxt/bitteam.py +26 -26
- ccxt/bitvavo.py +27 -27
- ccxt/bl3p.py +8 -8
- ccxt/blockchaincom.py +24 -24
- ccxt/blofin.py +37 -37
- ccxt/btcalpha.py +19 -19
- ccxt/btcbox.py +11 -11
- ccxt/btcmarkets.py +22 -22
- ccxt/btcturk.py +13 -13
- ccxt/bybit.py +96 -96
- ccxt/cex.py +21 -21
- ccxt/coinbase.py +53 -53
- ccxt/coinbaseexchange.py +29 -29
- ccxt/coinbaseinternational.py +32 -32
- ccxt/coincheck.py +14 -14
- ccxt/coinex.py +424 -448
- ccxt/coinlist.py +35 -35
- ccxt/coinmate.py +22 -22
- ccxt/coinmetro.py +22 -22
- ccxt/coinone.py +18 -18
- ccxt/coinsph.py +32 -32
- ccxt/coinspot.py +8 -8
- ccxt/cryptocom.py +43 -43
- ccxt/currencycom.py +33 -33
- ccxt/delta.py +35 -35
- ccxt/deribit.py +54 -54
- ccxt/digifinex.py +56 -56
- ccxt/exmo.py +34 -34
- ccxt/gate.py +60 -60
- ccxt/gemini.py +24 -24
- ccxt/hitbtc.py +51 -51
- ccxt/hollaex.py +29 -29
- ccxt/htx.py +73 -73
- ccxt/huobijp.py +30 -30
- ccxt/hyperliquid.py +58 -58
- ccxt/idex.py +33 -33
- ccxt/independentreserve.py +12 -12
- ccxt/indodax.py +21 -21
- ccxt/kraken.py +46 -51
- ccxt/krakenfutures.py +29 -29
- ccxt/kucoin.py +51 -51
- ccxt/kucoinfutures.py +33 -33
- ccxt/kuna.py +27 -27
- ccxt/latoken.py +27 -27
- ccxt/lbank.py +35 -35
- ccxt/luno.py +19 -19
- ccxt/lykke.py +20 -20
- ccxt/mercado.py +17 -17
- ccxt/mexc.py +64 -64
- ccxt/ndax.py +38 -38
- ccxt/novadax.py +26 -26
- ccxt/oceanex.py +21 -21
- ccxt/okcoin.py +35 -35
- ccxt/okx.py +85 -85
- ccxt/onetrading.py +32 -32
- ccxt/p2b.py +14 -14
- ccxt/paymium.py +12 -12
- ccxt/phemex.py +50 -50
- ccxt/poloniex.py +35 -35
- ccxt/poloniexfutures.py +25 -21
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +8 -8
- ccxt/pro/ascendex.py +4 -4
- ccxt/pro/binance.py +56 -56
- ccxt/pro/bingx.py +5 -5
- ccxt/pro/bitfinex.py +6 -6
- ccxt/pro/bitfinex2.py +10 -10
- ccxt/pro/bitget.py +17 -17
- ccxt/pro/bithumb.py +6 -6
- ccxt/pro/bitmart.py +8 -8
- ccxt/pro/bitmex.py +16 -16
- ccxt/pro/bitopro.py +4 -4
- ccxt/pro/bitrue.py +8 -8
- ccxt/pro/bitstamp.py +5 -5
- ccxt/pro/bitvavo.py +14 -14
- ccxt/pro/blockchaincom.py +7 -7
- ccxt/pro/bybit.py +12 -12
- ccxt/pro/cex.py +19 -19
- ccxt/pro/coinbase.py +2 -2
- ccxt/pro/coinbaseexchange.py +10 -10
- ccxt/pro/coinbaseinternational.py +4 -4
- ccxt/pro/coincheck.py +2 -2
- ccxt/pro/coinex.py +15 -15
- ccxt/pro/coinone.py +4 -4
- ccxt/pro/cryptocom.py +11 -11
- ccxt/pro/currencycom.py +4 -4
- ccxt/pro/deribit.py +9 -9
- ccxt/pro/exmo.py +9 -9
- ccxt/pro/gate.py +12 -12
- ccxt/pro/gemini.py +11 -11
- ccxt/pro/hitbtc.py +13 -13
- ccxt/pro/hollaex.py +6 -6
- ccxt/pro/htx.py +15 -15
- ccxt/pro/huobijp.py +16 -16
- ccxt/pro/hyperliquid.py +9 -9
- ccxt/pro/idex.py +12 -12
- ccxt/pro/independentreserve.py +2 -2
- ccxt/pro/kraken.py +14 -14
- ccxt/pro/krakenfutures.py +12 -12
- ccxt/pro/kucoin.py +12 -12
- ccxt/pro/kucoinfutures.py +16 -16
- ccxt/pro/lbank.py +12 -12
- ccxt/pro/luno.py +4 -4
- ccxt/pro/mexc.py +14 -14
- ccxt/pro/ndax.py +12 -12
- ccxt/pro/okcoin.py +6 -6
- ccxt/pro/okx.py +30 -30
- ccxt/pro/onetrading.py +13 -13
- ccxt/pro/p2b.py +2 -2
- ccxt/pro/phemex.py +9 -9
- ccxt/pro/poloniex.py +9 -9
- ccxt/pro/poloniexfutures.py +10 -10
- ccxt/pro/probit.py +8 -8
- ccxt/pro/upbit.py +1 -1
- ccxt/pro/wazirx.py +10 -10
- ccxt/pro/whitebit.py +8 -8
- ccxt/pro/woo.py +14 -14
- ccxt/pro/woofipro.py +14 -14
- ccxt/probit.py +30 -30
- ccxt/test/base/test_shared_methods.py +1 -0
- ccxt/timex.py +22 -22
- ccxt/tokocrypto.py +26 -26
- ccxt/tradeogre.py +12 -12
- ccxt/upbit.py +28 -28
- ccxt/wavesexchange.py +33 -33
- ccxt/wazirx.py +21 -21
- ccxt/whitebit.py +80 -40
- ccxt/woo.py +51 -51
- ccxt/woofipro.py +46 -46
- ccxt/yobit.py +20 -20
- ccxt/zaif.py +12 -12
- ccxt/zonda.py +22 -22
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/METADATA +4 -4
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/RECORD +260 -260
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/WHEEL +0 -0
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/top_level.txt +0 -0
ccxt/kucoin.py
CHANGED
@@ -1036,7 +1036,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1036
1036
|
data = self.safe_list(response, 'data')
|
1037
1037
|
options = self.safe_dict(self.options, 'fetchMarkets', {})
|
1038
1038
|
fetchTickersFees = self.safe_bool(options, 'fetchTickersFees', True)
|
1039
|
-
tickersResponse = {}
|
1039
|
+
tickersResponse: dict = {}
|
1040
1040
|
if fetchTickersFees:
|
1041
1041
|
tickersResponse = self.publicGetMarketAllTickers(params)
|
1042
1042
|
#
|
@@ -1218,7 +1218,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1218
1218
|
additionalResponse = self.safe_dict(responses, 1, {})
|
1219
1219
|
additionalData = self.safe_list(additionalResponse, 'data', [])
|
1220
1220
|
additionalDataGrouped = self.group_by(additionalData, 'currency')
|
1221
|
-
result = {}
|
1221
|
+
result: dict = {}
|
1222
1222
|
for i in range(0, len(currenciesData)):
|
1223
1223
|
entry = currenciesData[i]
|
1224
1224
|
id = self.safe_string(entry, 'currency')
|
@@ -1226,7 +1226,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1226
1226
|
code = self.safe_currency_code(id)
|
1227
1227
|
isWithdrawEnabled = None
|
1228
1228
|
isDepositEnabled = None
|
1229
|
-
networks = {}
|
1229
|
+
networks: dict = {}
|
1230
1230
|
chains = self.safe_list(entry, 'chains', [])
|
1231
1231
|
extraChainsData = self.index_by(self.safe_list(additionalDataGrouped, id, []), 'chain')
|
1232
1232
|
rawPrecision = self.safe_string(entry, 'precision')
|
@@ -1348,7 +1348,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1348
1348
|
"""
|
1349
1349
|
self.load_markets()
|
1350
1350
|
currency = self.currency(code)
|
1351
|
-
request = {
|
1351
|
+
request: dict = {
|
1352
1352
|
'currency': currency['id'],
|
1353
1353
|
}
|
1354
1354
|
networkCode = None
|
@@ -1357,7 +1357,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1357
1357
|
request['chain'] = self.network_code_to_id(networkCode).lower()
|
1358
1358
|
response = self.privateGetWithdrawalsQuotas(self.extend(request, params))
|
1359
1359
|
data = self.safe_dict(response, 'data', {})
|
1360
|
-
withdrawFees = {}
|
1360
|
+
withdrawFees: dict = {}
|
1361
1361
|
withdrawFees[code] = self.safe_number(data, 'withdrawMinFee')
|
1362
1362
|
return {
|
1363
1363
|
'info': response,
|
@@ -1376,7 +1376,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1376
1376
|
"""
|
1377
1377
|
self.load_markets()
|
1378
1378
|
currency = self.currency(code)
|
1379
|
-
request = {
|
1379
|
+
request: dict = {
|
1380
1380
|
'currency': currency['id'],
|
1381
1381
|
}
|
1382
1382
|
networkCode = None
|
@@ -1421,7 +1421,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1421
1421
|
# "chain": "ERC20"
|
1422
1422
|
# }
|
1423
1423
|
#
|
1424
|
-
result = {
|
1424
|
+
result: dict = {
|
1425
1425
|
'info': fee,
|
1426
1426
|
'withdraw': {
|
1427
1427
|
'fee': None,
|
@@ -1598,7 +1598,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1598
1598
|
data = self.safe_dict(response, 'data', {})
|
1599
1599
|
tickers = self.safe_list(data, 'ticker', [])
|
1600
1600
|
time = self.safe_integer(data, 'time')
|
1601
|
-
result = {}
|
1601
|
+
result: dict = {}
|
1602
1602
|
for i in range(0, len(tickers)):
|
1603
1603
|
tickers[i]['time'] = time
|
1604
1604
|
ticker = self.parse_ticker(tickers[i])
|
@@ -1617,7 +1617,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1617
1617
|
"""
|
1618
1618
|
self.load_markets()
|
1619
1619
|
market = self.market(symbol)
|
1620
|
-
request = {
|
1620
|
+
request: dict = {
|
1621
1621
|
'symbol': market['id'],
|
1622
1622
|
}
|
1623
1623
|
response = self.publicGetMarketStats(self.extend(request, params))
|
@@ -1686,7 +1686,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1686
1686
|
return self.fetch_paginated_call_deterministic('fetchOHLCV', symbol, since, limit, timeframe, params, 1500)
|
1687
1687
|
market = self.market(symbol)
|
1688
1688
|
marketId = market['id']
|
1689
|
-
request = {
|
1689
|
+
request: dict = {
|
1690
1690
|
'symbol': marketId,
|
1691
1691
|
'type': self.safe_string(self.timeframes, timeframe, timeframe),
|
1692
1692
|
}
|
@@ -1730,7 +1730,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1730
1730
|
"""
|
1731
1731
|
self.load_markets()
|
1732
1732
|
currency = self.currency(code)
|
1733
|
-
request = {
|
1733
|
+
request: dict = {
|
1734
1734
|
'currency': currency['id'],
|
1735
1735
|
}
|
1736
1736
|
networkCode = None
|
@@ -1755,7 +1755,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1755
1755
|
"""
|
1756
1756
|
self.load_markets()
|
1757
1757
|
currency = self.currency(code)
|
1758
|
-
request = {
|
1758
|
+
request: dict = {
|
1759
1759
|
'currency': currency['id'],
|
1760
1760
|
# for USDT - OMNI, ERC20, TRC20, default is ERC20
|
1761
1761
|
# for BTC - Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native
|
@@ -1805,7 +1805,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1805
1805
|
"""
|
1806
1806
|
self.load_markets()
|
1807
1807
|
currency = self.currency(code)
|
1808
|
-
request = {
|
1808
|
+
request: dict = {
|
1809
1809
|
'currency': currency['id'],
|
1810
1810
|
}
|
1811
1811
|
version = self.options['versions']['private']['GET']['deposit-addresses']
|
@@ -1846,7 +1846,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1846
1846
|
self.load_markets()
|
1847
1847
|
market = self.market(symbol)
|
1848
1848
|
level = self.safe_integer(params, 'level', 2)
|
1849
|
-
request = {'symbol': market['id']}
|
1849
|
+
request: dict = {'symbol': market['id']}
|
1850
1850
|
isAuthenticated = self.check_required_credentials(False)
|
1851
1851
|
response = None
|
1852
1852
|
if not isAuthenticated or limit is not None:
|
@@ -2056,7 +2056,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2056
2056
|
orderRequest = self.create_order_request(marketId, type, side, amount, price, orderParams)
|
2057
2057
|
ordersRequests.append(orderRequest)
|
2058
2058
|
market = self.market(symbol)
|
2059
|
-
request = {
|
2059
|
+
request: dict = {
|
2060
2060
|
'symbol': market['id'],
|
2061
2061
|
'orderList': ordersRequests,
|
2062
2062
|
}
|
@@ -2113,7 +2113,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2113
2113
|
# required param, cannot be used twice
|
2114
2114
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId', self.uuid())
|
2115
2115
|
params = self.omit(params, ['clientOid', 'clientOrderId'])
|
2116
|
-
request = {
|
2116
|
+
request: dict = {
|
2117
2117
|
'clientOid': clientOrderId,
|
2118
2118
|
'side': side,
|
2119
2119
|
'symbol': market['id'],
|
@@ -2181,7 +2181,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2181
2181
|
"""
|
2182
2182
|
self.load_markets()
|
2183
2183
|
market = self.market(symbol)
|
2184
|
-
request = {
|
2184
|
+
request: dict = {
|
2185
2185
|
'symbol': market['id'],
|
2186
2186
|
}
|
2187
2187
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
|
@@ -2222,7 +2222,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2222
2222
|
:returns: Response from the exchange
|
2223
2223
|
"""
|
2224
2224
|
self.load_markets()
|
2225
|
-
request = {}
|
2225
|
+
request: dict = {}
|
2226
2226
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
|
2227
2227
|
stop = self.safe_bool_2(params, 'stop', 'trigger', False)
|
2228
2228
|
hf = self.safe_bool(params, 'hf', False)
|
@@ -2267,7 +2267,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2267
2267
|
:returns: Response from the exchange
|
2268
2268
|
"""
|
2269
2269
|
self.load_markets()
|
2270
|
-
request = {}
|
2270
|
+
request: dict = {}
|
2271
2271
|
stop = self.safe_bool(params, 'stop', False)
|
2272
2272
|
hf = self.safe_bool(params, 'hf', False)
|
2273
2273
|
params = self.omit(params, ['stop', 'hf'])
|
@@ -2324,7 +2324,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2324
2324
|
lowercaseStatus = 'active'
|
2325
2325
|
elif lowercaseStatus == 'closed':
|
2326
2326
|
lowercaseStatus = 'done'
|
2327
|
-
request = {
|
2327
|
+
request: dict = {
|
2328
2328
|
'status': lowercaseStatus,
|
2329
2329
|
}
|
2330
2330
|
market = None
|
@@ -2473,7 +2473,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2473
2473
|
:returns: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2474
2474
|
"""
|
2475
2475
|
self.load_markets()
|
2476
|
-
request = {}
|
2476
|
+
request: dict = {}
|
2477
2477
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
|
2478
2478
|
stop = self.safe_bool(params, 'stop', False)
|
2479
2479
|
hf = self.safe_bool(params, 'hf', False)
|
@@ -2514,7 +2514,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2514
2514
|
responseData = self.safe_value(responseData, 0)
|
2515
2515
|
return self.parse_order(responseData, market)
|
2516
2516
|
|
2517
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
2517
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
2518
2518
|
#
|
2519
2519
|
# createOrder
|
2520
2520
|
#
|
@@ -2701,7 +2701,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2701
2701
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2702
2702
|
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
2703
2703
|
"""
|
2704
|
-
request = {
|
2704
|
+
request: dict = {
|
2705
2705
|
'orderId': id,
|
2706
2706
|
}
|
2707
2707
|
return self.fetch_my_trades(symbol, since, limit, self.extend(request, params))
|
@@ -2725,7 +2725,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2725
2725
|
paginate, params = self.handle_option_and_params(params, 'fetchMyTrades', 'paginate')
|
2726
2726
|
if paginate:
|
2727
2727
|
return self.fetch_paginated_call_dynamic('fetchMyTrades', symbol, since, limit, params)
|
2728
|
-
request = {}
|
2728
|
+
request: dict = {}
|
2729
2729
|
hf = self.safe_bool(params, 'hf', False)
|
2730
2730
|
if hf and symbol is None:
|
2731
2731
|
raise ArgumentsRequired(self.id + ' fetchMyTrades() requires a symbol parameter for hf orders')
|
@@ -2815,7 +2815,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2815
2815
|
"""
|
2816
2816
|
self.load_markets()
|
2817
2817
|
market = self.market(symbol)
|
2818
|
-
request = {
|
2818
|
+
request: dict = {
|
2819
2819
|
'symbol': market['id'],
|
2820
2820
|
}
|
2821
2821
|
# pagination is not supported on the exchange side anymore
|
@@ -2843,7 +2843,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2843
2843
|
trades = self.safe_list(response, 'data', [])
|
2844
2844
|
return self.parse_trades(trades, market, since, limit)
|
2845
2845
|
|
2846
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
2846
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
2847
2847
|
#
|
2848
2848
|
# fetchTrades(public)
|
2849
2849
|
#
|
@@ -2978,7 +2978,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2978
2978
|
"""
|
2979
2979
|
self.load_markets()
|
2980
2980
|
market = self.market(symbol)
|
2981
|
-
request = {
|
2981
|
+
request: dict = {
|
2982
2982
|
'symbols': market['id'],
|
2983
2983
|
}
|
2984
2984
|
response = self.privateGetTradeFees(self.extend(request, params))
|
@@ -3021,7 +3021,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3021
3021
|
self.load_markets()
|
3022
3022
|
self.check_address(address)
|
3023
3023
|
currency = self.currency(code)
|
3024
|
-
request = {
|
3024
|
+
request: dict = {
|
3025
3025
|
'currency': currency['id'],
|
3026
3026
|
'address': address,
|
3027
3027
|
# 'memo': tag,
|
@@ -3067,7 +3067,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3067
3067
|
# if precision exists, no need to refetch
|
3068
3068
|
return
|
3069
3069
|
# otherwise try to fetch and store in instance
|
3070
|
-
request = {
|
3070
|
+
request: dict = {
|
3071
3071
|
'currency': currency['id'],
|
3072
3072
|
'chain': self.network_code_to_id(networkCode).lower(),
|
3073
3073
|
}
|
@@ -3101,7 +3101,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3101
3101
|
self.currencies[code]['networks'][networkCode]['precision'] = precision
|
3102
3102
|
|
3103
3103
|
def parse_transaction_status(self, status):
|
3104
|
-
statuses = {
|
3104
|
+
statuses: dict = {
|
3105
3105
|
'SUCCESS': 'ok',
|
3106
3106
|
'PROCESSING': 'pending',
|
3107
3107
|
'WALLET_PROCESSING': 'pending',
|
@@ -3109,7 +3109,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3109
3109
|
}
|
3110
3110
|
return self.safe_string(statuses, status, status)
|
3111
3111
|
|
3112
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
3112
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
3113
3113
|
#
|
3114
3114
|
# fetchDeposits
|
3115
3115
|
#
|
@@ -3231,7 +3231,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3231
3231
|
paginate, params = self.handle_option_and_params(params, 'fetchDeposits', 'paginate')
|
3232
3232
|
if paginate:
|
3233
3233
|
return self.fetch_paginated_call_dynamic('fetchDeposits', code, since, limit, params)
|
3234
|
-
request = {}
|
3234
|
+
request: dict = {}
|
3235
3235
|
currency = None
|
3236
3236
|
if code is not None:
|
3237
3237
|
currency = self.currency(code)
|
@@ -3307,7 +3307,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3307
3307
|
paginate, params = self.handle_option_and_params(params, 'fetchWithdrawals', 'paginate')
|
3308
3308
|
if paginate:
|
3309
3309
|
return self.fetch_paginated_call_dynamic('fetchWithdrawals', code, since, limit, params)
|
3310
|
-
request = {}
|
3310
|
+
request: dict = {}
|
3311
3311
|
currency = None
|
3312
3312
|
if code is not None:
|
3313
3313
|
currency = self.currency(code)
|
@@ -3404,7 +3404,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3404
3404
|
params = self.omit(params, 'hf')
|
3405
3405
|
marginMode, query = self.handle_margin_mode_and_params('fetchBalance', params)
|
3406
3406
|
response = None
|
3407
|
-
request = {}
|
3407
|
+
request: dict = {}
|
3408
3408
|
isolated = (marginMode == 'isolated') or (type == 'isolated')
|
3409
3409
|
cross = (marginMode == 'cross') or (type == 'margin')
|
3410
3410
|
if isolated:
|
@@ -3496,7 +3496,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3496
3496
|
# }
|
3497
3497
|
#
|
3498
3498
|
data = None
|
3499
|
-
result = {
|
3499
|
+
result: dict = {
|
3500
3500
|
'info': response,
|
3501
3501
|
'timestamp': None,
|
3502
3502
|
'datetime': None,
|
@@ -3512,7 +3512,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3512
3512
|
quote = self.safe_dict(entry, 'quoteAsset', {})
|
3513
3513
|
baseCode = self.safe_currency_code(self.safe_string(base, 'currency'))
|
3514
3514
|
quoteCode = self.safe_currency_code(self.safe_string(quote, 'currency'))
|
3515
|
-
subResult = {}
|
3515
|
+
subResult: dict = {}
|
3516
3516
|
subResult[baseCode] = self.parse_balance_helper(base)
|
3517
3517
|
subResult[quoteCode] = self.parse_balance_helper(quote)
|
3518
3518
|
result[symbol] = self.safe_balance(subResult)
|
@@ -3563,7 +3563,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3563
3563
|
if fromId == 'contract':
|
3564
3564
|
if toId != 'main':
|
3565
3565
|
raise ExchangeError(self.id + ' transfer() only supports transferring from futures account to main account')
|
3566
|
-
request = {
|
3566
|
+
request: dict = {
|
3567
3567
|
'currency': currency['id'],
|
3568
3568
|
'amount': requestedAmount,
|
3569
3569
|
}
|
@@ -3598,7 +3598,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3598
3598
|
data = self.safe_dict(response, 'data')
|
3599
3599
|
return self.parse_transfer(data, currency)
|
3600
3600
|
else:
|
3601
|
-
request = {
|
3601
|
+
request: dict = {
|
3602
3602
|
'currency': currency['id'],
|
3603
3603
|
'amount': requestedAmount,
|
3604
3604
|
}
|
@@ -3681,13 +3681,13 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3681
3681
|
}
|
3682
3682
|
|
3683
3683
|
def parse_transfer_status(self, status: Str) -> Str:
|
3684
|
-
statuses = {
|
3684
|
+
statuses: dict = {
|
3685
3685
|
'PROCESSING': 'pending',
|
3686
3686
|
}
|
3687
3687
|
return self.safe_string(statuses, status, status)
|
3688
3688
|
|
3689
3689
|
def parse_ledger_entry_type(self, type):
|
3690
|
-
types = {
|
3690
|
+
types: dict = {
|
3691
3691
|
'Assets Transferred in After Upgrading': 'transfer', # Assets Transferred in After V1 to V2 Upgrading
|
3692
3692
|
'Deposit': 'transaction', # Deposit
|
3693
3693
|
'Withdrawal': 'transaction', # Withdrawal
|
@@ -3730,7 +3730,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3730
3730
|
}
|
3731
3731
|
return self.safe_string(types, type, type)
|
3732
3732
|
|
3733
|
-
def parse_ledger_entry(self, item, currency: Currency = None):
|
3733
|
+
def parse_ledger_entry(self, item: dict, currency: Currency = None):
|
3734
3734
|
#
|
3735
3735
|
# {
|
3736
3736
|
# "id": "611a1e7c6a053300067a88d9", #unique key for each ledger entry
|
@@ -3831,7 +3831,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3831
3831
|
params = self.omit(params, 'hf')
|
3832
3832
|
if paginate:
|
3833
3833
|
return self.fetch_paginated_call_dynamic('fetchLedger', code, since, limit, params)
|
3834
|
-
request = {
|
3834
|
+
request: dict = {
|
3835
3835
|
# 'currency': currency['id'], # can choose up to 10, if not provided returns for all currencies by default
|
3836
3836
|
# 'direction': 'in', # 'out'
|
3837
3837
|
# 'bizType': 'DEPOSIT', # DEPOSIT, WITHDRAW, TRANSFER, SUB_TRANSFER,TRADE_EXCHANGE, MARGIN_EXCHANGE, KUCOIN_BONUS(optional)
|
@@ -3971,7 +3971,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3971
3971
|
marginMode, params = self.handle_margin_mode_and_params('fetchBorrowInterest', params)
|
3972
3972
|
if marginMode is None:
|
3973
3973
|
marginMode = 'cross' # cross marginMode
|
3974
|
-
request = {}
|
3974
|
+
request: dict = {}
|
3975
3975
|
response = None
|
3976
3976
|
if code is not None:
|
3977
3977
|
currency = self.currency(code)
|
@@ -4048,7 +4048,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4048
4048
|
assets = self.safe_list(data, 'assets', []) if (marginMode == 'isolated') else self.safe_list(data, 'accounts', [])
|
4049
4049
|
return self.parse_borrow_interests(assets, None)
|
4050
4050
|
|
4051
|
-
def parse_borrow_interest(self, info, market: Market = None):
|
4051
|
+
def parse_borrow_interest(self, info: dict, market: Market = None):
|
4052
4052
|
#
|
4053
4053
|
# Cross
|
4054
4054
|
#
|
@@ -4138,7 +4138,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4138
4138
|
marginResult = self.handle_margin_mode_and_params('fetchBorrowRateHistories', params)
|
4139
4139
|
marginMode = self.safe_string(marginResult, 0, 'cross')
|
4140
4140
|
isIsolated = (marginMode == 'isolated') # True-isolated, False-cross
|
4141
|
-
request = {
|
4141
|
+
request: dict = {
|
4142
4142
|
'isIsolated': isIsolated,
|
4143
4143
|
}
|
4144
4144
|
if since is not None:
|
@@ -4188,7 +4188,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4188
4188
|
marginMode = self.safe_string(marginResult, 0, 'cross')
|
4189
4189
|
isIsolated = (marginMode == 'isolated') # True-isolated, False-cross
|
4190
4190
|
currency = self.currency(code)
|
4191
|
-
request = {
|
4191
|
+
request: dict = {
|
4192
4192
|
'isIsolated': isIsolated,
|
4193
4193
|
'currency': currency['id'],
|
4194
4194
|
}
|
@@ -4233,7 +4233,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4233
4233
|
# }
|
4234
4234
|
# ]
|
4235
4235
|
#
|
4236
|
-
borrowRateHistories = {}
|
4236
|
+
borrowRateHistories: dict = {}
|
4237
4237
|
for i in range(0, len(response)):
|
4238
4238
|
item = response[i]
|
4239
4239
|
code = self.safe_currency_code(self.safe_string(item, 'currency'))
|
@@ -4260,7 +4260,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4260
4260
|
"""
|
4261
4261
|
self.load_markets()
|
4262
4262
|
currency = self.currency(code)
|
4263
|
-
request = {
|
4263
|
+
request: dict = {
|
4264
4264
|
'currency': currency['id'],
|
4265
4265
|
'size': self.currency_to_precision(code, amount),
|
4266
4266
|
'timeInForce': 'FOK',
|
@@ -4295,7 +4295,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4295
4295
|
self.load_markets()
|
4296
4296
|
market = self.market(symbol)
|
4297
4297
|
currency = self.currency(code)
|
4298
|
-
request = {
|
4298
|
+
request: dict = {
|
4299
4299
|
'currency': currency['id'],
|
4300
4300
|
'size': self.currency_to_precision(code, amount),
|
4301
4301
|
'symbol': market['id'],
|
@@ -4329,7 +4329,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4329
4329
|
"""
|
4330
4330
|
self.load_markets()
|
4331
4331
|
currency = self.currency(code)
|
4332
|
-
request = {
|
4332
|
+
request: dict = {
|
4333
4333
|
'currency': currency['id'],
|
4334
4334
|
'size': self.currency_to_precision(code, amount),
|
4335
4335
|
}
|
@@ -4362,7 +4362,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4362
4362
|
self.load_markets()
|
4363
4363
|
market = self.market(symbol)
|
4364
4364
|
currency = self.currency(code)
|
4365
|
-
request = {
|
4365
|
+
request: dict = {
|
4366
4366
|
'currency': currency['id'],
|
4367
4367
|
'size': self.currency_to_precision(code, amount),
|
4368
4368
|
'symbol': market['id'],
|