ccxt 4.3.33__py2.py3-none-any.whl → 4.3.35__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- 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 +2 -2
- ccxt/ascendex.py +2 -2
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +2 -2
- ccxt/async_support/alpaca.py +2 -2
- ccxt/async_support/ascendex.py +2 -2
- ccxt/async_support/base/exchange.py +56 -40
- ccxt/async_support/bigone.py +2 -2
- ccxt/async_support/binance.py +6 -5
- ccxt/async_support/bingx.py +4 -3
- 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 +4 -9
- 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 +6 -4
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +3 -3
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +156 -58
- 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 +28 -21
- 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 +3 -3
- 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 +5 -3
- 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 +107 -76
- ccxt/base/types.py +0 -1
- ccxt/bigone.py +2 -2
- ccxt/binance.py +6 -5
- ccxt/bingx.py +4 -3
- 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 +4 -9
- 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 +6 -4
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +3 -3
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +156 -58
- ccxt/coinbaseexchange.py +1 -1
- ccxt/coinbaseinternational.py +3 -3
- ccxt/coincheck.py +2 -2
- ccxt/coinex.py +28 -21
- 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 +3 -3
- 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 +5 -3
- 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/bitget.py +24 -1
- ccxt/pro/bitmart.py +1 -1
- ccxt/pro/bitmex.py +98 -1
- ccxt/pro/bybit.py +82 -1
- ccxt/pro/gate.py +173 -1
- ccxt/pro/kraken.py +1 -1
- ccxt/pro/kucoinfutures.py +4 -0
- ccxt/pro/okx.py +244 -1
- ccxt/probit.py +3 -3
- ccxt/test/base/__init__.py +1 -0
- ccxt/test/base/test_crypto.py +1 -1
- 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.35.dist-info}/METADATA +4 -4
- {ccxt-4.3.33.dist-info → ccxt-4.3.35.dist-info}/RECORD +204 -203
- {ccxt-4.3.33.dist-info → ccxt-4.3.35.dist-info}/WHEEL +0 -0
- {ccxt-4.3.33.dist-info → ccxt-4.3.35.dist-info}/top_level.txt +0 -0
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
@@ -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',
|
@@ -2724,7 +2724,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2724
2724
|
request: dict = {}
|
2725
2725
|
type = None
|
2726
2726
|
type, params = self.handle_market_type_and_params('fetchTickers', market, params)
|
2727
|
-
# Calls like `.
|
2727
|
+
# Calls like `.fetchTickers(None, {subType:'inverse'})` should be supported for self exchange, so
|
2728
2728
|
# as "options.defaultSubType" is also set in exchange options, we should consider `params.subType`
|
2729
2729
|
# with higher priority and only default to spot, if `subType` is not set in params
|
2730
2730
|
passedSubType = self.safe_string(params, 'subType')
|
@@ -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
@@ -1180,14 +1180,9 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1180
1180
|
market = self.safe_market(marketId, market)
|
1181
1181
|
symbol = market['symbol']
|
1182
1182
|
last = self.safe_string_2(ticker, 'close_24h', 'last_price')
|
1183
|
-
percentage = self.safe_string(ticker, 'price_change_percent_24h')
|
1183
|
+
percentage = Precise.string_abs(self.safe_string(ticker, 'price_change_percent_24h'))
|
1184
1184
|
if percentage is None:
|
1185
|
-
|
1186
|
-
if (percentageRaw is not None) and (percentageRaw != '0'): # a few tickers show strictly '0' in fluctuation field
|
1187
|
-
direction = percentageRaw[0]
|
1188
|
-
percentage = direction + Precise.string_mul(percentageRaw.replace(direction, ''), '100')
|
1189
|
-
elif percentageRaw == '0':
|
1190
|
-
percentage = '0'
|
1185
|
+
percentage = Precise.string_abs(Precise.string_mul(self.safe_string(ticker, 'fluctuation'), '100'))
|
1191
1186
|
baseVolume = self.safe_string(ticker, 'base_volume_24h')
|
1192
1187
|
quoteVolume = self.safe_string(ticker, 'quote_volume_24h')
|
1193
1188
|
if quoteVolume is None:
|
@@ -3282,7 +3277,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3282
3277
|
"""
|
3283
3278
|
return await self.fetch_transactions_by_type('withdraw', code, since, limit, params)
|
3284
3279
|
|
3285
|
-
def parse_transaction_status(self, status):
|
3280
|
+
def parse_transaction_status(self, status: Str):
|
3286
3281
|
statuses: dict = {
|
3287
3282
|
'0': 'pending', # Create
|
3288
3283
|
'1': 'pending', # Submitted, waiting for withdrawal
|
@@ -4297,7 +4292,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
4297
4292
|
headers['X-BM-SIGN'] = signature
|
4298
4293
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
4299
4294
|
|
4300
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
4295
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
4301
4296
|
if response is None:
|
4302
4297
|
return None
|
4303
4298
|
#
|
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
|
#
|
ccxt/async_support/btcalpha.py
CHANGED
@@ -186,7 +186,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
186
186
|
#
|
187
187
|
return self.parse_markets(response)
|
188
188
|
|
189
|
-
def parse_market(self, market) -> Market:
|
189
|
+
def parse_market(self, market: dict) -> Market:
|
190
190
|
id = self.safe_string(market, 'name')
|
191
191
|
baseId = self.safe_string(market, 'currency1')
|
192
192
|
quoteId = self.safe_string(market, 'currency2')
|
@@ -544,7 +544,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
544
544
|
'updated': None,
|
545
545
|
}
|
546
546
|
|
547
|
-
def parse_transaction_status(self, status):
|
547
|
+
def parse_transaction_status(self, status: Str):
|
548
548
|
statuses: dict = {
|
549
549
|
'10': 'pending', # New
|
550
550
|
'20': 'pending', # Verified, waiting for approving
|
@@ -866,7 +866,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
866
866
|
headers['X-NONCE'] = str(self.nonce())
|
867
867
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
868
868
|
|
869
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
869
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
870
870
|
if response is None:
|
871
871
|
return None # fallback to default error handler
|
872
872
|
#
|
ccxt/async_support/btcbox.py
CHANGED
@@ -519,7 +519,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
519
519
|
}
|
520
520
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
521
521
|
|
522
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
522
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
523
523
|
if response is None:
|
524
524
|
return None # resort to defaultErrorHandler
|
525
525
|
# typical error response: {"result":false,"code":"401"}
|
ccxt/async_support/btcmarkets.py
CHANGED
@@ -237,7 +237,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
237
237
|
"""
|
238
238
|
return await self.fetch_transactions_with_method('privateGetWithdrawals', code, since, limit, params)
|
239
239
|
|
240
|
-
def parse_transaction_status(self, status):
|
240
|
+
def parse_transaction_status(self, status: Str):
|
241
241
|
statuses: dict = {
|
242
242
|
'Accepted': 'pending',
|
243
243
|
'Pending Authorization': 'pending',
|
@@ -376,7 +376,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
376
376
|
#
|
377
377
|
return self.parse_markets(response)
|
378
378
|
|
379
|
-
def parse_market(self, market) -> Market:
|
379
|
+
def parse_market(self, market: dict) -> Market:
|
380
380
|
baseId = self.safe_string(market, 'baseAssetName')
|
381
381
|
quoteId = self.safe_string(market, 'quoteAssetName')
|
382
382
|
id = self.safe_string(market, 'marketId')
|
@@ -876,7 +876,9 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
876
876
|
"""
|
877
877
|
calculates the presumptive fee that would be charged for an order
|
878
878
|
:param str symbol: unified market symbol
|
879
|
-
:param str type: not used by btcmarkets.
|
879
|
+
:param str type: not used by btcmarkets.calculateFee
|
880
|
+
:param str side: not used by btcmarkets.calculateFee
|
881
|
+
:param float amount: how much you want to trade, in units of the base currency on most exchanges, or number of contracts
|
880
882
|
:param float price: the price for the order to be filled at, in units of the quote currency
|
881
883
|
:param str takerOrMaker: 'taker' or 'maker'
|
882
884
|
:param dict params:
|
@@ -1170,7 +1172,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
1170
1172
|
url = self.urls['api'][api] + request
|
1171
1173
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1172
1174
|
|
1173
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1175
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1174
1176
|
if response is None:
|
1175
1177
|
return None # fallback to default error handler
|
1176
1178
|
if 'success' in response:
|
ccxt/async_support/btcturk.py
CHANGED
@@ -891,7 +891,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
891
891
|
}
|
892
892
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
893
893
|
|
894
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
894
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
895
895
|
errorCode = self.safe_string(response, 'code', '0')
|
896
896
|
message = self.safe_string(response, 'message')
|
897
897
|
output = body if (message is None) else message
|
ccxt/async_support/bybit.py
CHANGED
@@ -2080,7 +2080,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
2080
2080
|
}
|
2081
2081
|
type = None
|
2082
2082
|
type, params = self.handle_market_type_and_params('fetchTickers', market, params)
|
2083
|
-
# Calls like `.
|
2083
|
+
# Calls like `.fetchTickers(None, {subType:'inverse'})` should be supported for self exchange, so
|
2084
2084
|
# as "options.defaultSubType" is also set in exchange options, we should consider `params.subType`
|
2085
2085
|
# with higher priority and only default to spot, if `subType` is not set in params
|
2086
2086
|
passedSubType = self.safe_string(params, 'subType')
|
@@ -5284,7 +5284,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5284
5284
|
data = self.add_pagination_cursor_to_result(response)
|
5285
5285
|
return self.parse_transactions(data, currency, since, limit)
|
5286
5286
|
|
5287
|
-
def parse_transaction_status(self, status):
|
5287
|
+
def parse_transaction_status(self, status: Str):
|
5288
5288
|
statuses: dict = {
|
5289
5289
|
# v3 deposit status
|
5290
5290
|
'0': 'unknown',
|
@@ -8118,7 +8118,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
8118
8118
|
headers['Referer'] = brokerId
|
8119
8119
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
8120
8120
|
|
8121
|
-
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
8121
|
+
def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
8122
8122
|
if not response:
|
8123
8123
|
return None # fallback to default error handler
|
8124
8124
|
#
|
ccxt/async_support/cex.py
CHANGED
@@ -1585,7 +1585,7 @@ class cex(Exchange, ImplicitAPI):
|
|
1585
1585
|
}
|
1586
1586
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1587
1587
|
|
1588
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1588
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1589
1589
|
if isinstance(response, list):
|
1590
1590
|
return response # public endpoints may return []-arrays
|
1591
1591
|
if body == 'true':
|