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/idex.py
CHANGED
@@ -347,7 +347,7 @@ class idex(Exchange, ImplicitAPI):
|
|
347
347
|
"""
|
348
348
|
await self.load_markets()
|
349
349
|
market = self.market(symbol)
|
350
|
-
request = {
|
350
|
+
request: dict = {
|
351
351
|
'market': market['id'],
|
352
352
|
}
|
353
353
|
# [
|
@@ -460,7 +460,7 @@ class idex(Exchange, ImplicitAPI):
|
|
460
460
|
"""
|
461
461
|
await self.load_markets()
|
462
462
|
market = self.market(symbol)
|
463
|
-
request = {
|
463
|
+
request: dict = {
|
464
464
|
'market': market['id'],
|
465
465
|
'interval': timeframe,
|
466
466
|
}
|
@@ -516,7 +516,7 @@ class idex(Exchange, ImplicitAPI):
|
|
516
516
|
"""
|
517
517
|
await self.load_markets()
|
518
518
|
market = self.market(symbol)
|
519
|
-
request = {
|
519
|
+
request: dict = {
|
520
520
|
'market': market['id'],
|
521
521
|
}
|
522
522
|
if since is not None:
|
@@ -537,7 +537,7 @@ class idex(Exchange, ImplicitAPI):
|
|
537
537
|
response = await self.publicGetTrades(self.extend(request, params))
|
538
538
|
return self.parse_trades(response, market, since, limit)
|
539
539
|
|
540
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
540
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
541
541
|
#
|
542
542
|
# public trades
|
543
543
|
# {
|
@@ -623,7 +623,7 @@ class idex(Exchange, ImplicitAPI):
|
|
623
623
|
self.check_required_credentials()
|
624
624
|
await self.load_markets()
|
625
625
|
nonce = self.uuidv1()
|
626
|
-
request = {
|
626
|
+
request: dict = {
|
627
627
|
'nonce': nonce,
|
628
628
|
}
|
629
629
|
response = None
|
@@ -643,7 +643,7 @@ class idex(Exchange, ImplicitAPI):
|
|
643
643
|
#
|
644
644
|
maker = self.safe_number(response, 'makerFeeRate')
|
645
645
|
taker = self.safe_number(response, 'takerFeeRate')
|
646
|
-
result = {}
|
646
|
+
result: dict = {}
|
647
647
|
for i in range(0, len(self.symbols)):
|
648
648
|
symbol = self.symbols[i]
|
649
649
|
result[symbol] = {
|
@@ -667,7 +667,7 @@ class idex(Exchange, ImplicitAPI):
|
|
667
667
|
"""
|
668
668
|
await self.load_markets()
|
669
669
|
market = self.market(symbol)
|
670
|
-
request = {
|
670
|
+
request: dict = {
|
671
671
|
'market': market['id'],
|
672
672
|
'level': 2,
|
673
673
|
}
|
@@ -736,7 +736,7 @@ class idex(Exchange, ImplicitAPI):
|
|
736
736
|
# },
|
737
737
|
# ]
|
738
738
|
#
|
739
|
-
result = {}
|
739
|
+
result: dict = {}
|
740
740
|
for i in range(0, len(response)):
|
741
741
|
entry = response[i]
|
742
742
|
name = self.safe_string(entry, 'name')
|
@@ -762,7 +762,7 @@ class idex(Exchange, ImplicitAPI):
|
|
762
762
|
return result
|
763
763
|
|
764
764
|
def parse_balance(self, response) -> Balances:
|
765
|
-
result = {
|
765
|
+
result: dict = {
|
766
766
|
'info': response,
|
767
767
|
'timestamp': None,
|
768
768
|
'datetime': None,
|
@@ -788,7 +788,7 @@ class idex(Exchange, ImplicitAPI):
|
|
788
788
|
self.check_required_credentials()
|
789
789
|
await self.load_markets()
|
790
790
|
nonce1 = self.uuidv1()
|
791
|
-
request = {
|
791
|
+
request: dict = {
|
792
792
|
'nonce': nonce1,
|
793
793
|
'wallet': self.walletAddress,
|
794
794
|
}
|
@@ -829,7 +829,7 @@ class idex(Exchange, ImplicitAPI):
|
|
829
829
|
self.check_required_credentials()
|
830
830
|
await self.load_markets()
|
831
831
|
market = None
|
832
|
-
request = {
|
832
|
+
request: dict = {
|
833
833
|
'nonce': self.uuidv1(),
|
834
834
|
'wallet': self.walletAddress,
|
835
835
|
}
|
@@ -883,7 +883,7 @@ class idex(Exchange, ImplicitAPI):
|
|
883
883
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
884
884
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
885
885
|
"""
|
886
|
-
request = {
|
886
|
+
request: dict = {
|
887
887
|
'orderId': id,
|
888
888
|
}
|
889
889
|
return await self.fetch_orders_helper(symbol, None, None, self.extend(request, params))
|
@@ -898,7 +898,7 @@ class idex(Exchange, ImplicitAPI):
|
|
898
898
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
899
899
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
900
900
|
"""
|
901
|
-
request = {
|
901
|
+
request: dict = {
|
902
902
|
'closed': False,
|
903
903
|
}
|
904
904
|
return await self.fetch_orders_helper(symbol, since, limit, self.extend(request, params))
|
@@ -913,14 +913,14 @@ class idex(Exchange, ImplicitAPI):
|
|
913
913
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
914
914
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
915
915
|
"""
|
916
|
-
request = {
|
916
|
+
request: dict = {
|
917
917
|
'closed': True,
|
918
918
|
}
|
919
919
|
return await self.fetch_orders_helper(symbol, since, limit, self.extend(request, params))
|
920
920
|
|
921
921
|
async def fetch_orders_helper(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
922
922
|
await self.load_markets()
|
923
|
-
request = {
|
923
|
+
request: dict = {
|
924
924
|
'nonce': self.uuidv1(),
|
925
925
|
'wallet': self.walletAddress,
|
926
926
|
}
|
@@ -999,9 +999,9 @@ class idex(Exchange, ImplicitAPI):
|
|
999
999
|
else:
|
1000
1000
|
return self.parse_order(response, market)
|
1001
1001
|
|
1002
|
-
def parse_order_status(self, status):
|
1002
|
+
def parse_order_status(self, status: Str):
|
1003
1003
|
# https://docs.idex.io/#order-states-amp-lifecycle
|
1004
|
-
statuses = {
|
1004
|
+
statuses: dict = {
|
1005
1005
|
'active': 'open',
|
1006
1006
|
'partiallyFilled': 'open',
|
1007
1007
|
'rejected': 'canceled',
|
@@ -1009,7 +1009,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1009
1009
|
}
|
1010
1010
|
return self.safe_string(statuses, status, status)
|
1011
1011
|
|
1012
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1012
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1013
1013
|
#
|
1014
1014
|
# {
|
1015
1015
|
# "market": "DIL-ETH",
|
@@ -1098,7 +1098,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1098
1098
|
# "totalPortfolioValueUsd": "0.00",
|
1099
1099
|
# "time": 1598468353626
|
1100
1100
|
# }
|
1101
|
-
request = {
|
1101
|
+
request: dict = {
|
1102
1102
|
'parameters': {
|
1103
1103
|
'nonce': nonce,
|
1104
1104
|
'wallet': walletAddress,
|
@@ -1128,7 +1128,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1128
1128
|
market = self.market(symbol)
|
1129
1129
|
nonce = self.uuidv1()
|
1130
1130
|
typeEnum = None
|
1131
|
-
stopLossTypeEnums = {
|
1131
|
+
stopLossTypeEnums: dict = {
|
1132
1132
|
'stopLoss': 3,
|
1133
1133
|
'stopLossLimit': 4,
|
1134
1134
|
'takeProfit': 5,
|
@@ -1139,7 +1139,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1139
1139
|
if not ('stopPrice' in params):
|
1140
1140
|
raise BadRequest(self.id + ' createOrder() stopPrice is a required parameter for ' + type + 'orders')
|
1141
1141
|
stopPriceString = self.price_to_precision(symbol, params['stopPrice'])
|
1142
|
-
limitTypeEnums = {
|
1142
|
+
limitTypeEnums: dict = {
|
1143
1143
|
'limit': 1,
|
1144
1144
|
'limitMaker': 2,
|
1145
1145
|
}
|
@@ -1172,7 +1172,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1172
1172
|
})
|
1173
1173
|
amountString = self.amount_to_precision(symbol, amount)
|
1174
1174
|
# https://docs.idex.io/#time-in-force
|
1175
|
-
timeInForceEnums = {
|
1175
|
+
timeInForceEnums: dict = {
|
1176
1176
|
'gtc': 0,
|
1177
1177
|
'ioc': 2,
|
1178
1178
|
'fok': 3,
|
@@ -1187,7 +1187,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1187
1187
|
asString = ', '.join(allOptions)
|
1188
1188
|
raise BadRequest(self.id + ' ' + timeInForce + ' is not a valid timeInForce, please choose one of ' + asString)
|
1189
1189
|
# https://docs.idex.io/#self-trade-prevention
|
1190
|
-
selfTradePreventionEnums = {
|
1190
|
+
selfTradePreventionEnums: dict = {
|
1191
1191
|
'dc': 0,
|
1192
1192
|
'co': 1,
|
1193
1193
|
'cn': 2,
|
@@ -1230,7 +1230,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1230
1230
|
binary = self.binary_concat_array(allBytes)
|
1231
1231
|
hash = self.hash(binary, 'keccak', 'hex')
|
1232
1232
|
signature = self.sign_message_string(hash, self.privateKey)
|
1233
|
-
request = {
|
1233
|
+
request: dict = {
|
1234
1234
|
'parameters': {
|
1235
1235
|
'nonce': nonce,
|
1236
1236
|
'market': market['id'],
|
@@ -1319,7 +1319,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1319
1319
|
binary = self.binary_concat_array(byteArray)
|
1320
1320
|
hash = self.hash(binary, 'keccak', 'hex')
|
1321
1321
|
signature = self.sign_message_string(hash, self.privateKey)
|
1322
|
-
request = {
|
1322
|
+
request: dict = {
|
1323
1323
|
'parameters': {
|
1324
1324
|
'nonce': nonce,
|
1325
1325
|
'wallet': address,
|
@@ -1357,7 +1357,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1357
1357
|
if symbol is not None:
|
1358
1358
|
market = self.market(symbol)
|
1359
1359
|
nonce = self.uuidv1()
|
1360
|
-
request = {
|
1360
|
+
request: dict = {
|
1361
1361
|
'parameters': {
|
1362
1362
|
'nonce': nonce,
|
1363
1363
|
'wallet': self.walletAddress,
|
@@ -1403,7 +1403,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1403
1403
|
binary = self.binary_concat_array(byteArray)
|
1404
1404
|
hash = self.hash(binary, 'keccak', 'hex')
|
1405
1405
|
signature = self.sign_message_string(hash, self.privateKey)
|
1406
|
-
request = {
|
1406
|
+
request: dict = {
|
1407
1407
|
'parameters': {
|
1408
1408
|
'nonce': nonce,
|
1409
1409
|
'wallet': self.walletAddress,
|
@@ -1435,7 +1435,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1435
1435
|
"""
|
1436
1436
|
await self.load_markets()
|
1437
1437
|
nonce = self.uuidv1()
|
1438
|
-
request = {
|
1438
|
+
request: dict = {
|
1439
1439
|
'nonce': nonce,
|
1440
1440
|
'wallet': self.walletAddress,
|
1441
1441
|
'depositId': id,
|
@@ -1498,7 +1498,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1498
1498
|
"""
|
1499
1499
|
await self.load_markets()
|
1500
1500
|
nonce = self.uuidv1()
|
1501
|
-
request = {
|
1501
|
+
request: dict = {
|
1502
1502
|
'nonce': nonce,
|
1503
1503
|
'wallet': self.walletAddress,
|
1504
1504
|
'withdrawalId': id,
|
@@ -1524,7 +1524,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1524
1524
|
async def fetch_transactions_helper(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1525
1525
|
await self.load_markets()
|
1526
1526
|
nonce = self.uuidv1()
|
1527
|
-
request = {
|
1527
|
+
request: dict = {
|
1528
1528
|
'nonce': nonce,
|
1529
1529
|
'wallet': self.walletAddress,
|
1530
1530
|
}
|
@@ -1558,12 +1558,12 @@ class idex(Exchange, ImplicitAPI):
|
|
1558
1558
|
return self.parse_transactions(response, currency, since, limit)
|
1559
1559
|
|
1560
1560
|
def parse_transaction_status(self, status):
|
1561
|
-
statuses = {
|
1561
|
+
statuses: dict = {
|
1562
1562
|
'mined': 'ok',
|
1563
1563
|
}
|
1564
1564
|
return self.safe_string(statuses, status, status)
|
1565
1565
|
|
1566
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1566
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1567
1567
|
#
|
1568
1568
|
# fetchDeposits
|
1569
1569
|
#
|
@@ -1662,7 +1662,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1662
1662
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1663
1663
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
1664
1664
|
"""
|
1665
|
-
request = {}
|
1665
|
+
request: dict = {}
|
1666
1666
|
request['nonce'] = self.uuidv1()
|
1667
1667
|
response = await self.privateGetWallets(self.extend(request, params))
|
1668
1668
|
#
|
@@ -226,7 +226,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
226
226
|
return result
|
227
227
|
|
228
228
|
def parse_balance(self, response) -> Balances:
|
229
|
-
result = {'info': response}
|
229
|
+
result: dict = {'info': response}
|
230
230
|
for i in range(0, len(response)):
|
231
231
|
balance = response[i]
|
232
232
|
currencyId = self.safe_string(balance, 'CurrencyCode')
|
@@ -257,7 +257,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
257
257
|
"""
|
258
258
|
await self.load_markets()
|
259
259
|
market = self.market(symbol)
|
260
|
-
request = {
|
260
|
+
request: dict = {
|
261
261
|
'primaryCurrencyCode': market['baseId'],
|
262
262
|
'secondaryCurrencyCode': market['quoteId'],
|
263
263
|
}
|
@@ -320,7 +320,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
320
320
|
"""
|
321
321
|
await self.load_markets()
|
322
322
|
market = self.market(symbol)
|
323
|
-
request = {
|
323
|
+
request: dict = {
|
324
324
|
'primaryCurrencyCode': market['baseId'],
|
325
325
|
'secondaryCurrencyCode': market['quoteId'],
|
326
326
|
}
|
@@ -340,7 +340,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
340
340
|
# }
|
341
341
|
return self.parse_ticker(response, market)
|
342
342
|
|
343
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
343
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
344
344
|
#
|
345
345
|
# fetchOrder
|
346
346
|
#
|
@@ -434,8 +434,8 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
434
434
|
'trades': None,
|
435
435
|
}, market)
|
436
436
|
|
437
|
-
def parse_order_status(self, status):
|
438
|
-
statuses = {
|
437
|
+
def parse_order_status(self, status: Str):
|
438
|
+
statuses: dict = {
|
439
439
|
'Open': 'open',
|
440
440
|
'PartiallyFilled': 'open',
|
441
441
|
'Filled': 'closed',
|
@@ -533,7 +533,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
533
533
|
market = self.market(symbol)
|
534
534
|
return self.parse_trades(response['Data'], market, since, limit)
|
535
535
|
|
536
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
536
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
537
537
|
timestamp = self.parse8601(trade['TradeTimestampUtc'])
|
538
538
|
id = self.safe_string(trade, 'TradeGuid')
|
539
539
|
orderId = self.safe_string(trade, 'OrderGuid')
|
@@ -581,7 +581,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
581
581
|
"""
|
582
582
|
await self.load_markets()
|
583
583
|
market = self.market(symbol)
|
584
|
-
request = {
|
584
|
+
request: dict = {
|
585
585
|
'primaryCurrencyCode': market['baseId'],
|
586
586
|
'secondaryCurrencyCode': market['quoteId'],
|
587
587
|
'numberOfRecentTradesToRetrieve': 50, # max = 50
|
@@ -606,7 +606,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
606
606
|
# ...
|
607
607
|
# ]
|
608
608
|
#
|
609
|
-
fees = {}
|
609
|
+
fees: dict = {}
|
610
610
|
for i in range(0, len(response)):
|
611
611
|
fee = response[i]
|
612
612
|
currencyId = self.safe_string(fee, 'CurrencyCode')
|
@@ -616,7 +616,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
616
616
|
'info': fee,
|
617
617
|
'fee': tradingFee,
|
618
618
|
}
|
619
|
-
result = {}
|
619
|
+
result: dict = {}
|
620
620
|
for i in range(0, len(self.symbols)):
|
621
621
|
symbol = self.symbols[i]
|
622
622
|
market = self.market(symbol)
|
@@ -672,7 +672,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
672
672
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
673
673
|
"""
|
674
674
|
await self.load_markets()
|
675
|
-
request = {
|
675
|
+
request: dict = {
|
676
676
|
'orderGuid': id,
|
677
677
|
}
|
678
678
|
return await self.privatePostCancelOrder(self.extend(request, params))
|
@@ -687,7 +687,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
687
687
|
"""
|
688
688
|
await self.load_markets()
|
689
689
|
currency = self.currency(code)
|
690
|
-
request = {
|
690
|
+
request: dict = {
|
691
691
|
'primaryCurrencyCode': currency['id'],
|
692
692
|
}
|
693
693
|
response = await self.privatePostGetDigitalCurrencyDepositAddress(self.extend(request, params))
|
ccxt/async_support/indodax.py
CHANGED
@@ -334,7 +334,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
334
334
|
free = self.safe_value(balances, 'balance', {})
|
335
335
|
used = self.safe_value(balances, 'balance_hold', {})
|
336
336
|
timestamp = self.safe_timestamp(balances, 'server_time')
|
337
|
-
result = {
|
337
|
+
result: dict = {
|
338
338
|
'info': response,
|
339
339
|
'timestamp': timestamp,
|
340
340
|
'datetime': self.iso8601(timestamp),
|
@@ -401,7 +401,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
401
401
|
"""
|
402
402
|
await self.load_markets()
|
403
403
|
market = self.market(symbol)
|
404
|
-
request = {
|
404
|
+
request: dict = {
|
405
405
|
'pair': market['base'] + market['quote'],
|
406
406
|
}
|
407
407
|
orderbook = await self.publicGetApiDepthPair(self.extend(request, params))
|
@@ -458,7 +458,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
458
458
|
"""
|
459
459
|
await self.load_markets()
|
460
460
|
market = self.market(symbol)
|
461
|
-
request = {
|
461
|
+
request: dict = {
|
462
462
|
'pair': market['base'] + market['quote'],
|
463
463
|
}
|
464
464
|
response = await self.publicGetApiTickerPair(self.extend(request, params))
|
@@ -508,7 +508,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
508
508
|
tickers = self.safe_dict(response, 'tickers', {})
|
509
509
|
return self.parse_tickers(tickers, symbols)
|
510
510
|
|
511
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
511
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
512
512
|
timestamp = self.safe_timestamp(trade, 'date')
|
513
513
|
return self.safe_trade({
|
514
514
|
'id': self.safe_string(trade, 'tid'),
|
@@ -538,7 +538,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
538
538
|
"""
|
539
539
|
await self.load_markets()
|
540
540
|
market = self.market(symbol)
|
541
|
-
request = {
|
541
|
+
request: dict = {
|
542
542
|
'pair': market['base'] + market['quote'],
|
543
543
|
}
|
544
544
|
response = await self.publicGetApiTradesPair(self.extend(request, params))
|
@@ -582,7 +582,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
582
582
|
now = self.seconds()
|
583
583
|
until = self.safe_integer(params, 'until', now)
|
584
584
|
params = self.omit(params, ['until'])
|
585
|
-
request = {
|
585
|
+
request: dict = {
|
586
586
|
'to': until,
|
587
587
|
'tf': selectedTimeframe,
|
588
588
|
'symbol': market['base'] + market['quote'],
|
@@ -609,15 +609,15 @@ class indodax(Exchange, ImplicitAPI):
|
|
609
609
|
#
|
610
610
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
611
611
|
|
612
|
-
def parse_order_status(self, status):
|
613
|
-
statuses = {
|
612
|
+
def parse_order_status(self, status: Str):
|
613
|
+
statuses: dict = {
|
614
614
|
'open': 'open',
|
615
615
|
'filled': 'closed',
|
616
616
|
'cancelled': 'canceled',
|
617
617
|
}
|
618
618
|
return self.safe_string(statuses, status, status)
|
619
619
|
|
620
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
620
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
621
621
|
#
|
622
622
|
# {
|
623
623
|
# "order_id": "12345",
|
@@ -702,7 +702,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
702
702
|
raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol argument')
|
703
703
|
await self.load_markets()
|
704
704
|
market = self.market(symbol)
|
705
|
-
request = {
|
705
|
+
request: dict = {
|
706
706
|
'pair': market['id'],
|
707
707
|
'order_id': id,
|
708
708
|
}
|
@@ -724,7 +724,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
724
724
|
"""
|
725
725
|
await self.load_markets()
|
726
726
|
market = None
|
727
|
-
request = {}
|
727
|
+
request: dict = {}
|
728
728
|
if symbol is not None:
|
729
729
|
market = self.market(symbol)
|
730
730
|
request['pair'] = market['id']
|
@@ -761,7 +761,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
761
761
|
raise ArgumentsRequired(self.id + ' fetchClosedOrders() requires a symbol argument')
|
762
762
|
await self.load_markets()
|
763
763
|
market = self.market(symbol)
|
764
|
-
request = {
|
764
|
+
request: dict = {
|
765
765
|
'pair': market['id'],
|
766
766
|
}
|
767
767
|
response = await self.privatePostOrderHistory(self.extend(request, params))
|
@@ -785,7 +785,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
785
785
|
raise ExchangeError(self.id + ' createOrder() allows limit orders only')
|
786
786
|
await self.load_markets()
|
787
787
|
market = self.market(symbol)
|
788
|
-
request = {
|
788
|
+
request: dict = {
|
789
789
|
'pair': market['id'],
|
790
790
|
'type': side,
|
791
791
|
'price': price,
|
@@ -820,7 +820,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
820
820
|
raise ArgumentsRequired(self.id + ' cancelOrder() requires an extra "side" param')
|
821
821
|
await self.load_markets()
|
822
822
|
market = self.market(symbol)
|
823
|
-
request = {
|
823
|
+
request: dict = {
|
824
824
|
'order_id': id,
|
825
825
|
'pair': market['id'],
|
826
826
|
'type': side,
|
@@ -837,7 +837,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
837
837
|
"""
|
838
838
|
await self.load_markets()
|
839
839
|
currency = self.currency(code)
|
840
|
-
request = {
|
840
|
+
request: dict = {
|
841
841
|
'currency': currency['id'],
|
842
842
|
}
|
843
843
|
response = await self.privatePostWithdrawFee(self.extend(request, params))
|
@@ -870,7 +870,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
870
870
|
:returns dict: a list of `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
871
871
|
"""
|
872
872
|
await self.load_markets()
|
873
|
-
request = {}
|
873
|
+
request: dict = {}
|
874
874
|
if since is not None:
|
875
875
|
startTime = self.iso8601(since)[0:10]
|
876
876
|
request['start'] = startTime
|
@@ -976,7 +976,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
976
976
|
requestId = self.milliseconds()
|
977
977
|
# Alternatively:
|
978
978
|
# requestId = self.uuid()
|
979
|
-
request = {
|
979
|
+
request: dict = {
|
980
980
|
'currency': currency['id'],
|
981
981
|
'withdraw_amount': amount,
|
982
982
|
'withdraw_address': address,
|
@@ -1002,7 +1002,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
1002
1002
|
#
|
1003
1003
|
return self.parse_transaction(response, currency)
|
1004
1004
|
|
1005
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1005
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1006
1006
|
#
|
1007
1007
|
# withdraw
|
1008
1008
|
#
|
@@ -1079,12 +1079,12 @@ class indodax(Exchange, ImplicitAPI):
|
|
1079
1079
|
}
|
1080
1080
|
|
1081
1081
|
def parse_transaction_status(self, status):
|
1082
|
-
statuses = {
|
1082
|
+
statuses: dict = {
|
1083
1083
|
'success': 'ok',
|
1084
1084
|
}
|
1085
1085
|
return self.safe_string(statuses, status, status)
|
1086
1086
|
|
1087
|
-
async def fetch_deposit_addresses(self, codes:
|
1087
|
+
async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
1088
1088
|
"""
|
1089
1089
|
fetch deposit addresses for multiple currencies and chain types
|
1090
1090
|
:see: https://github.com/btcid/indodax-official-api-docs/blob/master/Private-RestAPI.md#general-information-on-endpoints
|
@@ -1133,7 +1133,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
1133
1133
|
addresses = self.safe_dict(data, 'address', {})
|
1134
1134
|
networks = self.safe_dict(data, 'network', {})
|
1135
1135
|
addressKeys = list(addresses.keys())
|
1136
|
-
result = {
|
1136
|
+
result: dict = {
|
1137
1137
|
'info': data,
|
1138
1138
|
}
|
1139
1139
|
for i in range(0, len(addressKeys)):
|