ccxt 4.3.30__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/bigone.py +32 -32
- ccxt/async_support/binance.py +105 -96
- ccxt/async_support/bingx.py +21 -21
- 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 +168 -139
- 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 +37 -37
- 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 +35 -35
- ccxt/base/types.py +13 -0
- ccxt/bigone.py +32 -32
- ccxt/binance.py +105 -96
- ccxt/bingx.py +21 -21
- 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 +168 -139
- 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 +37 -37
- 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.30.dist-info → ccxt-4.3.31.dist-info}/METADATA +4 -4
- {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/RECORD +258 -258
- {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/WHEEL +0 -0
- {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/top_level.txt +0 -0
ccxt/async_support/kucoin.py
CHANGED
@@ -1037,7 +1037,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1037
1037
|
data = self.safe_list(response, 'data')
|
1038
1038
|
options = self.safe_dict(self.options, 'fetchMarkets', {})
|
1039
1039
|
fetchTickersFees = self.safe_bool(options, 'fetchTickersFees', True)
|
1040
|
-
tickersResponse = {}
|
1040
|
+
tickersResponse: dict = {}
|
1041
1041
|
if fetchTickersFees:
|
1042
1042
|
tickersResponse = await self.publicGetMarketAllTickers(params)
|
1043
1043
|
#
|
@@ -1219,7 +1219,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1219
1219
|
additionalResponse = self.safe_dict(responses, 1, {})
|
1220
1220
|
additionalData = self.safe_list(additionalResponse, 'data', [])
|
1221
1221
|
additionalDataGrouped = self.group_by(additionalData, 'currency')
|
1222
|
-
result = {}
|
1222
|
+
result: dict = {}
|
1223
1223
|
for i in range(0, len(currenciesData)):
|
1224
1224
|
entry = currenciesData[i]
|
1225
1225
|
id = self.safe_string(entry, 'currency')
|
@@ -1227,7 +1227,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1227
1227
|
code = self.safe_currency_code(id)
|
1228
1228
|
isWithdrawEnabled = None
|
1229
1229
|
isDepositEnabled = None
|
1230
|
-
networks = {}
|
1230
|
+
networks: dict = {}
|
1231
1231
|
chains = self.safe_list(entry, 'chains', [])
|
1232
1232
|
extraChainsData = self.index_by(self.safe_list(additionalDataGrouped, id, []), 'chain')
|
1233
1233
|
rawPrecision = self.safe_string(entry, 'precision')
|
@@ -1349,7 +1349,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1349
1349
|
"""
|
1350
1350
|
await self.load_markets()
|
1351
1351
|
currency = self.currency(code)
|
1352
|
-
request = {
|
1352
|
+
request: dict = {
|
1353
1353
|
'currency': currency['id'],
|
1354
1354
|
}
|
1355
1355
|
networkCode = None
|
@@ -1358,7 +1358,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1358
1358
|
request['chain'] = self.network_code_to_id(networkCode).lower()
|
1359
1359
|
response = await self.privateGetWithdrawalsQuotas(self.extend(request, params))
|
1360
1360
|
data = self.safe_dict(response, 'data', {})
|
1361
|
-
withdrawFees = {}
|
1361
|
+
withdrawFees: dict = {}
|
1362
1362
|
withdrawFees[code] = self.safe_number(data, 'withdrawMinFee')
|
1363
1363
|
return {
|
1364
1364
|
'info': response,
|
@@ -1377,7 +1377,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1377
1377
|
"""
|
1378
1378
|
await self.load_markets()
|
1379
1379
|
currency = self.currency(code)
|
1380
|
-
request = {
|
1380
|
+
request: dict = {
|
1381
1381
|
'currency': currency['id'],
|
1382
1382
|
}
|
1383
1383
|
networkCode = None
|
@@ -1422,7 +1422,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1422
1422
|
# "chain": "ERC20"
|
1423
1423
|
# }
|
1424
1424
|
#
|
1425
|
-
result = {
|
1425
|
+
result: dict = {
|
1426
1426
|
'info': fee,
|
1427
1427
|
'withdraw': {
|
1428
1428
|
'fee': None,
|
@@ -1599,7 +1599,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1599
1599
|
data = self.safe_dict(response, 'data', {})
|
1600
1600
|
tickers = self.safe_list(data, 'ticker', [])
|
1601
1601
|
time = self.safe_integer(data, 'time')
|
1602
|
-
result = {}
|
1602
|
+
result: dict = {}
|
1603
1603
|
for i in range(0, len(tickers)):
|
1604
1604
|
tickers[i]['time'] = time
|
1605
1605
|
ticker = self.parse_ticker(tickers[i])
|
@@ -1618,7 +1618,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1618
1618
|
"""
|
1619
1619
|
await self.load_markets()
|
1620
1620
|
market = self.market(symbol)
|
1621
|
-
request = {
|
1621
|
+
request: dict = {
|
1622
1622
|
'symbol': market['id'],
|
1623
1623
|
}
|
1624
1624
|
response = await self.publicGetMarketStats(self.extend(request, params))
|
@@ -1687,7 +1687,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1687
1687
|
return await self.fetch_paginated_call_deterministic('fetchOHLCV', symbol, since, limit, timeframe, params, 1500)
|
1688
1688
|
market = self.market(symbol)
|
1689
1689
|
marketId = market['id']
|
1690
|
-
request = {
|
1690
|
+
request: dict = {
|
1691
1691
|
'symbol': marketId,
|
1692
1692
|
'type': self.safe_string(self.timeframes, timeframe, timeframe),
|
1693
1693
|
}
|
@@ -1731,7 +1731,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1731
1731
|
"""
|
1732
1732
|
await self.load_markets()
|
1733
1733
|
currency = self.currency(code)
|
1734
|
-
request = {
|
1734
|
+
request: dict = {
|
1735
1735
|
'currency': currency['id'],
|
1736
1736
|
}
|
1737
1737
|
networkCode = None
|
@@ -1756,7 +1756,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1756
1756
|
"""
|
1757
1757
|
await self.load_markets()
|
1758
1758
|
currency = self.currency(code)
|
1759
|
-
request = {
|
1759
|
+
request: dict = {
|
1760
1760
|
'currency': currency['id'],
|
1761
1761
|
# for USDT - OMNI, ERC20, TRC20, default is ERC20
|
1762
1762
|
# for BTC - Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native
|
@@ -1806,7 +1806,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1806
1806
|
"""
|
1807
1807
|
await self.load_markets()
|
1808
1808
|
currency = self.currency(code)
|
1809
|
-
request = {
|
1809
|
+
request: dict = {
|
1810
1810
|
'currency': currency['id'],
|
1811
1811
|
}
|
1812
1812
|
version = self.options['versions']['private']['GET']['deposit-addresses']
|
@@ -1847,7 +1847,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1847
1847
|
await self.load_markets()
|
1848
1848
|
market = self.market(symbol)
|
1849
1849
|
level = self.safe_integer(params, 'level', 2)
|
1850
|
-
request = {'symbol': market['id']}
|
1850
|
+
request: dict = {'symbol': market['id']}
|
1851
1851
|
isAuthenticated = self.check_required_credentials(False)
|
1852
1852
|
response = None
|
1853
1853
|
if not isAuthenticated or limit is not None:
|
@@ -2057,7 +2057,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2057
2057
|
orderRequest = self.create_order_request(marketId, type, side, amount, price, orderParams)
|
2058
2058
|
ordersRequests.append(orderRequest)
|
2059
2059
|
market = self.market(symbol)
|
2060
|
-
request = {
|
2060
|
+
request: dict = {
|
2061
2061
|
'symbol': market['id'],
|
2062
2062
|
'orderList': ordersRequests,
|
2063
2063
|
}
|
@@ -2114,7 +2114,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2114
2114
|
# required param, cannot be used twice
|
2115
2115
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId', self.uuid())
|
2116
2116
|
params = self.omit(params, ['clientOid', 'clientOrderId'])
|
2117
|
-
request = {
|
2117
|
+
request: dict = {
|
2118
2118
|
'clientOid': clientOrderId,
|
2119
2119
|
'side': side,
|
2120
2120
|
'symbol': market['id'],
|
@@ -2182,7 +2182,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2182
2182
|
"""
|
2183
2183
|
await self.load_markets()
|
2184
2184
|
market = self.market(symbol)
|
2185
|
-
request = {
|
2185
|
+
request: dict = {
|
2186
2186
|
'symbol': market['id'],
|
2187
2187
|
}
|
2188
2188
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
|
@@ -2223,7 +2223,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2223
2223
|
:returns: Response from the exchange
|
2224
2224
|
"""
|
2225
2225
|
await self.load_markets()
|
2226
|
-
request = {}
|
2226
|
+
request: dict = {}
|
2227
2227
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
|
2228
2228
|
stop = self.safe_bool_2(params, 'stop', 'trigger', False)
|
2229
2229
|
hf = self.safe_bool(params, 'hf', False)
|
@@ -2268,7 +2268,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2268
2268
|
:returns: Response from the exchange
|
2269
2269
|
"""
|
2270
2270
|
await self.load_markets()
|
2271
|
-
request = {}
|
2271
|
+
request: dict = {}
|
2272
2272
|
stop = self.safe_bool(params, 'stop', False)
|
2273
2273
|
hf = self.safe_bool(params, 'hf', False)
|
2274
2274
|
params = self.omit(params, ['stop', 'hf'])
|
@@ -2325,7 +2325,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2325
2325
|
lowercaseStatus = 'active'
|
2326
2326
|
elif lowercaseStatus == 'closed':
|
2327
2327
|
lowercaseStatus = 'done'
|
2328
|
-
request = {
|
2328
|
+
request: dict = {
|
2329
2329
|
'status': lowercaseStatus,
|
2330
2330
|
}
|
2331
2331
|
market = None
|
@@ -2474,7 +2474,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2474
2474
|
:returns: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2475
2475
|
"""
|
2476
2476
|
await self.load_markets()
|
2477
|
-
request = {}
|
2477
|
+
request: dict = {}
|
2478
2478
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
|
2479
2479
|
stop = self.safe_bool(params, 'stop', False)
|
2480
2480
|
hf = self.safe_bool(params, 'hf', False)
|
@@ -2515,7 +2515,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2515
2515
|
responseData = self.safe_value(responseData, 0)
|
2516
2516
|
return self.parse_order(responseData, market)
|
2517
2517
|
|
2518
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
2518
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
2519
2519
|
#
|
2520
2520
|
# createOrder
|
2521
2521
|
#
|
@@ -2702,7 +2702,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2702
2702
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2703
2703
|
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
2704
2704
|
"""
|
2705
|
-
request = {
|
2705
|
+
request: dict = {
|
2706
2706
|
'orderId': id,
|
2707
2707
|
}
|
2708
2708
|
return await self.fetch_my_trades(symbol, since, limit, self.extend(request, params))
|
@@ -2726,7 +2726,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2726
2726
|
paginate, params = self.handle_option_and_params(params, 'fetchMyTrades', 'paginate')
|
2727
2727
|
if paginate:
|
2728
2728
|
return await self.fetch_paginated_call_dynamic('fetchMyTrades', symbol, since, limit, params)
|
2729
|
-
request = {}
|
2729
|
+
request: dict = {}
|
2730
2730
|
hf = self.safe_bool(params, 'hf', False)
|
2731
2731
|
if hf and symbol is None:
|
2732
2732
|
raise ArgumentsRequired(self.id + ' fetchMyTrades() requires a symbol parameter for hf orders')
|
@@ -2816,7 +2816,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2816
2816
|
"""
|
2817
2817
|
await self.load_markets()
|
2818
2818
|
market = self.market(symbol)
|
2819
|
-
request = {
|
2819
|
+
request: dict = {
|
2820
2820
|
'symbol': market['id'],
|
2821
2821
|
}
|
2822
2822
|
# pagination is not supported on the exchange side anymore
|
@@ -2844,7 +2844,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2844
2844
|
trades = self.safe_list(response, 'data', [])
|
2845
2845
|
return self.parse_trades(trades, market, since, limit)
|
2846
2846
|
|
2847
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
2847
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
2848
2848
|
#
|
2849
2849
|
# fetchTrades(public)
|
2850
2850
|
#
|
@@ -2979,7 +2979,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2979
2979
|
"""
|
2980
2980
|
await self.load_markets()
|
2981
2981
|
market = self.market(symbol)
|
2982
|
-
request = {
|
2982
|
+
request: dict = {
|
2983
2983
|
'symbols': market['id'],
|
2984
2984
|
}
|
2985
2985
|
response = await self.privateGetTradeFees(self.extend(request, params))
|
@@ -3022,7 +3022,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3022
3022
|
await self.load_markets()
|
3023
3023
|
self.check_address(address)
|
3024
3024
|
currency = self.currency(code)
|
3025
|
-
request = {
|
3025
|
+
request: dict = {
|
3026
3026
|
'currency': currency['id'],
|
3027
3027
|
'address': address,
|
3028
3028
|
# 'memo': tag,
|
@@ -3068,7 +3068,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3068
3068
|
# if precision exists, no need to refetch
|
3069
3069
|
return
|
3070
3070
|
# otherwise try to fetch and store in instance
|
3071
|
-
request = {
|
3071
|
+
request: dict = {
|
3072
3072
|
'currency': currency['id'],
|
3073
3073
|
'chain': self.network_code_to_id(networkCode).lower(),
|
3074
3074
|
}
|
@@ -3102,7 +3102,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3102
3102
|
self.currencies[code]['networks'][networkCode]['precision'] = precision
|
3103
3103
|
|
3104
3104
|
def parse_transaction_status(self, status):
|
3105
|
-
statuses = {
|
3105
|
+
statuses: dict = {
|
3106
3106
|
'SUCCESS': 'ok',
|
3107
3107
|
'PROCESSING': 'pending',
|
3108
3108
|
'WALLET_PROCESSING': 'pending',
|
@@ -3110,7 +3110,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3110
3110
|
}
|
3111
3111
|
return self.safe_string(statuses, status, status)
|
3112
3112
|
|
3113
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
3113
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
3114
3114
|
#
|
3115
3115
|
# fetchDeposits
|
3116
3116
|
#
|
@@ -3232,7 +3232,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3232
3232
|
paginate, params = self.handle_option_and_params(params, 'fetchDeposits', 'paginate')
|
3233
3233
|
if paginate:
|
3234
3234
|
return await self.fetch_paginated_call_dynamic('fetchDeposits', code, since, limit, params)
|
3235
|
-
request = {}
|
3235
|
+
request: dict = {}
|
3236
3236
|
currency = None
|
3237
3237
|
if code is not None:
|
3238
3238
|
currency = self.currency(code)
|
@@ -3308,7 +3308,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3308
3308
|
paginate, params = self.handle_option_and_params(params, 'fetchWithdrawals', 'paginate')
|
3309
3309
|
if paginate:
|
3310
3310
|
return await self.fetch_paginated_call_dynamic('fetchWithdrawals', code, since, limit, params)
|
3311
|
-
request = {}
|
3311
|
+
request: dict = {}
|
3312
3312
|
currency = None
|
3313
3313
|
if code is not None:
|
3314
3314
|
currency = self.currency(code)
|
@@ -3405,7 +3405,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3405
3405
|
params = self.omit(params, 'hf')
|
3406
3406
|
marginMode, query = self.handle_margin_mode_and_params('fetchBalance', params)
|
3407
3407
|
response = None
|
3408
|
-
request = {}
|
3408
|
+
request: dict = {}
|
3409
3409
|
isolated = (marginMode == 'isolated') or (type == 'isolated')
|
3410
3410
|
cross = (marginMode == 'cross') or (type == 'margin')
|
3411
3411
|
if isolated:
|
@@ -3497,7 +3497,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3497
3497
|
# }
|
3498
3498
|
#
|
3499
3499
|
data = None
|
3500
|
-
result = {
|
3500
|
+
result: dict = {
|
3501
3501
|
'info': response,
|
3502
3502
|
'timestamp': None,
|
3503
3503
|
'datetime': None,
|
@@ -3513,7 +3513,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3513
3513
|
quote = self.safe_dict(entry, 'quoteAsset', {})
|
3514
3514
|
baseCode = self.safe_currency_code(self.safe_string(base, 'currency'))
|
3515
3515
|
quoteCode = self.safe_currency_code(self.safe_string(quote, 'currency'))
|
3516
|
-
subResult = {}
|
3516
|
+
subResult: dict = {}
|
3517
3517
|
subResult[baseCode] = self.parse_balance_helper(base)
|
3518
3518
|
subResult[quoteCode] = self.parse_balance_helper(quote)
|
3519
3519
|
result[symbol] = self.safe_balance(subResult)
|
@@ -3564,7 +3564,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3564
3564
|
if fromId == 'contract':
|
3565
3565
|
if toId != 'main':
|
3566
3566
|
raise ExchangeError(self.id + ' transfer() only supports transferring from futures account to main account')
|
3567
|
-
request = {
|
3567
|
+
request: dict = {
|
3568
3568
|
'currency': currency['id'],
|
3569
3569
|
'amount': requestedAmount,
|
3570
3570
|
}
|
@@ -3599,7 +3599,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3599
3599
|
data = self.safe_dict(response, 'data')
|
3600
3600
|
return self.parse_transfer(data, currency)
|
3601
3601
|
else:
|
3602
|
-
request = {
|
3602
|
+
request: dict = {
|
3603
3603
|
'currency': currency['id'],
|
3604
3604
|
'amount': requestedAmount,
|
3605
3605
|
}
|
@@ -3682,13 +3682,13 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3682
3682
|
}
|
3683
3683
|
|
3684
3684
|
def parse_transfer_status(self, status: Str) -> Str:
|
3685
|
-
statuses = {
|
3685
|
+
statuses: dict = {
|
3686
3686
|
'PROCESSING': 'pending',
|
3687
3687
|
}
|
3688
3688
|
return self.safe_string(statuses, status, status)
|
3689
3689
|
|
3690
3690
|
def parse_ledger_entry_type(self, type):
|
3691
|
-
types = {
|
3691
|
+
types: dict = {
|
3692
3692
|
'Assets Transferred in After Upgrading': 'transfer', # Assets Transferred in After V1 to V2 Upgrading
|
3693
3693
|
'Deposit': 'transaction', # Deposit
|
3694
3694
|
'Withdrawal': 'transaction', # Withdrawal
|
@@ -3731,7 +3731,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3731
3731
|
}
|
3732
3732
|
return self.safe_string(types, type, type)
|
3733
3733
|
|
3734
|
-
def parse_ledger_entry(self, item, currency: Currency = None):
|
3734
|
+
def parse_ledger_entry(self, item: dict, currency: Currency = None):
|
3735
3735
|
#
|
3736
3736
|
# {
|
3737
3737
|
# "id": "611a1e7c6a053300067a88d9", #unique key for each ledger entry
|
@@ -3832,7 +3832,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3832
3832
|
params = self.omit(params, 'hf')
|
3833
3833
|
if paginate:
|
3834
3834
|
return await self.fetch_paginated_call_dynamic('fetchLedger', code, since, limit, params)
|
3835
|
-
request = {
|
3835
|
+
request: dict = {
|
3836
3836
|
# 'currency': currency['id'], # can choose up to 10, if not provided returns for all currencies by default
|
3837
3837
|
# 'direction': 'in', # 'out'
|
3838
3838
|
# 'bizType': 'DEPOSIT', # DEPOSIT, WITHDRAW, TRANSFER, SUB_TRANSFER,TRADE_EXCHANGE, MARGIN_EXCHANGE, KUCOIN_BONUS(optional)
|
@@ -3972,7 +3972,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3972
3972
|
marginMode, params = self.handle_margin_mode_and_params('fetchBorrowInterest', params)
|
3973
3973
|
if marginMode is None:
|
3974
3974
|
marginMode = 'cross' # cross marginMode
|
3975
|
-
request = {}
|
3975
|
+
request: dict = {}
|
3976
3976
|
response = None
|
3977
3977
|
if code is not None:
|
3978
3978
|
currency = self.currency(code)
|
@@ -4049,7 +4049,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4049
4049
|
assets = self.safe_list(data, 'assets', []) if (marginMode == 'isolated') else self.safe_list(data, 'accounts', [])
|
4050
4050
|
return self.parse_borrow_interests(assets, None)
|
4051
4051
|
|
4052
|
-
def parse_borrow_interest(self, info, market: Market = None):
|
4052
|
+
def parse_borrow_interest(self, info: dict, market: Market = None):
|
4053
4053
|
#
|
4054
4054
|
# Cross
|
4055
4055
|
#
|
@@ -4139,7 +4139,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4139
4139
|
marginResult = self.handle_margin_mode_and_params('fetchBorrowRateHistories', params)
|
4140
4140
|
marginMode = self.safe_string(marginResult, 0, 'cross')
|
4141
4141
|
isIsolated = (marginMode == 'isolated') # True-isolated, False-cross
|
4142
|
-
request = {
|
4142
|
+
request: dict = {
|
4143
4143
|
'isIsolated': isIsolated,
|
4144
4144
|
}
|
4145
4145
|
if since is not None:
|
@@ -4189,7 +4189,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4189
4189
|
marginMode = self.safe_string(marginResult, 0, 'cross')
|
4190
4190
|
isIsolated = (marginMode == 'isolated') # True-isolated, False-cross
|
4191
4191
|
currency = self.currency(code)
|
4192
|
-
request = {
|
4192
|
+
request: dict = {
|
4193
4193
|
'isIsolated': isIsolated,
|
4194
4194
|
'currency': currency['id'],
|
4195
4195
|
}
|
@@ -4234,7 +4234,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4234
4234
|
# }
|
4235
4235
|
# ]
|
4236
4236
|
#
|
4237
|
-
borrowRateHistories = {}
|
4237
|
+
borrowRateHistories: dict = {}
|
4238
4238
|
for i in range(0, len(response)):
|
4239
4239
|
item = response[i]
|
4240
4240
|
code = self.safe_currency_code(self.safe_string(item, 'currency'))
|
@@ -4261,7 +4261,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4261
4261
|
"""
|
4262
4262
|
await self.load_markets()
|
4263
4263
|
currency = self.currency(code)
|
4264
|
-
request = {
|
4264
|
+
request: dict = {
|
4265
4265
|
'currency': currency['id'],
|
4266
4266
|
'size': self.currency_to_precision(code, amount),
|
4267
4267
|
'timeInForce': 'FOK',
|
@@ -4296,7 +4296,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4296
4296
|
await self.load_markets()
|
4297
4297
|
market = self.market(symbol)
|
4298
4298
|
currency = self.currency(code)
|
4299
|
-
request = {
|
4299
|
+
request: dict = {
|
4300
4300
|
'currency': currency['id'],
|
4301
4301
|
'size': self.currency_to_precision(code, amount),
|
4302
4302
|
'symbol': market['id'],
|
@@ -4330,7 +4330,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4330
4330
|
"""
|
4331
4331
|
await self.load_markets()
|
4332
4332
|
currency = self.currency(code)
|
4333
|
-
request = {
|
4333
|
+
request: dict = {
|
4334
4334
|
'currency': currency['id'],
|
4335
4335
|
'size': self.currency_to_precision(code, amount),
|
4336
4336
|
}
|
@@ -4363,7 +4363,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4363
4363
|
await self.load_markets()
|
4364
4364
|
market = self.market(symbol)
|
4365
4365
|
currency = self.currency(code)
|
4366
|
-
request = {
|
4366
|
+
request: dict = {
|
4367
4367
|
'currency': currency['id'],
|
4368
4368
|
'size': self.currency_to_precision(code, amount),
|
4369
4369
|
'symbol': market['id'],
|