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/async_support/deribit.py
CHANGED
@@ -550,7 +550,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
550
550
|
# }
|
551
551
|
#
|
552
552
|
data = self.safe_value(response, 'result', {})
|
553
|
-
result = {}
|
553
|
+
result: dict = {}
|
554
554
|
for i in range(0, len(data)):
|
555
555
|
currency = data[i]
|
556
556
|
currencyId = self.safe_string(currency, 'currency')
|
@@ -699,7 +699,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
699
699
|
"""
|
700
700
|
instrumentsResponses = []
|
701
701
|
result = []
|
702
|
-
parsedMarkets = {}
|
702
|
+
parsedMarkets: dict = {}
|
703
703
|
fetchAllMarkets = None
|
704
704
|
fetchAllMarkets, params = self.handle_option_and_params(params, 'fetchMarkets', 'fetchAllMarkets', True)
|
705
705
|
if fetchAllMarkets:
|
@@ -734,7 +734,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
734
734
|
currenciesResult = self.safe_value(currenciesResponse, 'result', [])
|
735
735
|
for i in range(0, len(currenciesResult)):
|
736
736
|
currencyId = self.safe_string(currenciesResult[i], 'currency')
|
737
|
-
request = {
|
737
|
+
request: dict = {
|
738
738
|
'currency': currencyId,
|
739
739
|
}
|
740
740
|
instrumentsResponse = await self.publicGetGetInstruments(self.extend(request, params))
|
@@ -912,7 +912,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
912
912
|
return result
|
913
913
|
|
914
914
|
def parse_balance(self, balance) -> Balances:
|
915
|
-
result = {
|
915
|
+
result: dict = {
|
916
916
|
'info': balance,
|
917
917
|
}
|
918
918
|
currencyId = self.safe_string(balance, 'currency')
|
@@ -934,7 +934,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
934
934
|
await self.load_markets()
|
935
935
|
code = self.code_from_options('fetchBalance', params)
|
936
936
|
currency = self.currency(code)
|
937
|
-
request = {
|
937
|
+
request: dict = {
|
938
938
|
'currency': currency['id'],
|
939
939
|
}
|
940
940
|
response = await self.privateGetGetAccountSummary(self.extend(request, params))
|
@@ -993,7 +993,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
993
993
|
"""
|
994
994
|
await self.load_markets()
|
995
995
|
currency = self.currency(code)
|
996
|
-
request = {
|
996
|
+
request: dict = {
|
997
997
|
'currency': currency['id'],
|
998
998
|
}
|
999
999
|
response = await self.privateGetCreateDepositAddress(self.extend(request, params))
|
@@ -1029,7 +1029,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1029
1029
|
"""
|
1030
1030
|
await self.load_markets()
|
1031
1031
|
currency = self.currency(code)
|
1032
|
-
request = {
|
1032
|
+
request: dict = {
|
1033
1033
|
'currency': currency['id'],
|
1034
1034
|
}
|
1035
1035
|
response = await self.privateGetGetCurrentDepositAddress(self.extend(request, params))
|
@@ -1146,7 +1146,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1146
1146
|
"""
|
1147
1147
|
await self.load_markets()
|
1148
1148
|
market = self.market(symbol)
|
1149
|
-
request = {
|
1149
|
+
request: dict = {
|
1150
1150
|
'instrument_name': market['id'],
|
1151
1151
|
}
|
1152
1152
|
response = await self.publicGetTicker(self.extend(request, params))
|
@@ -1197,7 +1197,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1197
1197
|
if code is None:
|
1198
1198
|
raise ArgumentsRequired(self.id + ' fetchTickers requires a currency/code(eg: BTC/ETH/USDT) parameter to fetch tickers for')
|
1199
1199
|
currency = self.currency(code)
|
1200
|
-
request = {
|
1200
|
+
request: dict = {
|
1201
1201
|
'currency': currency['id'],
|
1202
1202
|
}
|
1203
1203
|
response = await self.publicGetGetBookSummaryByCurrency(self.extend(request, params))
|
@@ -1232,7 +1232,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1232
1232
|
# }
|
1233
1233
|
#
|
1234
1234
|
result = self.safe_list(response, 'result', [])
|
1235
|
-
tickers = {}
|
1235
|
+
tickers: dict = {}
|
1236
1236
|
for i in range(0, len(result)):
|
1237
1237
|
ticker = self.parse_ticker(result[i])
|
1238
1238
|
symbol = ticker['symbol']
|
@@ -1258,7 +1258,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1258
1258
|
if paginate:
|
1259
1259
|
return await self.fetch_paginated_call_deterministic('fetchOHLCV', symbol, since, limit, timeframe, params, 5000)
|
1260
1260
|
market = self.market(symbol)
|
1261
|
-
request = {
|
1261
|
+
request: dict = {
|
1262
1262
|
'instrument_name': market['id'],
|
1263
1263
|
'resolution': self.safe_string(self.timeframes, timeframe, timeframe),
|
1264
1264
|
}
|
@@ -1304,7 +1304,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1304
1304
|
ohlcvs = self.convert_trading_view_to_ohlcv(result, 'ticks', 'open', 'high', 'low', 'close', 'volume', True)
|
1305
1305
|
return self.parse_ohlcvs(ohlcvs, market, timeframe, since, limit)
|
1306
1306
|
|
1307
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1307
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
1308
1308
|
#
|
1309
1309
|
# fetchTrades(public)
|
1310
1310
|
#
|
@@ -1404,7 +1404,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1404
1404
|
"""
|
1405
1405
|
await self.load_markets()
|
1406
1406
|
market = self.market(symbol)
|
1407
|
-
request = {
|
1407
|
+
request: dict = {
|
1408
1408
|
'instrument_name': market['id'],
|
1409
1409
|
'include_old': True,
|
1410
1410
|
}
|
@@ -1460,7 +1460,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1460
1460
|
await self.load_markets()
|
1461
1461
|
code = self.code_from_options('fetchTradingFees', params)
|
1462
1462
|
currency = self.currency(code)
|
1463
|
-
request = {
|
1463
|
+
request: dict = {
|
1464
1464
|
'currency': currency['id'],
|
1465
1465
|
'extended': True,
|
1466
1466
|
}
|
@@ -1516,9 +1516,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
1516
1516
|
#
|
1517
1517
|
result = self.safe_value(response, 'result', {})
|
1518
1518
|
fees = self.safe_value(result, 'fees', [])
|
1519
|
-
perpetualFee = {}
|
1520
|
-
futureFee = {}
|
1521
|
-
optionFee = {}
|
1519
|
+
perpetualFee: dict = {}
|
1520
|
+
futureFee: dict = {}
|
1521
|
+
optionFee: dict = {}
|
1522
1522
|
for i in range(0, len(fees)):
|
1523
1523
|
fee = fees[i]
|
1524
1524
|
instrumentType = self.safe_string(fee, 'instrument_type')
|
@@ -1540,11 +1540,11 @@ class deribit(Exchange, ImplicitAPI):
|
|
1540
1540
|
'maker': self.safe_number(fee, 'maker_fee'),
|
1541
1541
|
'taker': self.safe_number(fee, 'taker_fee'),
|
1542
1542
|
}
|
1543
|
-
parsedFees = {}
|
1543
|
+
parsedFees: dict = {}
|
1544
1544
|
for i in range(0, len(self.symbols)):
|
1545
1545
|
symbol = self.symbols[i]
|
1546
1546
|
market = self.market(symbol)
|
1547
|
-
fee = {
|
1547
|
+
fee: dict = {
|
1548
1548
|
'info': market,
|
1549
1549
|
'symbol': symbol,
|
1550
1550
|
'percentage': True,
|
@@ -1572,7 +1572,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1572
1572
|
"""
|
1573
1573
|
await self.load_markets()
|
1574
1574
|
market = self.market(symbol)
|
1575
|
-
request = {
|
1575
|
+
request: dict = {
|
1576
1576
|
'instrument_name': market['id'],
|
1577
1577
|
}
|
1578
1578
|
if limit is not None:
|
@@ -1624,8 +1624,8 @@ class deribit(Exchange, ImplicitAPI):
|
|
1624
1624
|
orderbook['nonce'] = nonce
|
1625
1625
|
return orderbook
|
1626
1626
|
|
1627
|
-
def parse_order_status(self, status):
|
1628
|
-
statuses = {
|
1627
|
+
def parse_order_status(self, status: Str):
|
1628
|
+
statuses: dict = {
|
1629
1629
|
'open': 'open',
|
1630
1630
|
'cancelled': 'canceled',
|
1631
1631
|
'filled': 'closed',
|
@@ -1634,8 +1634,8 @@ class deribit(Exchange, ImplicitAPI):
|
|
1634
1634
|
}
|
1635
1635
|
return self.safe_string(statuses, status, status)
|
1636
1636
|
|
1637
|
-
def parse_time_in_force(self, timeInForce):
|
1638
|
-
timeInForces = {
|
1637
|
+
def parse_time_in_force(self, timeInForce: Str):
|
1638
|
+
timeInForces: dict = {
|
1639
1639
|
'good_til_cancelled': 'GTC',
|
1640
1640
|
'fill_or_kill': 'FOK',
|
1641
1641
|
'immediate_or_cancel': 'IOC',
|
@@ -1643,7 +1643,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1643
1643
|
return self.safe_string(timeInForces, timeInForce, timeInForce)
|
1644
1644
|
|
1645
1645
|
def parse_order_type(self, orderType):
|
1646
|
-
orderTypes = {
|
1646
|
+
orderTypes: dict = {
|
1647
1647
|
'stop_limit': 'limit',
|
1648
1648
|
'take_limit': 'limit',
|
1649
1649
|
'stop_market': 'market',
|
@@ -1651,7 +1651,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1651
1651
|
}
|
1652
1652
|
return self.safe_string(orderTypes, orderType, orderType)
|
1653
1653
|
|
1654
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1654
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1655
1655
|
#
|
1656
1656
|
# createOrder
|
1657
1657
|
#
|
@@ -1752,7 +1752,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1752
1752
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1753
1753
|
"""
|
1754
1754
|
await self.load_markets()
|
1755
|
-
request = {
|
1755
|
+
request: dict = {
|
1756
1756
|
'order_id': id,
|
1757
1757
|
}
|
1758
1758
|
market = None
|
@@ -1807,7 +1807,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1807
1807
|
"""
|
1808
1808
|
await self.load_markets()
|
1809
1809
|
market = self.market(symbol)
|
1810
|
-
request = {
|
1810
|
+
request: dict = {
|
1811
1811
|
'instrument_name': market['id'],
|
1812
1812
|
'amount': self.amount_to_precision(symbol, amount),
|
1813
1813
|
'type': type, # limit, stop_limit, market, stop_market, default is limit
|
@@ -1964,7 +1964,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1964
1964
|
if amount is None:
|
1965
1965
|
raise ArgumentsRequired(self.id + ' editOrder() requires an amount argument')
|
1966
1966
|
await self.load_markets()
|
1967
|
-
request = {
|
1967
|
+
request: dict = {
|
1968
1968
|
'order_id': id,
|
1969
1969
|
'amount': self.amount_to_precision(symbol, amount),
|
1970
1970
|
# 'post_only': False, # if the new price would cause the order to be filled immediately(as taker), the price will be changed to be just below the spread.
|
@@ -1997,7 +1997,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1997
1997
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1998
1998
|
"""
|
1999
1999
|
await self.load_markets()
|
2000
|
-
request = {
|
2000
|
+
request: dict = {
|
2001
2001
|
'order_id': id,
|
2002
2002
|
}
|
2003
2003
|
response = await self.privateGetCancel(self.extend(request, params))
|
@@ -2014,7 +2014,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2014
2014
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
2015
2015
|
"""
|
2016
2016
|
await self.load_markets()
|
2017
|
-
request = {}
|
2017
|
+
request: dict = {}
|
2018
2018
|
response = None
|
2019
2019
|
if symbol is None:
|
2020
2020
|
response = await self.privateGetCancelAll(self.extend(request, params))
|
@@ -2036,7 +2036,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2036
2036
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
2037
2037
|
"""
|
2038
2038
|
await self.load_markets()
|
2039
|
-
request = {}
|
2039
|
+
request: dict = {}
|
2040
2040
|
market = None
|
2041
2041
|
response = None
|
2042
2042
|
if symbol is None:
|
@@ -2063,7 +2063,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2063
2063
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
2064
2064
|
"""
|
2065
2065
|
await self.load_markets()
|
2066
|
-
request = {}
|
2066
|
+
request: dict = {}
|
2067
2067
|
market = None
|
2068
2068
|
response = None
|
2069
2069
|
if symbol is None:
|
@@ -2090,7 +2090,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2090
2090
|
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
2091
2091
|
"""
|
2092
2092
|
await self.load_markets()
|
2093
|
-
request = {
|
2093
|
+
request: dict = {
|
2094
2094
|
'order_id': id,
|
2095
2095
|
}
|
2096
2096
|
response = await self.privateGetGetUserTradesByOrder(self.extend(request, params))
|
@@ -2144,7 +2144,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2144
2144
|
:returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
2145
2145
|
"""
|
2146
2146
|
await self.load_markets()
|
2147
|
-
request = {
|
2147
|
+
request: dict = {
|
2148
2148
|
'include_old': True,
|
2149
2149
|
}
|
2150
2150
|
market = None
|
@@ -2219,7 +2219,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2219
2219
|
raise ArgumentsRequired(self.id + ' fetchDeposits() requires a currency code argument')
|
2220
2220
|
await self.load_markets()
|
2221
2221
|
currency = self.currency(code)
|
2222
|
-
request = {
|
2222
|
+
request: dict = {
|
2223
2223
|
'currency': currency['id'],
|
2224
2224
|
}
|
2225
2225
|
if limit is not None:
|
@@ -2263,7 +2263,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2263
2263
|
raise ArgumentsRequired(self.id + ' fetchWithdrawals() requires a currency code argument')
|
2264
2264
|
await self.load_markets()
|
2265
2265
|
currency = self.currency(code)
|
2266
|
-
request = {
|
2266
|
+
request: dict = {
|
2267
2267
|
'currency': currency['id'],
|
2268
2268
|
}
|
2269
2269
|
if limit is not None:
|
@@ -2298,13 +2298,13 @@ class deribit(Exchange, ImplicitAPI):
|
|
2298
2298
|
return self.parse_transactions(data, currency, since, limit, params)
|
2299
2299
|
|
2300
2300
|
def parse_transaction_status(self, status):
|
2301
|
-
statuses = {
|
2301
|
+
statuses: dict = {
|
2302
2302
|
'completed': 'ok',
|
2303
2303
|
'unconfirmed': 'pending',
|
2304
2304
|
}
|
2305
2305
|
return self.safe_string(statuses, status, status)
|
2306
2306
|
|
2307
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2307
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
2308
2308
|
#
|
2309
2309
|
# fetchWithdrawals
|
2310
2310
|
#
|
@@ -2372,7 +2372,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2372
2372
|
'fee': fee,
|
2373
2373
|
}
|
2374
2374
|
|
2375
|
-
def parse_position(self, position, market: Market = None):
|
2375
|
+
def parse_position(self, position: dict, market: Market = None):
|
2376
2376
|
#
|
2377
2377
|
# {
|
2378
2378
|
# "jsonrpc": "2.0",
|
@@ -2448,7 +2448,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2448
2448
|
"""
|
2449
2449
|
await self.load_markets()
|
2450
2450
|
market = self.market(symbol)
|
2451
|
-
request = {
|
2451
|
+
request: dict = {
|
2452
2452
|
'instrument_name': market['id'],
|
2453
2453
|
}
|
2454
2454
|
response = await self.privateGetGetPosition(self.extend(request, params))
|
@@ -2508,7 +2508,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2508
2508
|
code = settle if (settle is not None) else market['base']
|
2509
2509
|
kind = market['info']['kind']
|
2510
2510
|
currency = self.currency(code)
|
2511
|
-
request = {
|
2511
|
+
request: dict = {
|
2512
2512
|
'currency': currency['id'],
|
2513
2513
|
}
|
2514
2514
|
if kind is not None:
|
@@ -2556,7 +2556,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2556
2556
|
"""
|
2557
2557
|
await self.load_markets()
|
2558
2558
|
currency = self.currency(code)
|
2559
|
-
request = {
|
2559
|
+
request: dict = {
|
2560
2560
|
'currency': currency['id'],
|
2561
2561
|
}
|
2562
2562
|
response = await self.publicGetGetHistoricalVolatility(self.extend(request, params))
|
@@ -2618,7 +2618,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2618
2618
|
raise ArgumentsRequired(self.id + ' fetchTransfers() requires a currency code argument')
|
2619
2619
|
await self.load_markets()
|
2620
2620
|
currency = self.currency(code)
|
2621
|
-
request = {
|
2621
|
+
request: dict = {
|
2622
2622
|
'currency': currency['id'],
|
2623
2623
|
}
|
2624
2624
|
if limit is not None:
|
@@ -2675,7 +2675,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2675
2675
|
"""
|
2676
2676
|
await self.load_markets()
|
2677
2677
|
currency = self.currency(code)
|
2678
|
-
request = {
|
2678
|
+
request: dict = {
|
2679
2679
|
'amount': amount,
|
2680
2680
|
'currency': currency['id'],
|
2681
2681
|
'destination': toAccount,
|
@@ -2742,7 +2742,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2742
2742
|
}
|
2743
2743
|
|
2744
2744
|
def parse_transfer_status(self, status: Str) -> Str:
|
2745
|
-
statuses = {
|
2745
|
+
statuses: dict = {
|
2746
2746
|
'prepared': 'pending',
|
2747
2747
|
'confirmed': 'ok',
|
2748
2748
|
'cancelled': 'cancelled',
|
@@ -2765,7 +2765,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2765
2765
|
self.check_address(address)
|
2766
2766
|
await self.load_markets()
|
2767
2767
|
currency = self.currency(code)
|
2768
|
-
request = {
|
2768
|
+
request: dict = {
|
2769
2769
|
'currency': currency['id'],
|
2770
2770
|
'address': address, # must be in the address book
|
2771
2771
|
'amount': amount,
|
@@ -2851,7 +2851,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2851
2851
|
await self.load_markets()
|
2852
2852
|
market = self.market(symbol)
|
2853
2853
|
time = self.milliseconds()
|
2854
|
-
request = {
|
2854
|
+
request: dict = {
|
2855
2855
|
'instrument_name': market['id'],
|
2856
2856
|
'start_timestamp': time - (8 * 60 * 60 * 1000), # 8h ago,
|
2857
2857
|
'end_timestamp': time,
|
@@ -2889,7 +2889,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2889
2889
|
month = 30 * 24 * 60 * 60 * 1000
|
2890
2890
|
if since is None:
|
2891
2891
|
since = time - month
|
2892
|
-
request = {
|
2892
|
+
request: dict = {
|
2893
2893
|
'instrument_name': market['id'],
|
2894
2894
|
'start_timestamp': since - 1,
|
2895
2895
|
'end_timestamp': time,
|
@@ -2979,7 +2979,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2979
2979
|
market = self.market(symbol)
|
2980
2980
|
if market['spot']:
|
2981
2981
|
raise NotSupported(self.id + ' fetchLiquidations() does not support ' + market['type'] + ' markets')
|
2982
|
-
request = {
|
2982
|
+
request: dict = {
|
2983
2983
|
'instrument_name': market['id'],
|
2984
2984
|
'type': 'bankruptcy',
|
2985
2985
|
}
|
@@ -3046,7 +3046,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
3046
3046
|
market = self.market(symbol)
|
3047
3047
|
if market['spot']:
|
3048
3048
|
raise NotSupported(self.id + ' fetchMyLiquidations() does not support ' + market['type'] + ' markets')
|
3049
|
-
request = {
|
3049
|
+
request: dict = {
|
3050
3050
|
'instrument_name': market['id'],
|
3051
3051
|
'type': 'bankruptcy',
|
3052
3052
|
}
|
@@ -3119,7 +3119,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
3119
3119
|
"""
|
3120
3120
|
await self.load_markets()
|
3121
3121
|
market = self.market(symbol)
|
3122
|
-
request = {
|
3122
|
+
request: dict = {
|
3123
3123
|
'instrument_name': market['id'],
|
3124
3124
|
}
|
3125
3125
|
response = await self.publicGetTicker(self.extend(request, params))
|
@@ -3248,7 +3248,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
3248
3248
|
"""
|
3249
3249
|
await self.load_markets()
|
3250
3250
|
market = self.market(symbol)
|
3251
|
-
request = {
|
3251
|
+
request: dict = {
|
3252
3252
|
'instrument_name': market['id'],
|
3253
3253
|
}
|
3254
3254
|
response = await self.publicGetGetBookSummaryByInstrument(self.extend(request, params))
|
@@ -3298,7 +3298,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
3298
3298
|
"""
|
3299
3299
|
await self.load_markets()
|
3300
3300
|
currency = self.currency(code)
|
3301
|
-
request = {
|
3301
|
+
request: dict = {
|
3302
3302
|
'currency': currency['id'],
|
3303
3303
|
'kind': 'option',
|
3304
3304
|
}
|