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.
Files changed (273) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/alpaca.py +1 -0
  3. ccxt/abstract/binance.py +9 -0
  4. ccxt/abstract/binancecoinm.py +9 -0
  5. ccxt/abstract/binanceus.py +9 -0
  6. ccxt/abstract/binanceusdm.py +9 -0
  7. ccxt/ace.py +36 -12
  8. ccxt/alpaca.py +113 -28
  9. ccxt/ascendex.py +65 -30
  10. ccxt/async_support/__init__.py +1 -1
  11. ccxt/async_support/ace.py +36 -12
  12. ccxt/async_support/alpaca.py +113 -28
  13. ccxt/async_support/ascendex.py +65 -30
  14. ccxt/async_support/base/exchange.py +3 -3
  15. ccxt/async_support/bigone.py +71 -27
  16. ccxt/async_support/binance.py +564 -323
  17. ccxt/async_support/bingx.py +208 -108
  18. ccxt/async_support/bit2c.py +34 -12
  19. ccxt/async_support/bitbank.py +42 -14
  20. ccxt/async_support/bitbns.py +29 -21
  21. ccxt/async_support/bitfinex.py +77 -33
  22. ccxt/async_support/bitfinex2.py +116 -44
  23. ccxt/async_support/bitflyer.py +54 -18
  24. ccxt/async_support/bitget.py +277 -145
  25. ccxt/async_support/bithumb.py +39 -14
  26. ccxt/async_support/bitmart.py +198 -132
  27. ccxt/async_support/bitmex.py +90 -30
  28. ccxt/async_support/bitopro.py +66 -22
  29. ccxt/async_support/bitrue.py +109 -57
  30. ccxt/async_support/bitso.py +55 -19
  31. ccxt/async_support/bitstamp.py +84 -36
  32. ccxt/async_support/bitteam.py +51 -17
  33. ccxt/async_support/bitvavo.py +57 -19
  34. ccxt/async_support/bl3p.py +26 -10
  35. ccxt/async_support/blockchaincom.py +63 -21
  36. ccxt/async_support/blofin.py +95 -38
  37. ccxt/async_support/btcalpha.py +48 -16
  38. ccxt/async_support/btcbox.py +27 -9
  39. ccxt/async_support/btcmarkets.py +57 -19
  40. ccxt/async_support/btcturk.py +36 -12
  41. ccxt/async_support/bybit.py +251 -95
  42. ccxt/async_support/cex.py +65 -22
  43. ccxt/async_support/coinbase.py +138 -56
  44. ccxt/async_support/coinbaseexchange.py +76 -28
  45. ccxt/async_support/coinbaseinternational.py +75 -27
  46. ccxt/async_support/coincatch.py +191 -97
  47. ccxt/async_support/coincheck.py +33 -11
  48. ccxt/async_support/coinex.py +212 -101
  49. ccxt/async_support/coinlist.py +87 -30
  50. ccxt/async_support/coinmate.py +55 -24
  51. ccxt/async_support/coinmetro.py +52 -18
  52. ccxt/async_support/coinone.py +27 -10
  53. ccxt/async_support/coinsph.py +73 -27
  54. ccxt/async_support/coinspot.py +25 -9
  55. ccxt/async_support/cryptocom.py +103 -38
  56. ccxt/async_support/currencycom.py +70 -23
  57. ccxt/async_support/delta.py +90 -30
  58. ccxt/async_support/deribit.py +138 -53
  59. ccxt/async_support/digifinex.py +114 -51
  60. ccxt/async_support/exmo.py +104 -45
  61. ccxt/async_support/gate.py +298 -155
  62. ccxt/async_support/gemini.py +57 -20
  63. ccxt/async_support/hashkey.py +151 -66
  64. ccxt/async_support/hitbtc.py +156 -73
  65. ccxt/async_support/hollaex.py +76 -25
  66. ccxt/async_support/htx.py +297 -240
  67. ccxt/async_support/huobijp.py +1 -0
  68. ccxt/async_support/hyperliquid.py +203 -42
  69. ccxt/async_support/idex.py +73 -24
  70. ccxt/async_support/independentreserve.py +12 -5
  71. ccxt/async_support/indodax.py +53 -16
  72. ccxt/async_support/kraken.py +107 -35
  73. ccxt/async_support/krakenfutures.py +88 -34
  74. ccxt/async_support/kucoin.py +211 -109
  75. ccxt/async_support/kucoinfutures.py +119 -42
  76. ccxt/async_support/kuna.py +80 -39
  77. ccxt/async_support/latoken.py +70 -33
  78. ccxt/async_support/lbank.py +90 -39
  79. ccxt/async_support/luno.py +54 -19
  80. ccxt/async_support/lykke.py +54 -19
  81. ccxt/async_support/mercado.py +1 -0
  82. ccxt/async_support/mexc.py +226 -108
  83. ccxt/async_support/ndax.py +58 -19
  84. ccxt/async_support/novadax.py +67 -22
  85. ccxt/async_support/oceanex.py +58 -19
  86. ccxt/async_support/okcoin.py +81 -38
  87. ccxt/async_support/okx.py +270 -109
  88. ccxt/async_support/onetrading.py +3 -1
  89. ccxt/async_support/oxfun.py +95 -36
  90. ccxt/async_support/p2b.py +49 -23
  91. ccxt/async_support/paradex.py +75 -27
  92. ccxt/async_support/paymium.py +31 -11
  93. ccxt/async_support/phemex.py +91 -41
  94. ccxt/async_support/poloniex.py +80 -30
  95. ccxt/async_support/poloniexfutures.py +72 -30
  96. ccxt/async_support/probit.py +64 -22
  97. ccxt/async_support/timex.py +58 -19
  98. ccxt/async_support/tokocrypto.py +63 -22
  99. ccxt/async_support/tradeogre.py +7 -2
  100. ccxt/async_support/upbit.py +72 -25
  101. ccxt/async_support/vertex.py +74 -28
  102. ccxt/async_support/wavesexchange.py +29 -8
  103. ccxt/async_support/wazirx.py +51 -17
  104. ccxt/async_support/whitebit.py +105 -41
  105. ccxt/async_support/woo.py +162 -65
  106. ccxt/async_support/woofipro.py +118 -49
  107. ccxt/async_support/xt.py +150 -73
  108. ccxt/async_support/yobit.py +49 -16
  109. ccxt/async_support/zaif.py +30 -10
  110. ccxt/async_support/zonda.py +46 -16
  111. ccxt/base/exchange.py +34 -34
  112. ccxt/base/types.py +1 -0
  113. ccxt/bigone.py +71 -27
  114. ccxt/binance.py +564 -323
  115. ccxt/bingx.py +208 -108
  116. ccxt/bit2c.py +34 -12
  117. ccxt/bitbank.py +42 -14
  118. ccxt/bitbns.py +29 -21
  119. ccxt/bitfinex.py +77 -33
  120. ccxt/bitfinex2.py +116 -44
  121. ccxt/bitflyer.py +54 -18
  122. ccxt/bitget.py +277 -145
  123. ccxt/bithumb.py +39 -14
  124. ccxt/bitmart.py +198 -132
  125. ccxt/bitmex.py +90 -30
  126. ccxt/bitopro.py +66 -22
  127. ccxt/bitrue.py +109 -57
  128. ccxt/bitso.py +55 -19
  129. ccxt/bitstamp.py +84 -36
  130. ccxt/bitteam.py +51 -17
  131. ccxt/bitvavo.py +57 -19
  132. ccxt/bl3p.py +26 -10
  133. ccxt/blockchaincom.py +63 -21
  134. ccxt/blofin.py +95 -38
  135. ccxt/btcalpha.py +48 -16
  136. ccxt/btcbox.py +27 -9
  137. ccxt/btcmarkets.py +57 -19
  138. ccxt/btcturk.py +36 -12
  139. ccxt/bybit.py +251 -95
  140. ccxt/cex.py +65 -22
  141. ccxt/coinbase.py +138 -56
  142. ccxt/coinbaseexchange.py +76 -28
  143. ccxt/coinbaseinternational.py +75 -27
  144. ccxt/coincatch.py +191 -97
  145. ccxt/coincheck.py +33 -11
  146. ccxt/coinex.py +212 -101
  147. ccxt/coinlist.py +87 -30
  148. ccxt/coinmate.py +55 -24
  149. ccxt/coinmetro.py +52 -18
  150. ccxt/coinone.py +27 -10
  151. ccxt/coinsph.py +73 -27
  152. ccxt/coinspot.py +25 -9
  153. ccxt/cryptocom.py +103 -38
  154. ccxt/currencycom.py +70 -23
  155. ccxt/delta.py +90 -30
  156. ccxt/deribit.py +138 -53
  157. ccxt/digifinex.py +114 -51
  158. ccxt/exmo.py +104 -45
  159. ccxt/gate.py +298 -155
  160. ccxt/gemini.py +57 -20
  161. ccxt/hashkey.py +151 -66
  162. ccxt/hitbtc.py +156 -73
  163. ccxt/hollaex.py +76 -25
  164. ccxt/htx.py +297 -240
  165. ccxt/huobijp.py +1 -0
  166. ccxt/hyperliquid.py +203 -42
  167. ccxt/idex.py +73 -24
  168. ccxt/independentreserve.py +12 -5
  169. ccxt/indodax.py +53 -16
  170. ccxt/kraken.py +107 -35
  171. ccxt/krakenfutures.py +88 -34
  172. ccxt/kucoin.py +211 -109
  173. ccxt/kucoinfutures.py +119 -42
  174. ccxt/kuna.py +80 -39
  175. ccxt/latoken.py +70 -33
  176. ccxt/lbank.py +90 -39
  177. ccxt/luno.py +54 -19
  178. ccxt/lykke.py +54 -19
  179. ccxt/mercado.py +1 -0
  180. ccxt/mexc.py +226 -108
  181. ccxt/ndax.py +58 -19
  182. ccxt/novadax.py +67 -22
  183. ccxt/oceanex.py +58 -19
  184. ccxt/okcoin.py +81 -38
  185. ccxt/okx.py +270 -109
  186. ccxt/onetrading.py +3 -1
  187. ccxt/oxfun.py +95 -36
  188. ccxt/p2b.py +49 -23
  189. ccxt/paradex.py +75 -27
  190. ccxt/paymium.py +31 -11
  191. ccxt/phemex.py +91 -41
  192. ccxt/poloniex.py +80 -30
  193. ccxt/poloniexfutures.py +72 -30
  194. ccxt/pro/__init__.py +1 -1
  195. ccxt/pro/alpaca.py +15 -5
  196. ccxt/pro/ascendex.py +18 -6
  197. ccxt/pro/binance.py +200 -119
  198. ccxt/pro/bingx.py +44 -24
  199. ccxt/pro/bitfinex.py +13 -5
  200. ccxt/pro/bitget.py +75 -36
  201. ccxt/pro/bithumb.py +12 -4
  202. ccxt/pro/bitmart.py +44 -20
  203. ccxt/pro/bitmex.py +42 -14
  204. ccxt/pro/bitopro.py +15 -5
  205. ccxt/pro/bitrue.py +7 -3
  206. ccxt/pro/bitvavo.py +51 -17
  207. ccxt/pro/blockchaincom.py +18 -6
  208. ccxt/pro/blofin.py +38 -13
  209. ccxt/pro/bybit.py +100 -42
  210. ccxt/pro/cex.py +48 -16
  211. ccxt/pro/coinbase.py +32 -12
  212. ccxt/pro/coinbaseexchange.py +1 -1
  213. ccxt/pro/coinbaseinternational.py +34 -14
  214. ccxt/pro/coincatch.py +54 -19
  215. ccxt/pro/coincheck.py +6 -2
  216. ccxt/pro/coinex.py +40 -20
  217. ccxt/pro/coinone.py +9 -3
  218. ccxt/pro/cryptocom.py +70 -26
  219. ccxt/pro/deribit.py +36 -12
  220. ccxt/pro/exmo.py +10 -4
  221. ccxt/pro/gate.py +64 -30
  222. ccxt/pro/gemini.py +21 -7
  223. ccxt/pro/hashkey.py +26 -8
  224. ccxt/pro/hitbtc.py +61 -37
  225. ccxt/pro/hollaex.py +15 -5
  226. ccxt/pro/htx.py +39 -21
  227. ccxt/pro/hyperliquid.py +41 -14
  228. ccxt/pro/kraken.py +49 -17
  229. ccxt/pro/krakenfutures.py +47 -24
  230. ccxt/pro/kucoin.py +60 -31
  231. ccxt/pro/kucoinfutures.py +41 -19
  232. ccxt/pro/lbank.py +27 -9
  233. ccxt/pro/luno.py +3 -1
  234. ccxt/pro/mexc.py +35 -17
  235. ccxt/pro/ndax.py +12 -4
  236. ccxt/pro/okcoin.py +18 -6
  237. ccxt/pro/okx.py +76 -28
  238. ccxt/pro/onetrading.py +21 -7
  239. ccxt/pro/oxfun.py +54 -20
  240. ccxt/pro/p2b.py +23 -11
  241. ccxt/pro/paradex.py +12 -4
  242. ccxt/pro/phemex.py +31 -19
  243. ccxt/pro/poloniex.py +50 -22
  244. ccxt/pro/poloniexfutures.py +17 -7
  245. ccxt/pro/probit.py +18 -6
  246. ccxt/pro/upbit.py +25 -9
  247. ccxt/pro/vertex.py +20 -6
  248. ccxt/pro/wazirx.py +21 -7
  249. ccxt/pro/whitebit.py +25 -9
  250. ccxt/pro/woo.py +32 -12
  251. ccxt/pro/woofipro.py +35 -13
  252. ccxt/pro/xt.py +46 -26
  253. ccxt/probit.py +64 -22
  254. ccxt/test/tests_helpers.py +2 -2
  255. ccxt/timex.py +58 -19
  256. ccxt/tokocrypto.py +63 -22
  257. ccxt/tradeogre.py +7 -2
  258. ccxt/upbit.py +72 -25
  259. ccxt/vertex.py +74 -28
  260. ccxt/wavesexchange.py +29 -8
  261. ccxt/wazirx.py +51 -17
  262. ccxt/whitebit.py +105 -41
  263. ccxt/woo.py +162 -65
  264. ccxt/woofipro.py +118 -49
  265. ccxt/xt.py +150 -73
  266. ccxt/yobit.py +49 -16
  267. ccxt/zaif.py +30 -10
  268. ccxt/zonda.py +46 -16
  269. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
  270. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/RECORD +273 -273
  271. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
  272. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
  273. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/top_level.txt +0 -0
