ccxt 4.3.30__py2.py3-none-any.whl → 4.3.31__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccxt/__init__.py +1 -1
- ccxt/abstract/binance.py +2 -0
- ccxt/abstract/binancecoinm.py +2 -0
- ccxt/abstract/binanceus.py +2 -0
- ccxt/abstract/binanceusdm.py +2 -0
- ccxt/ace.py +14 -14
- ccxt/alpaca.py +16 -16
- ccxt/ascendex.py +46 -46
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +14 -14
- ccxt/async_support/alpaca.py +16 -16
- ccxt/async_support/ascendex.py +46 -46
- ccxt/async_support/base/exchange.py +23 -23
- ccxt/async_support/bigone.py +32 -32
- ccxt/async_support/binance.py +105 -96
- ccxt/async_support/bingx.py +21 -21
- ccxt/async_support/bit2c.py +13 -13
- ccxt/async_support/bitbank.py +19 -19
- ccxt/async_support/bitbns.py +17 -17
- ccxt/async_support/bitfinex.py +24 -24
- ccxt/async_support/bitfinex2.py +142 -109
- ccxt/async_support/bitflyer.py +23 -23
- ccxt/async_support/bitget.py +76 -76
- ccxt/async_support/bithumb.py +20 -20
- ccxt/async_support/bitmart.py +55 -55
- ccxt/async_support/bitmex.py +41 -41
- ccxt/async_support/bitopro.py +30 -30
- ccxt/async_support/bitrue.py +37 -37
- ccxt/async_support/bitso.py +30 -30
- ccxt/async_support/bitstamp.py +31 -31
- ccxt/async_support/bitteam.py +26 -26
- ccxt/async_support/bitvavo.py +27 -27
- ccxt/async_support/bl3p.py +8 -8
- ccxt/async_support/blockchaincom.py +24 -24
- ccxt/async_support/blofin.py +37 -37
- ccxt/async_support/btcalpha.py +19 -19
- ccxt/async_support/btcbox.py +11 -11
- ccxt/async_support/btcmarkets.py +22 -22
- ccxt/async_support/btcturk.py +13 -13
- ccxt/async_support/bybit.py +96 -96
- ccxt/async_support/cex.py +21 -21
- ccxt/async_support/coinbase.py +53 -53
- ccxt/async_support/coinbaseexchange.py +29 -29
- ccxt/async_support/coinbaseinternational.py +32 -32
- ccxt/async_support/coincheck.py +14 -14
- ccxt/async_support/coinex.py +168 -139
- ccxt/async_support/coinlist.py +35 -35
- ccxt/async_support/coinmate.py +22 -22
- ccxt/async_support/coinmetro.py +22 -22
- ccxt/async_support/coinone.py +18 -18
- ccxt/async_support/coinsph.py +32 -32
- ccxt/async_support/coinspot.py +8 -8
- ccxt/async_support/cryptocom.py +43 -43
- ccxt/async_support/currencycom.py +33 -33
- ccxt/async_support/delta.py +35 -35
- ccxt/async_support/deribit.py +54 -54
- ccxt/async_support/digifinex.py +56 -56
- ccxt/async_support/exmo.py +34 -34
- ccxt/async_support/gate.py +60 -60
- ccxt/async_support/gemini.py +24 -24
- ccxt/async_support/hitbtc.py +51 -51
- ccxt/async_support/hollaex.py +29 -29
- ccxt/async_support/htx.py +73 -73
- ccxt/async_support/huobijp.py +30 -30
- ccxt/async_support/hyperliquid.py +58 -58
- ccxt/async_support/idex.py +33 -33
- ccxt/async_support/independentreserve.py +12 -12
- ccxt/async_support/indodax.py +21 -21
- ccxt/async_support/kraken.py +46 -51
- ccxt/async_support/krakenfutures.py +29 -29
- ccxt/async_support/kucoin.py +51 -51
- ccxt/async_support/kucoinfutures.py +33 -33
- ccxt/async_support/kuna.py +27 -27
- ccxt/async_support/latoken.py +27 -27
- ccxt/async_support/lbank.py +35 -35
- ccxt/async_support/luno.py +19 -19
- ccxt/async_support/lykke.py +20 -20
- ccxt/async_support/mercado.py +17 -17
- ccxt/async_support/mexc.py +64 -64
- ccxt/async_support/ndax.py +38 -38
- ccxt/async_support/novadax.py +26 -26
- ccxt/async_support/oceanex.py +21 -21
- ccxt/async_support/okcoin.py +35 -35
- ccxt/async_support/okx.py +85 -85
- ccxt/async_support/onetrading.py +32 -32
- ccxt/async_support/p2b.py +14 -14
- ccxt/async_support/paymium.py +12 -12
- ccxt/async_support/phemex.py +50 -50
- ccxt/async_support/poloniex.py +35 -35
- ccxt/async_support/poloniexfutures.py +25 -21
- ccxt/async_support/probit.py +30 -30
- ccxt/async_support/timex.py +22 -22
- ccxt/async_support/tokocrypto.py +26 -26
- ccxt/async_support/tradeogre.py +12 -12
- ccxt/async_support/upbit.py +28 -28
- ccxt/async_support/wavesexchange.py +33 -33
- ccxt/async_support/wazirx.py +21 -21
- ccxt/async_support/whitebit.py +37 -37
- ccxt/async_support/woo.py +51 -51
- ccxt/async_support/woofipro.py +46 -46
- ccxt/async_support/yobit.py +20 -20
- ccxt/async_support/zaif.py +12 -12
- ccxt/async_support/zonda.py +22 -22
- ccxt/base/exchange.py +35 -35
- ccxt/base/types.py +13 -0
- ccxt/bigone.py +32 -32
- ccxt/binance.py +105 -96
- ccxt/bingx.py +21 -21
- ccxt/bit2c.py +13 -13
- ccxt/bitbank.py +19 -19
- ccxt/bitbns.py +17 -17
- ccxt/bitfinex.py +24 -24
- ccxt/bitfinex2.py +142 -109
- ccxt/bitflyer.py +23 -23
- ccxt/bitget.py +76 -76
- ccxt/bithumb.py +20 -20
- ccxt/bitmart.py +55 -55
- ccxt/bitmex.py +41 -41
- ccxt/bitopro.py +30 -30
- ccxt/bitrue.py +37 -37
- ccxt/bitso.py +30 -30
- ccxt/bitstamp.py +31 -31
- ccxt/bitteam.py +26 -26
- ccxt/bitvavo.py +27 -27
- ccxt/bl3p.py +8 -8
- ccxt/blockchaincom.py +24 -24
- ccxt/blofin.py +37 -37
- ccxt/btcalpha.py +19 -19
- ccxt/btcbox.py +11 -11
- ccxt/btcmarkets.py +22 -22
- ccxt/btcturk.py +13 -13
- ccxt/bybit.py +96 -96
- ccxt/cex.py +21 -21
- ccxt/coinbase.py +53 -53
- ccxt/coinbaseexchange.py +29 -29
- ccxt/coinbaseinternational.py +32 -32
- ccxt/coincheck.py +14 -14
- ccxt/coinex.py +168 -139
- ccxt/coinlist.py +35 -35
- ccxt/coinmate.py +22 -22
- ccxt/coinmetro.py +22 -22
- ccxt/coinone.py +18 -18
- ccxt/coinsph.py +32 -32
- ccxt/coinspot.py +8 -8
- ccxt/cryptocom.py +43 -43
- ccxt/currencycom.py +33 -33
- ccxt/delta.py +35 -35
- ccxt/deribit.py +54 -54
- ccxt/digifinex.py +56 -56
- ccxt/exmo.py +34 -34
- ccxt/gate.py +60 -60
- ccxt/gemini.py +24 -24
- ccxt/hitbtc.py +51 -51
- ccxt/hollaex.py +29 -29
- ccxt/htx.py +73 -73
- ccxt/huobijp.py +30 -30
- ccxt/hyperliquid.py +58 -58
- ccxt/idex.py +33 -33
- ccxt/independentreserve.py +12 -12
- ccxt/indodax.py +21 -21
- ccxt/kraken.py +46 -51
- ccxt/krakenfutures.py +29 -29
- ccxt/kucoin.py +51 -51
- ccxt/kucoinfutures.py +33 -33
- ccxt/kuna.py +27 -27
- ccxt/latoken.py +27 -27
- ccxt/lbank.py +35 -35
- ccxt/luno.py +19 -19
- ccxt/lykke.py +20 -20
- ccxt/mercado.py +17 -17
- ccxt/mexc.py +64 -64
- ccxt/ndax.py +38 -38
- ccxt/novadax.py +26 -26
- ccxt/oceanex.py +21 -21
- ccxt/okcoin.py +35 -35
- ccxt/okx.py +85 -85
- ccxt/onetrading.py +32 -32
- ccxt/p2b.py +14 -14
- ccxt/paymium.py +12 -12
- ccxt/phemex.py +50 -50
- ccxt/poloniex.py +35 -35
- ccxt/poloniexfutures.py +25 -21
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +8 -8
- ccxt/pro/ascendex.py +4 -4
- ccxt/pro/binance.py +56 -56
- ccxt/pro/bingx.py +5 -5
- ccxt/pro/bitfinex.py +6 -6
- ccxt/pro/bitfinex2.py +10 -10
- ccxt/pro/bitget.py +17 -17
- ccxt/pro/bithumb.py +6 -6
- ccxt/pro/bitmart.py +8 -8
- ccxt/pro/bitmex.py +16 -16
- ccxt/pro/bitopro.py +4 -4
- ccxt/pro/bitrue.py +8 -8
- ccxt/pro/bitstamp.py +5 -5
- ccxt/pro/bitvavo.py +14 -14
- ccxt/pro/blockchaincom.py +7 -7
- ccxt/pro/bybit.py +12 -12
- ccxt/pro/cex.py +19 -19
- ccxt/pro/coinbase.py +2 -2
- ccxt/pro/coinbaseexchange.py +10 -10
- ccxt/pro/coinbaseinternational.py +4 -4
- ccxt/pro/coincheck.py +2 -2
- ccxt/pro/coinex.py +15 -15
- ccxt/pro/coinone.py +4 -4
- ccxt/pro/cryptocom.py +11 -11
- ccxt/pro/currencycom.py +4 -4
- ccxt/pro/deribit.py +9 -9
- ccxt/pro/exmo.py +9 -9
- ccxt/pro/gate.py +12 -12
- ccxt/pro/gemini.py +11 -11
- ccxt/pro/hitbtc.py +13 -13
- ccxt/pro/hollaex.py +6 -6
- ccxt/pro/htx.py +15 -15
- ccxt/pro/huobijp.py +16 -16
- ccxt/pro/hyperliquid.py +9 -9
- ccxt/pro/idex.py +12 -12
- ccxt/pro/independentreserve.py +2 -2
- ccxt/pro/kraken.py +14 -14
- ccxt/pro/krakenfutures.py +12 -12
- ccxt/pro/kucoin.py +12 -12
- ccxt/pro/kucoinfutures.py +16 -16
- ccxt/pro/lbank.py +12 -12
- ccxt/pro/luno.py +4 -4
- ccxt/pro/mexc.py +14 -14
- ccxt/pro/ndax.py +12 -12
- ccxt/pro/okcoin.py +6 -6
- ccxt/pro/okx.py +30 -30
- ccxt/pro/onetrading.py +13 -13
- ccxt/pro/p2b.py +2 -2
- ccxt/pro/phemex.py +9 -9
- ccxt/pro/poloniex.py +9 -9
- ccxt/pro/poloniexfutures.py +10 -10
- ccxt/pro/probit.py +8 -8
- ccxt/pro/upbit.py +1 -1
- ccxt/pro/wazirx.py +10 -10
- ccxt/pro/whitebit.py +8 -8
- ccxt/pro/woo.py +14 -14
- ccxt/pro/woofipro.py +14 -14
- ccxt/probit.py +30 -30
- ccxt/test/base/test_shared_methods.py +1 -0
- ccxt/timex.py +22 -22
- ccxt/tokocrypto.py +26 -26
- ccxt/tradeogre.py +12 -12
- ccxt/upbit.py +28 -28
- ccxt/wavesexchange.py +33 -33
- ccxt/wazirx.py +21 -21
- ccxt/whitebit.py +37 -37
- ccxt/woo.py +51 -51
- ccxt/woofipro.py +46 -46
- ccxt/yobit.py +20 -20
- ccxt/zaif.py +12 -12
- ccxt/zonda.py +22 -22
- {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/METADATA +4 -4
- {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/RECORD +258 -258
- {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/WHEEL +0 -0
- {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/top_level.txt +0 -0
ccxt/async_support/bitrue.py
CHANGED
@@ -524,7 +524,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
524
524
|
|
525
525
|
def safe_network(self, networkId):
|
526
526
|
uppercaseNetworkId = networkId.upper()
|
527
|
-
networksById = {
|
527
|
+
networksById: dict = {
|
528
528
|
'Aeternity': 'Aeternity',
|
529
529
|
'AION': 'AION',
|
530
530
|
'Algorand': 'Algorand',
|
@@ -646,7 +646,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
646
646
|
# ],
|
647
647
|
# }
|
648
648
|
#
|
649
|
-
result = {}
|
649
|
+
result: dict = {}
|
650
650
|
coins = self.safe_value(response, 'coins', [])
|
651
651
|
for i in range(0, len(coins)):
|
652
652
|
currency = coins[i]
|
@@ -659,7 +659,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
659
659
|
maxWithdrawString = None
|
660
660
|
minWithdrawFeeString = None
|
661
661
|
networkDetails = self.safe_value(currency, 'chainDetail', [])
|
662
|
-
networks = {}
|
662
|
+
networks: dict = {}
|
663
663
|
for j in range(0, len(networkDetails)):
|
664
664
|
entry = networkDetails[j]
|
665
665
|
networkId = self.safe_string(entry, 'chain')
|
@@ -956,7 +956,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
956
956
|
# ]
|
957
957
|
# }
|
958
958
|
#
|
959
|
-
result = {
|
959
|
+
result: dict = {
|
960
960
|
'info': response,
|
961
961
|
}
|
962
962
|
timestamp = self.safe_integer(response, 'updateTime')
|
@@ -1095,7 +1095,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1095
1095
|
market = self.market(symbol)
|
1096
1096
|
response = None
|
1097
1097
|
if market['swap']:
|
1098
|
-
request = {
|
1098
|
+
request: dict = {
|
1099
1099
|
'contractName': market['id'],
|
1100
1100
|
}
|
1101
1101
|
if limit is not None:
|
@@ -1107,7 +1107,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1107
1107
|
elif market['inverse']:
|
1108
1108
|
response = await self.dapiV1PublicGetDepth(self.extend(request, params))
|
1109
1109
|
elif market['spot']:
|
1110
|
-
request = {
|
1110
|
+
request: dict = {
|
1111
1111
|
'symbol': market['id'],
|
1112
1112
|
}
|
1113
1113
|
if limit is not None:
|
@@ -1229,7 +1229,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1229
1229
|
response = None
|
1230
1230
|
data = None
|
1231
1231
|
if market['swap']:
|
1232
|
-
request = {
|
1232
|
+
request: dict = {
|
1233
1233
|
'contractName': market['id'],
|
1234
1234
|
}
|
1235
1235
|
if market['linear']:
|
@@ -1238,7 +1238,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1238
1238
|
response = await self.dapiV1PublicGetTicker(self.extend(request, params))
|
1239
1239
|
data = response
|
1240
1240
|
elif market['spot']:
|
1241
|
-
request = {
|
1241
|
+
request: dict = {
|
1242
1242
|
'symbol': market['id'],
|
1243
1243
|
}
|
1244
1244
|
response = await self.spotV1PublicGetTicker24hr(self.extend(request, params))
|
@@ -1305,7 +1305,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1305
1305
|
data = None
|
1306
1306
|
if market['swap']:
|
1307
1307
|
timeframesFuture = self.safe_value(timeframes, 'future', {})
|
1308
|
-
request = {
|
1308
|
+
request: dict = {
|
1309
1309
|
'contractName': market['id'],
|
1310
1310
|
# 1min / 5min / 15min / 30min / 1h / 1day / 1week / 1month
|
1311
1311
|
'interval': self.safe_string(timeframesFuture, timeframe, '1min'),
|
@@ -1319,7 +1319,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1319
1319
|
data = response
|
1320
1320
|
elif market['spot']:
|
1321
1321
|
timeframesSpot = self.safe_value(timeframes, 'spot', {})
|
1322
|
-
request = {
|
1322
|
+
request: dict = {
|
1323
1323
|
'symbol': market['id'],
|
1324
1324
|
# 1m / 5m / 15m / 30m / 1H / 2H / 4H / 12H / 1D / 1W
|
1325
1325
|
'scale': self.safe_string(timeframesSpot, timeframe, '1m'),
|
@@ -1419,7 +1419,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1419
1419
|
market = self.market(first)
|
1420
1420
|
response = None
|
1421
1421
|
if market['swap']:
|
1422
|
-
request = {
|
1422
|
+
request: dict = {
|
1423
1423
|
'contractName': market['id'],
|
1424
1424
|
}
|
1425
1425
|
if market['linear']:
|
@@ -1427,7 +1427,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1427
1427
|
elif market['inverse']:
|
1428
1428
|
response = await self.dapiV1PublicGetTicker(self.extend(request, params))
|
1429
1429
|
elif market['spot']:
|
1430
|
-
request = {
|
1430
|
+
request: dict = {
|
1431
1431
|
'symbol': market['id'],
|
1432
1432
|
}
|
1433
1433
|
response = await self.spotV1PublicGetTickerBookTicker(self.extend(request, params))
|
@@ -1457,7 +1457,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1457
1457
|
# "time": 1699348013000
|
1458
1458
|
# }
|
1459
1459
|
#
|
1460
|
-
data = {}
|
1460
|
+
data: dict = {}
|
1461
1461
|
data[market['id']] = response
|
1462
1462
|
return self.parse_tickers(data, symbols)
|
1463
1463
|
|
@@ -1475,7 +1475,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1475
1475
|
symbols = self.market_symbols(symbols)
|
1476
1476
|
response = None
|
1477
1477
|
data = None
|
1478
|
-
request = {}
|
1478
|
+
request: dict = {}
|
1479
1479
|
type = None
|
1480
1480
|
if symbols is not None:
|
1481
1481
|
first = self.safe_string(symbols, 0)
|
@@ -1534,14 +1534,14 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1534
1534
|
# the exchange returns market ids with an underscore from the tickers endpoint
|
1535
1535
|
# the market ids do not have an underscore, so it has to be removed
|
1536
1536
|
# https://github.com/ccxt/ccxt/issues/13856
|
1537
|
-
tickers = {}
|
1537
|
+
tickers: dict = {}
|
1538
1538
|
for i in range(0, len(data)):
|
1539
1539
|
ticker = self.safe_value(data, i, {})
|
1540
1540
|
market = self.market(self.safe_value(ticker, 'symbol'))
|
1541
1541
|
tickers[market['id']] = ticker
|
1542
1542
|
return self.parse_tickers(tickers, symbols)
|
1543
1543
|
|
1544
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1544
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
1545
1545
|
#
|
1546
1546
|
# fetchTrades
|
1547
1547
|
#
|
@@ -1644,7 +1644,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1644
1644
|
market = self.market(symbol)
|
1645
1645
|
response = None
|
1646
1646
|
if market['spot']:
|
1647
|
-
request = {
|
1647
|
+
request: dict = {
|
1648
1648
|
'symbol': market['id'],
|
1649
1649
|
# 'limit': 100, # default 100, max = 1000
|
1650
1650
|
}
|
@@ -1669,8 +1669,8 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1669
1669
|
#
|
1670
1670
|
return self.parse_trades(response, market, since, limit)
|
1671
1671
|
|
1672
|
-
def parse_order_status(self, status):
|
1673
|
-
statuses = {
|
1672
|
+
def parse_order_status(self, status: Str):
|
1673
|
+
statuses: dict = {
|
1674
1674
|
'INIT': 'open',
|
1675
1675
|
'PENDING_CREATE': 'open',
|
1676
1676
|
'NEW': 'open',
|
@@ -1683,7 +1683,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1683
1683
|
}
|
1684
1684
|
return self.safe_string(statuses, status, status)
|
1685
1685
|
|
1686
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1686
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1687
1687
|
#
|
1688
1688
|
# createOrder - spot
|
1689
1689
|
#
|
@@ -1843,7 +1843,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1843
1843
|
response = None
|
1844
1844
|
data = None
|
1845
1845
|
uppercaseType = type.upper()
|
1846
|
-
request = {
|
1846
|
+
request: dict = {
|
1847
1847
|
'side': side.upper(),
|
1848
1848
|
'type': uppercaseType,
|
1849
1849
|
# 'timeInForce': '',
|
@@ -1954,7 +1954,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1954
1954
|
params = self.omit(params, ['origClientOrderId', 'clientOrderId'])
|
1955
1955
|
response = None
|
1956
1956
|
data = None
|
1957
|
-
request = {}
|
1957
|
+
request: dict = {}
|
1958
1958
|
if origClientOrderId is None:
|
1959
1959
|
request['orderId'] = id
|
1960
1960
|
else:
|
@@ -2037,7 +2037,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2037
2037
|
market = self.market(symbol)
|
2038
2038
|
if not market['spot']:
|
2039
2039
|
raise NotSupported(self.id + ' fetchClosedOrders only support spot markets')
|
2040
|
-
request = {
|
2040
|
+
request: dict = {
|
2041
2041
|
'symbol': market['id'],
|
2042
2042
|
# 'orderId': 123445, # long
|
2043
2043
|
# 'startTime': since,
|
@@ -2091,7 +2091,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2091
2091
|
market = self.market(symbol)
|
2092
2092
|
response = None
|
2093
2093
|
data = None
|
2094
|
-
request = {}
|
2094
|
+
request: dict = {}
|
2095
2095
|
if market['swap']:
|
2096
2096
|
request['contractName'] = market['id']
|
2097
2097
|
if market['linear']:
|
@@ -2172,7 +2172,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2172
2172
|
params = self.omit(params, ['origClientOrderId', 'clientOrderId'])
|
2173
2173
|
response = None
|
2174
2174
|
data = None
|
2175
|
-
request = {}
|
2175
|
+
request: dict = {}
|
2176
2176
|
if origClientOrderId is None:
|
2177
2177
|
request['orderId'] = id
|
2178
2178
|
else:
|
@@ -2230,7 +2230,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2230
2230
|
response = None
|
2231
2231
|
data = None
|
2232
2232
|
if market['swap']:
|
2233
|
-
request = {
|
2233
|
+
request: dict = {
|
2234
2234
|
'contractName': market['id'],
|
2235
2235
|
}
|
2236
2236
|
if market['linear']:
|
@@ -2269,7 +2269,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2269
2269
|
market = self.market(symbol)
|
2270
2270
|
response = None
|
2271
2271
|
data = None
|
2272
|
-
request = {}
|
2272
|
+
request: dict = {}
|
2273
2273
|
if since is not None:
|
2274
2274
|
request['startTime'] = since
|
2275
2275
|
if limit is not None:
|
@@ -2350,7 +2350,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2350
2350
|
raise ArgumentsRequired(self.id + ' fetchDeposits() requires a code argument')
|
2351
2351
|
await self.load_markets()
|
2352
2352
|
currency = self.currency(code)
|
2353
|
-
request = {
|
2353
|
+
request: dict = {
|
2354
2354
|
'coin': currency['id'],
|
2355
2355
|
'status': 1, # 0 init, 1 finished, default 0
|
2356
2356
|
# 'offset': 0,
|
@@ -2417,7 +2417,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2417
2417
|
raise ArgumentsRequired(self.id + ' fetchWithdrawals() requires a code argument')
|
2418
2418
|
await self.load_markets()
|
2419
2419
|
currency = self.currency(code)
|
2420
|
-
request = {
|
2420
|
+
request: dict = {
|
2421
2421
|
'coin': currency['id'],
|
2422
2422
|
'status': 5, # 0 init, 5 finished, 6 canceled, default 0
|
2423
2423
|
# 'offset': 0,
|
@@ -2458,7 +2458,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2458
2458
|
return self.parse_transactions(data, currency)
|
2459
2459
|
|
2460
2460
|
def parse_transaction_status_by_type(self, status, type=None):
|
2461
|
-
statusesByType = {
|
2461
|
+
statusesByType: dict = {
|
2462
2462
|
'deposit': {
|
2463
2463
|
'0': 'pending',
|
2464
2464
|
'1': 'ok',
|
@@ -2472,7 +2472,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2472
2472
|
statuses = self.safe_value(statusesByType, type, {})
|
2473
2473
|
return self.safe_string(statuses, status, status)
|
2474
2474
|
|
2475
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2475
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
2476
2476
|
#
|
2477
2477
|
# fetchDeposits
|
2478
2478
|
#
|
@@ -2607,7 +2607,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2607
2607
|
self.check_address(address)
|
2608
2608
|
await self.load_markets()
|
2609
2609
|
currency = self.currency(code)
|
2610
|
-
request = {
|
2610
|
+
request: dict = {
|
2611
2611
|
'coin': currency['id'],
|
2612
2612
|
'amount': amount,
|
2613
2613
|
'addressTo': address,
|
@@ -2652,7 +2652,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2652
2652
|
#
|
2653
2653
|
chainDetails = self.safe_value(fee, 'chainDetail', [])
|
2654
2654
|
chainDetailLength = len(chainDetails)
|
2655
|
-
result = {
|
2655
|
+
result: dict = {
|
2656
2656
|
'info': fee,
|
2657
2657
|
'withdraw': {
|
2658
2658
|
'fee': None,
|
@@ -2743,7 +2743,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2743
2743
|
"""
|
2744
2744
|
await self.load_markets()
|
2745
2745
|
type = self.safe_string_2(params, 'type', 'transferType')
|
2746
|
-
request = {
|
2746
|
+
request: dict = {
|
2747
2747
|
'transferType': type,
|
2748
2748
|
}
|
2749
2749
|
currency = None
|
@@ -2794,7 +2794,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2794
2794
|
accountTypes = self.safe_value(self.options, 'accountsByType', {})
|
2795
2795
|
fromId = self.safe_string(accountTypes, fromAccount, fromAccount)
|
2796
2796
|
toId = self.safe_string(accountTypes, toAccount, toAccount)
|
2797
|
-
request = {
|
2797
|
+
request: dict = {
|
2798
2798
|
'coinSymbol': currency['id'],
|
2799
2799
|
'amount': self.currency_to_precision(code, amount),
|
2800
2800
|
'transferType': fromId + '_to_' + toId,
|
@@ -2827,7 +2827,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2827
2827
|
await self.load_markets()
|
2828
2828
|
market = self.market(symbol)
|
2829
2829
|
response = None
|
2830
|
-
request = {
|
2830
|
+
request: dict = {
|
2831
2831
|
'contractName': market['id'],
|
2832
2832
|
'leverage': leverage,
|
2833
2833
|
}
|
@@ -2877,7 +2877,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2877
2877
|
if not market['swap']:
|
2878
2878
|
raise NotSupported(self.id + ' setMargin only support swap markets')
|
2879
2879
|
response = None
|
2880
|
-
request = {
|
2880
|
+
request: dict = {
|
2881
2881
|
'contractName': market['id'],
|
2882
2882
|
'amount': self.parse_to_numeric(amount),
|
2883
2883
|
}
|
ccxt/async_support/bitso.py
CHANGED
@@ -201,7 +201,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
201
201
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
202
202
|
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
|
203
203
|
"""
|
204
|
-
request = {}
|
204
|
+
request: dict = {}
|
205
205
|
if limit is not None:
|
206
206
|
request['limit'] = limit
|
207
207
|
response = await self.privateGetLedger(self.extend(request, params))
|
@@ -233,7 +233,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
233
233
|
return self.parse_ledger(payload, currency, since, limit)
|
234
234
|
|
235
235
|
def parse_ledger_entry_type(self, type):
|
236
|
-
types = {
|
236
|
+
types: dict = {
|
237
237
|
'funding': 'transaction',
|
238
238
|
'withdrawal': 'transaction',
|
239
239
|
'trade': 'trade',
|
@@ -241,7 +241,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
241
241
|
}
|
242
242
|
return self.safe_string(types, type, type)
|
243
243
|
|
244
|
-
def parse_ledger_entry(self, item, currency: Currency = None):
|
244
|
+
def parse_ledger_entry(self, item: dict, currency: Currency = None):
|
245
245
|
#
|
246
246
|
# {
|
247
247
|
# "eid": "2510b3e2bc1c87f584500a18084f35ed",
|
@@ -416,7 +416,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
416
416
|
if j == 0:
|
417
417
|
fee['taker'] = takerFee
|
418
418
|
fee['maker'] = makerFee
|
419
|
-
tiers = {
|
419
|
+
tiers: dict = {
|
420
420
|
'taker': takerFees,
|
421
421
|
'maker': makerFees,
|
422
422
|
}
|
@@ -479,7 +479,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
479
479
|
def parse_balance(self, response) -> Balances:
|
480
480
|
payload = self.safe_value(response, 'payload', {})
|
481
481
|
balances = self.safe_value(payload, 'balances', [])
|
482
|
-
result = {
|
482
|
+
result: dict = {
|
483
483
|
'info': response,
|
484
484
|
'timestamp': None,
|
485
485
|
'datetime': None,
|
@@ -542,7 +542,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
542
542
|
"""
|
543
543
|
await self.load_markets()
|
544
544
|
market = self.market(symbol)
|
545
|
-
request = {
|
545
|
+
request: dict = {
|
546
546
|
'book': market['id'],
|
547
547
|
}
|
548
548
|
response = await self.publicGetOrderBook(self.extend(request, params))
|
@@ -604,7 +604,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
604
604
|
"""
|
605
605
|
await self.load_markets()
|
606
606
|
market = self.market(symbol)
|
607
|
-
request = {
|
607
|
+
request: dict = {
|
608
608
|
'book': market['id'],
|
609
609
|
}
|
610
610
|
response = await self.publicGetTicker(self.extend(request, params))
|
@@ -640,7 +640,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
640
640
|
"""
|
641
641
|
await self.load_markets()
|
642
642
|
market = self.market(symbol)
|
643
|
-
request = {
|
643
|
+
request: dict = {
|
644
644
|
'book': market['id'],
|
645
645
|
'time_bucket': self.safe_string(self.timeframes, timeframe, timeframe),
|
646
646
|
}
|
@@ -700,7 +700,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
700
700
|
self.safe_number(ohlcv, 'volume'),
|
701
701
|
]
|
702
702
|
|
703
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
703
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
704
704
|
#
|
705
705
|
# fetchTrades(public)
|
706
706
|
#
|
@@ -811,7 +811,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
811
811
|
"""
|
812
812
|
await self.load_markets()
|
813
813
|
market = self.market(symbol)
|
814
|
-
request = {
|
814
|
+
request: dict = {
|
815
815
|
'book': market['id'],
|
816
816
|
}
|
817
817
|
response = await self.publicGetTrades(self.extend(request, params))
|
@@ -871,7 +871,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
871
871
|
#
|
872
872
|
payload = self.safe_value(response, 'payload', {})
|
873
873
|
fees = self.safe_value(payload, 'fees', [])
|
874
|
-
result = {}
|
874
|
+
result: dict = {}
|
875
875
|
for i in range(0, len(fees)):
|
876
876
|
fee = fees[i]
|
877
877
|
marketId = self.safe_string(fee, 'book')
|
@@ -911,7 +911,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
911
911
|
params = self.extend(params, {
|
912
912
|
'marker': int(params['marker']),
|
913
913
|
})
|
914
|
-
request = {
|
914
|
+
request: dict = {
|
915
915
|
'book': market['id'],
|
916
916
|
'limit': limit, # default = 25, max = 100
|
917
917
|
# 'sort': 'desc', # default = desc
|
@@ -934,7 +934,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
934
934
|
"""
|
935
935
|
await self.load_markets()
|
936
936
|
market = self.market(symbol)
|
937
|
-
request = {
|
937
|
+
request: dict = {
|
938
938
|
'book': market['id'],
|
939
939
|
'side': side,
|
940
940
|
'type': type,
|
@@ -959,7 +959,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
959
959
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
960
960
|
"""
|
961
961
|
await self.load_markets()
|
962
|
-
request = {
|
962
|
+
request: dict = {
|
963
963
|
'oid': id,
|
964
964
|
}
|
965
965
|
return await self.privateDeleteOrdersOid(self.extend(request, params))
|
@@ -979,7 +979,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
979
979
|
if symbol is not None:
|
980
980
|
market = self.market(symbol)
|
981
981
|
oids = ','.join(ids)
|
982
|
-
request = {
|
982
|
+
request: dict = {
|
983
983
|
'oids': oids,
|
984
984
|
}
|
985
985
|
response = await self.privateDeleteOrders(self.extend(request, params))
|
@@ -1020,8 +1020,8 @@ class bitso(Exchange, ImplicitAPI):
|
|
1020
1020
|
canceledOrders.append(order)
|
1021
1021
|
return canceledOrders
|
1022
1022
|
|
1023
|
-
def parse_order_status(self, status):
|
1024
|
-
statuses = {
|
1023
|
+
def parse_order_status(self, status: Str):
|
1024
|
+
statuses: dict = {
|
1025
1025
|
'partial-fill': 'open', # self is a common substitution in ccxt
|
1026
1026
|
'partially filled': 'open',
|
1027
1027
|
'queued': 'open',
|
@@ -1029,7 +1029,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1029
1029
|
}
|
1030
1030
|
return self.safe_string(statuses, status, status)
|
1031
1031
|
|
1032
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1032
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1033
1033
|
#
|
1034
1034
|
#
|
1035
1035
|
# canceledOrder
|
@@ -1100,7 +1100,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1100
1100
|
params = self.extend(params, {
|
1101
1101
|
'marker': int(params['marker']),
|
1102
1102
|
})
|
1103
|
-
request = {
|
1103
|
+
request: dict = {
|
1104
1104
|
'book': market['id'],
|
1105
1105
|
'limit': limit, # default = 25, max = 100
|
1106
1106
|
# 'sort': 'desc', # default = desc
|
@@ -1142,7 +1142,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1142
1142
|
"""
|
1143
1143
|
await self.load_markets()
|
1144
1144
|
market = self.market(symbol)
|
1145
|
-
request = {
|
1145
|
+
request: dict = {
|
1146
1146
|
'oid': id,
|
1147
1147
|
}
|
1148
1148
|
response = await self.privateGetOrderTradesOid(self.extend(request, params))
|
@@ -1158,7 +1158,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1158
1158
|
:returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1159
1159
|
"""
|
1160
1160
|
await self.load_markets()
|
1161
|
-
request = {
|
1161
|
+
request: dict = {
|
1162
1162
|
'fid': id,
|
1163
1163
|
}
|
1164
1164
|
response = await self.privateGetFundingsFid(self.extend(request, params))
|
@@ -1239,7 +1239,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1239
1239
|
"""
|
1240
1240
|
await self.load_markets()
|
1241
1241
|
currency = self.currency(code)
|
1242
|
-
request = {
|
1242
|
+
request: dict = {
|
1243
1243
|
'fund_currency': currency['id'],
|
1244
1244
|
}
|
1245
1245
|
response = await self.privateGetFundingDestination(self.extend(request, params))
|
@@ -1258,7 +1258,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1258
1258
|
'info': response,
|
1259
1259
|
}
|
1260
1260
|
|
1261
|
-
async def fetch_transaction_fees(self, codes:
|
1261
|
+
async def fetch_transaction_fees(self, codes: Strings = None, params={}):
|
1262
1262
|
"""
|
1263
1263
|
* @deprecated
|
1264
1264
|
please use fetchDepositWithdrawFees instead
|
@@ -1312,7 +1312,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1312
1312
|
# }
|
1313
1313
|
# }
|
1314
1314
|
#
|
1315
|
-
result = {}
|
1315
|
+
result: dict = {}
|
1316
1316
|
payload = self.safe_value(response, 'payload', {})
|
1317
1317
|
depositFees = self.safe_value(payload, 'deposit_fees', [])
|
1318
1318
|
for i in range(0, len(depositFees)):
|
@@ -1443,7 +1443,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1443
1443
|
# }
|
1444
1444
|
# }
|
1445
1445
|
#
|
1446
|
-
result = {}
|
1446
|
+
result: dict = {}
|
1447
1447
|
depositResponse = self.safe_value(response, 'deposit_fees', [])
|
1448
1448
|
withdrawalResponse = self.safe_value(response, 'withdrawal_fees', [])
|
1449
1449
|
for i in range(0, len(depositResponse)):
|
@@ -1489,7 +1489,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1489
1489
|
tag, params = self.handle_withdraw_tag_and_params(tag, params)
|
1490
1490
|
self.check_address(address)
|
1491
1491
|
await self.load_markets()
|
1492
|
-
methods = {
|
1492
|
+
methods: dict = {
|
1493
1493
|
'BTC': 'Bitcoin',
|
1494
1494
|
'ETH': 'Ether',
|
1495
1495
|
'XRP': 'Ripple',
|
@@ -1500,7 +1500,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1500
1500
|
method = methods[code] if (code in methods) else None
|
1501
1501
|
if method is None:
|
1502
1502
|
raise ExchangeError(self.id + ' not valid withdraw coin: ' + code)
|
1503
|
-
request = {
|
1503
|
+
request: dict = {
|
1504
1504
|
'amount': amount,
|
1505
1505
|
'address': address,
|
1506
1506
|
'destination_tag': tag,
|
@@ -1534,7 +1534,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1534
1534
|
if networkId is None:
|
1535
1535
|
return None
|
1536
1536
|
networkId = networkId.upper()
|
1537
|
-
networksById = {
|
1537
|
+
networksById: dict = {
|
1538
1538
|
'trx': 'TRC20',
|
1539
1539
|
'erc20': 'ERC20',
|
1540
1540
|
'bsc': 'BEP20',
|
@@ -1542,7 +1542,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1542
1542
|
}
|
1543
1543
|
return self.safe_string(networksById, networkId, networkId)
|
1544
1544
|
|
1545
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1545
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1546
1546
|
#
|
1547
1547
|
# deposit
|
1548
1548
|
# {
|
@@ -1612,7 +1612,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1612
1612
|
}
|
1613
1613
|
|
1614
1614
|
def parse_transaction_status(self, status):
|
1615
|
-
statuses = {
|
1615
|
+
statuses: dict = {
|
1616
1616
|
'pending': 'pending',
|
1617
1617
|
'in_progress': 'pending',
|
1618
1618
|
'complete': 'ok',
|