ccxt 4.3.29__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/base/ws/aiohttp_client.py +1 -0
- ccxt/async_support/base/ws/future.py +27 -29
- ccxt/async_support/bigone.py +32 -32
- ccxt/async_support/binance.py +105 -96
- ccxt/async_support/bingx.py +22 -22
- 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 +424 -448
- 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 +80 -40
- 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 +39 -35
- ccxt/base/types.py +13 -0
- ccxt/bigone.py +32 -32
- ccxt/binance.py +105 -96
- ccxt/bingx.py +22 -22
- 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 +424 -448
- 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 +80 -40
- 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.29.dist-info → ccxt-4.3.31.dist-info}/METADATA +4 -4
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/RECORD +260 -260
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/WHEEL +0 -0
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/top_level.txt +0 -0
ccxt/async_support/delta.py
CHANGED
@@ -448,7 +448,7 @@ class delta(Exchange, ImplicitAPI):
|
|
448
448
|
# }
|
449
449
|
#
|
450
450
|
currencies = self.safe_list(response, 'result', [])
|
451
|
-
result = {}
|
451
|
+
result: dict = {}
|
452
452
|
for i in range(0, len(currencies)):
|
453
453
|
currency = currencies[i]
|
454
454
|
id = self.safe_string(currency, 'symbol')
|
@@ -492,7 +492,7 @@ class delta(Exchange, ImplicitAPI):
|
|
492
492
|
return markets
|
493
493
|
|
494
494
|
def index_by_stringified_numeric_id(self, input):
|
495
|
-
result = {}
|
495
|
+
result: dict = {}
|
496
496
|
if input is None:
|
497
497
|
return None
|
498
498
|
keys = list(input.keys())
|
@@ -959,7 +959,7 @@ class delta(Exchange, ImplicitAPI):
|
|
959
959
|
"""
|
960
960
|
await self.load_markets()
|
961
961
|
market = self.market(symbol)
|
962
|
-
request = {
|
962
|
+
request: dict = {
|
963
963
|
'symbol': market['id'],
|
964
964
|
}
|
965
965
|
response = await self.publicGetTickersSymbol(self.extend(request, params))
|
@@ -1232,7 +1232,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1232
1232
|
# }
|
1233
1233
|
#
|
1234
1234
|
tickers = self.safe_list(response, 'result', [])
|
1235
|
-
result = {}
|
1235
|
+
result: dict = {}
|
1236
1236
|
for i in range(0, len(tickers)):
|
1237
1237
|
ticker = self.parse_ticker(tickers[i])
|
1238
1238
|
symbol = ticker['symbol']
|
@@ -1250,7 +1250,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1250
1250
|
"""
|
1251
1251
|
await self.load_markets()
|
1252
1252
|
market = self.market(symbol)
|
1253
|
-
request = {
|
1253
|
+
request: dict = {
|
1254
1254
|
'symbol': market['id'],
|
1255
1255
|
}
|
1256
1256
|
if limit is not None:
|
@@ -1277,7 +1277,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1277
1277
|
result = self.safe_dict(response, 'result', {})
|
1278
1278
|
return self.parse_order_book(result, market['symbol'], None, 'buy', 'sell', 'price', 'size')
|
1279
1279
|
|
1280
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1280
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
1281
1281
|
#
|
1282
1282
|
# public fetchTrades
|
1283
1283
|
#
|
@@ -1384,7 +1384,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1384
1384
|
"""
|
1385
1385
|
await self.load_markets()
|
1386
1386
|
market = self.market(symbol)
|
1387
|
-
request = {
|
1387
|
+
request: dict = {
|
1388
1388
|
'symbol': market['id'],
|
1389
1389
|
}
|
1390
1390
|
response = await self.publicGetTradesSymbol(self.extend(request, params))
|
@@ -1439,7 +1439,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1439
1439
|
"""
|
1440
1440
|
await self.load_markets()
|
1441
1441
|
market = self.market(symbol)
|
1442
|
-
request = {
|
1442
|
+
request: dict = {
|
1443
1443
|
'resolution': self.safe_string(self.timeframes, timeframe, timeframe),
|
1444
1444
|
}
|
1445
1445
|
duration = self.parse_timeframe(timeframe)
|
@@ -1476,7 +1476,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1476
1476
|
|
1477
1477
|
def parse_balance(self, response) -> Balances:
|
1478
1478
|
balances = self.safe_list(response, 'result', [])
|
1479
|
-
result = {'info': response}
|
1479
|
+
result: dict = {'info': response}
|
1480
1480
|
currenciesByNumericId = self.safe_dict(self.options, 'currenciesByNumericId', {})
|
1481
1481
|
for i in range(0, len(balances)):
|
1482
1482
|
balance = balances[i]
|
@@ -1531,7 +1531,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1531
1531
|
"""
|
1532
1532
|
await self.load_markets()
|
1533
1533
|
market = self.market(symbol)
|
1534
|
-
request = {
|
1534
|
+
request: dict = {
|
1535
1535
|
'product_id': market['numericId'],
|
1536
1536
|
}
|
1537
1537
|
response = await self.privateGetPositions(self.extend(request, params))
|
@@ -1582,7 +1582,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1582
1582
|
result = self.safe_list(response, 'result', [])
|
1583
1583
|
return self.parse_positions(result, symbols)
|
1584
1584
|
|
1585
|
-
def parse_position(self, position, market: Market = None):
|
1585
|
+
def parse_position(self, position: dict, market: Market = None):
|
1586
1586
|
#
|
1587
1587
|
# fetchPosition
|
1588
1588
|
#
|
@@ -1649,8 +1649,8 @@ class delta(Exchange, ImplicitAPI):
|
|
1649
1649
|
'takeProfitPrice': None,
|
1650
1650
|
})
|
1651
1651
|
|
1652
|
-
def parse_order_status(self, status):
|
1653
|
-
statuses = {
|
1652
|
+
def parse_order_status(self, status: Str):
|
1653
|
+
statuses: dict = {
|
1654
1654
|
'open': 'open',
|
1655
1655
|
'pending': 'open',
|
1656
1656
|
'closed': 'closed',
|
@@ -1658,7 +1658,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1658
1658
|
}
|
1659
1659
|
return self.safe_string(statuses, status, status)
|
1660
1660
|
|
1661
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1661
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1662
1662
|
#
|
1663
1663
|
# createOrder, cancelOrder, editOrder, fetchOpenOrders, fetchClosedOrders
|
1664
1664
|
#
|
@@ -1758,7 +1758,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1758
1758
|
await self.load_markets()
|
1759
1759
|
orderType = type + '_order'
|
1760
1760
|
market = self.market(symbol)
|
1761
|
-
request = {
|
1761
|
+
request: dict = {
|
1762
1762
|
'product_id': market['numericId'],
|
1763
1763
|
# 'limit_price': self.price_to_precision(market['symbol'], price),
|
1764
1764
|
'size': self.amount_to_precision(market['symbol'], amount),
|
@@ -1834,7 +1834,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1834
1834
|
"""
|
1835
1835
|
await self.load_markets()
|
1836
1836
|
market = self.market(symbol)
|
1837
|
-
request = {
|
1837
|
+
request: dict = {
|
1838
1838
|
'id': int(id),
|
1839
1839
|
'product_id': market['numericId'],
|
1840
1840
|
# "limit_price": self.price_to_precision(symbol, price),
|
@@ -1878,7 +1878,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1878
1878
|
raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
|
1879
1879
|
await self.load_markets()
|
1880
1880
|
market = self.market(symbol)
|
1881
|
-
request = {
|
1881
|
+
request: dict = {
|
1882
1882
|
'id': int(id),
|
1883
1883
|
'product_id': market['numericId'],
|
1884
1884
|
}
|
@@ -1934,7 +1934,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1934
1934
|
raise ArgumentsRequired(self.id + ' cancelAllOrders() requires a symbol argument')
|
1935
1935
|
await self.load_markets()
|
1936
1936
|
market = self.market(symbol)
|
1937
|
-
request = {
|
1937
|
+
request: dict = {
|
1938
1938
|
'product_id': market['numericId'],
|
1939
1939
|
# 'cancel_limit_orders': 'true',
|
1940
1940
|
# 'cancel_stop_orders': 'true',
|
@@ -1974,7 +1974,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1974
1974
|
|
1975
1975
|
async def fetch_orders_with_method(self, method, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1976
1976
|
await self.load_markets()
|
1977
|
-
request = {
|
1977
|
+
request: dict = {
|
1978
1978
|
# 'product_ids': market['id'], # comma-separated
|
1979
1979
|
# 'contract_types': types, # comma-separated, futures, perpetual_futures, call_options, put_options, interest_rate_swaps, move_options, spreads
|
1980
1980
|
# 'order_types': types, # comma-separated, market, limit, stop_market, stop_limit, all_stop
|
@@ -2034,7 +2034,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2034
2034
|
:returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
2035
2035
|
"""
|
2036
2036
|
await self.load_markets()
|
2037
|
-
request = {
|
2037
|
+
request: dict = {
|
2038
2038
|
# 'product_ids': market['id'], # comma-separated
|
2039
2039
|
# 'contract_types': types, # comma-separated, futures, perpetual_futures, call_options, put_options, interest_rate_swaps, move_options, spreads
|
2040
2040
|
# 'start_time': since * 1000,
|
@@ -2111,7 +2111,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2111
2111
|
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
|
2112
2112
|
"""
|
2113
2113
|
await self.load_markets()
|
2114
|
-
request = {
|
2114
|
+
request: dict = {
|
2115
2115
|
# 'asset_id': currency['numericId'],
|
2116
2116
|
# 'end_time': self.seconds(),
|
2117
2117
|
# 'after': 'string', # after cursor for pagination
|
@@ -2150,7 +2150,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2150
2150
|
return self.parse_ledger(result, currency, since, limit)
|
2151
2151
|
|
2152
2152
|
def parse_ledger_entry_type(self, type):
|
2153
|
-
types = {
|
2153
|
+
types: dict = {
|
2154
2154
|
'pnl': 'pnl',
|
2155
2155
|
'deposit': 'transaction',
|
2156
2156
|
'withdrawal': 'transaction',
|
@@ -2164,7 +2164,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2164
2164
|
}
|
2165
2165
|
return self.safe_string(types, type, type)
|
2166
2166
|
|
2167
|
-
def parse_ledger_entry(self, item, currency: Currency = None):
|
2167
|
+
def parse_ledger_entry(self, item: dict, currency: Currency = None):
|
2168
2168
|
#
|
2169
2169
|
# {
|
2170
2170
|
# "amount":"29.889184",
|
@@ -2229,7 +2229,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2229
2229
|
"""
|
2230
2230
|
await self.load_markets()
|
2231
2231
|
currency = self.currency(code)
|
2232
|
-
request = {
|
2232
|
+
request: dict = {
|
2233
2233
|
'asset_symbol': currency['id'],
|
2234
2234
|
}
|
2235
2235
|
networkCode = self.safe_string_upper(params, 'network')
|
@@ -2296,7 +2296,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2296
2296
|
market = self.market(symbol)
|
2297
2297
|
if not market['swap']:
|
2298
2298
|
raise BadSymbol(self.id + ' fetchFundingRate() supports swap contracts only')
|
2299
|
-
request = {
|
2299
|
+
request: dict = {
|
2300
2300
|
'symbol': market['id'],
|
2301
2301
|
}
|
2302
2302
|
response = await self.publicGetTickersSymbol(self.extend(request, params))
|
@@ -2358,7 +2358,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2358
2358
|
"""
|
2359
2359
|
await self.load_markets()
|
2360
2360
|
symbols = self.market_symbols(symbols)
|
2361
|
-
request = {
|
2361
|
+
request: dict = {
|
2362
2362
|
'contract_types': 'perpetual_futures',
|
2363
2363
|
}
|
2364
2364
|
response = await self.publicGetTickers(self.extend(request, params))
|
@@ -2508,7 +2508,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2508
2508
|
amount = str(amount)
|
2509
2509
|
if type == 'reduce':
|
2510
2510
|
amount = Precise.string_mul(amount, '-1')
|
2511
|
-
request = {
|
2511
|
+
request: dict = {
|
2512
2512
|
'product_id': market['numericId'],
|
2513
2513
|
'delta_margin': amount,
|
2514
2514
|
}
|
@@ -2587,7 +2587,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2587
2587
|
market = self.market(symbol)
|
2588
2588
|
if not market['contract']:
|
2589
2589
|
raise BadRequest(self.id + ' fetchOpenInterest() supports contract markets only')
|
2590
|
-
request = {
|
2590
|
+
request: dict = {
|
2591
2591
|
'symbol': market['id'],
|
2592
2592
|
}
|
2593
2593
|
response = await self.publicGetTickersSymbol(self.extend(request, params))
|
@@ -2719,7 +2719,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2719
2719
|
"""
|
2720
2720
|
await self.load_markets()
|
2721
2721
|
market = self.market(symbol)
|
2722
|
-
request = {
|
2722
|
+
request: dict = {
|
2723
2723
|
'product_id': market['numericId'],
|
2724
2724
|
}
|
2725
2725
|
response = await self.privateGetProductsProductIdOrdersLeverage(self.extend(request, params))
|
@@ -2763,7 +2763,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2763
2763
|
raise ArgumentsRequired(self.id + ' setLeverage() requires a symbol argument')
|
2764
2764
|
await self.load_markets()
|
2765
2765
|
market = self.market(symbol)
|
2766
|
-
request = {
|
2766
|
+
request: dict = {
|
2767
2767
|
'product_id': market['numericId'],
|
2768
2768
|
'leverage': leverage,
|
2769
2769
|
}
|
@@ -2794,7 +2794,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2794
2794
|
market = None
|
2795
2795
|
if symbol is not None:
|
2796
2796
|
market = self.market(symbol)
|
2797
|
-
request = {
|
2797
|
+
request: dict = {
|
2798
2798
|
'states': 'expired',
|
2799
2799
|
}
|
2800
2800
|
if limit is not None:
|
@@ -2943,7 +2943,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2943
2943
|
"""
|
2944
2944
|
await self.load_markets()
|
2945
2945
|
market = self.market(symbol)
|
2946
|
-
request = {
|
2946
|
+
request: dict = {
|
2947
2947
|
'symbol': market['id'],
|
2948
2948
|
}
|
2949
2949
|
response = await self.publicGetTickersSymbol(self.extend(request, params))
|
@@ -3088,7 +3088,7 @@ class delta(Exchange, ImplicitAPI):
|
|
3088
3088
|
:returns dict[]: A list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
|
3089
3089
|
"""
|
3090
3090
|
await self.load_markets()
|
3091
|
-
request = {
|
3091
|
+
request: dict = {
|
3092
3092
|
'close_all_portfolio': True,
|
3093
3093
|
'close_all_isolated': True,
|
3094
3094
|
# 'user_id': 12345,
|
@@ -3179,7 +3179,7 @@ class delta(Exchange, ImplicitAPI):
|
|
3179
3179
|
result = self.safe_dict(response, 'result', {})
|
3180
3180
|
return self.parse_margin_mode(result, market)
|
3181
3181
|
|
3182
|
-
def parse_margin_mode(self, marginMode, market=None) -> MarginMode:
|
3182
|
+
def parse_margin_mode(self, marginMode: dict, market=None) -> MarginMode:
|
3183
3183
|
symbol = None
|
3184
3184
|
if market is not None:
|
3185
3185
|
symbol = market['symbol']
|
@@ -3199,7 +3199,7 @@ class delta(Exchange, ImplicitAPI):
|
|
3199
3199
|
"""
|
3200
3200
|
await self.load_markets()
|
3201
3201
|
market = self.market(symbol)
|
3202
|
-
request = {
|
3202
|
+
request: dict = {
|
3203
3203
|
'symbol': market['id'],
|
3204
3204
|
}
|
3205
3205
|
response = await self.publicGetTickersSymbol(self.extend(request, params))
|