ccxt 4.3.32__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/abstract/bitget.py +1 -1
- 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 +4 -4
- 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 +4 -4
- 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.32.dist-info → ccxt-4.3.34.dist-info}/METADATA +4 -4
- {ccxt-4.3.32.dist-info → ccxt-4.3.34.dist-info}/RECORD +201 -200
- {ccxt-4.3.32.dist-info → ccxt-4.3.34.dist-info}/WHEEL +0 -0
- {ccxt-4.3.32.dist-info → ccxt-4.3.34.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/abstract/binance.py
CHANGED
@@ -4,6 +4,7 @@ from ccxt.base.types import Entry
|
|
4
4
|
class ImplicitAPI:
|
5
5
|
sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
|
6
6
|
sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
|
7
|
+
sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
|
7
8
|
sapi_get_margin_asset = sapiGetMarginAsset = Entry('margin/asset', 'sapi', 'GET', {'cost': 1})
|
8
9
|
sapi_get_margin_pair = sapiGetMarginPair = Entry('margin/pair', 'sapi', 'GET', {'cost': 1})
|
9
10
|
sapi_get_margin_allassets = sapiGetMarginAllAssets = Entry('margin/allAssets', 'sapi', 'GET', {'cost': 0.1})
|
ccxt/abstract/binancecoinm.py
CHANGED
@@ -4,6 +4,7 @@ from ccxt.base.types import Entry
|
|
4
4
|
class ImplicitAPI:
|
5
5
|
sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
|
6
6
|
sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
|
7
|
+
sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
|
7
8
|
sapi_get_margin_asset = sapiGetMarginAsset = Entry('margin/asset', 'sapi', 'GET', {'cost': 1})
|
8
9
|
sapi_get_margin_pair = sapiGetMarginPair = Entry('margin/pair', 'sapi', 'GET', {'cost': 1})
|
9
10
|
sapi_get_margin_allassets = sapiGetMarginAllAssets = Entry('margin/allAssets', 'sapi', 'GET', {'cost': 0.1})
|
ccxt/abstract/binanceus.py
CHANGED
@@ -4,6 +4,7 @@ from ccxt.base.types import Entry
|
|
4
4
|
class ImplicitAPI:
|
5
5
|
sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
|
6
6
|
sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
|
7
|
+
sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
|
7
8
|
sapi_get_margin_asset = sapiGetMarginAsset = Entry('margin/asset', 'sapi', 'GET', {'cost': 1})
|
8
9
|
sapi_get_margin_pair = sapiGetMarginPair = Entry('margin/pair', 'sapi', 'GET', {'cost': 1})
|
9
10
|
sapi_get_margin_allassets = sapiGetMarginAllAssets = Entry('margin/allAssets', 'sapi', 'GET', {'cost': 0.1})
|
ccxt/abstract/binanceusdm.py
CHANGED
@@ -4,6 +4,7 @@ from ccxt.base.types import Entry
|
|
4
4
|
class ImplicitAPI:
|
5
5
|
sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
|
6
6
|
sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
|
7
|
+
sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
|
7
8
|
sapi_get_margin_asset = sapiGetMarginAsset = Entry('margin/asset', 'sapi', 'GET', {'cost': 1})
|
8
9
|
sapi_get_margin_pair = sapiGetMarginPair = Entry('margin/pair', 'sapi', 'GET', {'cost': 1})
|
9
10
|
sapi_get_margin_allassets = sapiGetMarginAllAssets = Entry('margin/allAssets', 'sapi', 'GET', {'cost': 0.1})
|
ccxt/abstract/bitget.py
CHANGED
@@ -266,7 +266,7 @@ class ImplicitAPI:
|
|
266
266
|
private_mix_post_v2_mix_account_set_margin = privateMixPostV2MixAccountSetMargin = Entry('v2/mix/account/set-margin', ['private', 'mix'], 'POST', {'cost': 4})
|
267
267
|
private_mix_post_v2_mix_account_set_margin_mode = privateMixPostV2MixAccountSetMarginMode = Entry('v2/mix/account/set-margin-mode', ['private', 'mix'], 'POST', {'cost': 4})
|
268
268
|
private_mix_post_v2_mix_account_set_position_mode = privateMixPostV2MixAccountSetPositionMode = Entry('v2/mix/account/set-position-mode', ['private', 'mix'], 'POST', {'cost': 4})
|
269
|
-
private_mix_post_v2_mix_order_place_order = privateMixPostV2MixOrderPlaceOrder = Entry('v2/mix/order/place-order', ['private', 'mix'], 'POST', {'cost':
|
269
|
+
private_mix_post_v2_mix_order_place_order = privateMixPostV2MixOrderPlaceOrder = Entry('v2/mix/order/place-order', ['private', 'mix'], 'POST', {'cost': 2})
|
270
270
|
private_mix_post_v2_mix_order_click_backhand = privateMixPostV2MixOrderClickBackhand = Entry('v2/mix/order/click-backhand', ['private', 'mix'], 'POST', {'cost': 20})
|
271
271
|
private_mix_post_v2_mix_order_batch_place_order = privateMixPostV2MixOrderBatchPlaceOrder = Entry('v2/mix/order/batch-place-order', ['private', 'mix'], 'POST', {'cost': 20})
|
272
272
|
private_mix_post_v2_mix_order_modify_order = privateMixPostV2MixOrderModifyOrder = Entry('v2/mix/order/modify-order', ['private', 'mix'], 'POST', {'cost': 2})
|
ccxt/ace.py
CHANGED
@@ -202,7 +202,7 @@ class ace(Exchange, ImplicitAPI):
|
|
202
202
|
#
|
203
203
|
return self.parse_markets(response)
|
204
204
|
|
205
|
-
def parse_market(self, market) -> Market:
|
205
|
+
def parse_market(self, market: dict) -> Market:
|
206
206
|
baseId = self.safe_string(market, 'base')
|
207
207
|
base = self.safe_currency_code(baseId)
|
208
208
|
quoteId = self.safe_string(market, 'quote')
|
@@ -1000,7 +1000,7 @@ class ace(Exchange, ImplicitAPI):
|
|
1000
1000
|
url = self.urls['api'][api] + url
|
1001
1001
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1002
1002
|
|
1003
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1003
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1004
1004
|
if response is None:
|
1005
1005
|
return None # fallback to the default error handler
|
1006
1006
|
feedback = self.id + ' ' + body
|
ccxt/alpaca.py
CHANGED
@@ -1064,7 +1064,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
1064
1064
|
url = url + endpoint
|
1065
1065
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1066
1066
|
|
1067
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1067
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1068
1068
|
if response is None:
|
1069
1069
|
return None # default error handler
|
1070
1070
|
# {
|
ccxt/ascendex.py
CHANGED
@@ -2440,7 +2440,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2440
2440
|
transactions = self.safe_list(data, 'data', [])
|
2441
2441
|
return self.parse_transactions(transactions, currency, since, limit)
|
2442
2442
|
|
2443
|
-
def parse_transaction_status(self, status):
|
2443
|
+
def parse_transaction_status(self, status: Str):
|
2444
2444
|
statuses: dict = {
|
2445
2445
|
'reviewing': 'pending',
|
2446
2446
|
'pending': 'pending',
|
@@ -3309,7 +3309,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3309
3309
|
url = self.urls['api']['rest'] + url
|
3310
3310
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
3311
3311
|
|
3312
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
3312
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
3313
3313
|
if response is None:
|
3314
3314
|
return None # fallback to default error handler
|
3315
3315
|
#
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/ace.py
CHANGED
@@ -202,7 +202,7 @@ class ace(Exchange, ImplicitAPI):
|
|
202
202
|
#
|
203
203
|
return self.parse_markets(response)
|
204
204
|
|
205
|
-
def parse_market(self, market) -> Market:
|
205
|
+
def parse_market(self, market: dict) -> Market:
|
206
206
|
baseId = self.safe_string(market, 'base')
|
207
207
|
base = self.safe_currency_code(baseId)
|
208
208
|
quoteId = self.safe_string(market, 'quote')
|
@@ -1000,7 +1000,7 @@ class ace(Exchange, ImplicitAPI):
|
|
1000
1000
|
url = self.urls['api'][api] + url
|
1001
1001
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1002
1002
|
|
1003
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1003
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1004
1004
|
if response is None:
|
1005
1005
|
return None # fallback to the default error handler
|
1006
1006
|
feedback = self.id + ' ' + body
|
ccxt/async_support/alpaca.py
CHANGED
@@ -1064,7 +1064,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
1064
1064
|
url = url + endpoint
|
1065
1065
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1066
1066
|
|
1067
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1067
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1068
1068
|
if response is None:
|
1069
1069
|
return None # default error handler
|
1070
1070
|
# {
|
ccxt/async_support/ascendex.py
CHANGED
@@ -2440,7 +2440,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2440
2440
|
transactions = self.safe_list(data, 'data', [])
|
2441
2441
|
return self.parse_transactions(transactions, currency, since, limit)
|
2442
2442
|
|
2443
|
-
def parse_transaction_status(self, status):
|
2443
|
+
def parse_transaction_status(self, status: Str):
|
2444
2444
|
statuses: dict = {
|
2445
2445
|
'reviewing': 'pending',
|
2446
2446
|
'pending': 'pending',
|
@@ -3309,7 +3309,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3309
3309
|
url = self.urls['api']['rest'] + url
|
3310
3310
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
3311
3311
|
|
3312
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
3312
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
3313
3313
|
if response is None:
|
3314
3314
|
return None # fallback to default error handler
|
3315
3315
|
#
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.3.
|
5
|
+
__version__ = '4.3.34'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -568,6 +568,22 @@ class Exchange(BaseExchange):
|
|
568
568
|
async def fetch_trades_ws(self, symbol: str, since: Int = None, limit: Int = None, params={}):
|
569
569
|
raise NotSupported(self.id + ' fetchTradesWs() is not supported yet')
|
570
570
|
|
571
|
+
async def watch_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}):
|
572
|
+
if self.has['watchLiquidationsForSymbols']:
|
573
|
+
return self.watchLiquidationsForSymbols([symbol], since, limit, params)
|
574
|
+
raise NotSupported(self.id + ' watchLiquidations() is not supported yet')
|
575
|
+
|
576
|
+
async def watch_liquidations_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}):
|
577
|
+
raise NotSupported(self.id + ' watchLiquidationsForSymbols() is not supported yet')
|
578
|
+
|
579
|
+
async def watch_my_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}):
|
580
|
+
if self.has['watchMyLiquidationsForSymbols']:
|
581
|
+
return self.watchMyLiquidationsForSymbols([symbol], since, limit, params)
|
582
|
+
raise NotSupported(self.id + ' watchMyLiquidations() is not supported yet')
|
583
|
+
|
584
|
+
async def watch_my_liquidations_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}):
|
585
|
+
raise NotSupported(self.id + ' watchMyLiquidationsForSymbols() is not supported yet')
|
586
|
+
|
571
587
|
async def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}):
|
572
588
|
raise NotSupported(self.id + ' watchTrades() is not supported yet')
|
573
589
|
|
ccxt/async_support/bigone.py
CHANGED
@@ -1781,7 +1781,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1781
1781
|
'info': response,
|
1782
1782
|
}
|
1783
1783
|
|
1784
|
-
def parse_transaction_status(self, status):
|
1784
|
+
def parse_transaction_status(self, status: Str):
|
1785
1785
|
statuses: dict = {
|
1786
1786
|
# what are other statuses here?
|
1787
1787
|
'WITHHOLD': 'ok', # deposits
|
@@ -2095,7 +2095,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
2095
2095
|
data = self.safe_dict(response, 'data', {})
|
2096
2096
|
return self.parse_transaction(data, currency)
|
2097
2097
|
|
2098
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2098
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2099
2099
|
if response is None:
|
2100
2100
|
return None # fallback to default error handler
|
2101
2101
|
#
|
ccxt/async_support/binance.py
CHANGED
@@ -263,6 +263,7 @@ class binance(Exchange, ImplicitAPI):
|
|
263
263
|
'system/status': 0.1,
|
264
264
|
# these endpoints require self.apiKey
|
265
265
|
'accountSnapshot': 240, # Weight(IP): 2400 => cost = 0.1 * 2400 = 240
|
266
|
+
'account/info': 0.1,
|
266
267
|
'margin/asset': 1, # Weight(IP): 10 => cost = 0.1 * 10 = 1
|
267
268
|
'margin/pair': 1,
|
268
269
|
'margin/allAssets': 0.1,
|
@@ -3043,7 +3044,7 @@ class binance(Exchange, ImplicitAPI):
|
|
3043
3044
|
result.append(self.parse_market(markets[i]))
|
3044
3045
|
return result
|
3045
3046
|
|
3046
|
-
def parse_market(self, market) -> Market:
|
3047
|
+
def parse_market(self, market: dict) -> Market:
|
3047
3048
|
swap = False
|
3048
3049
|
future = False
|
3049
3050
|
option = False
|
@@ -10225,7 +10226,7 @@ class binance(Exchange, ImplicitAPI):
|
|
10225
10226
|
url += '?' + self.urlencode(params)
|
10226
10227
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
10227
10228
|
|
10228
|
-
def get_exceptions_by_url(self, url, exactOrBroad):
|
10229
|
+
def get_exceptions_by_url(self, url: str, exactOrBroad: str):
|
10229
10230
|
marketType = None
|
10230
10231
|
hostname = self.hostname if (self.hostname is not None) else 'binance.com'
|
10231
10232
|
if url.startswith('https://api.' + hostname + '/'):
|
@@ -10243,7 +10244,7 @@ class binance(Exchange, ImplicitAPI):
|
|
10243
10244
|
return self.safe_dict(exceptionsForMarketType, exactOrBroad, {})
|
10244
10245
|
return {}
|
10245
10246
|
|
10246
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
10247
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
10247
10248
|
if (code == 418) or (code == 429):
|
10248
10249
|
raise DDoSProtection(self.id + ' ' + str(code) + ' ' + reason + ' ' + body)
|
10249
10250
|
# error response in a form: {"code": -1013, "msg": "Invalid quantity."}
|
ccxt/async_support/bingx.py
CHANGED
@@ -636,7 +636,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
636
636
|
markets = self.safe_list(response, 'data', [])
|
637
637
|
return self.parse_markets(markets)
|
638
638
|
|
639
|
-
def parse_market(self, market) -> Market:
|
639
|
+
def parse_market(self, market: dict) -> Market:
|
640
640
|
id = self.safe_string(market, 'symbol')
|
641
641
|
symbolParts = id.split('-')
|
642
642
|
baseId = symbolParts[0]
|
@@ -4264,7 +4264,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4264
4264
|
super(bingx, self).set_sandbox_mode(enable)
|
4265
4265
|
self.options['sandboxMode'] = enable
|
4266
4266
|
|
4267
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
4267
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
4268
4268
|
if response is None:
|
4269
4269
|
return None # fallback to default error handler
|
4270
4270
|
#
|
ccxt/async_support/bit2c.py
CHANGED
@@ -846,7 +846,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
846
846
|
}
|
847
847
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
848
848
|
|
849
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
849
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
850
850
|
if response is None:
|
851
851
|
return None # fallback to default error handler
|
852
852
|
#
|
ccxt/async_support/bitbank.py
CHANGED
@@ -881,7 +881,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
881
881
|
}
|
882
882
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
883
883
|
|
884
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
884
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
885
885
|
if response is None:
|
886
886
|
return None
|
887
887
|
success = self.safe_integer(response, 'success')
|
ccxt/async_support/bitbns.py
CHANGED
@@ -1135,7 +1135,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
1135
1135
|
headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
1136
1136
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1137
1137
|
|
1138
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1138
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1139
1139
|
if response is None:
|
1140
1140
|
return None # fallback to default error handler
|
1141
1141
|
#
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -1477,7 +1477,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1477
1477
|
},
|
1478
1478
|
}
|
1479
1479
|
|
1480
|
-
def parse_transaction_status(self, status):
|
1480
|
+
def parse_transaction_status(self, status: Str):
|
1481
1481
|
statuses: dict = {
|
1482
1482
|
'SENDING': 'pending',
|
1483
1483
|
'CANCELED': 'canceled',
|
@@ -1594,7 +1594,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1594
1594
|
}
|
1595
1595
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1596
1596
|
|
1597
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1597
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1598
1598
|
if response is None:
|
1599
1599
|
return None
|
1600
1600
|
throwError = False
|
ccxt/async_support/bitfinex2.py
CHANGED
@@ -2146,7 +2146,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2146
2146
|
'info': response,
|
2147
2147
|
}
|
2148
2148
|
|
2149
|
-
def parse_transaction_status(self, status):
|
2149
|
+
def parse_transaction_status(self, status: Str):
|
2150
2150
|
statuses: dict = {
|
2151
2151
|
'SUCCESS': 'ok',
|
2152
2152
|
'COMPLETED': 'ok',
|
ccxt/async_support/bitflyer.py
CHANGED
@@ -982,7 +982,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
982
982
|
}
|
983
983
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
984
984
|
|
985
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
985
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
986
986
|
if response is None:
|
987
987
|
return None # fallback to the default error handler
|
988
988
|
feedback = self.id + ' ' + body
|
ccxt/async_support/bitget.py
CHANGED
@@ -505,7 +505,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
505
505
|
'v2/mix/account/set-margin': 4,
|
506
506
|
'v2/mix/account/set-margin-mode': 4,
|
507
507
|
'v2/mix/account/set-position-mode': 4,
|
508
|
-
'v2/mix/order/place-order':
|
508
|
+
'v2/mix/order/place-order': 2,
|
509
509
|
'v2/mix/order/click-backhand': 20,
|
510
510
|
'v2/mix/order/batch-place-order': 20,
|
511
511
|
'v2/mix/order/modify-order': 2,
|
@@ -1559,7 +1559,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1559
1559
|
result = self.array_concat(result, promises[i])
|
1560
1560
|
return result
|
1561
1561
|
|
1562
|
-
def parse_market(self, market) -> Market:
|
1562
|
+
def parse_market(self, market: dict) -> Market:
|
1563
1563
|
#
|
1564
1564
|
# spot
|
1565
1565
|
#
|
@@ -2378,7 +2378,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2378
2378
|
'fee': fee,
|
2379
2379
|
}
|
2380
2380
|
|
2381
|
-
def parse_transaction_status(self, status):
|
2381
|
+
def parse_transaction_status(self, status: Str):
|
2382
2382
|
statuses: dict = {
|
2383
2383
|
'success': 'ok',
|
2384
2384
|
'Pending': 'pending',
|
@@ -8182,7 +8182,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
8182
8182
|
}
|
8183
8183
|
return result
|
8184
8184
|
|
8185
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
8185
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
8186
8186
|
if not response:
|
8187
8187
|
return None # fallback to default error handler
|
8188
8188
|
#
|
ccxt/async_support/bithumb.py
CHANGED
@@ -1031,7 +1031,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
1031
1031
|
}
|
1032
1032
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1033
1033
|
|
1034
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1034
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1035
1035
|
if response is None:
|
1036
1036
|
return None # fallback to default error handler
|
1037
1037
|
if 'status' in response:
|
ccxt/async_support/bitmart.py
CHANGED
@@ -3282,7 +3282,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3282
3282
|
"""
|
3283
3283
|
return await self.fetch_transactions_by_type('withdraw', code, since, limit, params)
|
3284
3284
|
|
3285
|
-
def parse_transaction_status(self, status):
|
3285
|
+
def parse_transaction_status(self, status: Str):
|
3286
3286
|
statuses: dict = {
|
3287
3287
|
'0': 'pending', # Create
|
3288
3288
|
'1': 'pending', # Submitted, waiting for withdrawal
|
@@ -4297,7 +4297,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
4297
4297
|
headers['X-BM-SIGN'] = signature
|
4298
4298
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
4299
4299
|
|
4300
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
4300
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
4301
4301
|
if response is None:
|
4302
4302
|
return None
|
4303
4303
|
#
|
ccxt/async_support/bitmex.py
CHANGED
@@ -580,7 +580,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
580
580
|
#
|
581
581
|
return self.parse_markets(response)
|
582
582
|
|
583
|
-
def parse_market(self, market) -> Market:
|
583
|
+
def parse_market(self, market: dict) -> Market:
|
584
584
|
id = self.safe_string(market, 'symbol')
|
585
585
|
baseId = self.safe_string(market, 'underlying')
|
586
586
|
quoteId = self.safe_string(market, 'quoteCurrency')
|
@@ -1220,7 +1220,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1220
1220
|
transactions = self.filter_by_array(response, 'transactType', ['Withdrawal', 'Deposit'], False)
|
1221
1221
|
return self.parse_transactions(transactions, currency, since, limit)
|
1222
1222
|
|
1223
|
-
def parse_transaction_status(self, status):
|
1223
|
+
def parse_transaction_status(self, status: Str):
|
1224
1224
|
statuses: dict = {
|
1225
1225
|
'Confirmed': 'pending',
|
1226
1226
|
'Canceled': 'canceled',
|
@@ -2705,7 +2705,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2705
2705
|
'datetime': None,
|
2706
2706
|
})
|
2707
2707
|
|
2708
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2708
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2709
2709
|
if response is None:
|
2710
2710
|
return None
|
2711
2711
|
if code == 429:
|
ccxt/async_support/bitopro.py
CHANGED
@@ -316,7 +316,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
316
316
|
#
|
317
317
|
return self.parse_markets(markets)
|
318
318
|
|
319
|
-
def parse_market(self, market) -> Market:
|
319
|
+
def parse_market(self, market: dict) -> Market:
|
320
320
|
active = not self.safe_value(market, 'maintain')
|
321
321
|
id = self.safe_string(market, 'pair')
|
322
322
|
uppercaseId = id.upper()
|
@@ -1259,7 +1259,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1259
1259
|
#
|
1260
1260
|
return self.parse_trades(trades, market, since, limit)
|
1261
1261
|
|
1262
|
-
def parse_transaction_status(self, status):
|
1262
|
+
def parse_transaction_status(self, status: Str):
|
1263
1263
|
states: dict = {
|
1264
1264
|
'COMPLETE': 'ok',
|
1265
1265
|
'INVALID': 'failed',
|
@@ -1618,7 +1618,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1618
1618
|
url = self.urls['api']['rest'] + url
|
1619
1619
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1620
1620
|
|
1621
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1621
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1622
1622
|
if response is None:
|
1623
1623
|
return None # fallback to the default error handler
|
1624
1624
|
if code >= 200 and code < 300:
|
ccxt/async_support/bitrue.py
CHANGED
@@ -810,7 +810,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
810
810
|
await self.load_time_difference()
|
811
811
|
return self.parse_markets(markets)
|
812
812
|
|
813
|
-
def parse_market(self, market) -> Market:
|
813
|
+
def parse_market(self, market: dict) -> Market:
|
814
814
|
id = self.safe_string(market, 'symbol')
|
815
815
|
lowercaseId = self.safe_string_lower(market, 'symbol')
|
816
816
|
side = self.safe_integer(market, 'side') # 1 linear, 0 inverse, None spot
|
@@ -2962,7 +2962,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2962
2962
|
url += '?' + self.urlencode(params)
|
2963
2963
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
2964
2964
|
|
2965
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2965
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2966
2966
|
if (code == 418) or (code == 429):
|
2967
2967
|
raise DDoSProtection(self.id + ' ' + str(code) + ' ' + reason + ' ' + body)
|
2968
2968
|
# error response in a form: {"code": -1013, "msg": "Invalid quantity."}
|
ccxt/async_support/bitso.py
CHANGED
@@ -1611,7 +1611,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1611
1611
|
'info': transaction,
|
1612
1612
|
}
|
1613
1613
|
|
1614
|
-
def parse_transaction_status(self, status):
|
1614
|
+
def parse_transaction_status(self, status: Str):
|
1615
1615
|
statuses: dict = {
|
1616
1616
|
'pending': 'pending',
|
1617
1617
|
'in_progress': 'pending',
|
@@ -1646,7 +1646,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1646
1646
|
}
|
1647
1647
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1648
1648
|
|
1649
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1649
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1650
1650
|
if response is None:
|
1651
1651
|
return None # fallback to default error handler
|
1652
1652
|
if 'success' in response:
|
ccxt/async_support/bitstamp.py
CHANGED
@@ -1689,7 +1689,7 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1689
1689
|
'fee': fee,
|
1690
1690
|
}
|
1691
1691
|
|
1692
|
-
def parse_transaction_status(self, status):
|
1692
|
+
def parse_transaction_status(self, status: Str):
|
1693
1693
|
#
|
1694
1694
|
# withdrawals:
|
1695
1695
|
# 0(open), 1(in process), 2(finished), 3(canceled) or 4(failed).
|
@@ -2109,7 +2109,7 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
2109
2109
|
headers['X-Auth-Signature'] = signature
|
2110
2110
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
2111
2111
|
|
2112
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2112
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2113
2113
|
if response is None:
|
2114
2114
|
return None
|
2115
2115
|
#
|
ccxt/async_support/bitteam.py
CHANGED
@@ -349,7 +349,7 @@ class bitteam(Exchange, ImplicitAPI):
|
|
349
349
|
markets = self.safe_value(result, 'pairs', [])
|
350
350
|
return self.parse_markets(markets)
|
351
351
|
|
352
|
-
def parse_market(self, market) -> Market:
|
352
|
+
def parse_market(self, market: dict) -> Market:
|
353
353
|
id = self.safe_string(market, 'name')
|
354
354
|
numericId = self.safe_integer(market, 'id')
|
355
355
|
parts = id.split('_')
|
@@ -2190,7 +2190,7 @@ class bitteam(Exchange, ImplicitAPI):
|
|
2190
2190
|
}
|
2191
2191
|
return self.safe_string(types, type, type)
|
2192
2192
|
|
2193
|
-
def parse_transaction_status(self, status):
|
2193
|
+
def parse_transaction_status(self, status: Str):
|
2194
2194
|
statuses: dict = {
|
2195
2195
|
'approving': 'pending',
|
2196
2196
|
'success': 'ok',
|
@@ -2219,7 +2219,7 @@ class bitteam(Exchange, ImplicitAPI):
|
|
2219
2219
|
url += '?' + query
|
2220
2220
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
2221
2221
|
|
2222
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2222
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2223
2223
|
if response is None:
|
2224
2224
|
return None
|
2225
2225
|
if code != 200:
|
ccxt/async_support/bitvavo.py
CHANGED
@@ -1751,7 +1751,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1751
1751
|
#
|
1752
1752
|
return self.parse_transactions(response, currency, since, limit, {'type': 'deposit'})
|
1753
1753
|
|
1754
|
-
def parse_transaction_status(self, status):
|
1754
|
+
def parse_transaction_status(self, status: Str):
|
1755
1755
|
statuses: dict = {
|
1756
1756
|
'awaiting_processing': 'pending',
|
1757
1757
|
'awaiting_email_confirmation': 'pending',
|
@@ -1945,7 +1945,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1945
1945
|
url = self.urls['api'][api] + url
|
1946
1946
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1947
1947
|
|
1948
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1948
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1949
1949
|
if response is None:
|
1950
1950
|
return None # fallback to default error handler
|
1951
1951
|
#
|
@@ -1083,7 +1083,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
1083
1083
|
headers['Content-Type'] = 'application/json'
|
1084
1084
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1085
1085
|
|
1086
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1086
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1087
1087
|
# {"timestamp":"2021-10-21T15:13:58.837+00:00","status":404,"error":"Not Found","message":"","path":"/orders/505050"
|
1088
1088
|
if response is None:
|
1089
1089
|
return None
|
ccxt/async_support/blofin.py
CHANGED
@@ -368,7 +368,7 @@ class blofin(Exchange, ImplicitAPI):
|
|
368
368
|
data = self.safe_list(response, 'data', [])
|
369
369
|
return self.parse_markets(data)
|
370
370
|
|
371
|
-
def parse_market(self, market) -> Market:
|
371
|
+
def parse_market(self, market: dict) -> Market:
|
372
372
|
id = self.safe_string(market, 'instId')
|
373
373
|
type = self.safe_string_lower(market, 'instType')
|
374
374
|
spot = (type == 'spot')
|
@@ -1499,7 +1499,7 @@ class blofin(Exchange, ImplicitAPI):
|
|
1499
1499
|
},
|
1500
1500
|
}
|
1501
1501
|
|
1502
|
-
def parse_transaction_status(self, status):
|
1502
|
+
def parse_transaction_status(self, status: Str):
|
1503
1503
|
statuses: dict = {
|
1504
1504
|
'0': 'pending',
|
1505
1505
|
'1': 'ok',
|
@@ -2000,7 +2000,7 @@ class blofin(Exchange, ImplicitAPI):
|
|
2000
2000
|
'marginMode': self.safe_string(marginMode, 'marginMode'),
|
2001
2001
|
}
|
2002
2002
|
|
2003
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
2003
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
2004
2004
|
if response is None:
|
2005
2005
|
return None # fallback to default error handler
|
2006
2006
|
#
|