ccxt/deribit.py CHANGED
@@ -504,7 +504,9 @@ class deribit(Exchange, ImplicitAPI):
504
504
  def fetch_time(self, params={}):
505
505
  """
506
506
  fetches the current integer timestamp in milliseconds from the exchange server
507
- :see: https://docs.deribit.com/#public-get_time
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
  def fetch_currencies(self, params={}) -> Currencies:
525
527
  """
526
528
  fetches all available currencies on an exchange
527
- :see: https://docs.deribit.com/#public-get_currencies
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
  def fetch_status(self, params={}):
596
600
  """
597
601
  the latest known information on the availability of the exchange API
598
- :see: https://docs.deribit.com/#public-status
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
  def fetch_accounts(self, params={}) -> List[Account]:
627
633
  """
628
634
  fetch all the accounts associated with a profile
629
- :see: https://docs.deribit.com/#private-get_subaccounts
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
  def fetch_markets(self, params={}) -> List[Market]:
695
703
  """
696
704
  retrieves data on all markets for deribit
697
- :see: https://docs.deribit.com/#public-get_currencies
698
- :see: https://docs.deribit.com/#public-get_instruments
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': (settle == quote),
881
- 'inverse': (settle != quote),
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
  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
- :see: https://docs.deribit.com/#private-get_account_summary
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
  def create_deposit_address(self, code: str, params={}):
989
1005
  """
