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/wazirx.py
CHANGED
@@ -322,7 +322,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
322
322
|
"""
|
323
323
|
await self.load_markets()
|
324
324
|
market = self.market(symbol)
|
325
|
-
request = {
|
325
|
+
request: dict = {
|
326
326
|
'symbol': market['id'],
|
327
327
|
'interval': self.safe_string(self.timeframes, timeframe, timeframe),
|
328
328
|
}
|
@@ -367,7 +367,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
367
367
|
"""
|
368
368
|
await self.load_markets()
|
369
369
|
market = self.market(symbol)
|
370
|
-
request = {
|
370
|
+
request: dict = {
|
371
371
|
'symbol': market['id'],
|
372
372
|
}
|
373
373
|
if limit is not None:
|
@@ -399,7 +399,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
399
399
|
"""
|
400
400
|
await self.load_markets()
|
401
401
|
market = self.market(symbol)
|
402
|
-
request = {
|
402
|
+
request: dict = {
|
403
403
|
'symbol': market['id'],
|
404
404
|
}
|
405
405
|
ticker = await self.publicGetTicker24hr(self.extend(request, params))
|
@@ -447,7 +447,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
447
447
|
# ...
|
448
448
|
# ]
|
449
449
|
#
|
450
|
-
result = {}
|
450
|
+
result: dict = {}
|
451
451
|
for i in range(0, len(tickers)):
|
452
452
|
ticker = tickers[i]
|
453
453
|
parsedTicker = self.parse_ticker(ticker)
|
@@ -467,7 +467,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
467
467
|
"""
|
468
468
|
await self.load_markets()
|
469
469
|
market = self.market(symbol)
|
470
|
-
request = {
|
470
|
+
request: dict = {
|
471
471
|
'symbol': market['id'],
|
472
472
|
}
|
473
473
|
if limit is not None:
|
@@ -490,7 +490,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
490
490
|
# ]
|
491
491
|
return self.parse_trades(response, market, since, limit)
|
492
492
|
|
493
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
493
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
494
494
|
#
|
495
495
|
# {
|
496
496
|
# "id":322307791,
|
@@ -615,7 +615,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
615
615
|
}, market)
|
616
616
|
|
617
617
|
def parse_balance(self, response) -> Balances:
|
618
|
-
result = {'info': response}
|
618
|
+
result: dict = {'info': response}
|
619
619
|
for i in range(0, len(response)):
|
620
620
|
balance = response[i]
|
621
621
|
id = self.safe_string(balance, 'asset')
|
@@ -660,7 +660,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
660
660
|
raise ArgumentsRequired(self.id + ' fetchOrders() requires a symbol argument')
|
661
661
|
await self.load_markets()
|
662
662
|
market = self.market(symbol)
|
663
|
-
request = {
|
663
|
+
request: dict = {
|
664
664
|
'symbol': market['id'],
|
665
665
|
}
|
666
666
|
if since is not None:
|
@@ -712,7 +712,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
712
712
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
713
713
|
"""
|
714
714
|
await self.load_markets()
|
715
|
-
request = {}
|
715
|
+
request: dict = {}
|
716
716
|
market: Market = None
|
717
717
|
if symbol is not None:
|
718
718
|
market = self.market(symbol)
|
@@ -760,7 +760,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
760
760
|
raise ArgumentsRequired(self.id + ' cancelAllOrders() requires a symbol argument')
|
761
761
|
await self.load_markets()
|
762
762
|
market = self.market(symbol)
|
763
|
-
request = {
|
763
|
+
request: dict = {
|
764
764
|
'symbol': market['id'],
|
765
765
|
}
|
766
766
|
return await self.privateDeleteOpenOrders(self.extend(request, params))
|
@@ -778,7 +778,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
778
778
|
raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
|
779
779
|
await self.load_markets()
|
780
780
|
market = self.market(symbol)
|
781
|
-
request = {
|
781
|
+
request: dict = {
|
782
782
|
'symbol': market['id'],
|
783
783
|
'orderId': id,
|
784
784
|
}
|
@@ -804,7 +804,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
804
804
|
raise ExchangeError(self.id + ' createOrder() requires a price argument')
|
805
805
|
await self.load_markets()
|
806
806
|
market = self.market(symbol)
|
807
|
-
request = {
|
807
|
+
request: dict = {
|
808
808
|
'symbol': market['id'],
|
809
809
|
'side': side,
|
810
810
|
'quantity': amount,
|
@@ -830,7 +830,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
830
830
|
# }
|
831
831
|
return self.parse_order(response, market)
|
832
832
|
|
833
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
833
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
834
834
|
# {
|
835
835
|
# "id":1949417813,
|
836
836
|
# "symbol":"ltcusdt",
|
@@ -877,8 +877,8 @@ class wazirx(Exchange, ImplicitAPI):
|
|
877
877
|
'trades': [],
|
878
878
|
}, market)
|
879
879
|
|
880
|
-
def parse_order_status(self, status):
|
881
|
-
statuses = {
|
880
|
+
def parse_order_status(self, status: Str):
|
881
|
+
statuses: dict = {
|
882
882
|
'wait': 'open',
|
883
883
|
'done': 'closed',
|
884
884
|
'cancel': 'canceled',
|
@@ -941,14 +941,14 @@ class wazirx(Exchange, ImplicitAPI):
|
|
941
941
|
# }
|
942
942
|
# ]
|
943
943
|
#
|
944
|
-
result = {}
|
944
|
+
result: dict = {}
|
945
945
|
for i in range(0, len(response)):
|
946
946
|
currency = response[i]
|
947
947
|
currencyId = self.safe_string(currency, 'currency')
|
948
948
|
code = self.safe_currency_code(currencyId)
|
949
949
|
name = self.safe_string(currency, 'name')
|
950
950
|
chains = self.safe_list(currency, 'networkList', [])
|
951
|
-
networks = {}
|
951
|
+
networks: dict = {}
|
952
952
|
minPrecision = None
|
953
953
|
minWithdrawFeeString = None
|
954
954
|
minWithdrawString = None
|
@@ -1041,7 +1041,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
1041
1041
|
params = self.omit(params, 'network')
|
1042
1042
|
if networkCode is None:
|
1043
1043
|
raise ArgumentsRequired(self.id + ' fetchDepositAddress() requires a network parameter')
|
1044
|
-
request = {
|
1044
|
+
request: dict = {
|
1045
1045
|
'coin': currency['id'],
|
1046
1046
|
'network': self.network_code_to_id(networkCode, code),
|
1047
1047
|
}
|
@@ -1073,7 +1073,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
1073
1073
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1074
1074
|
"""
|
1075
1075
|
await self.load_markets()
|
1076
|
-
request = {}
|
1076
|
+
request: dict = {}
|
1077
1077
|
currency = None
|
1078
1078
|
if code is not None:
|
1079
1079
|
currency = self.currency(code)
|
@@ -1108,7 +1108,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
1108
1108
|
return self.parse_transactions(response, currency, since, limit)
|
1109
1109
|
|
1110
1110
|
def parse_transaction_status(self, status):
|
1111
|
-
statuses = {
|
1111
|
+
statuses: dict = {
|
1112
1112
|
'0': 'ok',
|
1113
1113
|
'1': 'fail',
|
1114
1114
|
'2': 'pending',
|
@@ -1116,7 +1116,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
1116
1116
|
}
|
1117
1117
|
return self.safe_string(statuses, status, status)
|
1118
1118
|
|
1119
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1119
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1120
1120
|
#
|
1121
1121
|
# {
|
1122
1122
|
# "address": "0x94df8b352de7f46f64b01d3666bf6e936e44ce60",
|
ccxt/async_support/whitebit.py
CHANGED
@@ -459,7 +459,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
459
459
|
# },
|
460
460
|
#
|
461
461
|
ids = list(response.keys())
|
462
|
-
result = {}
|
462
|
+
result: dict = {}
|
463
463
|
for i in range(0, len(ids)):
|
464
464
|
id = ids[i]
|
465
465
|
currency = response[id]
|
@@ -492,7 +492,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
492
492
|
}
|
493
493
|
return result
|
494
494
|
|
495
|
-
async def fetch_transaction_fees(self, codes:
|
495
|
+
async def fetch_transaction_fees(self, codes: Strings = None, params={}):
|
496
496
|
"""
|
497
497
|
* @deprecated
|
498
498
|
please use fetchDepositWithdrawFees instead
|
@@ -529,8 +529,8 @@ class whitebit(Exchange, ImplicitAPI):
|
|
529
529
|
# }
|
530
530
|
#
|
531
531
|
currenciesIds = list(response.keys())
|
532
|
-
withdrawFees = {}
|
533
|
-
depositFees = {}
|
532
|
+
withdrawFees: dict = {}
|
533
|
+
depositFees: dict = {}
|
534
534
|
for i in range(0, len(currenciesIds)):
|
535
535
|
currency = currenciesIds[i]
|
536
536
|
data = response[currency]
|
@@ -642,7 +642,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
642
642
|
# ...
|
643
643
|
# }
|
644
644
|
#
|
645
|
-
depositWithdrawFees = {}
|
645
|
+
depositWithdrawFees: dict = {}
|
646
646
|
codes = self.market_codes(codes)
|
647
647
|
currencyIds = list(response.keys())
|
648
648
|
for i in range(0, len(currencyIds)):
|
@@ -661,11 +661,11 @@ class whitebit(Exchange, ImplicitAPI):
|
|
661
661
|
deposit = self.safe_value(feeInfo, 'deposit')
|
662
662
|
withdrawFee = self.safe_number(withdraw, 'fixed')
|
663
663
|
depositFee = self.safe_number(deposit, 'fixed')
|
664
|
-
withdrawResult = {
|
664
|
+
withdrawResult: dict = {
|
665
665
|
'fee': withdrawFee,
|
666
666
|
'percentage': False if (withdrawFee is not None) else None,
|
667
667
|
}
|
668
|
-
depositResult = {
|
668
|
+
depositResult: dict = {
|
669
669
|
'fee': depositFee,
|
670
670
|
'percentage': False if (depositFee is not None) else None,
|
671
671
|
}
|
@@ -713,7 +713,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
713
713
|
# ...
|
714
714
|
# }
|
715
715
|
#
|
716
|
-
result = {}
|
716
|
+
result: dict = {}
|
717
717
|
for i in range(0, len(self.symbols)):
|
718
718
|
symbol = self.symbols[i]
|
719
719
|
market = self.market(symbol)
|
@@ -742,7 +742,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
742
742
|
"""
|
743
743
|
await self.load_markets()
|
744
744
|
market = self.market(symbol)
|
745
|
-
request = {
|
745
|
+
request: dict = {
|
746
746
|
'market': market['id'],
|
747
747
|
}
|
748
748
|
response = await self.v1PublicGetTicker(self.extend(request, params))
|
@@ -842,7 +842,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
842
842
|
# },
|
843
843
|
#
|
844
844
|
marketIds = list(response.keys())
|
845
|
-
result = {}
|
845
|
+
result: dict = {}
|
846
846
|
for i in range(0, len(marketIds)):
|
847
847
|
marketId = marketIds[i]
|
848
848
|
market = self.safe_market(marketId)
|
@@ -862,7 +862,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
862
862
|
"""
|
863
863
|
await self.load_markets()
|
864
864
|
market = self.market(symbol)
|
865
|
-
request = {
|
865
|
+
request: dict = {
|
866
866
|
'market': market['id'],
|
867
867
|
}
|
868
868
|
if limit is not None:
|
@@ -902,7 +902,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
902
902
|
"""
|
903
903
|
await self.load_markets()
|
904
904
|
market = self.market(symbol)
|
905
|
-
request = {
|
905
|
+
request: dict = {
|
906
906
|
'market': market['id'],
|
907
907
|
}
|
908
908
|
response = await self.v4PublicGetTradesMarket(self.extend(request, params))
|
@@ -932,7 +932,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
932
932
|
"""
|
933
933
|
await self.load_markets()
|
934
934
|
market: Market = None
|
935
|
-
request = {}
|
935
|
+
request: dict = {}
|
936
936
|
if symbol is not None:
|
937
937
|
market = self.market(symbol)
|
938
938
|
request['market'] = market['id']
|
@@ -988,7 +988,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
988
988
|
results = self.sort_by_2(results, 'timestamp', 'id')
|
989
989
|
return self.filter_by_since_limit(results, since, limit, 'timestamp')
|
990
990
|
|
991
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
991
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
992
992
|
#
|
993
993
|
# fetchTradesV4
|
994
994
|
#
|
@@ -1079,7 +1079,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1079
1079
|
"""
|
1080
1080
|
await self.load_markets()
|
1081
1081
|
market = self.market(symbol)
|
1082
|
-
request = {
|
1082
|
+
request: dict = {
|
1083
1083
|
'market': market['id'],
|
1084
1084
|
'interval': self.safe_string(self.timeframes, timeframe, timeframe),
|
1085
1085
|
}
|
@@ -1207,7 +1207,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1207
1207
|
"""
|
1208
1208
|
await self.load_markets()
|
1209
1209
|
market = self.market(symbol)
|
1210
|
-
request = {
|
1210
|
+
request: dict = {
|
1211
1211
|
'market': market['id'],
|
1212
1212
|
'side': side,
|
1213
1213
|
}
|
@@ -1291,7 +1291,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1291
1291
|
raise ArgumentsRequired(self.id + ' editOrder() requires a symbol argument')
|
1292
1292
|
await self.load_markets()
|
1293
1293
|
market = self.market(symbol)
|
1294
|
-
request = {
|
1294
|
+
request: dict = {
|
1295
1295
|
'orderId': id,
|
1296
1296
|
'market': market['id'],
|
1297
1297
|
}
|
@@ -1337,7 +1337,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1337
1337
|
raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
|
1338
1338
|
await self.load_markets()
|
1339
1339
|
market = self.market(symbol)
|
1340
|
-
request = {
|
1340
|
+
request: dict = {
|
1341
1341
|
'market': market['id'],
|
1342
1342
|
'orderId': int(id),
|
1343
1343
|
}
|
@@ -1355,7 +1355,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1355
1355
|
"""
|
1356
1356
|
await self.load_markets()
|
1357
1357
|
market = None
|
1358
|
-
request = {}
|
1358
|
+
request: dict = {}
|
1359
1359
|
if symbol is not None:
|
1360
1360
|
market = self.market(symbol)
|
1361
1361
|
request['market'] = market['id']
|
@@ -1418,7 +1418,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1418
1418
|
|
1419
1419
|
def parse_balance(self, response) -> Balances:
|
1420
1420
|
balanceKeys = list(response.keys())
|
1421
|
-
result = {}
|
1421
|
+
result: dict = {}
|
1422
1422
|
for i in range(0, len(balanceKeys)):
|
1423
1423
|
id = balanceKeys[i]
|
1424
1424
|
code = self.safe_currency_code(id)
|
@@ -1496,7 +1496,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1496
1496
|
raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
|
1497
1497
|
await self.load_markets()
|
1498
1498
|
market = self.market(symbol)
|
1499
|
-
request = {
|
1499
|
+
request: dict = {
|
1500
1500
|
'market': market['id'],
|
1501
1501
|
}
|
1502
1502
|
if limit is not None:
|
@@ -1535,7 +1535,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1535
1535
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1536
1536
|
"""
|
1537
1537
|
await self.load_markets()
|
1538
|
-
request = {}
|
1538
|
+
request: dict = {}
|
1539
1539
|
market = None
|
1540
1540
|
if symbol is not None:
|
1541
1541
|
market = self.market(symbol)
|
@@ -1574,8 +1574,8 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1574
1574
|
results = self.filter_by_symbol_since_limit(results, symbol, since, limit)
|
1575
1575
|
return results
|
1576
1576
|
|
1577
|
-
def parse_order_type(self, type):
|
1578
|
-
types = {
|
1577
|
+
def parse_order_type(self, type: Str):
|
1578
|
+
types: dict = {
|
1579
1579
|
'limit': 'limit',
|
1580
1580
|
'market': 'market',
|
1581
1581
|
'stop market': 'market',
|
@@ -1586,7 +1586,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1586
1586
|
}
|
1587
1587
|
return self.safe_string(types, type, type)
|
1588
1588
|
|
1589
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1589
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1590
1590
|
#
|
1591
1591
|
# createOrder, fetchOpenOrders
|
1592
1592
|
#
|
@@ -1691,7 +1691,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1691
1691
|
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
1692
1692
|
"""
|
1693
1693
|
await self.load_markets()
|
1694
|
-
request = {
|
1694
|
+
request: dict = {
|
1695
1695
|
'orderId': int(id),
|
1696
1696
|
}
|
1697
1697
|
market = None
|
@@ -1734,7 +1734,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1734
1734
|
"""
|
1735
1735
|
await self.load_markets()
|
1736
1736
|
currency = self.currency(code)
|
1737
|
-
request = {
|
1737
|
+
request: dict = {
|
1738
1738
|
'ticker': currency['id'],
|
1739
1739
|
}
|
1740
1740
|
response = None
|
@@ -1806,7 +1806,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1806
1806
|
raise NotSupported(self.id + ' setLeverage() does not allow to set per symbol')
|
1807
1807
|
if (leverage < 1) or (leverage > 20):
|
1808
1808
|
raise BadRequest(self.id + ' setLeverage() leverage should be between 1 and 20')
|
1809
|
-
request = {
|
1809
|
+
request: dict = {
|
1810
1810
|
'leverage': leverage,
|
1811
1811
|
}
|
1812
1812
|
return await self.v4PrivatePostCollateralAccountLeverage(self.extend(request, params))
|
@@ -1831,7 +1831,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1831
1831
|
fromAccountId = self.safe_string(accountsByType, fromAccount, fromAccount)
|
1832
1832
|
toAccountId = self.safe_string(accountsByType, toAccount, toAccount)
|
1833
1833
|
amountString = self.currency_to_precision(code, amount)
|
1834
|
-
request = {
|
1834
|
+
request: dict = {
|
1835
1835
|
'ticker': currency['id'],
|
1836
1836
|
'amount': amountString,
|
1837
1837
|
'from': fromAccountId,
|
@@ -1872,7 +1872,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1872
1872
|
"""
|
1873
1873
|
await self.load_markets()
|
1874
1874
|
currency = self.currency(code) # check if it has canDeposit
|
1875
|
-
request = {
|
1875
|
+
request: dict = {
|
1876
1876
|
'ticker': currency['id'],
|
1877
1877
|
'amount': self.currency_to_precision(code, amount),
|
1878
1878
|
'address': address,
|
@@ -1897,7 +1897,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1897
1897
|
#
|
1898
1898
|
return self.extend({'id': uniqueId}, self.parse_transaction(response, currency))
|
1899
1899
|
|
1900
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1900
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1901
1901
|
#
|
1902
1902
|
# {
|
1903
1903
|
# "address": "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE", # deposit address
|
@@ -1962,7 +1962,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1962
1962
|
}
|
1963
1963
|
|
1964
1964
|
def parse_transaction_status(self, status):
|
1965
|
-
statuses = {
|
1965
|
+
statuses: dict = {
|
1966
1966
|
'1': 'pending',
|
1967
1967
|
'2': 'pending',
|
1968
1968
|
'3': 'ok',
|
@@ -1993,7 +1993,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1993
1993
|
"""
|
1994
1994
|
await self.load_markets()
|
1995
1995
|
currency = None
|
1996
|
-
request = {
|
1996
|
+
request: dict = {
|
1997
1997
|
'transactionMethod': 1,
|
1998
1998
|
'uniqueId': id,
|
1999
1999
|
'limit': 1,
|
@@ -2056,7 +2056,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2056
2056
|
"""
|
2057
2057
|
await self.load_markets()
|
2058
2058
|
currency = None
|
2059
|
-
request = {
|
2059
|
+
request: dict = {
|
2060
2060
|
'transactionMethod': 1,
|
2061
2061
|
'limit': 100,
|
2062
2062
|
'offset': 0,
|
@@ -2119,7 +2119,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2119
2119
|
:returns dict[]: a list of `borrow interest structures <https://docs.ccxt.com/#/?id=borrow-interest-structure>`
|
2120
2120
|
"""
|
2121
2121
|
await self.load_markets()
|
2122
|
-
request = {}
|
2122
|
+
request: dict = {}
|
2123
2123
|
market = None
|
2124
2124
|
if symbol is not None:
|
2125
2125
|
market = self.market(symbol)
|
@@ -2149,7 +2149,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2149
2149
|
interest = self.parse_borrow_interests(response, market)
|
2150
2150
|
return self.filter_by_currency_since_limit(interest, code, since, limit)
|
2151
2151
|
|
2152
|
-
def parse_borrow_interest(self, info, market: Market = None):
|
2152
|
+
def parse_borrow_interest(self, info: dict, market: Market = None):
|
2153
2153
|
#
|
2154
2154
|
# {
|
2155
2155
|
# "positionId": 191823,
|
@@ -2334,7 +2334,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2334
2334
|
:returns dict: a list of `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
2335
2335
|
"""
|
2336
2336
|
await self.load_markets()
|
2337
|
-
request = {}
|
2337
|
+
request: dict = {}
|
2338
2338
|
currency = None
|
2339
2339
|
if code is not None:
|
2340
2340
|
currency = self.currency(code)
|