ccxt 4.3.30__py2.py3-none-any.whl → 4.3.32__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 +208 -175
- 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 +48 -36
- 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 +208 -175
- 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 +20 -20
- ccxt/pro/coinbase.py +32 -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/test/test_async.py +1 -1
- ccxt/test/test_sync.py +1 -1
- 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.32.dist-info}/METADATA +4 -4
- {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/RECORD +260 -260
- {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/WHEEL +0 -0
- {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/top_level.txt +0 -0
ccxt/ndax.py
CHANGED
@@ -296,7 +296,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
296
296
|
self.check_required_credentials()
|
297
297
|
if self.login is None or self.password is None:
|
298
298
|
raise AuthenticationError(self.id + ' signIn() requires exchange.login, exchange.password')
|
299
|
-
request = {
|
299
|
+
request: dict = {
|
300
300
|
'grant_type': 'client_credentials', # the only supported value
|
301
301
|
}
|
302
302
|
response = self.publicGetAuthenticate(self.extend(request, params))
|
@@ -342,7 +342,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
342
342
|
:returns dict: an associative dictionary of currencies
|
343
343
|
"""
|
344
344
|
omsId = self.safe_integer(self.options, 'omsId', 1)
|
345
|
-
request = {
|
345
|
+
request: dict = {
|
346
346
|
'omsId': omsId,
|
347
347
|
}
|
348
348
|
response = self.publicGetGetProducts(self.extend(request, params))
|
@@ -362,7 +362,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
362
362
|
# },
|
363
363
|
# ]
|
364
364
|
#
|
365
|
-
result = {}
|
365
|
+
result: dict = {}
|
366
366
|
for i in range(0, len(response)):
|
367
367
|
currency = response[i]
|
368
368
|
id = self.safe_string(currency, 'ProductId')
|
@@ -408,7 +408,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
408
408
|
:returns dict[]: an array of objects representing market data
|
409
409
|
"""
|
410
410
|
omsId = self.safe_integer(self.options, 'omsId', 1)
|
411
|
-
request = {
|
411
|
+
request: dict = {
|
412
412
|
'omsId': omsId,
|
413
413
|
}
|
414
414
|
response = self.publicGetGetInstruments(self.extend(request, params))
|
@@ -522,7 +522,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
522
522
|
|
523
523
|
def parse_order_book(self, orderbook, symbol, timestamp=None, bidsKey='bids', asksKey='asks', priceKey: IndexType = 6, amountKey: IndexType = 8, countOrIdKey: IndexType = 2):
|
524
524
|
nonce = None
|
525
|
-
result = {
|
525
|
+
result: dict = {
|
526
526
|
'symbol': symbol,
|
527
527
|
'bids': [],
|
528
528
|
'asks': [],
|
@@ -566,7 +566,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
566
566
|
self.load_markets()
|
567
567
|
market = self.market(symbol)
|
568
568
|
limit = 100 if (limit is None) else limit # default 100
|
569
|
-
request = {
|
569
|
+
request: dict = {
|
570
570
|
'omsId': omsId,
|
571
571
|
'InstrumentId': market['id'],
|
572
572
|
'Depth': limit, # default 100
|
@@ -673,7 +673,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
673
673
|
omsId = self.safe_integer(self.options, 'omsId', 1)
|
674
674
|
self.load_markets()
|
675
675
|
market = self.market(symbol)
|
676
|
-
request = {
|
676
|
+
request: dict = {
|
677
677
|
'omsId': omsId,
|
678
678
|
'InstrumentId': market['id'],
|
679
679
|
}
|
@@ -747,7 +747,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
747
747
|
omsId = self.safe_integer(self.options, 'omsId', 1)
|
748
748
|
self.load_markets()
|
749
749
|
market = self.market(symbol)
|
750
|
-
request = {
|
750
|
+
request: dict = {
|
751
751
|
'omsId': omsId,
|
752
752
|
'InstrumentId': market['id'],
|
753
753
|
'Interval': self.safe_string(self.timeframes, timeframe, timeframe),
|
@@ -774,7 +774,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
774
774
|
#
|
775
775
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
776
776
|
|
777
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
777
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
778
778
|
#
|
779
779
|
# fetchTrades(public)
|
780
780
|
#
|
@@ -951,7 +951,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
951
951
|
omsId = self.safe_integer(self.options, 'omsId', 1)
|
952
952
|
self.load_markets()
|
953
953
|
market = self.market(symbol)
|
954
|
-
request = {
|
954
|
+
request: dict = {
|
955
955
|
'omsId': omsId,
|
956
956
|
'InstrumentId': market['id'],
|
957
957
|
}
|
@@ -978,7 +978,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
978
978
|
raise AuthenticationError(self.id + ' fetchAccounts() requires exchange.login email credential')
|
979
979
|
omsId = self.safe_integer(self.options, 'omsId', 1)
|
980
980
|
self.check_required_credentials()
|
981
|
-
request = {
|
981
|
+
request: dict = {
|
982
982
|
'omsId': omsId,
|
983
983
|
'UserId': self.uid,
|
984
984
|
'UserName': self.login,
|
@@ -999,7 +999,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
999
999
|
return result
|
1000
1000
|
|
1001
1001
|
def parse_balance(self, response) -> Balances:
|
1002
|
-
result = {
|
1002
|
+
result: dict = {
|
1003
1003
|
'info': response,
|
1004
1004
|
'timestamp': None,
|
1005
1005
|
'datetime': None,
|
@@ -1028,7 +1028,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1028
1028
|
defaultAccountId = self.safe_integer_2(self.options, 'accountId', 'AccountId', int(self.accounts[0]['id']))
|
1029
1029
|
accountId = self.safe_integer_2(params, 'accountId', 'AccountId', defaultAccountId)
|
1030
1030
|
params = self.omit(params, ['accountId', 'AccountId'])
|
1031
|
-
request = {
|
1031
|
+
request: dict = {
|
1032
1032
|
'omsId': omsId,
|
1033
1033
|
'AccountId': accountId,
|
1034
1034
|
}
|
@@ -1067,7 +1067,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1067
1067
|
return self.parse_balance(response)
|
1068
1068
|
|
1069
1069
|
def parse_ledger_entry_type(self, type):
|
1070
|
-
types = {
|
1070
|
+
types: dict = {
|
1071
1071
|
'Trade': 'trade',
|
1072
1072
|
'Deposit': 'transaction',
|
1073
1073
|
'Withdraw': 'transaction',
|
@@ -1084,7 +1084,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1084
1084
|
}
|
1085
1085
|
return self.safe_string(types, type, type)
|
1086
1086
|
|
1087
|
-
def parse_ledger_entry(self, item, currency: Currency = None):
|
1087
|
+
def parse_ledger_entry(self, item: dict, currency: Currency = None):
|
1088
1088
|
#
|
1089
1089
|
# {
|
1090
1090
|
# "TransactionId": 2663709493,
|
@@ -1153,7 +1153,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1153
1153
|
defaultAccountId = self.safe_integer_2(self.options, 'accountId', 'AccountId', int(self.accounts[0]['id']))
|
1154
1154
|
accountId = self.safe_integer_2(params, 'accountId', 'AccountId', defaultAccountId)
|
1155
1155
|
params = self.omit(params, ['accountId', 'AccountId'])
|
1156
|
-
request = {
|
1156
|
+
request: dict = {
|
1157
1157
|
'omsId': omsId,
|
1158
1158
|
'AccountId': accountId,
|
1159
1159
|
}
|
@@ -1183,8 +1183,8 @@ class ndax(Exchange, ImplicitAPI):
|
|
1183
1183
|
currency = self.currency(code)
|
1184
1184
|
return self.parse_ledger(response, currency, since, limit)
|
1185
1185
|
|
1186
|
-
def parse_order_status(self, status):
|
1187
|
-
statuses = {
|
1186
|
+
def parse_order_status(self, status: Str):
|
1187
|
+
statuses: dict = {
|
1188
1188
|
'Accepted': 'open',
|
1189
1189
|
'Rejected': 'rejected',
|
1190
1190
|
'Working': 'open',
|
@@ -1194,7 +1194,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1194
1194
|
}
|
1195
1195
|
return self.safe_string(statuses, status, status)
|
1196
1196
|
|
1197
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1197
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1198
1198
|
#
|
1199
1199
|
# createOrder
|
1200
1200
|
#
|
@@ -1317,7 +1317,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1317
1317
|
params = self.omit(params, ['accountId', 'AccountId', 'clientOrderId', 'ClientOrderId', 'triggerPrice'])
|
1318
1318
|
market = self.market(symbol)
|
1319
1319
|
orderSide = 0 if (side == 'buy') else 1
|
1320
|
-
request = {
|
1320
|
+
request: dict = {
|
1321
1321
|
'InstrumentId': int(market['id']),
|
1322
1322
|
'omsId': omsId,
|
1323
1323
|
'AccountId': accountId,
|
@@ -1362,7 +1362,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1362
1362
|
params = self.omit(params, ['accountId', 'AccountId', 'clientOrderId', 'ClientOrderId'])
|
1363
1363
|
market = self.market(symbol)
|
1364
1364
|
orderSide = 0 if (side == 'buy') else 1
|
1365
|
-
request = {
|
1365
|
+
request: dict = {
|
1366
1366
|
'OrderIdToReplace': int(id),
|
1367
1367
|
'InstrumentId': int(market['id']),
|
1368
1368
|
'omsId': omsId,
|
@@ -1413,7 +1413,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1413
1413
|
defaultAccountId = self.safe_integer_2(self.options, 'accountId', 'AccountId', int(self.accounts[0]['id']))
|
1414
1414
|
accountId = self.safe_integer_2(params, 'accountId', 'AccountId', defaultAccountId)
|
1415
1415
|
params = self.omit(params, ['accountId', 'AccountId'])
|
1416
|
-
request = {
|
1416
|
+
request: dict = {
|
1417
1417
|
'omsId': omsId,
|
1418
1418
|
'AccountId': accountId,
|
1419
1419
|
# 'InstrumentId': market['id'],
|
@@ -1494,7 +1494,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1494
1494
|
defaultAccountId = self.safe_integer_2(self.options, 'accountId', 'AccountId', int(self.accounts[0]['id']))
|
1495
1495
|
accountId = self.safe_integer_2(params, 'accountId', 'AccountId', defaultAccountId)
|
1496
1496
|
params = self.omit(params, ['accountId', 'AccountId'])
|
1497
|
-
request = {
|
1497
|
+
request: dict = {
|
1498
1498
|
'omsId': omsId,
|
1499
1499
|
'AccountId': accountId,
|
1500
1500
|
}
|
@@ -1530,7 +1530,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1530
1530
|
market = None
|
1531
1531
|
if symbol is not None:
|
1532
1532
|
market = self.market(symbol)
|
1533
|
-
request = {
|
1533
|
+
request: dict = {
|
1534
1534
|
'omsId': omsId,
|
1535
1535
|
# 'AccountId': accountId,
|
1536
1536
|
}
|
@@ -1566,7 +1566,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1566
1566
|
market = None
|
1567
1567
|
if symbol is not None:
|
1568
1568
|
market = self.market(symbol)
|
1569
|
-
request = {
|
1569
|
+
request: dict = {
|
1570
1570
|
'omsId': omsId,
|
1571
1571
|
'AccountId': accountId,
|
1572
1572
|
}
|
@@ -1639,7 +1639,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1639
1639
|
defaultAccountId = self.safe_integer_2(self.options, 'accountId', 'AccountId', int(self.accounts[0]['id']))
|
1640
1640
|
accountId = self.safe_integer_2(params, 'accountId', 'AccountId', defaultAccountId)
|
1641
1641
|
params = self.omit(params, ['accountId', 'AccountId'])
|
1642
|
-
request = {
|
1642
|
+
request: dict = {
|
1643
1643
|
'omsId': omsId,
|
1644
1644
|
'AccountId': accountId,
|
1645
1645
|
# 'ClientOrderId': clientOrderId,
|
@@ -1730,7 +1730,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1730
1730
|
market = None
|
1731
1731
|
if symbol is not None:
|
1732
1732
|
market = self.market(symbol)
|
1733
|
-
request = {
|
1733
|
+
request: dict = {
|
1734
1734
|
'omsId': omsId,
|
1735
1735
|
'AccountId': accountId,
|
1736
1736
|
'OrderId': int(id),
|
@@ -1806,7 +1806,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1806
1806
|
market = None
|
1807
1807
|
if symbol is not None:
|
1808
1808
|
market = self.market(symbol)
|
1809
|
-
request = {
|
1809
|
+
request: dict = {
|
1810
1810
|
'OMSId': self.parse_to_int(omsId),
|
1811
1811
|
# 'AccountId': accountId,
|
1812
1812
|
'OrderId': int(id),
|
@@ -1880,7 +1880,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1880
1880
|
accountId = self.safe_integer_2(params, 'accountId', 'AccountId', defaultAccountId)
|
1881
1881
|
params = self.omit(params, ['accountId', 'AccountId'])
|
1882
1882
|
currency = self.currency(code)
|
1883
|
-
request = {
|
1883
|
+
request: dict = {
|
1884
1884
|
'omsId': omsId,
|
1885
1885
|
'AccountId': accountId,
|
1886
1886
|
'ProductId': currency['id'],
|
@@ -1942,7 +1942,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1942
1942
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1943
1943
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
1944
1944
|
"""
|
1945
|
-
request = {
|
1945
|
+
request: dict = {
|
1946
1946
|
'GenerateNewKey': True,
|
1947
1947
|
}
|
1948
1948
|
return self.fetch_deposit_address(code, self.extend(request, params))
|
@@ -1966,7 +1966,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1966
1966
|
currency = None
|
1967
1967
|
if code is not None:
|
1968
1968
|
currency = self.currency(code)
|
1969
|
-
request = {
|
1969
|
+
request: dict = {
|
1970
1970
|
'omsId': omsId,
|
1971
1971
|
'AccountId': accountId,
|
1972
1972
|
}
|
@@ -2022,7 +2022,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
2022
2022
|
currency = None
|
2023
2023
|
if code is not None:
|
2024
2024
|
currency = self.currency(code)
|
2025
|
-
request = {
|
2025
|
+
request: dict = {
|
2026
2026
|
'omsId': omsId,
|
2027
2027
|
'AccountId': accountId,
|
2028
2028
|
}
|
@@ -2054,7 +2054,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
2054
2054
|
return self.parse_transactions(response, currency, since, limit)
|
2055
2055
|
|
2056
2056
|
def parse_transaction_status_by_type(self, status, type=None):
|
2057
|
-
statusesByType = {
|
2057
|
+
statusesByType: dict = {
|
2058
2058
|
'deposit': {
|
2059
2059
|
'New': 'pending', # new ticket awaiting operator review
|
2060
2060
|
'AdminProcessing': 'pending', # an admin is looking at the ticket
|
@@ -2101,7 +2101,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
2101
2101
|
statuses = self.safe_value(statusesByType, type, {})
|
2102
2102
|
return self.safe_string(statuses, status, status)
|
2103
2103
|
|
2104
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2104
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
2105
2105
|
#
|
2106
2106
|
# fetchDeposits
|
2107
2107
|
#
|
@@ -2221,7 +2221,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
2221
2221
|
accountId = self.safe_integer_2(params, 'accountId', 'AccountId', defaultAccountId)
|
2222
2222
|
params = self.omit(params, ['accountId', 'AccountId'])
|
2223
2223
|
currency = self.currency(code)
|
2224
|
-
withdrawTemplateTypesRequest = {
|
2224
|
+
withdrawTemplateTypesRequest: dict = {
|
2225
2225
|
'omsId': omsId,
|
2226
2226
|
'AccountId': accountId,
|
2227
2227
|
'ProductId': currency['id'],
|
@@ -2244,7 +2244,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
2244
2244
|
if firstTemplateType is None:
|
2245
2245
|
raise ExchangeError(self.id + ' withdraw() could not find a withdraw template type for ' + currency['code'])
|
2246
2246
|
templateName = self.safe_string(firstTemplateType, 'TemplateName')
|
2247
|
-
withdrawTemplateRequest = {
|
2247
|
+
withdrawTemplateRequest: dict = {
|
2248
2248
|
'omsId': omsId,
|
2249
2249
|
'AccountId': accountId,
|
2250
2250
|
'ProductId': currency['id'],
|
@@ -2268,14 +2268,14 @@ class ndax(Exchange, ImplicitAPI):
|
|
2268
2268
|
if tag is not None:
|
2269
2269
|
if 'Memo' in withdrawTemplate:
|
2270
2270
|
withdrawTemplate['Memo'] = tag
|
2271
|
-
withdrawPayload = {
|
2271
|
+
withdrawPayload: dict = {
|
2272
2272
|
'omsId': omsId,
|
2273
2273
|
'AccountId': accountId,
|
2274
2274
|
'ProductId': currency['id'],
|
2275
2275
|
'TemplateForm': self.json(withdrawTemplate),
|
2276
2276
|
'TemplateType': templateName,
|
2277
2277
|
}
|
2278
|
-
withdrawRequest = {
|
2278
|
+
withdrawRequest: dict = {
|
2279
2279
|
'TfaType': 'Google',
|
2280
2280
|
'TFaCode': self.totp(self.twofa),
|
2281
2281
|
'Payload': self.json(withdrawPayload),
|
ccxt/novadax.py
CHANGED
@@ -387,7 +387,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
387
387
|
"""
|
388
388
|
self.load_markets()
|
389
389
|
market = self.market(symbol)
|
390
|
-
request = {
|
390
|
+
request: dict = {
|
391
391
|
'symbol': market['id'],
|
392
392
|
}
|
393
393
|
response = self.publicGetMarketTicker(self.extend(request, params))
|
@@ -444,7 +444,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
444
444
|
# }
|
445
445
|
#
|
446
446
|
data = self.safe_value(response, 'data', [])
|
447
|
-
result = {}
|
447
|
+
result: dict = {}
|
448
448
|
for i in range(0, len(data)):
|
449
449
|
ticker = self.parse_ticker(data[i])
|
450
450
|
symbol = ticker['symbol']
|
@@ -462,7 +462,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
462
462
|
"""
|
463
463
|
self.load_markets()
|
464
464
|
market = self.market(symbol)
|
465
|
-
request = {
|
465
|
+
request: dict = {
|
466
466
|
'symbol': market['id'],
|
467
467
|
}
|
468
468
|
if limit is not None:
|
@@ -491,7 +491,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
491
491
|
timestamp = self.safe_integer(data, 'timestamp')
|
492
492
|
return self.parse_order_book(data, market['symbol'], timestamp, 'bids', 'asks')
|
493
493
|
|
494
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
494
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
495
495
|
#
|
496
496
|
# public fetchTrades
|
497
497
|
#
|
@@ -580,7 +580,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
580
580
|
"""
|
581
581
|
self.load_markets()
|
582
582
|
market = self.market(symbol)
|
583
|
-
request = {
|
583
|
+
request: dict = {
|
584
584
|
'symbol': market['id'],
|
585
585
|
}
|
586
586
|
if limit is not None:
|
@@ -613,7 +613,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
613
613
|
"""
|
614
614
|
self.load_markets()
|
615
615
|
market = self.market(symbol)
|
616
|
-
request = {
|
616
|
+
request: dict = {
|
617
617
|
'symbol': market['id'],
|
618
618
|
'unit': self.safe_string(self.timeframes, timeframe, timeframe),
|
619
619
|
}
|
@@ -678,7 +678,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
678
678
|
|
679
679
|
def parse_balance(self, response) -> Balances:
|
680
680
|
data = self.safe_value(response, 'data', [])
|
681
|
-
result = {
|
681
|
+
result: dict = {
|
682
682
|
'info': response,
|
683
683
|
'timestamp': None,
|
684
684
|
'datetime': None,
|
@@ -736,7 +736,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
736
736
|
market = self.market(symbol)
|
737
737
|
uppercaseType = type.upper()
|
738
738
|
uppercaseSide = side.upper()
|
739
|
-
request = {
|
739
|
+
request: dict = {
|
740
740
|
'symbol': market['id'],
|
741
741
|
'side': uppercaseSide, # or SELL
|
742
742
|
# "amount": self.amount_to_precision(symbol, amount),
|
@@ -821,7 +821,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
821
821
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
822
822
|
"""
|
823
823
|
self.load_markets()
|
824
|
-
request = {
|
824
|
+
request: dict = {
|
825
825
|
'id': id,
|
826
826
|
}
|
827
827
|
response = self.privatePostOrdersCancel(self.extend(request, params))
|
@@ -846,7 +846,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
846
846
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
847
847
|
"""
|
848
848
|
self.load_markets()
|
849
|
-
request = {
|
849
|
+
request: dict = {
|
850
850
|
'id': id,
|
851
851
|
}
|
852
852
|
response = self.privateGetOrdersGet(self.extend(request, params))
|
@@ -885,7 +885,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
885
885
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
886
886
|
"""
|
887
887
|
self.load_markets()
|
888
|
-
request = {
|
888
|
+
request: dict = {
|
889
889
|
# 'symbol': market['id'],
|
890
890
|
# 'status': 'SUBMITTED,PROCESSING', # SUBMITTED, PROCESSING, PARTIAL_FILLED, CANCELING, FILLED, CANCELED, REJECTED
|
891
891
|
# 'fromId': '...', # order id to begin with
|
@@ -939,7 +939,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
939
939
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
940
940
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
941
941
|
"""
|
942
|
-
request = {
|
942
|
+
request: dict = {
|
943
943
|
'status': 'SUBMITTED,PROCESSING,PARTIAL_FILLED,CANCELING',
|
944
944
|
}
|
945
945
|
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
@@ -954,7 +954,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
954
954
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
955
955
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
956
956
|
"""
|
957
|
-
request = {
|
957
|
+
request: dict = {
|
958
958
|
'status': 'FILLED,CANCELED,REJECTED',
|
959
959
|
}
|
960
960
|
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
@@ -971,7 +971,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
971
971
|
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
972
972
|
"""
|
973
973
|
self.load_markets()
|
974
|
-
request = {
|
974
|
+
request: dict = {
|
975
975
|
'id': id,
|
976
976
|
}
|
977
977
|
response = self.privateGetOrdersFill(self.extend(request, params))
|
@@ -1002,8 +1002,8 @@ class novadax(Exchange, ImplicitAPI):
|
|
1002
1002
|
#
|
1003
1003
|
return self.parse_trades(data, market, since, limit)
|
1004
1004
|
|
1005
|
-
def parse_order_status(self, status):
|
1006
|
-
statuses = {
|
1005
|
+
def parse_order_status(self, status: Str):
|
1006
|
+
statuses: dict = {
|
1007
1007
|
'SUBMITTED': 'open',
|
1008
1008
|
'PROCESSING': 'open',
|
1009
1009
|
'PARTIAL_FILLED': 'open',
|
@@ -1014,7 +1014,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1014
1014
|
}
|
1015
1015
|
return self.safe_string(statuses, status, status)
|
1016
1016
|
|
1017
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1017
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1018
1018
|
#
|
1019
1019
|
# createOrder, fetchOrders, fetchOrder
|
1020
1020
|
#
|
@@ -1105,7 +1105,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1105
1105
|
# master-transfer-in = from master account to subaccount
|
1106
1106
|
# master-transfer-out = from subaccount to master account
|
1107
1107
|
type = 'master-transfer-in' if (fromAccount == 'main') else 'master-transfer-out'
|
1108
|
-
request = {
|
1108
|
+
request: dict = {
|
1109
1109
|
'transferAmount': self.currency_to_precision(code, amount),
|
1110
1110
|
'currency': currency['id'],
|
1111
1111
|
'subId': toAccount if (type == 'master-transfer-in') else fromAccount,
|
@@ -1152,7 +1152,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1152
1152
|
}
|
1153
1153
|
|
1154
1154
|
def parse_transfer_status(self, status: Str) -> Str:
|
1155
|
-
statuses = {
|
1155
|
+
statuses: dict = {
|
1156
1156
|
'SUCCESS': 'pending',
|
1157
1157
|
}
|
1158
1158
|
return self.safe_string(statuses, status, 'failed')
|
@@ -1171,7 +1171,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1171
1171
|
tag, params = self.handle_withdraw_tag_and_params(tag, params)
|
1172
1172
|
self.load_markets()
|
1173
1173
|
currency = self.currency(code)
|
1174
|
-
request = {
|
1174
|
+
request: dict = {
|
1175
1175
|
'code': currency['id'],
|
1176
1176
|
'amount': self.currency_to_precision(code, amount),
|
1177
1177
|
'wallet': address,
|
@@ -1234,7 +1234,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1234
1234
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1235
1235
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1236
1236
|
"""
|
1237
|
-
request = {
|
1237
|
+
request: dict = {
|
1238
1238
|
'type': 'coin_in',
|
1239
1239
|
}
|
1240
1240
|
return self.fetch_deposits_withdrawals(code, since, limit, self.extend(request, params))
|
@@ -1249,7 +1249,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1249
1249
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1250
1250
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1251
1251
|
"""
|
1252
|
-
request = {
|
1252
|
+
request: dict = {
|
1253
1253
|
'type': 'coin_out',
|
1254
1254
|
}
|
1255
1255
|
return self.fetch_deposits_withdrawals(code, since, limit, self.extend(request, params))
|
@@ -1265,7 +1265,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1265
1265
|
:returns dict: a list of `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1266
1266
|
"""
|
1267
1267
|
self.load_markets()
|
1268
|
-
request = {
|
1268
|
+
request: dict = {
|
1269
1269
|
# 'currency': currency['id'],
|
1270
1270
|
# 'type': 'coin_in', # 'coin_out'
|
1271
1271
|
# 'direct': 'asc', # 'desc'
|
@@ -1310,7 +1310,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1310
1310
|
# FAIL the record failed
|
1311
1311
|
parts = status.split(' ')
|
1312
1312
|
status = self.safe_string(parts, 1, status)
|
1313
|
-
statuses = {
|
1313
|
+
statuses: dict = {
|
1314
1314
|
'Pending': 'pending',
|
1315
1315
|
'confirming': 'pending',
|
1316
1316
|
'SUCCESS': 'ok',
|
@@ -1318,7 +1318,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1318
1318
|
}
|
1319
1319
|
return self.safe_string(statuses, status, status)
|
1320
1320
|
|
1321
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1321
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1322
1322
|
#
|
1323
1323
|
# withdraw
|
1324
1324
|
#
|
@@ -1398,7 +1398,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1398
1398
|
:returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
1399
1399
|
"""
|
1400
1400
|
self.load_markets()
|
1401
|
-
request = {
|
1401
|
+
request: dict = {
|
1402
1402
|
# 'orderId': id, # Order ID, string
|
1403
1403
|
# 'symbol': market['id'], # The trading symbol, like BTC_BRL, string
|
1404
1404
|
# 'fromId': fromId, # Search fill id to begin with, string
|