990
1006
  create a currency deposit address
991
- :see: https://docs.deribit.com/#private-create_deposit_address
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
  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
- :see: https://docs.deribit.com/#private-get_current_deposit_address
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
  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
- :see: https://docs.deribit.com/#public-ticker
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
  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
- :see: https://docs.deribit.com/#public-get_book_summary_by_currency
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
  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
- :see: https://docs.deribit.com/#public-get_tradingview_chart_data
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
  def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
1398
1424
  """
1399
- :see: https://docs.deribit.com/#public-get_last_trades_by_instrument
1400
- :see: https://docs.deribit.com/#public-get_last_trades_by_instrument_and_time
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
  def fetch_trading_fees(self, params={}) -> TradingFees:
1458
1486
  """
1459
1487
  fetch the trading fees for multiple markets
1460
- :see: https://docs.deribit.com/#private-get_account_summary
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
  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
- :see: https://docs.deribit.com/#public-get_order_book
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['inverse']:
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
  def fetch_order(self, id: str, symbol: Str = None, params={}):
1751
1783
  """
1752
1784
  fetches information on an order made by the user
1753
- :see: https://docs.deribit.com/#private-get_order_state
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
  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
- :see: https://docs.deribit.com/#private-buy
1801
- :see: https://docs.deribit.com/#private-sell
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
  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
- :see: https://docs.deribit.com/#private-edit
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
  def cancel_order(self, id: str, symbol: Str = None, params={}):
1995
2034
  """
