ccxt 4.3.30__py2.py3-none-any.whl → 4.3.32__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccxt/__init__.py +1 -1
- ccxt/abstract/binance.py +2 -0
- ccxt/abstract/binancecoinm.py +2 -0
- ccxt/abstract/binanceus.py +2 -0
- ccxt/abstract/binanceusdm.py +2 -0
- ccxt/ace.py +14 -14
- ccxt/alpaca.py +16 -16
- ccxt/ascendex.py +46 -46
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +14 -14
- ccxt/async_support/alpaca.py +16 -16
- ccxt/async_support/ascendex.py +46 -46
- ccxt/async_support/base/exchange.py +23 -23
- ccxt/async_support/bigone.py +32 -32
- ccxt/async_support/binance.py +105 -96
- ccxt/async_support/bingx.py +21 -21
- ccxt/async_support/bit2c.py +13 -13
- ccxt/async_support/bitbank.py +19 -19
- ccxt/async_support/bitbns.py +17 -17
- ccxt/async_support/bitfinex.py +24 -24
- ccxt/async_support/bitfinex2.py +142 -109
- ccxt/async_support/bitflyer.py +23 -23
- ccxt/async_support/bitget.py +76 -76
- ccxt/async_support/bithumb.py +20 -20
- ccxt/async_support/bitmart.py +55 -55
- ccxt/async_support/bitmex.py +41 -41
- ccxt/async_support/bitopro.py +30 -30
- ccxt/async_support/bitrue.py +37 -37
- ccxt/async_support/bitso.py +30 -30
- ccxt/async_support/bitstamp.py +31 -31
- ccxt/async_support/bitteam.py +26 -26
- ccxt/async_support/bitvavo.py +27 -27
- ccxt/async_support/bl3p.py +8 -8
- ccxt/async_support/blockchaincom.py +24 -24
- ccxt/async_support/blofin.py +37 -37
- ccxt/async_support/btcalpha.py +19 -19
- ccxt/async_support/btcbox.py +11 -11
- ccxt/async_support/btcmarkets.py +22 -22
- ccxt/async_support/btcturk.py +13 -13
- ccxt/async_support/bybit.py +96 -96
- ccxt/async_support/cex.py +21 -21
- ccxt/async_support/coinbase.py +53 -53
- ccxt/async_support/coinbaseexchange.py +29 -29
- ccxt/async_support/coinbaseinternational.py +32 -32
- ccxt/async_support/coincheck.py +14 -14
- ccxt/async_support/coinex.py +208 -175
- ccxt/async_support/coinlist.py +35 -35
- ccxt/async_support/coinmate.py +22 -22
- ccxt/async_support/coinmetro.py +22 -22
- ccxt/async_support/coinone.py +18 -18
- ccxt/async_support/coinsph.py +32 -32
- ccxt/async_support/coinspot.py +8 -8
- ccxt/async_support/cryptocom.py +43 -43
- ccxt/async_support/currencycom.py +33 -33
- ccxt/async_support/delta.py +35 -35
- ccxt/async_support/deribit.py +54 -54
- ccxt/async_support/digifinex.py +56 -56
- ccxt/async_support/exmo.py +34 -34
- ccxt/async_support/gate.py +60 -60
- ccxt/async_support/gemini.py +24 -24
- ccxt/async_support/hitbtc.py +51 -51
- ccxt/async_support/hollaex.py +29 -29
- ccxt/async_support/htx.py +73 -73
- ccxt/async_support/huobijp.py +30 -30
- ccxt/async_support/hyperliquid.py +58 -58
- ccxt/async_support/idex.py +33 -33
- ccxt/async_support/independentreserve.py +12 -12
- ccxt/async_support/indodax.py +21 -21
- ccxt/async_support/kraken.py +46 -51
- ccxt/async_support/krakenfutures.py +29 -29
- ccxt/async_support/kucoin.py +51 -51
- ccxt/async_support/kucoinfutures.py +33 -33
- ccxt/async_support/kuna.py +27 -27
- ccxt/async_support/latoken.py +27 -27
- ccxt/async_support/lbank.py +35 -35
- ccxt/async_support/luno.py +19 -19
- ccxt/async_support/lykke.py +20 -20
- ccxt/async_support/mercado.py +17 -17
- ccxt/async_support/mexc.py +64 -64
- ccxt/async_support/ndax.py +38 -38
- ccxt/async_support/novadax.py +26 -26
- ccxt/async_support/oceanex.py +21 -21
- ccxt/async_support/okcoin.py +35 -35
- ccxt/async_support/okx.py +85 -85
- ccxt/async_support/onetrading.py +32 -32
- ccxt/async_support/p2b.py +14 -14
- ccxt/async_support/paymium.py +12 -12
- ccxt/async_support/phemex.py +50 -50
- ccxt/async_support/poloniex.py +35 -35
- ccxt/async_support/poloniexfutures.py +25 -21
- ccxt/async_support/probit.py +30 -30
- ccxt/async_support/timex.py +22 -22
- ccxt/async_support/tokocrypto.py +26 -26
- ccxt/async_support/tradeogre.py +12 -12
- ccxt/async_support/upbit.py +28 -28
- ccxt/async_support/wavesexchange.py +33 -33
- ccxt/async_support/wazirx.py +21 -21
- ccxt/async_support/whitebit.py +37 -37
- ccxt/async_support/woo.py +51 -51
- ccxt/async_support/woofipro.py +46 -46
- ccxt/async_support/yobit.py +20 -20
- ccxt/async_support/zaif.py +12 -12
- ccxt/async_support/zonda.py +22 -22
- ccxt/base/exchange.py +48 -36
- ccxt/base/types.py +13 -0
- ccxt/bigone.py +32 -32
- ccxt/binance.py +105 -96
- ccxt/bingx.py +21 -21
- ccxt/bit2c.py +13 -13
- ccxt/bitbank.py +19 -19
- ccxt/bitbns.py +17 -17
- ccxt/bitfinex.py +24 -24
- ccxt/bitfinex2.py +142 -109
- ccxt/bitflyer.py +23 -23
- ccxt/bitget.py +76 -76
- ccxt/bithumb.py +20 -20
- ccxt/bitmart.py +55 -55
- ccxt/bitmex.py +41 -41
- ccxt/bitopro.py +30 -30
- ccxt/bitrue.py +37 -37
- ccxt/bitso.py +30 -30
- ccxt/bitstamp.py +31 -31
- ccxt/bitteam.py +26 -26
- ccxt/bitvavo.py +27 -27
- ccxt/bl3p.py +8 -8
- ccxt/blockchaincom.py +24 -24
- ccxt/blofin.py +37 -37
- ccxt/btcalpha.py +19 -19
- ccxt/btcbox.py +11 -11
- ccxt/btcmarkets.py +22 -22
- ccxt/btcturk.py +13 -13
- ccxt/bybit.py +96 -96
- ccxt/cex.py +21 -21
- ccxt/coinbase.py +53 -53
- ccxt/coinbaseexchange.py +29 -29
- ccxt/coinbaseinternational.py +32 -32
- ccxt/coincheck.py +14 -14
- ccxt/coinex.py +208 -175
- ccxt/coinlist.py +35 -35
- ccxt/coinmate.py +22 -22
- ccxt/coinmetro.py +22 -22
- ccxt/coinone.py +18 -18
- ccxt/coinsph.py +32 -32
- ccxt/coinspot.py +8 -8
- ccxt/cryptocom.py +43 -43
- ccxt/currencycom.py +33 -33
- ccxt/delta.py +35 -35
- ccxt/deribit.py +54 -54
- ccxt/digifinex.py +56 -56
- ccxt/exmo.py +34 -34
- ccxt/gate.py +60 -60
- ccxt/gemini.py +24 -24
- ccxt/hitbtc.py +51 -51
- ccxt/hollaex.py +29 -29
- ccxt/htx.py +73 -73
- ccxt/huobijp.py +30 -30
- ccxt/hyperliquid.py +58 -58
- ccxt/idex.py +33 -33
- ccxt/independentreserve.py +12 -12
- ccxt/indodax.py +21 -21
- ccxt/kraken.py +46 -51
- ccxt/krakenfutures.py +29 -29
- ccxt/kucoin.py +51 -51
- ccxt/kucoinfutures.py +33 -33
- ccxt/kuna.py +27 -27
- ccxt/latoken.py +27 -27
- ccxt/lbank.py +35 -35
- ccxt/luno.py +19 -19
- ccxt/lykke.py +20 -20
- ccxt/mercado.py +17 -17
- ccxt/mexc.py +64 -64
- ccxt/ndax.py +38 -38
- ccxt/novadax.py +26 -26
- ccxt/oceanex.py +21 -21
- ccxt/okcoin.py +35 -35
- ccxt/okx.py +85 -85
- ccxt/onetrading.py +32 -32
- ccxt/p2b.py +14 -14
- ccxt/paymium.py +12 -12
- ccxt/phemex.py +50 -50
- ccxt/poloniex.py +35 -35
- ccxt/poloniexfutures.py +25 -21
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +8 -8
- ccxt/pro/ascendex.py +4 -4
- ccxt/pro/binance.py +56 -56
- ccxt/pro/bingx.py +5 -5
- ccxt/pro/bitfinex.py +6 -6
- ccxt/pro/bitfinex2.py +10 -10
- ccxt/pro/bitget.py +17 -17
- ccxt/pro/bithumb.py +6 -6
- ccxt/pro/bitmart.py +8 -8
- ccxt/pro/bitmex.py +16 -16
- ccxt/pro/bitopro.py +4 -4
- ccxt/pro/bitrue.py +8 -8
- ccxt/pro/bitstamp.py +5 -5
- ccxt/pro/bitvavo.py +14 -14
- ccxt/pro/blockchaincom.py +7 -7
- ccxt/pro/bybit.py +12 -12
- ccxt/pro/cex.py +20 -20
- ccxt/pro/coinbase.py +32 -2
- ccxt/pro/coinbaseexchange.py +10 -10
- ccxt/pro/coinbaseinternational.py +4 -4
- ccxt/pro/coincheck.py +2 -2
- ccxt/pro/coinex.py +15 -15
- ccxt/pro/coinone.py +4 -4
- ccxt/pro/cryptocom.py +11 -11
- ccxt/pro/currencycom.py +4 -4
- ccxt/pro/deribit.py +9 -9
- ccxt/pro/exmo.py +9 -9
- ccxt/pro/gate.py +12 -12
- ccxt/pro/gemini.py +11 -11
- ccxt/pro/hitbtc.py +13 -13
- ccxt/pro/hollaex.py +6 -6
- ccxt/pro/htx.py +15 -15
- ccxt/pro/huobijp.py +16 -16
- ccxt/pro/hyperliquid.py +9 -9
- ccxt/pro/idex.py +12 -12
- ccxt/pro/independentreserve.py +2 -2
- ccxt/pro/kraken.py +14 -14
- ccxt/pro/krakenfutures.py +12 -12
- ccxt/pro/kucoin.py +12 -12
- ccxt/pro/kucoinfutures.py +16 -16
- ccxt/pro/lbank.py +12 -12
- ccxt/pro/luno.py +4 -4
- ccxt/pro/mexc.py +14 -14
- ccxt/pro/ndax.py +12 -12
- ccxt/pro/okcoin.py +6 -6
- ccxt/pro/okx.py +30 -30
- ccxt/pro/onetrading.py +13 -13
- ccxt/pro/p2b.py +2 -2
- ccxt/pro/phemex.py +9 -9
- ccxt/pro/poloniex.py +9 -9
- ccxt/pro/poloniexfutures.py +10 -10
- ccxt/pro/probit.py +8 -8
- ccxt/pro/upbit.py +1 -1
- ccxt/pro/wazirx.py +10 -10
- ccxt/pro/whitebit.py +8 -8
- ccxt/pro/woo.py +14 -14
- ccxt/pro/woofipro.py +14 -14
- ccxt/probit.py +30 -30
- ccxt/test/base/test_shared_methods.py +1 -0
- ccxt/test/test_async.py +1 -1
- ccxt/test/test_sync.py +1 -1
- ccxt/timex.py +22 -22
- ccxt/tokocrypto.py +26 -26
- ccxt/tradeogre.py +12 -12
- ccxt/upbit.py +28 -28
- ccxt/wavesexchange.py +33 -33
- ccxt/wazirx.py +21 -21
- ccxt/whitebit.py +37 -37
- ccxt/woo.py +51 -51
- ccxt/woofipro.py +46 -46
- ccxt/yobit.py +20 -20
- ccxt/zaif.py +12 -12
- ccxt/zonda.py +22 -22
- {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/METADATA +4 -4
- {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/RECORD +260 -260
- {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/WHEEL +0 -0
- {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/top_level.txt +0 -0
ccxt/bitget.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bitget import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, FundingHistory, Int, IsolatedBorrowRate, Leverage, Liquidation, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry, TransferEntries
|
10
|
+
from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, FundingHistory, Int, IsolatedBorrowRate, Leverage, LeverageTier, Liquidation, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry, TransferEntries
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -1862,14 +1862,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
1862
1862
|
# "requestTime": "1700120731773"
|
1863
1863
|
# }
|
1864
1864
|
#
|
1865
|
-
result = {}
|
1865
|
+
result: dict = {}
|
1866
1866
|
data = self.safe_value(response, 'data', [])
|
1867
1867
|
for i in range(0, len(data)):
|
1868
1868
|
entry = data[i]
|
1869
1869
|
id = self.safe_string(entry, 'coin') # we don't use 'coinId' has no use. it is 'coin' field that needs to be used in currency related endpoints(deposit, withdraw, etc..)
|
1870
1870
|
code = self.safe_currency_code(id)
|
1871
1871
|
chains = self.safe_value(entry, 'chains', [])
|
1872
|
-
networks = {}
|
1872
|
+
networks: dict = {}
|
1873
1873
|
deposit = False
|
1874
1874
|
withdraw = False
|
1875
1875
|
minWithdrawString = None
|
@@ -1944,7 +1944,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1944
1944
|
}
|
1945
1945
|
return result
|
1946
1946
|
|
1947
|
-
def fetch_market_leverage_tiers(self, symbol: str, params={}):
|
1947
|
+
def fetch_market_leverage_tiers(self, symbol: str, params={}) -> List[LeverageTier]:
|
1948
1948
|
"""
|
1949
1949
|
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
1950
1950
|
:see: https://www.bitget.com/api-doc/contract/position/Get-Query-Position-Lever
|
@@ -1965,7 +1965,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1965
1965
|
market = self.market(sandboxSymbol)
|
1966
1966
|
else:
|
1967
1967
|
market = self.market(symbol)
|
1968
|
-
request = {}
|
1968
|
+
request: dict = {}
|
1969
1969
|
response = None
|
1970
1970
|
marginMode = None
|
1971
1971
|
marginMode, params = self.handle_margin_mode_and_params('fetchMarketLeverageTiers', params, 'isolated')
|
@@ -2048,7 +2048,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2048
2048
|
result = self.safe_value(response, 'data', [])
|
2049
2049
|
return self.parse_market_leverage_tiers(result, market)
|
2050
2050
|
|
2051
|
-
def parse_market_leverage_tiers(self, info, market: Market = None):
|
2051
|
+
def parse_market_leverage_tiers(self, info, market: Market = None) -> List[LeverageTier]:
|
2052
2052
|
#
|
2053
2053
|
# swap and future
|
2054
2054
|
#
|
@@ -2130,7 +2130,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2130
2130
|
currency = self.currency(code)
|
2131
2131
|
if since is None:
|
2132
2132
|
since = self.milliseconds() - 7776000000 # 90 days
|
2133
|
-
request = {
|
2133
|
+
request: dict = {
|
2134
2134
|
'coin': currency['id'],
|
2135
2135
|
'startTime': since,
|
2136
2136
|
'endTime': self.milliseconds(),
|
@@ -2185,7 +2185,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2185
2185
|
self.load_markets()
|
2186
2186
|
currency = self.currency(code)
|
2187
2187
|
networkId = self.network_code_to_id(chain)
|
2188
|
-
request = {
|
2188
|
+
request: dict = {
|
2189
2189
|
'coin': currency['id'],
|
2190
2190
|
'address': address,
|
2191
2191
|
'chain': networkId,
|
@@ -2207,7 +2207,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2207
2207
|
# }
|
2208
2208
|
#
|
2209
2209
|
data = self.safe_value(response, 'data', {})
|
2210
|
-
result = {
|
2210
|
+
result: dict = {
|
2211
2211
|
'id': self.safe_string(data, 'orderId'),
|
2212
2212
|
'info': response,
|
2213
2213
|
'txid': None,
|
@@ -2264,7 +2264,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2264
2264
|
currency = self.currency(code)
|
2265
2265
|
if since is None:
|
2266
2266
|
since = self.milliseconds() - 7776000000 # 90 days
|
2267
|
-
request = {
|
2267
|
+
request: dict = {
|
2268
2268
|
'coin': currency['id'],
|
2269
2269
|
'startTime': since,
|
2270
2270
|
'endTime': self.milliseconds(),
|
@@ -2302,7 +2302,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2302
2302
|
rawTransactions = self.safe_list(response, 'data', [])
|
2303
2303
|
return self.parse_transactions(rawTransactions, currency, since, limit)
|
2304
2304
|
|
2305
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2305
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
2306
2306
|
#
|
2307
2307
|
# fetchDeposits
|
2308
2308
|
#
|
@@ -2378,7 +2378,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2378
2378
|
}
|
2379
2379
|
|
2380
2380
|
def parse_transaction_status(self, status):
|
2381
|
-
statuses = {
|
2381
|
+
statuses: dict = {
|
2382
2382
|
'success': 'ok',
|
2383
2383
|
'Pending': 'pending',
|
2384
2384
|
'pending_review': 'pending',
|
@@ -2402,7 +2402,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2402
2402
|
if networkCode is not None:
|
2403
2403
|
networkId = self.network_code_to_id(networkCode, code)
|
2404
2404
|
currency = self.currency(code)
|
2405
|
-
request = {
|
2405
|
+
request: dict = {
|
2406
2406
|
'coin': currency['id'],
|
2407
2407
|
}
|
2408
2408
|
if networkId is not None:
|
@@ -2467,7 +2467,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2467
2467
|
market = self.market(sandboxSymbol)
|
2468
2468
|
else:
|
2469
2469
|
market = self.market(symbol)
|
2470
|
-
request = {
|
2470
|
+
request: dict = {
|
2471
2471
|
'symbol': market['id'],
|
2472
2472
|
}
|
2473
2473
|
if limit is not None:
|
@@ -2621,7 +2621,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2621
2621
|
market = self.market(sandboxSymbol)
|
2622
2622
|
else:
|
2623
2623
|
market = self.market(symbol)
|
2624
|
-
request = {
|
2624
|
+
request: dict = {
|
2625
2625
|
'symbol': market['id'],
|
2626
2626
|
}
|
2627
2627
|
response = None
|
@@ -2720,7 +2720,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2720
2720
|
else:
|
2721
2721
|
market = self.market(symbol)
|
2722
2722
|
response = None
|
2723
|
-
request = {}
|
2723
|
+
request: dict = {}
|
2724
2724
|
type = None
|
2725
2725
|
type, params = self.handle_market_type_and_params('fetchTickers', market, params)
|
2726
2726
|
# Calls like `.fetch_tickers(None, {subType:'inverse'})` should be supported for self exchange, so
|
@@ -2795,7 +2795,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2795
2795
|
data = self.safe_list(response, 'data', [])
|
2796
2796
|
return self.parse_tickers(data, symbols)
|
2797
2797
|
|
2798
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
2798
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
2799
2799
|
#
|
2800
2800
|
# spot, swap and future: fetchTrades
|
2801
2801
|
#
|
@@ -2939,7 +2939,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2939
2939
|
market = self.market(sandboxSymbol)
|
2940
2940
|
else:
|
2941
2941
|
market = self.market(symbol)
|
2942
|
-
request = {
|
2942
|
+
request: dict = {
|
2943
2943
|
'symbol': market['id'],
|
2944
2944
|
}
|
2945
2945
|
if limit is not None:
|
@@ -3027,7 +3027,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3027
3027
|
"""
|
3028
3028
|
self.load_markets()
|
3029
3029
|
market = self.market(symbol)
|
3030
|
-
request = {
|
3030
|
+
request: dict = {
|
3031
3031
|
'symbol': market['id'],
|
3032
3032
|
}
|
3033
3033
|
marginMode = None
|
@@ -3157,7 +3157,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3157
3157
|
# }
|
3158
3158
|
#
|
3159
3159
|
data = self.safe_value(response, 'data', [])
|
3160
|
-
result = {}
|
3160
|
+
result: dict = {}
|
3161
3161
|
for i in range(0, len(data)):
|
3162
3162
|
entry = data[i]
|
3163
3163
|
marketId = self.safe_string(entry, 'symbol')
|
@@ -3237,7 +3237,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3237
3237
|
timeframes = self.options['timeframes'][marketType]
|
3238
3238
|
msInDay = 86400000
|
3239
3239
|
duration = self.parse_timeframe(timeframe) * 1000
|
3240
|
-
request = {
|
3240
|
+
request: dict = {
|
3241
3241
|
'symbol': market['id'],
|
3242
3242
|
'granularity': self.safe_string(timeframes, timeframe, timeframe),
|
3243
3243
|
}
|
@@ -3333,7 +3333,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3333
3333
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
3334
3334
|
"""
|
3335
3335
|
self.load_markets()
|
3336
|
-
request = {}
|
3336
|
+
request: dict = {}
|
3337
3337
|
marketType = None
|
3338
3338
|
marginMode = None
|
3339
3339
|
response = None
|
@@ -3443,7 +3443,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3443
3443
|
return self.parse_balance(data)
|
3444
3444
|
|
3445
3445
|
def parse_balance(self, balance) -> Balances:
|
3446
|
-
result = {'info': balance}
|
3446
|
+
result: dict = {'info': balance}
|
3447
3447
|
#
|
3448
3448
|
# spot
|
3449
3449
|
#
|
@@ -3530,8 +3530,8 @@ class bitget(Exchange, ImplicitAPI):
|
|
3530
3530
|
result[code] = account
|
3531
3531
|
return self.safe_balance(result)
|
3532
3532
|
|
3533
|
-
def parse_order_status(self, status):
|
3534
|
-
statuses = {
|
3533
|
+
def parse_order_status(self, status: Str):
|
3534
|
+
statuses: dict = {
|
3535
3535
|
'new': 'open',
|
3536
3536
|
'init': 'open',
|
3537
3537
|
'not_trigger': 'open',
|
@@ -3551,7 +3551,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3551
3551
|
}
|
3552
3552
|
return self.safe_string(statuses, status, status)
|
3553
3553
|
|
3554
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
3554
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
3555
3555
|
#
|
3556
3556
|
# createOrder, editOrder, closePosition
|
3557
3557
|
#
|
@@ -4038,7 +4038,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4038
4038
|
marginMode = None
|
4039
4039
|
marketType, params = self.handle_market_type_and_params('createOrder', market, params)
|
4040
4040
|
marginMode, params = self.handle_margin_mode_and_params('createOrder', params)
|
4041
|
-
request = {
|
4041
|
+
request: dict = {
|
4042
4042
|
'symbol': market['id'],
|
4043
4043
|
'orderType': type,
|
4044
4044
|
}
|
@@ -4245,7 +4245,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4245
4245
|
market = self.market(sandboxSymbol)
|
4246
4246
|
else:
|
4247
4247
|
market = self.market(symbol)
|
4248
|
-
request = {
|
4248
|
+
request: dict = {
|
4249
4249
|
'symbol': market['id'],
|
4250
4250
|
'orderList': ordersRequests,
|
4251
4251
|
}
|
@@ -4333,7 +4333,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4333
4333
|
market = self.market(sandboxSymbol)
|
4334
4334
|
else:
|
4335
4335
|
market = self.market(symbol)
|
4336
|
-
request = {
|
4336
|
+
request: dict = {
|
4337
4337
|
'orderId': id,
|
4338
4338
|
}
|
4339
4339
|
isMarketOrder = type == 'market'
|
@@ -4476,7 +4476,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4476
4476
|
marginMode = None
|
4477
4477
|
response = None
|
4478
4478
|
marginMode, params = self.handle_margin_mode_and_params('cancelOrder', params)
|
4479
|
-
request = {}
|
4479
|
+
request: dict = {}
|
4480
4480
|
trailing = self.safe_value(params, 'trailing')
|
4481
4481
|
stop = self.safe_value_2(params, 'stop', 'trigger')
|
4482
4482
|
params = self.omit(params, ['stop', 'trigger', 'trailing'])
|
@@ -4490,7 +4490,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4490
4490
|
request['productType'] = productType
|
4491
4491
|
if stop or trailing:
|
4492
4492
|
orderIdList = []
|
4493
|
-
orderId = {
|
4493
|
+
orderId: dict = {
|
4494
4494
|
'orderId': id,
|
4495
4495
|
}
|
4496
4496
|
orderIdList.append(orderId)
|
@@ -4598,11 +4598,11 @@ class bitget(Exchange, ImplicitAPI):
|
|
4598
4598
|
orderIdList = []
|
4599
4599
|
for i in range(0, len(ids)):
|
4600
4600
|
individualId = ids[i]
|
4601
|
-
orderId = {
|
4601
|
+
orderId: dict = {
|
4602
4602
|
'orderId': individualId,
|
4603
4603
|
}
|
4604
4604
|
orderIdList.append(orderId)
|
4605
|
-
request = {
|
4605
|
+
request: dict = {
|
4606
4606
|
'symbol': market['id'],
|
4607
4607
|
}
|
4608
4608
|
if market['spot'] and (marginMode is None):
|
@@ -4672,7 +4672,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4672
4672
|
market = self.market(symbol)
|
4673
4673
|
marginMode = None
|
4674
4674
|
marginMode, params = self.handle_margin_mode_and_params('cancelAllOrders', params)
|
4675
|
-
request = {
|
4675
|
+
request: dict = {
|
4676
4676
|
'symbol': market['id'],
|
4677
4677
|
}
|
4678
4678
|
stop = self.safe_bool_2(params, 'stop', 'trigger')
|
@@ -4686,7 +4686,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4686
4686
|
response = self.privateMarginPostMarginV1IsolatedOrderBatchCancelOrder(self.extend(request, params))
|
4687
4687
|
else:
|
4688
4688
|
if stop:
|
4689
|
-
stopRequest = {
|
4689
|
+
stopRequest: dict = {
|
4690
4690
|
'symbolList': [market['id']],
|
4691
4691
|
}
|
4692
4692
|
response = self.privateSpotPostV2SpotTradeBatchCancelPlanOrder(self.extend(stopRequest, params))
|
@@ -4767,7 +4767,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4767
4767
|
market = self.market(sandboxSymbol)
|
4768
4768
|
else:
|
4769
4769
|
market = self.market(symbol)
|
4770
|
-
request = {
|
4770
|
+
request: dict = {
|
4771
4771
|
'orderId': id,
|
4772
4772
|
}
|
4773
4773
|
response = None
|
@@ -4884,7 +4884,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4884
4884
|
sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
4885
4885
|
market = None
|
4886
4886
|
type = None
|
4887
|
-
request = {}
|
4887
|
+
request: dict = {}
|
4888
4888
|
marginMode = None
|
4889
4889
|
marginMode, params = self.handle_margin_mode_and_params('fetchOpenOrders', params)
|
4890
4890
|
if symbol is not None:
|
@@ -5211,7 +5211,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5211
5211
|
if symbol is not None:
|
5212
5212
|
sandboxSymbol = self.convert_symbol_for_sandbox(symbol)
|
5213
5213
|
symbol = sandboxSymbol
|
5214
|
-
request = {}
|
5214
|
+
request: dict = {}
|
5215
5215
|
if symbol is not None:
|
5216
5216
|
market = self.market(symbol)
|
5217
5217
|
request['symbol'] = market['id']
|
@@ -5506,7 +5506,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5506
5506
|
cursorReceived = 'endId'
|
5507
5507
|
return self.fetch_paginated_call_cursor('fetchLedger', symbol, since, limit, params, cursorReceived, 'idLessThan')
|
5508
5508
|
currency = None
|
5509
|
-
request = {}
|
5509
|
+
request: dict = {}
|
5510
5510
|
if code is not None:
|
5511
5511
|
currency = self.currency(code)
|
5512
5512
|
request['coin'] = currency['id']
|
@@ -5575,7 +5575,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5575
5575
|
return self.parse_ledger(bills, currency, since, limit)
|
5576
5576
|
return self.parse_ledger(data, currency, since, limit)
|
5577
5577
|
|
5578
|
-
def parse_ledger_entry(self, item, currency: Currency = None):
|
5578
|
+
def parse_ledger_entry(self, item: dict, currency: Currency = None):
|
5579
5579
|
#
|
5580
5580
|
# spot
|
5581
5581
|
#
|
@@ -5632,7 +5632,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5632
5632
|
}
|
5633
5633
|
|
5634
5634
|
def parse_ledger_type(self, type):
|
5635
|
-
types = {
|
5635
|
+
types: dict = {
|
5636
5636
|
'trans_to_cross': 'transfer',
|
5637
5637
|
'trans_from_cross': 'transfer',
|
5638
5638
|
'trans_to_exchange': 'transfer',
|
@@ -5714,7 +5714,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5714
5714
|
cursorReceived = 'endId'
|
5715
5715
|
return self.fetch_paginated_call_cursor('fetchMyTrades', symbol, since, limit, params, cursorReceived, 'idLessThan')
|
5716
5716
|
response = None
|
5717
|
-
request = {
|
5717
|
+
request: dict = {
|
5718
5718
|
'symbol': market['id'],
|
5719
5719
|
}
|
5720
5720
|
request, params = self.handle_until_option('endTime', request, params)
|
@@ -5863,7 +5863,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5863
5863
|
market = self.market(symbol)
|
5864
5864
|
productType = None
|
5865
5865
|
productType, params = self.handle_product_type_and_params(market, params)
|
5866
|
-
request = {
|
5866
|
+
request: dict = {
|
5867
5867
|
'symbol': market['id'],
|
5868
5868
|
'marginCoin': market['settleId'],
|
5869
5869
|
'productType': productType,
|
@@ -5939,7 +5939,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5939
5939
|
market = self.market(first)
|
5940
5940
|
productType = None
|
5941
5941
|
productType, params = self.handle_product_type_and_params(market, params)
|
5942
|
-
request = {
|
5942
|
+
request: dict = {
|
5943
5943
|
'productType': productType,
|
5944
5944
|
}
|
5945
5945
|
response = None
|
@@ -6040,7 +6040,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6040
6040
|
symbols = self.market_symbols(symbols)
|
6041
6041
|
return self.filter_by_array_positions(result, 'symbol', symbols, False)
|
6042
6042
|
|
6043
|
-
def parse_position(self, position, market: Market = None):
|
6043
|
+
def parse_position(self, position: dict, market: Market = None):
|
6044
6044
|
#
|
6045
6045
|
# fetchPosition
|
6046
6046
|
#
|
@@ -6230,7 +6230,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6230
6230
|
market = self.market(symbol)
|
6231
6231
|
productType = None
|
6232
6232
|
productType, params = self.handle_product_type_and_params(market, params)
|
6233
|
-
request = {
|
6233
|
+
request: dict = {
|
6234
6234
|
'symbol': market['id'],
|
6235
6235
|
'productType': productType,
|
6236
6236
|
# 'pageSize': limit, # default 20
|
@@ -6290,7 +6290,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6290
6290
|
raise BadSymbol(self.id + ' fetchFundingRate() supports swap contracts only')
|
6291
6291
|
productType = None
|
6292
6292
|
productType, params = self.handle_product_type_and_params(market, params)
|
6293
|
-
request = {
|
6293
|
+
request: dict = {
|
6294
6294
|
'symbol': market['id'],
|
6295
6295
|
'productType': productType,
|
6296
6296
|
}
|
@@ -6370,7 +6370,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6370
6370
|
raise BadSymbol(self.id + ' fetchFundingHistory() supports swap contracts only')
|
6371
6371
|
productType = None
|
6372
6372
|
productType, params = self.handle_product_type_and_params(market, params)
|
6373
|
-
request = {
|
6373
|
+
request: dict = {
|
6374
6374
|
'symbol': market['id'],
|
6375
6375
|
'marginCoin': market['settleId'],
|
6376
6376
|
'businessType': 'contract_settle_fee',
|
@@ -6457,7 +6457,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6457
6457
|
market = self.market(symbol)
|
6458
6458
|
productType = None
|
6459
6459
|
productType, params = self.handle_product_type_and_params(market, params)
|
6460
|
-
request = {
|
6460
|
+
request: dict = {
|
6461
6461
|
'symbol': market['id'],
|
6462
6462
|
'marginCoin': market['settleId'],
|
6463
6463
|
'amount': self.amount_to_precision(symbol, amount), # positive value for adding margin, negative for reducing
|
@@ -6553,7 +6553,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6553
6553
|
market = self.market(symbol)
|
6554
6554
|
productType = None
|
6555
6555
|
productType, params = self.handle_product_type_and_params(market, params)
|
6556
|
-
request = {
|
6556
|
+
request: dict = {
|
6557
6557
|
'symbol': market['id'],
|
6558
6558
|
'marginCoin': market['settleId'],
|
6559
6559
|
'productType': productType,
|
@@ -6621,7 +6621,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6621
6621
|
market = self.market(symbol)
|
6622
6622
|
productType = None
|
6623
6623
|
productType, params = self.handle_product_type_and_params(market, params)
|
6624
|
-
request = {
|
6624
|
+
request: dict = {
|
6625
6625
|
'symbol': market['id'],
|
6626
6626
|
'marginCoin': market['settleId'],
|
6627
6627
|
'leverage': self.number_to_string(leverage),
|
@@ -6672,7 +6672,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6672
6672
|
market = self.market(symbol)
|
6673
6673
|
productType = None
|
6674
6674
|
productType, params = self.handle_product_type_and_params(market, params)
|
6675
|
-
request = {
|
6675
|
+
request: dict = {
|
6676
6676
|
'symbol': market['id'],
|
6677
6677
|
'marginCoin': market['settleId'],
|
6678
6678
|
'marginMode': marginMode,
|
@@ -6717,7 +6717,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6717
6717
|
market = self.market(symbol)
|
6718
6718
|
productType = None
|
6719
6719
|
productType, params = self.handle_product_type_and_params(market, params)
|
6720
|
-
request = {
|
6720
|
+
request: dict = {
|
6721
6721
|
'posMode': posMode,
|
6722
6722
|
'productType': productType,
|
6723
6723
|
}
|
@@ -6754,7 +6754,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6754
6754
|
raise BadRequest(self.id + ' fetchOpenInterest() supports contract markets only')
|
6755
6755
|
productType = None
|
6756
6756
|
productType, params = self.handle_product_type_and_params(market, params)
|
6757
|
-
request = {
|
6757
|
+
request: dict = {
|
6758
6758
|
'symbol': market['id'],
|
6759
6759
|
'productType': productType,
|
6760
6760
|
}
|
@@ -6823,7 +6823,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6823
6823
|
accountsByType = self.safe_value(self.options, 'accountsByType', {})
|
6824
6824
|
type = self.safe_string(accountsByType, fromAccount)
|
6825
6825
|
currency = self.currency(code)
|
6826
|
-
request = {
|
6826
|
+
request: dict = {
|
6827
6827
|
'coin': currency['id'],
|
6828
6828
|
'fromType': type,
|
6829
6829
|
}
|
@@ -6875,7 +6875,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6875
6875
|
accountsByType = self.safe_value(self.options, 'accountsByType', {})
|
6876
6876
|
fromType = self.safe_string(accountsByType, fromAccount)
|
6877
6877
|
toType = self.safe_string(accountsByType, toAccount)
|
6878
|
-
request = {
|
6878
|
+
request: dict = {
|
6879
6879
|
'fromType': fromType,
|
6880
6880
|
'toType': toType,
|
6881
6881
|
'amount': amount,
|
@@ -6949,7 +6949,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6949
6949
|
}
|
6950
6950
|
|
6951
6951
|
def parse_transfer_status(self, status: Str) -> Str:
|
6952
|
-
statuses = {
|
6952
|
+
statuses: dict = {
|
6953
6953
|
'successful': 'ok',
|
6954
6954
|
}
|
6955
6955
|
return self.safe_string(statuses, status, status)
|
@@ -6979,7 +6979,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6979
6979
|
#
|
6980
6980
|
chains = self.safe_value(fee, 'chains', [])
|
6981
6981
|
chainsLength = len(chains)
|
6982
|
-
result = {
|
6982
|
+
result: dict = {
|
6983
6983
|
'info': fee,
|
6984
6984
|
'withdraw': {
|
6985
6985
|
'fee': None,
|
@@ -7058,7 +7058,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7058
7058
|
"""
|
7059
7059
|
self.load_markets()
|
7060
7060
|
currency = self.currency(code)
|
7061
|
-
request = {
|
7061
|
+
request: dict = {
|
7062
7062
|
'coin': currency['id'],
|
7063
7063
|
'borrowAmount': self.currency_to_precision(code, amount),
|
7064
7064
|
}
|
@@ -7091,7 +7091,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7091
7091
|
self.load_markets()
|
7092
7092
|
currency = self.currency(code)
|
7093
7093
|
market = self.market(symbol)
|
7094
|
-
request = {
|
7094
|
+
request: dict = {
|
7095
7095
|
'coin': currency['id'],
|
7096
7096
|
'borrowAmount': self.currency_to_precision(code, amount),
|
7097
7097
|
'symbol': market['id'],
|
@@ -7126,7 +7126,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7126
7126
|
self.load_markets()
|
7127
7127
|
currency = self.currency(code)
|
7128
7128
|
market = self.market(symbol)
|
7129
|
-
request = {
|
7129
|
+
request: dict = {
|
7130
7130
|
'coin': currency['id'],
|
7131
7131
|
'repayAmount': self.currency_to_precision(code, amount),
|
7132
7132
|
'symbol': market['id'],
|
@@ -7160,7 +7160,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7160
7160
|
"""
|
7161
7161
|
self.load_markets()
|
7162
7162
|
currency = self.currency(code)
|
7163
|
-
request = {
|
7163
|
+
request: dict = {
|
7164
7164
|
'coin': currency['id'],
|
7165
7165
|
'repayAmount': self.currency_to_precision(code, amount),
|
7166
7166
|
}
|
@@ -7260,7 +7260,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7260
7260
|
type, params = self.handle_market_type_and_params('fetchMyLiquidations', market, params)
|
7261
7261
|
if type != 'spot':
|
7262
7262
|
raise NotSupported(self.id + ' fetchMyLiquidations() supports spot margin markets only')
|
7263
|
-
request = {}
|
7263
|
+
request: dict = {}
|
7264
7264
|
request, params = self.handle_until_option('endTime', request, params)
|
7265
7265
|
if since is not None:
|
7266
7266
|
request['startTime'] = since
|
@@ -7392,7 +7392,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7392
7392
|
"""
|
7393
7393
|
self.load_markets()
|
7394
7394
|
market = self.market(symbol)
|
7395
|
-
request = {
|
7395
|
+
request: dict = {
|
7396
7396
|
'symbol': market['id'],
|
7397
7397
|
}
|
7398
7398
|
response = self.privateMarginGetV2MarginIsolatedInterestRateAndLimit(self.extend(request, params))
|
@@ -7506,7 +7506,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7506
7506
|
"""
|
7507
7507
|
self.load_markets()
|
7508
7508
|
currency = self.currency(code)
|
7509
|
-
request = {
|
7509
|
+
request: dict = {
|
7510
7510
|
'coin': currency['id'],
|
7511
7511
|
}
|
7512
7512
|
response = self.privateMarginGetV2MarginCrossedInterestRateAndLimit(self.extend(request, params))
|
@@ -7594,7 +7594,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7594
7594
|
market = None
|
7595
7595
|
if symbol is not None:
|
7596
7596
|
market = self.market(symbol)
|
7597
|
-
request = {}
|
7597
|
+
request: dict = {}
|
7598
7598
|
currency = None
|
7599
7599
|
if code is not None:
|
7600
7600
|
currency = self.currency(code)
|
@@ -7670,7 +7670,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7670
7670
|
interest = self.parse_borrow_interests(rows, market)
|
7671
7671
|
return self.filter_by_currency_since_limit(interest, code, since, limit)
|
7672
7672
|
|
7673
|
-
def parse_borrow_interest(self, info, market: Market = None):
|
7673
|
+
def parse_borrow_interest(self, info: dict, market: Market = None):
|
7674
7674
|
#
|
7675
7675
|
# isolated
|
7676
7676
|
#
|
@@ -7734,7 +7734,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7734
7734
|
market = self.market(symbol)
|
7735
7735
|
productType = None
|
7736
7736
|
productType, params = self.handle_product_type_and_params(market, params)
|
7737
|
-
request = {
|
7737
|
+
request: dict = {
|
7738
7738
|
'symbol': market['id'],
|
7739
7739
|
'productType': productType,
|
7740
7740
|
}
|
@@ -7773,7 +7773,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7773
7773
|
self.load_markets()
|
7774
7774
|
productType = None
|
7775
7775
|
productType, params = self.handle_product_type_and_params(None, params)
|
7776
|
-
request = {
|
7776
|
+
request: dict = {
|
7777
7777
|
'productType': productType,
|
7778
7778
|
}
|
7779
7779
|
response = self.privateMixPostV2MixOrderClosePositions(self.extend(request, params))
|
@@ -7816,7 +7816,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7816
7816
|
market = self.market(symbol)
|
7817
7817
|
productType = None
|
7818
7818
|
productType, params = self.handle_product_type_and_params(market, params)
|
7819
|
-
request = {
|
7819
|
+
request: dict = {
|
7820
7820
|
'symbol': market['id'],
|
7821
7821
|
'marginCoin': market['settleId'],
|
7822
7822
|
'productType': productType,
|
@@ -7853,7 +7853,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7853
7853
|
data = self.safe_dict(response, 'data', {})
|
7854
7854
|
return self.parse_margin_mode(data, market)
|
7855
7855
|
|
7856
|
-
def parse_margin_mode(self, marginMode, market=None) -> MarginMode:
|
7856
|
+
def parse_margin_mode(self, marginMode: dict, market=None) -> MarginMode:
|
7857
7857
|
marginType = self.safe_string(marginMode, 'marginMode')
|
7858
7858
|
marginType = 'cross' if (marginType == 'crossed') else marginType
|
7859
7859
|
return {
|
@@ -7879,7 +7879,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7879
7879
|
self.load_markets()
|
7880
7880
|
until = self.safe_integer(params, 'until')
|
7881
7881
|
params = self.omit(params, 'until')
|
7882
|
-
request = {}
|
7882
|
+
request: dict = {}
|
7883
7883
|
if symbols is not None:
|
7884
7884
|
symbolsLength = len(symbols)
|
7885
7885
|
if symbolsLength > 0:
|
@@ -7937,7 +7937,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7937
7937
|
:returns dict: a `conversion structure <https://docs.ccxt.com/#/?id=conversion-structure>`
|
7938
7938
|
"""
|
7939
7939
|
self.load_markets()
|
7940
|
-
request = {
|
7940
|
+
request: dict = {
|
7941
7941
|
'fromCoin': fromCode,
|
7942
7942
|
'toCoin': toCode,
|
7943
7943
|
'fromCoinSize': self.number_to_string(amount),
|
@@ -7987,7 +7987,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7987
7987
|
if toAmount is None:
|
7988
7988
|
raise ArgumentsRequired(self.id + ' createConvertTrade() requires a toAmount parameter')
|
7989
7989
|
params = self.omit(params, ['price', 'toAmount'])
|
7990
|
-
request = {
|
7990
|
+
request: dict = {
|
7991
7991
|
'traceId': id,
|
7992
7992
|
'fromCoin': fromCode,
|
7993
7993
|
'toCoin': toCode,
|
@@ -8025,7 +8025,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
8025
8025
|
:returns dict[]: a list of `conversion structures <https://docs.ccxt.com/#/?id=conversion-structure>`
|
8026
8026
|
"""
|
8027
8027
|
self.load_markets()
|
8028
|
-
request = {}
|
8028
|
+
request: dict = {}
|
8029
8029
|
msInDay = 86400000
|
8030
8030
|
now = self.milliseconds()
|
8031
8031
|
if since is not None:
|
@@ -8145,7 +8145,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
8145
8145
|
# ]
|
8146
8146
|
# }
|
8147
8147
|
#
|
8148
|
-
result = {}
|
8148
|
+
result: dict = {}
|
8149
8149
|
data = self.safe_list(response, 'data', [])
|
8150
8150
|
for i in range(0, len(data)):
|
8151
8151
|
entry = data[i]
|