ccxt 4.3.33__py2.py3-none-any.whl → 4.3.34__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 +1 -0
- ccxt/abstract/binancecoinm.py +1 -0
- ccxt/abstract/binanceus.py +1 -0
- ccxt/abstract/binanceusdm.py +1 -0
- ccxt/ace.py +2 -2
- ccxt/alpaca.py +1 -1
- ccxt/ascendex.py +2 -2
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +2 -2
- ccxt/async_support/alpaca.py +1 -1
- ccxt/async_support/ascendex.py +2 -2
- ccxt/async_support/base/exchange.py +17 -1
- ccxt/async_support/bigone.py +2 -2
- ccxt/async_support/binance.py +4 -3
- ccxt/async_support/bingx.py +2 -2
- ccxt/async_support/bit2c.py +1 -1
- ccxt/async_support/bitbank.py +1 -1
- ccxt/async_support/bitbns.py +1 -1
- ccxt/async_support/bitfinex.py +2 -2
- ccxt/async_support/bitfinex2.py +1 -1
- ccxt/async_support/bitflyer.py +1 -1
- ccxt/async_support/bitget.py +3 -3
- ccxt/async_support/bithumb.py +1 -1
- ccxt/async_support/bitmart.py +2 -2
- ccxt/async_support/bitmex.py +3 -3
- ccxt/async_support/bitopro.py +3 -3
- ccxt/async_support/bitrue.py +2 -2
- ccxt/async_support/bitso.py +2 -2
- ccxt/async_support/bitstamp.py +2 -2
- ccxt/async_support/bitteam.py +3 -3
- ccxt/async_support/bitvavo.py +2 -2
- ccxt/async_support/blockchaincom.py +1 -1
- ccxt/async_support/blofin.py +3 -3
- ccxt/async_support/btcalpha.py +3 -3
- ccxt/async_support/btcbox.py +1 -1
- ccxt/async_support/btcmarkets.py +3 -3
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +2 -2
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +96 -55
- ccxt/async_support/coinbaseexchange.py +1 -1
- ccxt/async_support/coinbaseinternational.py +3 -3
- ccxt/async_support/coincheck.py +2 -2
- ccxt/async_support/coinex.py +2 -2
- ccxt/async_support/coinlist.py +2 -2
- ccxt/async_support/coinmate.py +2 -2
- ccxt/async_support/coinmetro.py +2 -2
- ccxt/async_support/coinone.py +1 -1
- ccxt/async_support/coinsph.py +2 -2
- ccxt/async_support/cryptocom.py +1 -1
- ccxt/async_support/currencycom.py +2 -2
- ccxt/async_support/delta.py +1 -1
- ccxt/async_support/deribit.py +2 -2
- ccxt/async_support/digifinex.py +2 -2
- ccxt/async_support/exmo.py +2 -2
- ccxt/async_support/gate.py +2 -2
- ccxt/async_support/gemini.py +2 -2
- ccxt/async_support/hitbtc.py +2 -2
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +2 -2
- ccxt/async_support/huobijp.py +2 -2
- ccxt/async_support/hyperliquid.py +2 -2
- ccxt/async_support/idex.py +2 -2
- ccxt/async_support/indodax.py +2 -2
- ccxt/async_support/kraken.py +2 -2
- ccxt/async_support/krakenfutures.py +1 -1
- ccxt/async_support/kucoin.py +2 -2
- ccxt/async_support/kuna.py +2 -2
- ccxt/async_support/latoken.py +2 -2
- ccxt/async_support/lbank.py +1 -1
- ccxt/async_support/luno.py +1 -1
- ccxt/async_support/lykke.py +1 -1
- ccxt/async_support/mercado.py +1 -1
- ccxt/async_support/mexc.py +1 -1
- ccxt/async_support/ndax.py +2 -2
- ccxt/async_support/novadax.py +3 -3
- ccxt/async_support/oceanex.py +2 -2
- ccxt/async_support/okcoin.py +3 -3
- ccxt/async_support/okx.py +3 -3
- ccxt/async_support/onetrading.py +2 -2
- ccxt/async_support/p2b.py +2 -2
- ccxt/async_support/paymium.py +1 -1
- ccxt/async_support/phemex.py +4 -4
- ccxt/async_support/poloniex.py +3 -3
- ccxt/async_support/poloniexfutures.py +2 -2
- ccxt/async_support/probit.py +3 -3
- ccxt/async_support/timex.py +2 -2
- ccxt/async_support/tokocrypto.py +1 -1
- ccxt/async_support/tradeogre.py +1 -1
- ccxt/async_support/upbit.py +3 -3
- ccxt/async_support/wavesexchange.py +1 -1
- ccxt/async_support/wazirx.py +3 -3
- ccxt/async_support/whitebit.py +3 -3
- ccxt/async_support/woo.py +3 -3
- ccxt/async_support/woofipro.py +3 -3
- ccxt/async_support/yobit.py +1 -1
- ccxt/async_support/zaif.py +2 -2
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/exchange.py +25 -3
- ccxt/base/types.py +0 -1
- ccxt/bigone.py +2 -2
- ccxt/binance.py +4 -3
- ccxt/bingx.py +2 -2
- ccxt/bit2c.py +1 -1
- ccxt/bitbank.py +1 -1
- ccxt/bitbns.py +1 -1
- ccxt/bitfinex.py +2 -2
- ccxt/bitfinex2.py +1 -1
- ccxt/bitflyer.py +1 -1
- ccxt/bitget.py +3 -3
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +2 -2
- ccxt/bitmex.py +3 -3
- ccxt/bitopro.py +3 -3
- ccxt/bitrue.py +2 -2
- ccxt/bitso.py +2 -2
- ccxt/bitstamp.py +2 -2
- ccxt/bitteam.py +3 -3
- ccxt/bitvavo.py +2 -2
- ccxt/blockchaincom.py +1 -1
- ccxt/blofin.py +3 -3
- ccxt/btcalpha.py +3 -3
- ccxt/btcbox.py +1 -1
- ccxt/btcmarkets.py +3 -3
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +2 -2
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +96 -55
- ccxt/coinbaseexchange.py +1 -1
- ccxt/coinbaseinternational.py +3 -3
- ccxt/coincheck.py +2 -2
- ccxt/coinex.py +2 -2
- ccxt/coinlist.py +2 -2
- ccxt/coinmate.py +2 -2
- ccxt/coinmetro.py +2 -2
- ccxt/coinone.py +1 -1
- ccxt/coinsph.py +2 -2
- ccxt/cryptocom.py +1 -1
- ccxt/currencycom.py +2 -2
- ccxt/delta.py +1 -1
- ccxt/deribit.py +2 -2
- ccxt/digifinex.py +2 -2
- ccxt/exmo.py +2 -2
- ccxt/gate.py +2 -2
- ccxt/gemini.py +2 -2
- ccxt/hitbtc.py +2 -2
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +2 -2
- ccxt/huobijp.py +2 -2
- ccxt/hyperliquid.py +2 -2
- ccxt/idex.py +2 -2
- ccxt/indodax.py +2 -2
- ccxt/kraken.py +2 -2
- ccxt/krakenfutures.py +1 -1
- ccxt/kucoin.py +2 -2
- ccxt/kuna.py +2 -2
- ccxt/latoken.py +2 -2
- ccxt/lbank.py +1 -1
- ccxt/luno.py +1 -1
- ccxt/lykke.py +1 -1
- ccxt/mercado.py +1 -1
- ccxt/mexc.py +1 -1
- ccxt/ndax.py +2 -2
- ccxt/novadax.py +3 -3
- ccxt/oceanex.py +2 -2
- ccxt/okcoin.py +3 -3
- ccxt/okx.py +3 -3
- ccxt/onetrading.py +2 -2
- ccxt/p2b.py +2 -2
- ccxt/paymium.py +1 -1
- ccxt/phemex.py +4 -4
- ccxt/poloniex.py +3 -3
- ccxt/poloniexfutures.py +2 -2
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +331 -2
- ccxt/pro/bitmex.py +98 -1
- ccxt/pro/bybit.py +82 -1
- ccxt/pro/gate.py +173 -1
- ccxt/pro/kucoinfutures.py +4 -0
- ccxt/pro/okx.py +245 -2
- ccxt/probit.py +3 -3
- ccxt/test/base/__init__.py +1 -0
- ccxt/test/base/test_liquidation.py +50 -0
- ccxt/timex.py +2 -2
- ccxt/tokocrypto.py +1 -1
- ccxt/tradeogre.py +1 -1
- ccxt/upbit.py +3 -3
- ccxt/wavesexchange.py +1 -1
- ccxt/wazirx.py +3 -3
- ccxt/whitebit.py +3 -3
- ccxt/woo.py +3 -3
- ccxt/woofipro.py +3 -3
- ccxt/yobit.py +1 -1
- ccxt/zaif.py +2 -2
- ccxt/zonda.py +1 -1
- {ccxt-4.3.33.dist-info → ccxt-4.3.34.dist-info}/METADATA +4 -4
- {ccxt-4.3.33.dist-info → ccxt-4.3.34.dist-info}/RECORD +200 -199
- {ccxt-4.3.33.dist-info → ccxt-4.3.34.dist-info}/WHEEL +0 -0
- {ccxt-4.3.33.dist-info → ccxt-4.3.34.dist-info}/top_level.txt +0 -0
ccxt/gate.py
CHANGED
@@ -3435,7 +3435,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3435
3435
|
#
|
3436
3436
|
return self.parse_transaction(response, currency)
|
3437
3437
|
|
3438
|
-
def parse_transaction_status(self, status):
|
3438
|
+
def parse_transaction_status(self, status: Str):
|
3439
3439
|
statuses: dict = {
|
3440
3440
|
'PEND': 'pending',
|
3441
3441
|
'REQUEST': 'pending',
|
@@ -6957,7 +6957,7 @@ class gate(Exchange, ImplicitAPI):
|
|
6957
6957
|
#
|
6958
6958
|
return self.parse_positions(response, symbols, params)
|
6959
6959
|
|
6960
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
6960
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
6961
6961
|
if response is None:
|
6962
6962
|
return None
|
6963
6963
|
#
|
ccxt/gemini.py
CHANGED
@@ -1653,7 +1653,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1653
1653
|
'fee': fee,
|
1654
1654
|
}
|
1655
1655
|
|
1656
|
-
def parse_transaction_status(self, status):
|
1656
|
+
def parse_transaction_status(self, status: Str):
|
1657
1657
|
statuses: dict = {
|
1658
1658
|
'Advanced': 'ok',
|
1659
1659
|
'Complete': 'ok',
|
@@ -1748,7 +1748,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1748
1748
|
body = self.json(query)
|
1749
1749
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1750
1750
|
|
1751
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1751
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1752
1752
|
if response is None:
|
1753
1753
|
if isinstance(body, str):
|
1754
1754
|
feedback = self.id + ' ' + body
|
ccxt/hitbtc.py
CHANGED
@@ -1367,7 +1367,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1367
1367
|
#
|
1368
1368
|
return self.parse_transactions(response, currency, since, limit, params)
|
1369
1369
|
|
1370
|
-
def parse_transaction_status(self, status):
|
1370
|
+
def parse_transaction_status(self, status: Str):
|
1371
1371
|
statuses: dict = {
|
1372
1372
|
'PENDING': 'pending',
|
1373
1373
|
'FAILED': 'failed',
|
@@ -3362,7 +3362,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
3362
3362
|
marginMode = 'isolated'
|
3363
3363
|
return [marginMode, params]
|
3364
3364
|
|
3365
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
3365
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
3366
3366
|
#
|
3367
3367
|
# {
|
3368
3368
|
# "error": {
|
ccxt/hollaex.py
CHANGED
@@ -1792,7 +1792,7 @@ class hollaex(Exchange, ImplicitAPI):
|
|
1792
1792
|
headers['api-signature'] = signature
|
1793
1793
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1794
1794
|
|
1795
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1795
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1796
1796
|
if response is None:
|
1797
1797
|
return None
|
1798
1798
|
if (code >= 400) and (code <= 503):
|
ccxt/htx.py
CHANGED
@@ -5954,7 +5954,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5954
5954
|
},
|
5955
5955
|
}
|
5956
5956
|
|
5957
|
-
def parse_transaction_status(self, status):
|
5957
|
+
def parse_transaction_status(self, status: Str):
|
5958
5958
|
statuses: dict = {
|
5959
5959
|
# deposit statuses
|
5960
5960
|
'unknown': 'failed',
|
@@ -6639,7 +6639,7 @@ class htx(Exchange, ImplicitAPI):
|
|
6639
6639
|
}) + url
|
6640
6640
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
6641
6641
|
|
6642
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
6642
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
6643
6643
|
if response is None:
|
6644
6644
|
return None # fallback to default error handler
|
6645
6645
|
if 'status' in response:
|
ccxt/huobijp.py
CHANGED
@@ -1673,7 +1673,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1673
1673
|
},
|
1674
1674
|
}
|
1675
1675
|
|
1676
|
-
def parse_transaction_status(self, status):
|
1676
|
+
def parse_transaction_status(self, status: Str):
|
1677
1677
|
statuses: dict = {
|
1678
1678
|
# deposit statuses
|
1679
1679
|
'unknown': 'failed',
|
@@ -1782,7 +1782,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1782
1782
|
}) + url
|
1783
1783
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1784
1784
|
|
1785
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1785
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1786
1786
|
if response is None:
|
1787
1787
|
return None # fallback to default error handler
|
1788
1788
|
if 'status' in response:
|
ccxt/hyperliquid.py
CHANGED
@@ -519,7 +519,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
519
519
|
}))
|
520
520
|
return markets
|
521
521
|
|
522
|
-
def parse_market(self, market) -> Market:
|
522
|
+
def parse_market(self, market: dict) -> Market:
|
523
523
|
#
|
524
524
|
# {
|
525
525
|
# "maxLeverage": "50",
|
@@ -2356,7 +2356,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2356
2356
|
return coin # spot
|
2357
2357
|
return coin + '/USDC:USDC'
|
2358
2358
|
|
2359
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2359
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2360
2360
|
if not response:
|
2361
2361
|
return None # fallback to default error handler
|
2362
2362
|
# {"status":"err","response":"User or API Wallet 0xb8a6f8b26223de27c31938d56e470a5b832703a5 does not exist."}
|
ccxt/idex.py
CHANGED
@@ -1416,7 +1416,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1416
1416
|
canceledOrder = self.safe_dict(response, 0)
|
1417
1417
|
return self.parse_order(canceledOrder, market)
|
1418
1418
|
|
1419
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1419
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1420
1420
|
errorCode = self.safe_string(response, 'code')
|
1421
1421
|
message = self.safe_string(response, 'message')
|
1422
1422
|
if errorCode is not None:
|
@@ -1557,7 +1557,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1557
1557
|
raise NotSupported(self.id + ' fetchTransactionsHelper() not support self method')
|
1558
1558
|
return self.parse_transactions(response, currency, since, limit)
|
1559
1559
|
|
1560
|
-
def parse_transaction_status(self, status):
|
1560
|
+
def parse_transaction_status(self, status: Str):
|
1561
1561
|
statuses: dict = {
|
1562
1562
|
'mined': 'ok',
|
1563
1563
|
}
|
ccxt/indodax.py
CHANGED
@@ -1078,7 +1078,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
1078
1078
|
'info': transaction,
|
1079
1079
|
}
|
1080
1080
|
|
1081
|
-
def parse_transaction_status(self, status):
|
1081
|
+
def parse_transaction_status(self, status: Str):
|
1082
1082
|
statuses: dict = {
|
1083
1083
|
'success': 'ok',
|
1084
1084
|
}
|
@@ -1183,7 +1183,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
1183
1183
|
}
|
1184
1184
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1185
1185
|
|
1186
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1186
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1187
1187
|
if response is None:
|
1188
1188
|
return None
|
1189
1189
|
# {success: 0, error: "invalid order."}
|
ccxt/kraken.py
CHANGED
@@ -2168,7 +2168,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
2168
2168
|
orders = self.safe_dict(result, 'closed', {})
|
2169
2169
|
return self.parse_orders(orders, market, since, limit)
|
2170
2170
|
|
2171
|
-
def parse_transaction_status(self, status):
|
2171
|
+
def parse_transaction_status(self, status: Str):
|
2172
2172
|
# IFEX transaction states
|
2173
2173
|
statuses: dict = {
|
2174
2174
|
'Initial': 'pending',
|
@@ -2832,7 +2832,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
2832
2832
|
def nonce(self):
|
2833
2833
|
return self.milliseconds()
|
2834
2834
|
|
2835
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2835
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2836
2836
|
if code == 520:
|
2837
2837
|
raise ExchangeNotAvailable(self.id + ' ' + str(code) + ' ' + reason)
|
2838
2838
|
# todo: rewrite self for "broad" exceptions matching
|
ccxt/krakenfutures.py
CHANGED
@@ -2491,7 +2491,7 @@ class krakenfutures(Exchange, ImplicitAPI):
|
|
2491
2491
|
'shortLeverage': leverageValue,
|
2492
2492
|
}
|
2493
2493
|
|
2494
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2494
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2495
2495
|
if response is None:
|
2496
2496
|
return None
|
2497
2497
|
if code == 429:
|
ccxt/kucoin.py
CHANGED
@@ -3100,7 +3100,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3100
3100
|
code = currency['code']
|
3101
3101
|
self.currencies[code]['networks'][networkCode]['precision'] = precision
|
3102
3102
|
|
3103
|
-
def parse_transaction_status(self, status):
|
3103
|
+
def parse_transaction_status(self, status: Str):
|
3104
3104
|
statuses: dict = {
|
3105
3105
|
'SUCCESS': 'ok',
|
3106
3106
|
'PROCESSING': 'pending',
|
@@ -4497,7 +4497,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4497
4497
|
headers['KC-BROKER-NAME'] = brokerName
|
4498
4498
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
4499
4499
|
|
4500
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
4500
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
4501
4501
|
if not response:
|
4502
4502
|
self.throw_broadly_matched_exception(self.exceptions['broad'], body, body)
|
4503
4503
|
return None
|
ccxt/kuna.py
CHANGED
@@ -1555,7 +1555,7 @@ class kuna(Exchange, ImplicitAPI):
|
|
1555
1555
|
'tag': None,
|
1556
1556
|
}
|
1557
1557
|
|
1558
|
-
def parse_transaction_status(self, status):
|
1558
|
+
def parse_transaction_status(self, status: Str):
|
1559
1559
|
statuses: dict = {
|
1560
1560
|
'Created': 'pending',
|
1561
1561
|
'Canceled': 'canceled',
|
@@ -1814,7 +1814,7 @@ class kuna(Exchange, ImplicitAPI):
|
|
1814
1814
|
body = json.dumps(body)
|
1815
1815
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1816
1816
|
|
1817
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1817
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1818
1818
|
#
|
1819
1819
|
# {
|
1820
1820
|
# "errors": [
|
ccxt/latoken.py
CHANGED
@@ -1457,7 +1457,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
1457
1457
|
'fee': fee,
|
1458
1458
|
}
|
1459
1459
|
|
1460
|
-
def parse_transaction_status(self, status):
|
1460
|
+
def parse_transaction_status(self, status: Str):
|
1461
1461
|
statuses: dict = {
|
1462
1462
|
'TRANSACTION_STATUS_CONFIRMED': 'ok',
|
1463
1463
|
'TRANSACTION_STATUS_EXECUTED': 'ok',
|
@@ -1641,7 +1641,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
1641
1641
|
url = self.urls['api']['rest'] + requestString
|
1642
1642
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1643
1643
|
|
1644
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1644
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1645
1645
|
if not response:
|
1646
1646
|
return None
|
1647
1647
|
#
|
ccxt/lbank.py
CHANGED
@@ -2567,7 +2567,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
2567
2567
|
pem += self.secret[start:end] + "\n" # eslint-disable-line
|
2568
2568
|
return pem + '-----END PRIVATE KEY-----'
|
2569
2569
|
|
2570
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2570
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2571
2571
|
if response is None:
|
2572
2572
|
return None
|
2573
2573
|
success = self.safe_value(response, 'result')
|
ccxt/luno.py
CHANGED
@@ -1050,7 +1050,7 @@ class luno(Exchange, ImplicitAPI):
|
|
1050
1050
|
}
|
1051
1051
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1052
1052
|
|
1053
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1053
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1054
1054
|
if response is None:
|
1055
1055
|
return None
|
1056
1056
|
error = self.safe_value(response, 'error')
|
ccxt/lykke.py
CHANGED
@@ -1248,7 +1248,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
1248
1248
|
headers['X-Request-ID'] = self.uuid()
|
1249
1249
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1250
1250
|
|
1251
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1251
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1252
1252
|
if response is None:
|
1253
1253
|
return None
|
1254
1254
|
error = self.safe_value(response, 'error', {})
|
ccxt/mercado.py
CHANGED
@@ -828,7 +828,7 @@ class mercado(Exchange, ImplicitAPI):
|
|
828
828
|
}
|
829
829
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
830
830
|
|
831
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
831
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
832
832
|
if response is None:
|
833
833
|
return None
|
834
834
|
#
|
ccxt/mexc.py
CHANGED
@@ -5342,7 +5342,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
5342
5342
|
headers['Signature'] = signature
|
5343
5343
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
5344
5344
|
|
5345
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
5345
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
5346
5346
|
if response is None:
|
5347
5347
|
return None
|
5348
5348
|
# spot
|
ccxt/ndax.py
CHANGED
@@ -460,7 +460,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
460
460
|
#
|
461
461
|
return self.parse_markets(response)
|
462
462
|
|
463
|
-
def parse_market(self, market) -> Market:
|
463
|
+
def parse_market(self, market: dict) -> Market:
|
464
464
|
id = self.safe_string(market, 'InstrumentId')
|
465
465
|
# lowercaseId = self.safe_string_lower(market, 'symbol')
|
466
466
|
baseId = self.safe_string(market, 'Product1')
|
@@ -2332,7 +2332,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
2332
2332
|
url += '?' + self.urlencode(query)
|
2333
2333
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
2334
2334
|
|
2335
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2335
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2336
2336
|
if code == 404:
|
2337
2337
|
raise AuthenticationError(self.id + ' ' + body)
|
2338
2338
|
if response is None:
|
ccxt/novadax.py
CHANGED
@@ -272,7 +272,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
272
272
|
data = self.safe_value(response, 'data', [])
|
273
273
|
return self.parse_markets(data)
|
274
274
|
|
275
|
-
def parse_market(self, market) -> Market:
|
275
|
+
def parse_market(self, market: dict) -> Market:
|
276
276
|
baseId = self.safe_string(market, 'baseCurrency')
|
277
277
|
quoteId = self.safe_string(market, 'quoteCurrency')
|
278
278
|
id = self.safe_string(market, 'symbol')
|
@@ -1303,7 +1303,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1303
1303
|
data = self.safe_list(response, 'data', [])
|
1304
1304
|
return self.parse_transactions(data, currency, since, limit)
|
1305
1305
|
|
1306
|
-
def parse_transaction_status(self, status):
|
1306
|
+
def parse_transaction_status(self, status: Str):
|
1307
1307
|
# Pending the record is wait broadcast to chain
|
1308
1308
|
# x/M confirming the comfirming state of tx, the M is total confirmings needed
|
1309
1309
|
# SUCCESS the record is success full
|
@@ -1468,7 +1468,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1468
1468
|
headers['X-Nova-Signature'] = self.hmac(self.encode(auth), self.encode(self.secret), hashlib.sha256)
|
1469
1469
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1470
1470
|
|
1471
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1471
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1472
1472
|
if response is None:
|
1473
1473
|
return None
|
1474
1474
|
#
|
ccxt/oceanex.py
CHANGED
@@ -181,7 +181,7 @@ class oceanex(Exchange, ImplicitAPI):
|
|
181
181
|
markets = self.safe_value(response, 'data', [])
|
182
182
|
return self.parse_markets(markets)
|
183
183
|
|
184
|
-
def parse_market(self, market) -> Market:
|
184
|
+
def parse_market(self, market: dict) -> Market:
|
185
185
|
id = self.safe_value(market, 'id')
|
186
186
|
name = self.safe_value(market, 'name')
|
187
187
|
baseId, quoteId = name.split('/')
|
@@ -887,7 +887,7 @@ class oceanex(Exchange, ImplicitAPI):
|
|
887
887
|
headers = {'Content-Type': 'application/json'}
|
888
888
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
889
889
|
|
890
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
890
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
891
891
|
#
|
892
892
|
# {"code":1011,"message":"This IP 'x.x.x.x' is not allowed","data":{}}
|
893
893
|
#
|
ccxt/okcoin.py
CHANGED
@@ -643,7 +643,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
643
643
|
markets = self.safe_value(response, 'data', [])
|
644
644
|
return self.parse_markets(markets)
|
645
645
|
|
646
|
-
def parse_market(self, market) -> Market:
|
646
|
+
def parse_market(self, market: dict) -> Market:
|
647
647
|
#
|
648
648
|
# spot markets
|
649
649
|
#
|
@@ -2493,7 +2493,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
2493
2493
|
data = self.safe_list(response, 'data', [])
|
2494
2494
|
return self.parse_transactions(data, currency, since, limit, params)
|
2495
2495
|
|
2496
|
-
def parse_transaction_status(self, status):
|
2496
|
+
def parse_transaction_status(self, status: Str):
|
2497
2497
|
#
|
2498
2498
|
# deposit statuses
|
2499
2499
|
#
|
@@ -2898,7 +2898,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
2898
2898
|
else:
|
2899
2899
|
return self.parse_trading_balance(response)
|
2900
2900
|
|
2901
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2901
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2902
2902
|
if not response:
|
2903
2903
|
return None # fallback to default error handler
|
2904
2904
|
#
|
ccxt/okx.py
CHANGED
@@ -1372,7 +1372,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1372
1372
|
result = self.array_concat(result, promises[i])
|
1373
1373
|
return result
|
1374
1374
|
|
1375
|
-
def parse_market(self, market) -> Market:
|
1375
|
+
def parse_market(self, market: dict) -> Market:
|
1376
1376
|
#
|
1377
1377
|
# {
|
1378
1378
|
# "alias": "", # self_week, next_week, quarter, next_quarter
|
@@ -4805,7 +4805,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4805
4805
|
withdrawal = self.safe_dict(data, 0, {})
|
4806
4806
|
return self.parse_transaction(withdrawal)
|
4807
4807
|
|
4808
|
-
def parse_transaction_status(self, status):
|
4808
|
+
def parse_transaction_status(self, status: Str):
|
4809
4809
|
#
|
4810
4810
|
# deposit statuses
|
4811
4811
|
#
|
@@ -7613,7 +7613,7 @@ class okx(Exchange, ImplicitAPI):
|
|
7613
7613
|
}
|
7614
7614
|
return result
|
7615
7615
|
|
7616
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
7616
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
7617
7617
|
if not response:
|
7618
7618
|
return None # fallback to default error handler
|
7619
7619
|
#
|
ccxt/onetrading.py
CHANGED
@@ -387,7 +387,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
387
387
|
#
|
388
388
|
return self.parse_markets(response)
|
389
389
|
|
390
|
-
def parse_market(self, market) -> Market:
|
390
|
+
def parse_market(self, market: dict) -> Market:
|
391
391
|
baseAsset = self.safe_value(market, 'base', {})
|
392
392
|
quoteAsset = self.safe_value(market, 'quote', {})
|
393
393
|
baseId = self.safe_string(baseAsset, 'code')
|
@@ -1894,7 +1894,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1894
1894
|
url += '?' + self.urlencode(query)
|
1895
1895
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1896
1896
|
|
1897
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1897
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1898
1898
|
if response is None:
|
1899
1899
|
return None
|
1900
1900
|
#
|
ccxt/p2b.py
CHANGED
@@ -279,7 +279,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
279
279
|
markets = self.safe_value(response, 'result', [])
|
280
280
|
return self.parse_markets(markets)
|
281
281
|
|
282
|
-
def parse_market(self, market) -> Market:
|
282
|
+
def parse_market(self, market: dict) -> Market:
|
283
283
|
marketId = self.safe_string(market, 'name')
|
284
284
|
baseId = self.safe_string(market, 'stock')
|
285
285
|
quoteId = self.safe_string(market, 'money')
|
@@ -1182,7 +1182,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
1182
1182
|
body = self.json(params)
|
1183
1183
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1184
1184
|
|
1185
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1185
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1186
1186
|
if response is None:
|
1187
1187
|
return None
|
1188
1188
|
if code == 400:
|
ccxt/paymium.py
CHANGED
@@ -552,7 +552,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
552
552
|
headers['Api-Signature'] = self.hmac(self.encode(auth), self.encode(self.secret), hashlib.sha256)
|
553
553
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
554
554
|
|
555
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
555
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
556
556
|
if response is None:
|
557
557
|
return None
|
558
558
|
errors = self.safe_value(response, 'errors')
|
ccxt/phemex.py
CHANGED
@@ -512,7 +512,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
512
512
|
parts = value.split(' ')
|
513
513
|
return self.safe_number(parts, 0)
|
514
514
|
|
515
|
-
def parse_swap_market(self, market):
|
515
|
+
def parse_swap_market(self, market: dict):
|
516
516
|
#
|
517
517
|
# {
|
518
518
|
# "symbol":"BTCUSD",
|
@@ -647,7 +647,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
647
647
|
'info': market,
|
648
648
|
})
|
649
649
|
|
650
|
-
def parse_spot_market(self, market):
|
650
|
+
def parse_spot_market(self, market: dict):
|
651
651
|
#
|
652
652
|
# {
|
653
653
|
# "symbol":"sBTCUSDT",
|
@@ -3225,7 +3225,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
3225
3225
|
data = self.safe_list(response, 'data', [])
|
3226
3226
|
return self.parse_transactions(data, currency, since, limit)
|
3227
3227
|
|
3228
|
-
def parse_transaction_status(self, status):
|
3228
|
+
def parse_transaction_status(self, status: Str):
|
3229
3229
|
statuses: dict = {
|
3230
3230
|
'Success': 'ok',
|
3231
3231
|
'Succeed': 'ok',
|
@@ -4453,7 +4453,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4453
4453
|
data = self.safe_dict(response, 'data', {})
|
4454
4454
|
return self.parse_transaction(data, currency)
|
4455
4455
|
|
4456
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
4456
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
4457
4457
|
if response is None:
|
4458
4458
|
return None # fallback to default error handler
|
4459
4459
|
#
|
ccxt/poloniex.py
CHANGED
@@ -514,7 +514,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
514
514
|
#
|
515
515
|
return self.parse_markets(markets)
|
516
516
|
|
517
|
-
def parse_market(self, market) -> Market:
|
517
|
+
def parse_market(self, market: dict) -> Market:
|
518
518
|
id = self.safe_string(market, 'symbol')
|
519
519
|
baseId = self.safe_string(market, 'baseCurrencyName')
|
520
520
|
quoteId = self.safe_string(market, 'quoteCurrencyName')
|
@@ -2084,7 +2084,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
2084
2084
|
transactions = self.parse_transactions(deposits, currency, since, limit)
|
2085
2085
|
return self.filter_by_currency_since_limit(transactions, code, since, limit)
|
2086
2086
|
|
2087
|
-
def parse_transaction_status(self, status):
|
2087
|
+
def parse_transaction_status(self, status: Str):
|
2088
2088
|
statuses: dict = {
|
2089
2089
|
'COMPLETE': 'ok',
|
2090
2090
|
'COMPLETED': 'ok',
|
@@ -2212,7 +2212,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
2212
2212
|
}
|
2213
2213
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
2214
2214
|
|
2215
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2215
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2216
2216
|
if response is None:
|
2217
2217
|
return None
|
2218
2218
|
#
|
ccxt/poloniexfutures.py
CHANGED
@@ -288,7 +288,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
288
288
|
data = self.safe_value(response, 'data', [])
|
289
289
|
return self.parse_markets(data)
|
290
290
|
|
291
|
-
def parse_market(self, market) -> Market:
|
291
|
+
def parse_market(self, market: dict) -> Market:
|
292
292
|
id = self.safe_string(market, 'symbol')
|
293
293
|
baseId = self.safe_string(market, 'baseCurrency')
|
294
294
|
quoteId = self.safe_string(market, 'quoteCurrency')
|
@@ -1698,7 +1698,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1698
1698
|
headers['Content-Type'] = 'application/json'
|
1699
1699
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1700
1700
|
|
1701
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1701
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1702
1702
|
if not response:
|
1703
1703
|
self.throw_broadly_matched_exception(self.exceptions['broad'], body, body)
|
1704
1704
|
return None
|