1996
2035
  cancels an open order
1997
- :see: https://docs.deribit.com/#private-cancel
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
  def cancel_all_orders(self, symbol: Str = None, params={}):
2012
2053
  """
2013
2054
  cancel all open orders
2014
- :see: https://docs.deribit.com/#private-cancel_all
2015
- :see: https://docs.deribit.com/#private-cancel_all_by_instrument
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
  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
- :see: https://docs.deribit.com/#private-get_open_orders_by_currency
2049
- :see: https://docs.deribit.com/#private-get_open_orders_by_instrument
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
  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
- :see: https://docs.deribit.com/#private-get_order_history_by_currency
2076
- :see: https://docs.deribit.com/#private-get_order_history_by_instrument
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
  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
- :see: https://docs.deribit.com/#private-get_user_trades_by_order
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
  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
- :see: https://docs.deribit.com/#private-get_user_trades_by_currency
2155
- :see: https://docs.deribit.com/#private-get_user_trades_by_currency_and_time
2156
- :see: https://docs.deribit.com/#private-get_user_trades_by_instrument
2157
- :see: https://docs.deribit.com/#private-get_user_trades_by_instrument_and_time
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
  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
- :see: https://docs.deribit.com/#private-get_deposits
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
  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
- :see: https://docs.deribit.com/#private-get_withdrawals
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
  def fetch_position(self, symbol: str, params={}):
2460
2515
  """
