ccxt 4.4.29__py2.py3-none-any.whl → 4.4.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/alpaca.py +1 -0
- ccxt/abstract/binance.py +9 -0
- ccxt/abstract/binancecoinm.py +9 -0
- ccxt/abstract/binanceus.py +9 -0
- ccxt/abstract/binanceusdm.py +9 -0
- ccxt/ace.py +36 -12
- ccxt/alpaca.py +113 -28
- ccxt/ascendex.py +65 -30
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +36 -12
- ccxt/async_support/alpaca.py +113 -28
- ccxt/async_support/ascendex.py +65 -30
- ccxt/async_support/base/exchange.py +3 -3
- ccxt/async_support/bigone.py +71 -27
- ccxt/async_support/binance.py +564 -323
- ccxt/async_support/bingx.py +208 -108
- ccxt/async_support/bit2c.py +34 -12
- ccxt/async_support/bitbank.py +42 -14
- ccxt/async_support/bitbns.py +29 -21
- ccxt/async_support/bitfinex.py +77 -33
- ccxt/async_support/bitfinex2.py +116 -44
- ccxt/async_support/bitflyer.py +54 -18
- ccxt/async_support/bitget.py +277 -145
- ccxt/async_support/bithumb.py +39 -14
- ccxt/async_support/bitmart.py +198 -132
- ccxt/async_support/bitmex.py +90 -30
- ccxt/async_support/bitopro.py +66 -22
- ccxt/async_support/bitrue.py +109 -57
- ccxt/async_support/bitso.py +55 -19
- ccxt/async_support/bitstamp.py +84 -36
- ccxt/async_support/bitteam.py +51 -17
- ccxt/async_support/bitvavo.py +57 -19
- ccxt/async_support/bl3p.py +26 -10
- ccxt/async_support/blockchaincom.py +63 -21
- ccxt/async_support/blofin.py +95 -38
- ccxt/async_support/btcalpha.py +48 -16
- ccxt/async_support/btcbox.py +27 -9
- ccxt/async_support/btcmarkets.py +57 -19
- ccxt/async_support/btcturk.py +36 -12
- ccxt/async_support/bybit.py +251 -95
- ccxt/async_support/cex.py +65 -22
- ccxt/async_support/coinbase.py +138 -56
- ccxt/async_support/coinbaseexchange.py +76 -28
- ccxt/async_support/coinbaseinternational.py +75 -27
- ccxt/async_support/coincatch.py +191 -97
- ccxt/async_support/coincheck.py +33 -11
- ccxt/async_support/coinex.py +212 -101
- ccxt/async_support/coinlist.py +87 -30
- ccxt/async_support/coinmate.py +55 -24
- ccxt/async_support/coinmetro.py +52 -18
- ccxt/async_support/coinone.py +27 -10
- ccxt/async_support/coinsph.py +73 -27
- ccxt/async_support/coinspot.py +25 -9
- ccxt/async_support/cryptocom.py +103 -38
- ccxt/async_support/currencycom.py +70 -23
- ccxt/async_support/delta.py +90 -30
- ccxt/async_support/deribit.py +138 -53
- ccxt/async_support/digifinex.py +114 -51
- ccxt/async_support/exmo.py +104 -45
- ccxt/async_support/gate.py +298 -155
- ccxt/async_support/gemini.py +57 -20
- ccxt/async_support/hashkey.py +151 -66
- ccxt/async_support/hitbtc.py +156 -73
- ccxt/async_support/hollaex.py +76 -25
- ccxt/async_support/htx.py +297 -240
- ccxt/async_support/huobijp.py +1 -0
- ccxt/async_support/hyperliquid.py +203 -42
- ccxt/async_support/idex.py +73 -24
- ccxt/async_support/independentreserve.py +12 -5
- ccxt/async_support/indodax.py +53 -16
- ccxt/async_support/kraken.py +107 -35
- ccxt/async_support/krakenfutures.py +88 -34
- ccxt/async_support/kucoin.py +211 -109
- ccxt/async_support/kucoinfutures.py +119 -42
- ccxt/async_support/kuna.py +80 -39
- ccxt/async_support/latoken.py +70 -33
- ccxt/async_support/lbank.py +90 -39
- ccxt/async_support/luno.py +54 -19
- ccxt/async_support/lykke.py +54 -19
- ccxt/async_support/mercado.py +1 -0
- ccxt/async_support/mexc.py +226 -108
- ccxt/async_support/ndax.py +58 -19
- ccxt/async_support/novadax.py +67 -22
- ccxt/async_support/oceanex.py +58 -19
- ccxt/async_support/okcoin.py +81 -38
- ccxt/async_support/okx.py +270 -109
- ccxt/async_support/onetrading.py +3 -1
- ccxt/async_support/oxfun.py +95 -36
- ccxt/async_support/p2b.py +49 -23
- ccxt/async_support/paradex.py +75 -27
- ccxt/async_support/paymium.py +31 -11
- ccxt/async_support/phemex.py +91 -41
- ccxt/async_support/poloniex.py +80 -30
- ccxt/async_support/poloniexfutures.py +72 -30
- ccxt/async_support/probit.py +64 -22
- ccxt/async_support/timex.py +58 -19
- ccxt/async_support/tokocrypto.py +63 -22
- ccxt/async_support/tradeogre.py +7 -2
- ccxt/async_support/upbit.py +72 -25
- ccxt/async_support/vertex.py +74 -28
- ccxt/async_support/wavesexchange.py +29 -8
- ccxt/async_support/wazirx.py +51 -17
- ccxt/async_support/whitebit.py +105 -41
- ccxt/async_support/woo.py +162 -65
- ccxt/async_support/woofipro.py +118 -49
- ccxt/async_support/xt.py +150 -73
- ccxt/async_support/yobit.py +49 -16
- ccxt/async_support/zaif.py +30 -10
- ccxt/async_support/zonda.py +46 -16
- ccxt/base/exchange.py +34 -34
- ccxt/base/types.py +1 -0
- ccxt/bigone.py +71 -27
- ccxt/binance.py +564 -323
- ccxt/bingx.py +208 -108
- ccxt/bit2c.py +34 -12
- ccxt/bitbank.py +42 -14
- ccxt/bitbns.py +29 -21
- ccxt/bitfinex.py +77 -33
- ccxt/bitfinex2.py +116 -44
- ccxt/bitflyer.py +54 -18
- ccxt/bitget.py +277 -145
- ccxt/bithumb.py +39 -14
- ccxt/bitmart.py +198 -132
- ccxt/bitmex.py +90 -30
- ccxt/bitopro.py +66 -22
- ccxt/bitrue.py +109 -57
- ccxt/bitso.py +55 -19
- ccxt/bitstamp.py +84 -36
- ccxt/bitteam.py +51 -17
- ccxt/bitvavo.py +57 -19
- ccxt/bl3p.py +26 -10
- ccxt/blockchaincom.py +63 -21
- ccxt/blofin.py +95 -38
- ccxt/btcalpha.py +48 -16
- ccxt/btcbox.py +27 -9
- ccxt/btcmarkets.py +57 -19
- ccxt/btcturk.py +36 -12
- ccxt/bybit.py +251 -95
- ccxt/cex.py +65 -22
- ccxt/coinbase.py +138 -56
- ccxt/coinbaseexchange.py +76 -28
- ccxt/coinbaseinternational.py +75 -27
- ccxt/coincatch.py +191 -97
- ccxt/coincheck.py +33 -11
- ccxt/coinex.py +212 -101
- ccxt/coinlist.py +87 -30
- ccxt/coinmate.py +55 -24
- ccxt/coinmetro.py +52 -18
- ccxt/coinone.py +27 -10
- ccxt/coinsph.py +73 -27
- ccxt/coinspot.py +25 -9
- ccxt/cryptocom.py +103 -38
- ccxt/currencycom.py +70 -23
- ccxt/delta.py +90 -30
- ccxt/deribit.py +138 -53
- ccxt/digifinex.py +114 -51
- ccxt/exmo.py +104 -45
- ccxt/gate.py +298 -155
- ccxt/gemini.py +57 -20
- ccxt/hashkey.py +151 -66
- ccxt/hitbtc.py +156 -73
- ccxt/hollaex.py +76 -25
- ccxt/htx.py +297 -240
- ccxt/huobijp.py +1 -0
- ccxt/hyperliquid.py +203 -42
- ccxt/idex.py +73 -24
- ccxt/independentreserve.py +12 -5
- ccxt/indodax.py +53 -16
- ccxt/kraken.py +107 -35
- ccxt/krakenfutures.py +88 -34
- ccxt/kucoin.py +211 -109
- ccxt/kucoinfutures.py +119 -42
- ccxt/kuna.py +80 -39
- ccxt/latoken.py +70 -33
- ccxt/lbank.py +90 -39
- ccxt/luno.py +54 -19
- ccxt/lykke.py +54 -19
- ccxt/mercado.py +1 -0
- ccxt/mexc.py +226 -108
- ccxt/ndax.py +58 -19
- ccxt/novadax.py +67 -22
- ccxt/oceanex.py +58 -19
- ccxt/okcoin.py +81 -38
- ccxt/okx.py +270 -109
- ccxt/onetrading.py +3 -1
- ccxt/oxfun.py +95 -36
- ccxt/p2b.py +49 -23
- ccxt/paradex.py +75 -27
- ccxt/paymium.py +31 -11
- ccxt/phemex.py +91 -41
- ccxt/poloniex.py +80 -30
- ccxt/poloniexfutures.py +72 -30
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +15 -5
- ccxt/pro/ascendex.py +18 -6
- ccxt/pro/binance.py +200 -119
- ccxt/pro/bingx.py +44 -24
- ccxt/pro/bitfinex.py +13 -5
- ccxt/pro/bitget.py +75 -36
- ccxt/pro/bithumb.py +12 -4
- ccxt/pro/bitmart.py +44 -20
- ccxt/pro/bitmex.py +42 -14
- ccxt/pro/bitopro.py +15 -5
- ccxt/pro/bitrue.py +7 -3
- ccxt/pro/bitvavo.py +51 -17
- ccxt/pro/blockchaincom.py +18 -6
- ccxt/pro/blofin.py +38 -13
- ccxt/pro/bybit.py +100 -42
- ccxt/pro/cex.py +48 -16
- ccxt/pro/coinbase.py +32 -12
- ccxt/pro/coinbaseexchange.py +1 -1
- ccxt/pro/coinbaseinternational.py +34 -14
- ccxt/pro/coincatch.py +54 -19
- ccxt/pro/coincheck.py +6 -2
- ccxt/pro/coinex.py +40 -20
- ccxt/pro/coinone.py +9 -3
- ccxt/pro/cryptocom.py +70 -26
- ccxt/pro/deribit.py +36 -12
- ccxt/pro/exmo.py +10 -4
- ccxt/pro/gate.py +64 -30
- ccxt/pro/gemini.py +21 -7
- ccxt/pro/hashkey.py +26 -8
- ccxt/pro/hitbtc.py +61 -37
- ccxt/pro/hollaex.py +15 -5
- ccxt/pro/htx.py +39 -21
- ccxt/pro/hyperliquid.py +41 -14
- ccxt/pro/kraken.py +49 -17
- ccxt/pro/krakenfutures.py +47 -24
- ccxt/pro/kucoin.py +60 -31
- ccxt/pro/kucoinfutures.py +41 -19
- ccxt/pro/lbank.py +27 -9
- ccxt/pro/luno.py +3 -1
- ccxt/pro/mexc.py +35 -17
- ccxt/pro/ndax.py +12 -4
- ccxt/pro/okcoin.py +18 -6
- ccxt/pro/okx.py +76 -28
- ccxt/pro/onetrading.py +21 -7
- ccxt/pro/oxfun.py +54 -20
- ccxt/pro/p2b.py +23 -11
- ccxt/pro/paradex.py +12 -4
- ccxt/pro/phemex.py +31 -19
- ccxt/pro/poloniex.py +50 -22
- ccxt/pro/poloniexfutures.py +17 -7
- ccxt/pro/probit.py +18 -6
- ccxt/pro/upbit.py +25 -9
- ccxt/pro/vertex.py +20 -6
- ccxt/pro/wazirx.py +21 -7
- ccxt/pro/whitebit.py +25 -9
- ccxt/pro/woo.py +32 -12
- ccxt/pro/woofipro.py +35 -13
- ccxt/pro/xt.py +46 -26
- ccxt/probit.py +64 -22
- ccxt/test/tests_helpers.py +2 -2
- ccxt/timex.py +58 -19
- ccxt/tokocrypto.py +63 -22
- ccxt/tradeogre.py +7 -2
- ccxt/upbit.py +72 -25
- ccxt/vertex.py +74 -28
- ccxt/wavesexchange.py +29 -8
- ccxt/wazirx.py +51 -17
- ccxt/whitebit.py +105 -41
- ccxt/woo.py +162 -65
- ccxt/woofipro.py +118 -49
- ccxt/xt.py +150 -73
- ccxt/yobit.py +49 -16
- ccxt/zaif.py +30 -10
- ccxt/zonda.py +46 -16
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/RECORD +273 -273
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/top_level.txt +0 -0
ccxt/async_support/deribit.py
CHANGED
@@ -504,7 +504,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
504
504
|
async def fetch_time(self, params={}):
|
505
505
|
"""
|
506
506
|
fetches the current integer timestamp in milliseconds from the exchange server
|
507
|
-
|
507
|
+
|
508
|
+
https://docs.deribit.com/#public-get_time
|
509
|
+
|
508
510
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
509
511
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
510
512
|
"""
|
@@ -524,7 +526,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
524
526
|
async def fetch_currencies(self, params={}) -> Currencies:
|
525
527
|
"""
|
526
528
|
fetches all available currencies on an exchange
|
527
|
-
|
529
|
+
|
530
|
+
https://docs.deribit.com/#public-get_currencies
|
531
|
+
|
528
532
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
529
533
|
:returns dict: an associative dictionary of currencies
|
530
534
|
"""
|
@@ -595,7 +599,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
595
599
|
async def fetch_status(self, params={}):
|
596
600
|
"""
|
597
601
|
the latest known information on the availability of the exchange API
|
598
|
-
|
602
|
+
|
603
|
+
https://docs.deribit.com/#public-status
|
604
|
+
|
599
605
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
600
606
|
:returns dict: a `status structure <https://docs.ccxt.com/#/?id=exchange-status-structure>`
|
601
607
|
"""
|
@@ -626,7 +632,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
626
632
|
async def fetch_accounts(self, params={}) -> List[Account]:
|
627
633
|
"""
|
628
634
|
fetch all the accounts associated with a profile
|
629
|
-
|
635
|
+
|
636
|
+
https://docs.deribit.com/#private-get_subaccounts
|
637
|
+
|
630
638
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
631
639
|
:returns dict: a dictionary of `account structures <https://docs.ccxt.com/#/?id=account-structure>` indexed by the account type
|
632
640
|
"""
|
@@ -694,8 +702,10 @@ class deribit(Exchange, ImplicitAPI):
|
|
694
702
|
async def fetch_markets(self, params={}) -> List[Market]:
|
695
703
|
"""
|
696
704
|
retrieves data on all markets for deribit
|
697
|
-
|
698
|
-
|
705
|
+
|
706
|
+
https://docs.deribit.com/#public-get_currencies
|
707
|
+
https://docs.deribit.com/#public-get_instruments
|
708
|
+
|
699
709
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
700
710
|
:returns dict[]: an array of objects representing market data
|
701
711
|
"""
|
@@ -843,6 +853,8 @@ class deribit(Exchange, ImplicitAPI):
|
|
843
853
|
type = 'option'
|
844
854
|
elif isSpot:
|
845
855
|
type = 'spot'
|
856
|
+
inverse = None
|
857
|
+
linear = None
|
846
858
|
if isSpot:
|
847
859
|
symbol = base + '/' + quote
|
848
860
|
elif not isComboMarket:
|
@@ -854,6 +866,8 @@ class deribit(Exchange, ImplicitAPI):
|
|
854
866
|
optionType = self.safe_string(market, 'option_type')
|
855
867
|
letter = 'C' if (optionType == 'call') else 'P'
|
856
868
|
symbol = symbol + '-' + self.number_to_string(strike) + '-' + letter
|
869
|
+
inverse = (quote != settle)
|
870
|
+
linear = (settle == quote)
|
857
871
|
parsedMarketValue = self.safe_value(parsedMarkets, symbol)
|
858
872
|
if parsedMarketValue:
|
859
873
|
continue
|
@@ -877,8 +891,8 @@ class deribit(Exchange, ImplicitAPI):
|
|
877
891
|
'option': option,
|
878
892
|
'active': self.safe_value(market, 'is_active'),
|
879
893
|
'contract': not isSpot,
|
880
|
-
'linear':
|
881
|
-
'inverse':
|
894
|
+
'linear': linear,
|
895
|
+
'inverse': inverse,
|
882
896
|
'taker': self.safe_number(market, 'taker_commission'),
|
883
897
|
'maker': self.safe_number(market, 'maker_commission'),
|
884
898
|
'contractSize': self.safe_number(market, 'contract_size'),
|
@@ -929,7 +943,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
929
943
|
async def fetch_balance(self, params={}) -> Balances:
|
930
944
|
"""
|
931
945
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
932
|
-
|
946
|
+
|
947
|
+
https://docs.deribit.com/#private-get_account_summary
|
948
|
+
|
933
949
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
934
950
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
935
951
|
"""
|
@@ -988,7 +1004,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
988
1004
|
async def create_deposit_address(self, code: str, params={}):
|
989
1005
|
"""
|
990
1006
|
create a currency deposit address
|
991
|
-
|
1007
|
+
|
1008
|
+
https://docs.deribit.com/#private-create_deposit_address
|
1009
|
+
|
992
1010
|
:param str code: unified currency code of the currency for the deposit address
|
993
1011
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
994
1012
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -1024,7 +1042,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
1024
1042
|
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1025
1043
|
"""
|
1026
1044
|
fetch the deposit address for a currency associated with self account
|
1027
|
-
|
1045
|
+
|
1046
|
+
https://docs.deribit.com/#private-get_current_deposit_address
|
1047
|
+
|
1028
1048
|
:param str code: unified currency code
|
1029
1049
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1030
1050
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -1143,7 +1163,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
1143
1163
|
async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
1144
1164
|
"""
|
1145
1165
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
1146
|
-
|
1166
|
+
|
1167
|
+
https://docs.deribit.com/#public-ticker
|
1168
|
+
|
1147
1169
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
1148
1170
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1149
1171
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -1188,7 +1210,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
1188
1210
|
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
1189
1211
|
"""
|
1190
1212
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
1191
|
-
|
1213
|
+
|
1214
|
+
https://docs.deribit.com/#public-get_book_summary_by_currency
|
1215
|
+
|
1192
1216
|
:param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
1193
1217
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1194
1218
|
:param str [params.code]: *required* the currency code to fetch the tickers for, eg. 'BTC', 'ETH'
|
@@ -1246,7 +1270,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
1246
1270
|
async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
1247
1271
|
"""
|
1248
1272
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1249
|
-
|
1273
|
+
|
1274
|
+
https://docs.deribit.com/#public-get_tradingview_chart_data
|
1275
|
+
|
1250
1276
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
1251
1277
|
:param str timeframe: the length of time each candle represents
|
1252
1278
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -1396,8 +1422,10 @@ class deribit(Exchange, ImplicitAPI):
|
|
1396
1422
|
|
1397
1423
|
async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
1398
1424
|
"""
|
1399
|
-
|
1400
|
-
|
1425
|
+
|
1426
|
+
https://docs.deribit.com/#public-get_last_trades_by_instrument
|
1427
|
+
https://docs.deribit.com/#public-get_last_trades_by_instrument_and_time
|
1428
|
+
|
1401
1429
|
get the list of most recent trades for a particular symbol.
|
1402
1430
|
:param str symbol: unified symbol of the market to fetch trades for
|
1403
1431
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
@@ -1457,7 +1485,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
1457
1485
|
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
1458
1486
|
"""
|
1459
1487
|
fetch the trading fees for multiple markets
|
1460
|
-
|
1488
|
+
|
1489
|
+
https://docs.deribit.com/#private-get_account_summary
|
1490
|
+
|
1461
1491
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1462
1492
|
:returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
|
1463
1493
|
"""
|
@@ -1568,7 +1598,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
1568
1598
|
async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
1569
1599
|
"""
|
1570
1600
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
1571
|
-
|
1601
|
+
|
1602
|
+
https://docs.deribit.com/#public-get_order_book
|
1603
|
+
|
1572
1604
|
:param str symbol: unified symbol of the market to fetch the order book for
|
1573
1605
|
:param int [limit]: the maximum amount of order book entries to return
|
1574
1606
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1697,7 +1729,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1697
1729
|
filledString = self.safe_string(order, 'filled_amount')
|
1698
1730
|
amount = self.safe_string(order, 'amount')
|
1699
1731
|
cost = Precise.string_mul(filledString, averageString)
|
1700
|
-
if market
|
1732
|
+
if self.safe_bool(market, 'inverse'):
|
1701
1733
|
if averageString != '0':
|
1702
1734
|
cost = Precise.string_div(amount, averageString)
|
1703
1735
|
lastTradeTimestamp = None
|
@@ -1750,7 +1782,10 @@ class deribit(Exchange, ImplicitAPI):
|
|
1750
1782
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1751
1783
|
"""
|
1752
1784
|
fetches information on an order made by the user
|
1753
|
-
|
1785
|
+
|
1786
|
+
https://docs.deribit.com/#private-get_order_state
|
1787
|
+
|
1788
|
+
:param str id: order id
|
1754
1789
|
:param str symbol: unified symbol of the market the order was made in
|
1755
1790
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1756
1791
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1797,8 +1832,10 @@ class deribit(Exchange, ImplicitAPI):
|
|
1797
1832
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
1798
1833
|
"""
|
1799
1834
|
create a trade order
|
1800
|
-
|
1801
|
-
|
1835
|
+
|
1836
|
+
https://docs.deribit.com/#private-buy
|
1837
|
+
https://docs.deribit.com/#private-sell
|
1838
|
+
|
1802
1839
|
:param str symbol: unified symbol of the market to create an order in
|
1803
1840
|
:param str type: 'market' or 'limit'
|
1804
1841
|
:param str side: 'buy' or 'sell'
|
@@ -1954,7 +1991,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
1954
1991
|
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
|
1955
1992
|
"""
|
1956
1993
|
edit a trade order
|
1957
|
-
|
1994
|
+
|
1995
|
+
https://docs.deribit.com/#private-edit
|
1996
|
+
|
1958
1997
|
:param str id: edit order id
|
1959
1998
|
:param str [symbol]: unified symbol of the market to edit an order in
|
1960
1999
|
:param str [type]: 'market' or 'limit'
|
@@ -1994,7 +2033,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
1994
2033
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1995
2034
|
"""
|
1996
2035
|
cancels an open order
|
1997
|
-
|
2036
|
+
|
2037
|
+
https://docs.deribit.com/#private-cancel
|
2038
|
+
|
1998
2039
|
:param str id: order id
|
1999
2040
|
:param str symbol: not used by deribit cancelOrder()
|
2000
2041
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -2011,8 +2052,10 @@ class deribit(Exchange, ImplicitAPI):
|
|
2011
2052
|
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
2012
2053
|
"""
|
2013
2054
|
cancel all open orders
|
2014
|
-
|
2015
|
-
|
2055
|
+
|
2056
|
+
https://docs.deribit.com/#private-cancel_all
|
2057
|
+
https://docs.deribit.com/#private-cancel_all_by_instrument
|
2058
|
+
|
2016
2059
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
2017
2060
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2018
2061
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2045,8 +2088,10 @@ class deribit(Exchange, ImplicitAPI):
|
|
2045
2088
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
2046
2089
|
"""
|
2047
2090
|
fetch all unfilled currently open orders
|
2048
|
-
|
2049
|
-
|
2091
|
+
|
2092
|
+
https://docs.deribit.com/#private-get_open_orders_by_currency
|
2093
|
+
https://docs.deribit.com/#private-get_open_orders_by_instrument
|
2094
|
+
|
2050
2095
|
:param str symbol: unified market symbol
|
2051
2096
|
:param int [since]: the earliest time in ms to fetch open orders for
|
2052
2097
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
@@ -2072,8 +2117,10 @@ class deribit(Exchange, ImplicitAPI):
|
|
2072
2117
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
2073
2118
|
"""
|
2074
2119
|
fetches information on multiple closed orders made by the user
|
2075
|
-
|
2076
|
-
|
2120
|
+
|
2121
|
+
https://docs.deribit.com/#private-get_order_history_by_currency
|
2122
|
+
https://docs.deribit.com/#private-get_order_history_by_instrument
|
2123
|
+
|
2077
2124
|
:param str symbol: unified market symbol of the market orders were made in
|
2078
2125
|
:param int [since]: the earliest time in ms to fetch orders for
|
2079
2126
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -2099,7 +2146,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2099
2146
|
async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2100
2147
|
"""
|
2101
2148
|
fetch all the trades made from a single order
|
2102
|
-
|
2149
|
+
|
2150
|
+
https://docs.deribit.com/#private-get_user_trades_by_order
|
2151
|
+
|
2103
2152
|
:param str id: order id
|
2104
2153
|
:param str symbol: unified market symbol
|
2105
2154
|
:param int [since]: the earliest time in ms to fetch trades for
|
@@ -2151,10 +2200,12 @@ class deribit(Exchange, ImplicitAPI):
|
|
2151
2200
|
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2152
2201
|
"""
|
2153
2202
|
fetch all trades made by the user
|
2154
|
-
|
2155
|
-
|
2156
|
-
|
2157
|
-
|
2203
|
+
|
2204
|
+
https://docs.deribit.com/#private-get_user_trades_by_currency
|
2205
|
+
https://docs.deribit.com/#private-get_user_trades_by_currency_and_time
|
2206
|
+
https://docs.deribit.com/#private-get_user_trades_by_instrument
|
2207
|
+
https://docs.deribit.com/#private-get_user_trades_by_instrument_and_time
|
2208
|
+
|
2158
2209
|
:param str symbol: unified market symbol
|
2159
2210
|
:param int [since]: the earliest time in ms to fetch trades for
|
2160
2211
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -2226,7 +2277,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2226
2277
|
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2227
2278
|
"""
|
2228
2279
|
fetch all deposits made to an account
|
2229
|
-
|
2280
|
+
|
2281
|
+
https://docs.deribit.com/#private-get_deposits
|
2282
|
+
|
2230
2283
|
:param str code: unified currency code
|
2231
2284
|
:param int [since]: the earliest time in ms to fetch deposits for
|
2232
2285
|
:param int [limit]: the maximum number of deposits structures to retrieve
|
@@ -2270,7 +2323,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2270
2323
|
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2271
2324
|
"""
|
2272
2325
|
fetch all withdrawals made from an account
|
2273
|
-
|
2326
|
+
|
2327
|
+
https://docs.deribit.com/#private-get_withdrawals
|
2328
|
+
|
2274
2329
|
:param str code: unified currency code
|
2275
2330
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
2276
2331
|
:param int [limit]: the maximum number of withdrawals structures to retrieve
|
@@ -2459,7 +2514,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2459
2514
|
async def fetch_position(self, symbol: str, params={}):
|
2460
2515
|
"""
|
2461
2516
|
fetch data on a single open contract trade position
|
2462
|
-
|
2517
|
+
|
2518
|
+
https://docs.deribit.com/#private-get_position
|
2519
|
+
|
2463
2520
|
:param str symbol: unified market symbol of the market the position is held in, default is None
|
2464
2521
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2465
2522
|
:returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
|
@@ -2502,7 +2559,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2502
2559
|
async def fetch_positions(self, symbols: Strings = None, params={}):
|
2503
2560
|
"""
|
2504
2561
|
fetch all open positions
|
2505
|
-
|
2562
|
+
|
2563
|
+
https://docs.deribit.com/#private-get_positions
|
2564
|
+
|
2506
2565
|
:param str[]|None symbols: list of unified market symbols
|
2507
2566
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2508
2567
|
:param str [params.kind]: market type filter for positions 'future', 'option', 'spot', 'future_combo' or 'option_combo'
|
@@ -2567,7 +2626,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2567
2626
|
async def fetch_volatility_history(self, code: str, params={}):
|
2568
2627
|
"""
|
2569
2628
|
fetch the historical volatility of an option market based on an underlying asset
|
2570
|
-
|
2629
|
+
|
2630
|
+
https://docs.deribit.com/#public-get_historical_volatility
|
2631
|
+
|
2571
2632
|
:param str code: unified currency code
|
2572
2633
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2573
2634
|
:returns dict[]: a list of `volatility history objects <https://docs.ccxt.com/#/?id=volatility-structure>`
|
@@ -2625,7 +2686,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2625
2686
|
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
2626
2687
|
"""
|
2627
2688
|
fetch a history of internal transfers made on an account
|
2628
|
-
|
2689
|
+
|
2690
|
+
https://docs.deribit.com/#private-get_transfers
|
2691
|
+
|
2629
2692
|
:param str code: unified currency code of the currency transferred
|
2630
2693
|
:param int [since]: the earliest time in ms to fetch transfers for
|
2631
2694
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
@@ -2682,8 +2745,10 @@ class deribit(Exchange, ImplicitAPI):
|
|
2682
2745
|
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
2683
2746
|
"""
|
2684
2747
|
transfer currency internally between wallets on the same account
|
2685
|
-
|
2686
|
-
|
2748
|
+
|
2749
|
+
https://docs.deribit.com/#private-submit_transfer_to_user
|
2750
|
+
https://docs.deribit.com/#private-submit_transfer_to_subaccount
|
2751
|
+
|
2687
2752
|
:param str code: unified currency code
|
2688
2753
|
:param float amount: amount to transfer
|
2689
2754
|
:param str fromAccount: account to transfer from
|
@@ -2771,7 +2836,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2771
2836
|
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2772
2837
|
"""
|
2773
2838
|
make a withdrawal
|
2774
|
-
|
2839
|
+
|
2840
|
+
https://docs.deribit.com/#private-withdraw
|
2841
|
+
|
2775
2842
|
:param str code: unified currency code
|
2776
2843
|
:param float amount: the amount to withdraw
|
2777
2844
|
:param str address: the address to withdraw to
|
@@ -2824,7 +2891,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2824
2891
|
async def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
|
2825
2892
|
"""
|
2826
2893
|
fetch deposit and withdraw fees
|
2827
|
-
|
2894
|
+
|
2895
|
+
https://docs.deribit.com/#public-get_currencies
|
2896
|
+
|
2828
2897
|
:param str[]|None codes: list of unified currency codes
|
2829
2898
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2830
2899
|
:returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -2859,7 +2928,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2859
2928
|
async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
2860
2929
|
"""
|
2861
2930
|
fetch the current funding rate
|
2862
|
-
|
2931
|
+
|
2932
|
+
https://docs.deribit.com/#public-get_funding_rate_value
|
2933
|
+
|
2863
2934
|
:param str symbol: unified market symbol
|
2864
2935
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2865
2936
|
:param int [params.start_timestamp]: fetch funding rate starting from self timestamp
|
@@ -2890,8 +2961,12 @@ class deribit(Exchange, ImplicitAPI):
|
|
2890
2961
|
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2891
2962
|
"""
|
2892
2963
|
fetch the current funding rate
|
2893
|
-
|
2964
|
+
|
2965
|
+
https://docs.deribit.com/#public-get_funding_rate_history
|
2966
|
+
|
2894
2967
|
:param str symbol: unified market symbol
|
2968
|
+
@param since
|
2969
|
+
@param limit
|
2895
2970
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2896
2971
|
:param int [params.end_timestamp]: fetch funding rate ending at self timestamp
|
2897
2972
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
@@ -2982,7 +3057,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
2982
3057
|
async def fetch_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}):
|
2983
3058
|
"""
|
2984
3059
|
retrieves the public liquidations of a trading pair
|
2985
|
-
|
3060
|
+
|
3061
|
+
https://docs.deribit.com/#public-get_last_settlements_by_currency
|
3062
|
+
|
2986
3063
|
:param str symbol: unified CCXT market symbol
|
2987
3064
|
:param int [since]: the earliest time in ms to fetch liquidations for
|
2988
3065
|
:param int [limit]: the maximum number of liquidation structures to retrieve
|
@@ -3052,7 +3129,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
3052
3129
|
async def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3053
3130
|
"""
|
3054
3131
|
retrieves the users liquidated positions
|
3055
|
-
|
3132
|
+
|
3133
|
+
https://docs.deribit.com/#private-get_settlement_history_by_instrument
|
3134
|
+
|
3056
3135
|
:param str symbol: unified CCXT market symbol
|
3057
3136
|
:param int [since]: the earliest time in ms to fetch liquidations for
|
3058
3137
|
:param int [limit]: the maximum number of liquidation structures to retrieve
|
@@ -3131,7 +3210,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
3131
3210
|
async def fetch_greeks(self, symbol: str, params={}) -> Greeks:
|
3132
3211
|
"""
|
3133
3212
|
fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
|
3134
|
-
|
3213
|
+
|
3214
|
+
https://docs.deribit.com/#public-ticker
|
3215
|
+
|
3135
3216
|
:param str symbol: unified symbol of the market to fetch greeks for
|
3136
3217
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3137
3218
|
:returns dict: a `greeks structure <https://docs.ccxt.com/#/?id=greeks-structure>`
|
@@ -3260,7 +3341,9 @@ class deribit(Exchange, ImplicitAPI):
|
|
3260
3341
|
async def fetch_option(self, symbol: str, params={}) -> Option:
|
3261
3342
|
"""
|
3262
3343
|
fetches option data that is commonly found in an option chain
|
3263
|
-
|
3344
|
+
|
3345
|
+
https://docs.deribit.com/#public-get_book_summary_by_instrument
|
3346
|
+
|
3264
3347
|
:param str symbol: unified market symbol
|
3265
3348
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3266
3349
|
:returns dict: an `option chain structure <https://docs.ccxt.com/#/?id=option-chain-structure>`
|
@@ -3310,8 +3393,10 @@ class deribit(Exchange, ImplicitAPI):
|
|
3310
3393
|
async def fetch_option_chain(self, code: str, params={}) -> OptionChain:
|
3311
3394
|
"""
|
3312
3395
|
fetches data for an underlying asset that is commonly found in an option chain
|
3313
|
-
|
3314
|
-
|
3396
|
+
|
3397
|
+
https://docs.deribit.com/#public-get_book_summary_by_currency
|
3398
|
+
|
3399
|
+
:param str code: base currency to fetch an option chain for
|
3315
3400
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3316
3401
|
:returns dict: a list of `option chain structures <https://docs.ccxt.com/#/?id=option-chain-structure>`
|
3317
3402
|
"""
|