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/async_support/probit.py
CHANGED
@@ -405,7 +405,7 @@ class probit(Exchange, ImplicitAPI):
|
|
405
405
|
# }
|
406
406
|
#
|
407
407
|
currencies = self.safe_value(response, 'data', [])
|
408
|
-
result = {}
|
408
|
+
result: dict = {}
|
409
409
|
for i in range(0, len(currencies)):
|
410
410
|
currency = currencies[i]
|
411
411
|
id = self.safe_string(currency, 'id')
|
@@ -415,7 +415,7 @@ class probit(Exchange, ImplicitAPI):
|
|
415
415
|
platforms = self.safe_value(currency, 'platform', [])
|
416
416
|
platformsByPriority = self.sort_by(platforms, 'priority')
|
417
417
|
platform = None
|
418
|
-
networkList = {}
|
418
|
+
networkList: dict = {}
|
419
419
|
for j in range(0, len(platformsByPriority)):
|
420
420
|
network = platformsByPriority[j]
|
421
421
|
idInner = self.safe_string(network, 'id')
|
@@ -505,7 +505,7 @@ class probit(Exchange, ImplicitAPI):
|
|
505
505
|
return result
|
506
506
|
|
507
507
|
def parse_balance(self, response) -> Balances:
|
508
|
-
result = {
|
508
|
+
result: dict = {
|
509
509
|
'info': response,
|
510
510
|
'timestamp': None,
|
511
511
|
'datetime': None,
|
@@ -554,7 +554,7 @@ class probit(Exchange, ImplicitAPI):
|
|
554
554
|
"""
|
555
555
|
await self.load_markets()
|
556
556
|
market = self.market(symbol)
|
557
|
-
request = {
|
557
|
+
request: dict = {
|
558
558
|
'market_id': market['id'],
|
559
559
|
}
|
560
560
|
response = await self.publicGetOrderBook(self.extend(request, params))
|
@@ -580,7 +580,7 @@ class probit(Exchange, ImplicitAPI):
|
|
580
580
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
581
581
|
"""
|
582
582
|
await self.load_markets()
|
583
|
-
request = {}
|
583
|
+
request: dict = {}
|
584
584
|
if symbols is not None:
|
585
585
|
marketIds = self.market_ids(symbols)
|
586
586
|
request['market_ids'] = ','.join(marketIds)
|
@@ -614,7 +614,7 @@ class probit(Exchange, ImplicitAPI):
|
|
614
614
|
"""
|
615
615
|
await self.load_markets()
|
616
616
|
market = self.market(symbol)
|
617
|
-
request = {
|
617
|
+
request: dict = {
|
618
618
|
'market_ids': market['id'],
|
619
619
|
}
|
620
620
|
response = await self.publicGetTicker(self.extend(request, params))
|
@@ -696,7 +696,7 @@ class probit(Exchange, ImplicitAPI):
|
|
696
696
|
await self.load_markets()
|
697
697
|
market: Market = None
|
698
698
|
now = self.milliseconds()
|
699
|
-
request = {
|
699
|
+
request: dict = {
|
700
700
|
'limit': 100,
|
701
701
|
'start_time': self.iso8601(now - 31536000000), # -365 days
|
702
702
|
'end_time': self.iso8601(now),
|
@@ -744,7 +744,7 @@ class probit(Exchange, ImplicitAPI):
|
|
744
744
|
"""
|
745
745
|
await self.load_markets()
|
746
746
|
market = self.market(symbol)
|
747
|
-
request = {
|
747
|
+
request: dict = {
|
748
748
|
'market_id': market['id'],
|
749
749
|
'start_time': '1970-01-01T00:00:00.000Z',
|
750
750
|
'end_time': self.iso8601(self.milliseconds()),
|
@@ -781,7 +781,7 @@ class probit(Exchange, ImplicitAPI):
|
|
781
781
|
data = self.safe_list(response, 'data', [])
|
782
782
|
return self.parse_trades(data, market, since, limit)
|
783
783
|
|
784
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
784
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
785
785
|
#
|
786
786
|
# fetchTrades(public)
|
787
787
|
#
|
@@ -907,7 +907,7 @@ class probit(Exchange, ImplicitAPI):
|
|
907
907
|
limit = 100 if (limit is None) else limit
|
908
908
|
requestLimit = self.sum(limit, 1)
|
909
909
|
requestLimit = min(1000, requestLimit) # max 1000
|
910
|
-
request = {
|
910
|
+
request: dict = {
|
911
911
|
'market_ids': market['id'],
|
912
912
|
'interval': interval,
|
913
913
|
'sort': 'asc', # 'asc' will always include the start_time, 'desc' will always include end_time
|
@@ -986,7 +986,7 @@ class probit(Exchange, ImplicitAPI):
|
|
986
986
|
"""
|
987
987
|
await self.load_markets()
|
988
988
|
since = self.parse8601(since)
|
989
|
-
request = {}
|
989
|
+
request: dict = {}
|
990
990
|
market: Market = None
|
991
991
|
if symbol is not None:
|
992
992
|
market = self.market(symbol)
|
@@ -1006,7 +1006,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1006
1006
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1007
1007
|
"""
|
1008
1008
|
await self.load_markets()
|
1009
|
-
request = {
|
1009
|
+
request: dict = {
|
1010
1010
|
'start_time': self.iso8601(0),
|
1011
1011
|
'end_time': self.iso8601(self.milliseconds()),
|
1012
1012
|
'limit': 100,
|
@@ -1035,7 +1035,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1035
1035
|
raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol argument')
|
1036
1036
|
await self.load_markets()
|
1037
1037
|
market = self.market(symbol)
|
1038
|
-
request = {
|
1038
|
+
request: dict = {
|
1039
1039
|
'market_id': market['id'],
|
1040
1040
|
}
|
1041
1041
|
clientOrderId = self.safe_string_2(params, 'clientOrderId', 'client_order_id')
|
@@ -1049,15 +1049,15 @@ class probit(Exchange, ImplicitAPI):
|
|
1049
1049
|
order = self.safe_dict(data, 0)
|
1050
1050
|
return self.parse_order(order, market)
|
1051
1051
|
|
1052
|
-
def parse_order_status(self, status):
|
1053
|
-
statuses = {
|
1052
|
+
def parse_order_status(self, status: Str):
|
1053
|
+
statuses: dict = {
|
1054
1054
|
'open': 'open',
|
1055
1055
|
'cancelled': 'canceled',
|
1056
1056
|
'filled': 'closed',
|
1057
1057
|
}
|
1058
1058
|
return self.safe_string(statuses, status, status)
|
1059
1059
|
|
1060
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1060
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1061
1061
|
#
|
1062
1062
|
# {
|
1063
1063
|
# id,
|
@@ -1141,7 +1141,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1141
1141
|
options = self.safe_value(self.options, 'timeInForce')
|
1142
1142
|
defaultTimeInForce = self.safe_value(options, type)
|
1143
1143
|
timeInForce = self.safe_string_2(params, 'timeInForce', 'time_in_force', defaultTimeInForce)
|
1144
|
-
request = {
|
1144
|
+
request: dict = {
|
1145
1145
|
'market_id': market['id'],
|
1146
1146
|
'type': type,
|
1147
1147
|
'side': side,
|
@@ -1222,7 +1222,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1222
1222
|
raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
|
1223
1223
|
await self.load_markets()
|
1224
1224
|
market = self.market(symbol)
|
1225
|
-
request = {
|
1225
|
+
request: dict = {
|
1226
1226
|
'market_id': market['id'],
|
1227
1227
|
'order_id': id,
|
1228
1228
|
}
|
@@ -1256,7 +1256,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1256
1256
|
"""
|
1257
1257
|
await self.load_markets()
|
1258
1258
|
currency = self.currency(code)
|
1259
|
-
request = {
|
1259
|
+
request: dict = {
|
1260
1260
|
'currency_id': currency['id'],
|
1261
1261
|
# 'platform_id': 'TRON',(undocumented)
|
1262
1262
|
}
|
@@ -1296,7 +1296,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1296
1296
|
raise InvalidAddress(self.id + ' fetchDepositAddress() returned an empty response')
|
1297
1297
|
return self.parse_deposit_address(firstAddress, currency)
|
1298
1298
|
|
1299
|
-
async def fetch_deposit_addresses(self, codes:
|
1299
|
+
async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
1300
1300
|
"""
|
1301
1301
|
:see: https://docs-en.probit.com/reference/deposit_address
|
1302
1302
|
fetch deposit addresses for multiple currencies and chain types
|
@@ -1305,7 +1305,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1305
1305
|
:returns dict: a list of `address structures <https://docs.ccxt.com/#/?id=address-structure>`
|
1306
1306
|
"""
|
1307
1307
|
await self.load_markets()
|
1308
|
-
request = {}
|
1308
|
+
request: dict = {}
|
1309
1309
|
if codes:
|
1310
1310
|
currencyIds = []
|
1311
1311
|
for i in range(0, len(codes)):
|
@@ -1337,7 +1337,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1337
1337
|
currency = self.currency(code)
|
1338
1338
|
if tag is None:
|
1339
1339
|
tag = ''
|
1340
|
-
request = {
|
1340
|
+
request: dict = {
|
1341
1341
|
'currency_id': currency['id'],
|
1342
1342
|
# 'platform_id': 'ETH', # if omitted it will use the default platform for the currency
|
1343
1343
|
'address': address,
|
@@ -1368,7 +1368,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1368
1368
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1369
1369
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1370
1370
|
"""
|
1371
|
-
request = {
|
1371
|
+
request: dict = {
|
1372
1372
|
'type': 'deposit',
|
1373
1373
|
}
|
1374
1374
|
result = await self.fetch_transactions(code, since, limit, self.extend(request, params))
|
@@ -1383,7 +1383,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1383
1383
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1384
1384
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1385
1385
|
"""
|
1386
|
-
request = {
|
1386
|
+
request: dict = {
|
1387
1387
|
'type': 'withdrawal',
|
1388
1388
|
}
|
1389
1389
|
result = await self.fetch_transactions(code, since, limit, self.extend(request, params))
|
@@ -1402,7 +1402,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1402
1402
|
"""
|
1403
1403
|
await self.load_markets()
|
1404
1404
|
currency: Currency = None
|
1405
|
-
request = {}
|
1405
|
+
request: dict = {}
|
1406
1406
|
if code is not None:
|
1407
1407
|
currency = self.currency(code)
|
1408
1408
|
request['currency_id'] = currency['id']
|
@@ -1448,7 +1448,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1448
1448
|
data = self.safe_list(response, 'data', [])
|
1449
1449
|
return self.parse_transactions(data, currency, since, limit)
|
1450
1450
|
|
1451
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1451
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1452
1452
|
#
|
1453
1453
|
# {
|
1454
1454
|
# "id": "01211d4b-0e68-41d6-97cb-298bfe2cab67",
|
@@ -1512,7 +1512,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1512
1512
|
}
|
1513
1513
|
|
1514
1514
|
def parse_transaction_status(self, status):
|
1515
|
-
statuses = {
|
1515
|
+
statuses: dict = {
|
1516
1516
|
'requested': 'pending',
|
1517
1517
|
'pending': 'pending',
|
1518
1518
|
'confirming': 'pending',
|
@@ -1629,7 +1629,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1629
1629
|
#
|
1630
1630
|
depositWithdrawFee = self.deposit_withdraw_fee({})
|
1631
1631
|
platforms = self.safe_value(fee, 'platform', [])
|
1632
|
-
depositResult = {
|
1632
|
+
depositResult: dict = {
|
1633
1633
|
'fee': None,
|
1634
1634
|
'percentage': None,
|
1635
1635
|
}
|
@@ -1640,7 +1640,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1640
1640
|
withdrawalFees = self.safe_value(network, 'withdrawal_fee', {})
|
1641
1641
|
withdrawFee = self.safe_number(withdrawalFees[0], 'amount')
|
1642
1642
|
if len(withdrawalFees):
|
1643
|
-
withdrawResult = {
|
1643
|
+
withdrawResult: dict = {
|
1644
1644
|
'fee': withdrawFee,
|
1645
1645
|
'percentage': False if (withdrawFee is not None) else None,
|
1646
1646
|
}
|
@@ -1703,7 +1703,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1703
1703
|
:returns: response from exchange
|
1704
1704
|
"""
|
1705
1705
|
self.check_required_credentials()
|
1706
|
-
request = {
|
1706
|
+
request: dict = {
|
1707
1707
|
'grant_type': 'client_credentials', # the only supported value
|
1708
1708
|
}
|
1709
1709
|
response = await self.accountsPostToken(self.extend(request, params))
|
ccxt/async_support/timex.py
CHANGED
@@ -379,7 +379,7 @@ class timex(Exchange, ImplicitAPI):
|
|
379
379
|
params = self.omit(params, 'address')
|
380
380
|
if address is None:
|
381
381
|
raise ArgumentsRequired(self.id + ' fetchDeposits() requires an address parameter')
|
382
|
-
request = {
|
382
|
+
request: dict = {
|
383
383
|
'address': address,
|
384
384
|
}
|
385
385
|
response = await self.managerGetDeposits(self.extend(request, params))
|
@@ -412,7 +412,7 @@ class timex(Exchange, ImplicitAPI):
|
|
412
412
|
params = self.omit(params, 'address')
|
413
413
|
if address is None:
|
414
414
|
raise ArgumentsRequired(self.id + ' fetchDeposits() requires an address parameter')
|
415
|
-
request = {
|
415
|
+
request: dict = {
|
416
416
|
'address': address,
|
417
417
|
}
|
418
418
|
response = await self.managerGetWithdrawals(self.extend(request, params))
|
@@ -441,7 +441,7 @@ class timex(Exchange, ImplicitAPI):
|
|
441
441
|
return currency
|
442
442
|
return None
|
443
443
|
|
444
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
444
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
445
445
|
#
|
446
446
|
# {
|
447
447
|
# "from": "0x1134cc86b45039cc211c6d1d2e4b3c77f60207ed",
|
@@ -488,7 +488,7 @@ class timex(Exchange, ImplicitAPI):
|
|
488
488
|
"""
|
489
489
|
await self.load_markets()
|
490
490
|
period = self.safe_string(self.options['fetchTickers'], 'period', '1d')
|
491
|
-
request = {
|
491
|
+
request: dict = {
|
492
492
|
'period': self.timeframes[period], # I1, I5, I15, I30, H1, H2, H4, H6, H12, D1, W1
|
493
493
|
}
|
494
494
|
response = await self.publicGetTickers(self.extend(request, params))
|
@@ -522,7 +522,7 @@ class timex(Exchange, ImplicitAPI):
|
|
522
522
|
await self.load_markets()
|
523
523
|
market = self.market(symbol)
|
524
524
|
period = self.safe_string(self.options['fetchTickers'], 'period', '1d')
|
525
|
-
request = {
|
525
|
+
request: dict = {
|
526
526
|
'market': market['id'],
|
527
527
|
'period': self.timeframes[period], # I1, I5, I15, I30, H1, H2, H4, H6, H12, D1, W1
|
528
528
|
}
|
@@ -558,7 +558,7 @@ class timex(Exchange, ImplicitAPI):
|
|
558
558
|
"""
|
559
559
|
await self.load_markets()
|
560
560
|
market = self.market(symbol)
|
561
|
-
request = {
|
561
|
+
request: dict = {
|
562
562
|
'market': market['id'],
|
563
563
|
}
|
564
564
|
if limit is not None:
|
@@ -607,7 +607,7 @@ class timex(Exchange, ImplicitAPI):
|
|
607
607
|
defaultSort = self.safe_value(options, 'sort', 'timestamp,asc')
|
608
608
|
sort = self.safe_string(params, 'sort', defaultSort)
|
609
609
|
query = self.omit(params, 'sort')
|
610
|
-
request = {
|
610
|
+
request: dict = {
|
611
611
|
# 'address': 'string', # trade’s member account(?)
|
612
612
|
# 'cursor': 1234, # int64(?)
|
613
613
|
# 'from': self.iso8601(since),
|
@@ -648,7 +648,7 @@ class timex(Exchange, ImplicitAPI):
|
|
648
648
|
"""
|
649
649
|
await self.load_markets()
|
650
650
|
market = self.market(symbol)
|
651
|
-
request = {
|
651
|
+
request: dict = {
|
652
652
|
'market': market['id'],
|
653
653
|
'period': self.safe_string(self.timeframes, timeframe, timeframe),
|
654
654
|
}
|
@@ -680,7 +680,7 @@ class timex(Exchange, ImplicitAPI):
|
|
680
680
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
681
681
|
|
682
682
|
def parse_balance(self, response) -> Balances:
|
683
|
-
result = {
|
683
|
+
result: dict = {
|
684
684
|
'info': response,
|
685
685
|
'timestamp': None,
|
686
686
|
'datetime': None,
|
@@ -735,7 +735,7 @@ class timex(Exchange, ImplicitAPI):
|
|
735
735
|
if postOnly:
|
736
736
|
uppercaseType = 'POST_ONLY'
|
737
737
|
params = self.omit(params, ['postOnly'])
|
738
|
-
request = {
|
738
|
+
request: dict = {
|
739
739
|
'symbol': market['id'],
|
740
740
|
'quantity': self.amount_to_precision(symbol, amount),
|
741
741
|
'side': uppercaseSide,
|
@@ -788,7 +788,7 @@ class timex(Exchange, ImplicitAPI):
|
|
788
788
|
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
|
789
789
|
await self.load_markets()
|
790
790
|
market = self.market(symbol)
|
791
|
-
request = {
|
791
|
+
request: dict = {
|
792
792
|
'id': id,
|
793
793
|
}
|
794
794
|
if amount is not None:
|
@@ -855,7 +855,7 @@ class timex(Exchange, ImplicitAPI):
|
|
855
855
|
:returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
856
856
|
"""
|
857
857
|
await self.load_markets()
|
858
|
-
request = {
|
858
|
+
request: dict = {
|
859
859
|
'id': ids,
|
860
860
|
}
|
861
861
|
response = await self.tradingDeleteOrders(self.extend(request, params))
|
@@ -894,7 +894,7 @@ class timex(Exchange, ImplicitAPI):
|
|
894
894
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
895
895
|
"""
|
896
896
|
await self.load_markets()
|
897
|
-
request = {
|
897
|
+
request: dict = {
|
898
898
|
'orderHash': id,
|
899
899
|
}
|
900
900
|
response = await self.historyGetOrdersDetails(request)
|
@@ -950,7 +950,7 @@ class timex(Exchange, ImplicitAPI):
|
|
950
950
|
defaultSort = self.safe_value(options, 'sort', 'createdAt,asc')
|
951
951
|
sort = self.safe_string(params, 'sort', defaultSort)
|
952
952
|
query = self.omit(params, 'sort')
|
953
|
-
request = {
|
953
|
+
request: dict = {
|
954
954
|
# 'clientOrderId': '123', # order’s client id list for filter
|
955
955
|
# page: 0, # results page you want to retrieve(0 .. N)
|
956
956
|
'sort': sort, # sorting criteria in the format "property,asc" or "property,desc", default order is ascending, multiple sort criteria are supported
|
@@ -1001,7 +1001,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1001
1001
|
defaultSort = self.safe_value(options, 'sort', 'createdAt,asc')
|
1002
1002
|
sort = self.safe_string(params, 'sort', defaultSort)
|
1003
1003
|
query = self.omit(params, 'sort')
|
1004
|
-
request = {
|
1004
|
+
request: dict = {
|
1005
1005
|
# 'clientOrderId': '123', # order’s client id list for filter
|
1006
1006
|
# page: 0, # results page you want to retrieve(0 .. N)
|
1007
1007
|
'sort': sort, # sorting criteria in the format "property,asc" or "property,desc", default order is ascending, multiple sort criteria are supported
|
@@ -1056,7 +1056,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1056
1056
|
defaultSort = self.safe_value(options, 'sort', 'timestamp,asc')
|
1057
1057
|
sort = self.safe_string(params, 'sort', defaultSort)
|
1058
1058
|
query = self.omit(params, 'sort')
|
1059
|
-
request = {
|
1059
|
+
request: dict = {
|
1060
1060
|
# 'cursorId': 123, # int64(?)
|
1061
1061
|
# 'from': self.iso8601(since),
|
1062
1062
|
# 'makerOrderId': '1234', # maker order hash
|
@@ -1099,7 +1099,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1099
1099
|
trades = self.safe_list(response, 'trades', [])
|
1100
1100
|
return self.parse_trades(trades, market, since, limit)
|
1101
1101
|
|
1102
|
-
def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
|
1102
|
+
def parse_trading_fee(self, fee: dict, market: Market = None) -> TradingFeeInterface:
|
1103
1103
|
#
|
1104
1104
|
# {
|
1105
1105
|
# "fee": 0.0075,
|
@@ -1127,7 +1127,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1127
1127
|
"""
|
1128
1128
|
await self.load_markets()
|
1129
1129
|
market = self.market(symbol)
|
1130
|
-
request = {
|
1130
|
+
request: dict = {
|
1131
1131
|
'markets': market['id'],
|
1132
1132
|
}
|
1133
1133
|
response = await self.tradingGetFees(self.extend(request, params))
|
@@ -1225,7 +1225,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1225
1225
|
'info': market,
|
1226
1226
|
}
|
1227
1227
|
|
1228
|
-
def parse_currency(self, currency):
|
1228
|
+
def parse_currency(self, currency: dict):
|
1229
1229
|
#
|
1230
1230
|
# {
|
1231
1231
|
# "symbol": "BTC",
|
@@ -1348,7 +1348,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1348
1348
|
'quoteVolume': self.safe_string(ticker, 'volumeQuote'),
|
1349
1349
|
}, market)
|
1350
1350
|
|
1351
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1351
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
1352
1352
|
#
|
1353
1353
|
# fetchTrades(public)
|
1354
1354
|
#
|
@@ -1435,7 +1435,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1435
1435
|
self.safe_number(ohlcv, 'volume'),
|
1436
1436
|
]
|
1437
1437
|
|
1438
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1438
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1439
1439
|
#
|
1440
1440
|
# fetchOrder, createOrder, cancelOrder, cancelOrders, fetchOpenOrders, fetchClosedOrders
|
1441
1441
|
#
|
@@ -1510,7 +1510,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1510
1510
|
"""
|
1511
1511
|
await self.load_markets()
|
1512
1512
|
currency = self.currency(code)
|
1513
|
-
request = {
|
1513
|
+
request: dict = {
|
1514
1514
|
'symbol': currency['code'],
|
1515
1515
|
}
|
1516
1516
|
response = await self.currenciesGetSSymbol(self.extend(request, params))
|
ccxt/async_support/tokocrypto.py
CHANGED
@@ -707,7 +707,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
707
707
|
active = False
|
708
708
|
break
|
709
709
|
isMarginTradingAllowed = self.safe_bool(market, 'isMarginTradingAllowed', False)
|
710
|
-
entry = {
|
710
|
+
entry: dict = {
|
711
711
|
'id': id,
|
712
712
|
'lowercaseId': lowercaseId,
|
713
713
|
'symbol': symbol,
|
@@ -804,7 +804,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
804
804
|
"""
|
805
805
|
await self.load_markets()
|
806
806
|
market = self.market(symbol)
|
807
|
-
request = {}
|
807
|
+
request: dict = {}
|
808
808
|
if limit is not None:
|
809
809
|
request['limit'] = limit # default 100, max 5000, see https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#order-book
|
810
810
|
response = None
|
@@ -849,7 +849,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
849
849
|
orderbook['nonce'] = self.safe_integer(data, 'lastUpdateId')
|
850
850
|
return orderbook
|
851
851
|
|
852
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
852
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
853
853
|
#
|
854
854
|
# aggregate trades
|
855
855
|
# https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#compressedaggregate-trades-list
|
@@ -1002,7 +1002,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1002
1002
|
"""
|
1003
1003
|
await self.load_markets()
|
1004
1004
|
market = self.market(symbol)
|
1005
|
-
request = {
|
1005
|
+
request: dict = {
|
1006
1006
|
'symbol': self.get_market_id_by_type(market),
|
1007
1007
|
# 'fromId': 123, # ID to get aggregate trades from INCLUSIVE.
|
1008
1008
|
# 'startTime': 456, # Timestamp in ms to get aggregate trades from INCLUSIVE.
|
@@ -1198,7 +1198,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1198
1198
|
"""
|
1199
1199
|
await self.load_markets()
|
1200
1200
|
market = self.market(symbol)
|
1201
|
-
request = {
|
1201
|
+
request: dict = {
|
1202
1202
|
'symbol': market['baseId'] + market['quoteId'],
|
1203
1203
|
}
|
1204
1204
|
response = await self.binanceGetTicker24hr(self.extend(request, params))
|
@@ -1286,7 +1286,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1286
1286
|
until = self.safe_integer(params, 'until')
|
1287
1287
|
params = self.omit(params, ['price', 'until'])
|
1288
1288
|
limit = defaultLimit if (limit is None) else min(limit, maxLimit)
|
1289
|
-
request = {
|
1289
|
+
request: dict = {
|
1290
1290
|
'interval': self.safe_string(self.timeframes, timeframe, timeframe),
|
1291
1291
|
'limit': limit,
|
1292
1292
|
}
|
@@ -1329,7 +1329,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1329
1329
|
type = self.safe_string(params, 'type', defaultType)
|
1330
1330
|
defaultMarginMode = self.safe_string_2(self.options, 'marginMode', 'defaultMarginMode')
|
1331
1331
|
marginMode = self.safe_string_lower(params, 'marginMode', defaultMarginMode)
|
1332
|
-
request = {}
|
1332
|
+
request: dict = {}
|
1333
1333
|
response = await self.privateGetOpenV1AccountSpot(self.extend(request, params))
|
1334
1334
|
#
|
1335
1335
|
# spot
|
@@ -1359,7 +1359,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1359
1359
|
|
1360
1360
|
def parse_balance_custom(self, response, type=None, marginMode=None):
|
1361
1361
|
timestamp = self.safe_integer(response, 'updateTime')
|
1362
|
-
result = {
|
1362
|
+
result: dict = {
|
1363
1363
|
'info': response,
|
1364
1364
|
'timestamp': timestamp,
|
1365
1365
|
'datetime': self.iso8601(timestamp),
|
@@ -1376,8 +1376,8 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1376
1376
|
result[code] = account
|
1377
1377
|
return self.safe_balance(result)
|
1378
1378
|
|
1379
|
-
def parse_order_status(self, status):
|
1380
|
-
statuses = {
|
1379
|
+
def parse_order_status(self, status: Str):
|
1380
|
+
statuses: dict = {
|
1381
1381
|
'-2': 'open',
|
1382
1382
|
'0': 'open', # NEW
|
1383
1383
|
'1': 'open', # PARTIALLY_FILLED
|
@@ -1396,7 +1396,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1396
1396
|
}
|
1397
1397
|
return self.safe_string(statuses, status, status)
|
1398
1398
|
|
1399
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1399
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1400
1400
|
#
|
1401
1401
|
# spot
|
1402
1402
|
#
|
@@ -1549,7 +1549,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1549
1549
|
}, market)
|
1550
1550
|
|
1551
1551
|
def parse_order_type(self, status):
|
1552
|
-
statuses = {
|
1552
|
+
statuses: dict = {
|
1553
1553
|
'2': 'market',
|
1554
1554
|
'1': 'limit',
|
1555
1555
|
'4': 'limit',
|
@@ -1595,7 +1595,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1595
1595
|
raise InvalidOrder(self.id + ' stopPrice parameter is not allowed for ' + symbol + ' ' + type + ' orders')
|
1596
1596
|
else:
|
1597
1597
|
raise InvalidOrder(self.id + ' ' + type + ' is not a valid order type for the ' + symbol + ' market')
|
1598
|
-
reverseOrderTypeMapping = {
|
1598
|
+
reverseOrderTypeMapping: dict = {
|
1599
1599
|
'LIMIT': 1,
|
1600
1600
|
'MARKET': 2,
|
1601
1601
|
'STOP_LOSS': 3,
|
@@ -1604,7 +1604,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1604
1604
|
'TAKE_PROFIT_LIMIT': 6,
|
1605
1605
|
'LIMIT_MAKER': 7,
|
1606
1606
|
}
|
1607
|
-
request = {
|
1607
|
+
request: dict = {
|
1608
1608
|
'symbol': market['baseId'] + '_' + market['quoteId'],
|
1609
1609
|
'type': self.safe_string(reverseOrderTypeMapping, uppercaseType),
|
1610
1610
|
}
|
@@ -1723,7 +1723,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1723
1723
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1724
1724
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1725
1725
|
"""
|
1726
|
-
request = {
|
1726
|
+
request: dict = {
|
1727
1727
|
'orderId': id,
|
1728
1728
|
}
|
1729
1729
|
response = await self.privateGetOpenV1Orders(self.extend(request, params))
|
@@ -1776,7 +1776,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1776
1776
|
raise ArgumentsRequired(self.id + ' fetchOrders() requires a symbol argument')
|
1777
1777
|
await self.load_markets()
|
1778
1778
|
market = self.market(symbol)
|
1779
|
-
request = {
|
1779
|
+
request: dict = {
|
1780
1780
|
'symbol': market['id'],
|
1781
1781
|
# 'type': -1, # -1 = all, 1 = open, 2 = closed
|
1782
1782
|
# 'side': 1, # or 2
|
@@ -1838,7 +1838,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1838
1838
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1839
1839
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1840
1840
|
"""
|
1841
|
-
request = {'type': 1} # -1 = all, 1 = open, 2 = closed
|
1841
|
+
request: dict = {'type': 1} # -1 = all, 1 = open, 2 = closed
|
1842
1842
|
return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1843
1843
|
|
1844
1844
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
@@ -1851,7 +1851,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1851
1851
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1852
1852
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1853
1853
|
"""
|
1854
|
-
request = {'type': 2} # -1 = all, 1 = open, 2 = closed
|
1854
|
+
request: dict = {'type': 2} # -1 = all, 1 = open, 2 = closed
|
1855
1855
|
return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1856
1856
|
|
1857
1857
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
@@ -1863,7 +1863,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1863
1863
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1864
1864
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1865
1865
|
"""
|
1866
|
-
request = {
|
1866
|
+
request: dict = {
|
1867
1867
|
'orderId': id,
|
1868
1868
|
}
|
1869
1869
|
response = await self.privatePostOpenV1OrdersCancel(self.extend(request, params))
|
@@ -1911,7 +1911,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1911
1911
|
raise ArgumentsRequired(self.id + ' fetchMyTrades() requires a symbol argument')
|
1912
1912
|
await self.load_markets()
|
1913
1913
|
market = self.market(symbol)
|
1914
|
-
request = {
|
1914
|
+
request: dict = {
|
1915
1915
|
'symbol': market['id'],
|
1916
1916
|
}
|
1917
1917
|
endTime = self.safe_integer_2(params, 'until', 'endTime')
|
@@ -1962,7 +1962,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1962
1962
|
"""
|
1963
1963
|
await self.load_markets()
|
1964
1964
|
currency = self.currency(code)
|
1965
|
-
request = {
|
1965
|
+
request: dict = {
|
1966
1966
|
'asset': currency['id'],
|
1967
1967
|
# 'network': 'ETH', # 'BSC', 'XMR', you can get network and isDefault in networkList in the response of sapiGetCapitalConfigDetail
|
1968
1968
|
}
|
@@ -2017,7 +2017,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2017
2017
|
"""
|
2018
2018
|
await self.load_markets()
|
2019
2019
|
currency = None
|
2020
|
-
request = {}
|
2020
|
+
request: dict = {}
|
2021
2021
|
until = self.safe_integer(params, 'until')
|
2022
2022
|
if code is not None:
|
2023
2023
|
currency = self.currency(code)
|
@@ -2070,7 +2070,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2070
2070
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
2071
2071
|
"""
|
2072
2072
|
await self.load_markets()
|
2073
|
-
request = {}
|
2073
|
+
request: dict = {}
|
2074
2074
|
currency = None
|
2075
2075
|
if code is not None:
|
2076
2076
|
currency = self.currency(code)
|
@@ -2112,7 +2112,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2112
2112
|
return self.parse_transactions(withdrawals, currency, since, limit)
|
2113
2113
|
|
2114
2114
|
def parse_transaction_status_by_type(self, status, type=None):
|
2115
|
-
statusesByType = {
|
2115
|
+
statusesByType: dict = {
|
2116
2116
|
'deposit': {
|
2117
2117
|
'0': 'pending',
|
2118
2118
|
'1': 'ok',
|
@@ -2130,7 +2130,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2130
2130
|
statuses = self.safe_value(statusesByType, type, {})
|
2131
2131
|
return self.safe_string(statuses, status, status)
|
2132
2132
|
|
2133
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2133
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
2134
2134
|
#
|
2135
2135
|
# fetchDeposits
|
2136
2136
|
#
|
@@ -2252,7 +2252,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2252
2252
|
await self.load_markets()
|
2253
2253
|
self.check_address(address)
|
2254
2254
|
currency = self.currency(code)
|
2255
|
-
request = {
|
2255
|
+
request: dict = {
|
2256
2256
|
'asset': currency['id'],
|
2257
2257
|
# 'clientId': 'string', # # client's custom id for withdraw order, server does not check it's uniqueness, automatically generated if not sent
|
2258
2258
|
# 'network': 'string',
|