2461
2516
  fetch data on a single open contract trade position
2462
- :see: https://docs.deribit.com/#private-get_position
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
  def fetch_positions(self, symbols: Strings = None, params={}):
2503
2560
  """
2504
2561
  fetch all open positions
2505
- :see: https://docs.deribit.com/#private-get_positions
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
  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
- :see: https://docs.deribit.com/#public-get_historical_volatility
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
  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
- :see: https://docs.deribit.com/#private-get_transfers
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
  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
- :see: https://docs.deribit.com/#private-submit_transfer_to_user
2686
- :see: https://docs.deribit.com/#private-submit_transfer_to_subaccount
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
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2772
2837
  """
2773
2838
  make a withdrawal
2774
- :see: https://docs.deribit.com/#private-withdraw
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
  def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
2825
2892
  """
2826
2893
  fetch deposit and withdraw fees
2827
- :see: https://docs.deribit.com/#public-get_currencies
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
  def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
2860
2929
  """
2861
2930
  fetch the current funding rate
2862
- :see: https://docs.deribit.com/#public-get_funding_rate_value
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
  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
- :see: https://docs.deribit.com/#public-get_funding_rate_history
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
  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
- :see: https://docs.deribit.com/#public-get_last_settlements_by_currency
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
  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
- :see: https://docs.deribit.com/#private-get_settlement_history_by_instrument
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
  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
- :see: https://docs.deribit.com/#public-ticker
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
  def fetch_option(self, symbol: str, params={}) -> Option:
3261
3342
  """
3262
3343
  fetches option data that is commonly found in an option chain
3263
- :see: https://docs.deribit.com/#public-get_book_summary_by_instrument
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
  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
- :see: https://docs.deribit.com/#public-get_book_summary_by_currency
3314
- :param str currency: base currency to fetch an option chain for
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
  """