ccxt 4.4.30__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 (267) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ace.py +36 -12
  3. ccxt/alpaca.py +62 -22
  4. ccxt/ascendex.py +65 -30
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ace.py +36 -12
  7. ccxt/async_support/alpaca.py +62 -22
  8. ccxt/async_support/ascendex.py +65 -30
  9. ccxt/async_support/base/exchange.py +3 -3
  10. ccxt/async_support/bigone.py +71 -27
  11. ccxt/async_support/binance.py +555 -323
  12. ccxt/async_support/bingx.py +208 -108
  13. ccxt/async_support/bit2c.py +34 -12
  14. ccxt/async_support/bitbank.py +42 -14
  15. ccxt/async_support/bitbns.py +17 -9
  16. ccxt/async_support/bitfinex.py +68 -24
  17. ccxt/async_support/bitfinex2.py +116 -44
  18. ccxt/async_support/bitflyer.py +54 -18
  19. ccxt/async_support/bitget.py +277 -145
  20. ccxt/async_support/bithumb.py +39 -14
  21. ccxt/async_support/bitmart.py +145 -79
  22. ccxt/async_support/bitmex.py +90 -30
  23. ccxt/async_support/bitopro.py +66 -22
  24. ccxt/async_support/bitrue.py +109 -57
  25. ccxt/async_support/bitso.py +55 -19
  26. ccxt/async_support/bitstamp.py +84 -36
  27. ccxt/async_support/bitteam.py +51 -17
  28. ccxt/async_support/bitvavo.py +57 -19
  29. ccxt/async_support/bl3p.py +26 -10
  30. ccxt/async_support/blockchaincom.py +63 -21
  31. ccxt/async_support/blofin.py +95 -38
  32. ccxt/async_support/btcalpha.py +48 -16
  33. ccxt/async_support/btcbox.py +27 -9
  34. ccxt/async_support/btcmarkets.py +57 -19
  35. ccxt/async_support/btcturk.py +36 -12
  36. ccxt/async_support/bybit.py +251 -95
  37. ccxt/async_support/cex.py +65 -22
  38. ccxt/async_support/coinbase.py +138 -56
  39. ccxt/async_support/coinbaseexchange.py +76 -28
  40. ccxt/async_support/coinbaseinternational.py +75 -27
  41. ccxt/async_support/coincatch.py +191 -97
  42. ccxt/async_support/coincheck.py +33 -11
  43. ccxt/async_support/coinex.py +212 -101
  44. ccxt/async_support/coinlist.py +87 -30
  45. ccxt/async_support/coinmate.py +55 -24
  46. ccxt/async_support/coinmetro.py +52 -18
  47. ccxt/async_support/coinone.py +27 -10
  48. ccxt/async_support/coinsph.py +73 -27
  49. ccxt/async_support/coinspot.py +25 -9
  50. ccxt/async_support/cryptocom.py +103 -38
  51. ccxt/async_support/currencycom.py +70 -23
  52. ccxt/async_support/delta.py +90 -30
  53. ccxt/async_support/deribit.py +131 -50
  54. ccxt/async_support/digifinex.py +114 -51
  55. ccxt/async_support/exmo.py +104 -45
  56. ccxt/async_support/gate.py +298 -155
  57. ccxt/async_support/gemini.py +57 -20
  58. ccxt/async_support/hashkey.py +151 -66
  59. ccxt/async_support/hitbtc.py +156 -73
  60. ccxt/async_support/hollaex.py +76 -25
  61. ccxt/async_support/htx.py +297 -240
  62. ccxt/async_support/huobijp.py +1 -0
  63. ccxt/async_support/hyperliquid.py +94 -38
  64. ccxt/async_support/idex.py +73 -24
  65. ccxt/async_support/independentreserve.py +12 -5
  66. ccxt/async_support/indodax.py +53 -16
  67. ccxt/async_support/kraken.py +107 -35
  68. ccxt/async_support/krakenfutures.py +88 -34
  69. ccxt/async_support/kucoin.py +211 -109
  70. ccxt/async_support/kucoinfutures.py +119 -42
  71. ccxt/async_support/kuna.py +80 -39
  72. ccxt/async_support/latoken.py +70 -33
  73. ccxt/async_support/lbank.py +89 -38
  74. ccxt/async_support/luno.py +54 -19
  75. ccxt/async_support/lykke.py +54 -19
  76. ccxt/async_support/mercado.py +1 -0
  77. ccxt/async_support/mexc.py +226 -108
  78. ccxt/async_support/ndax.py +58 -19
  79. ccxt/async_support/novadax.py +67 -22
  80. ccxt/async_support/oceanex.py +58 -19
  81. ccxt/async_support/okcoin.py +81 -38
  82. ccxt/async_support/okx.py +270 -109
  83. ccxt/async_support/onetrading.py +3 -1
  84. ccxt/async_support/oxfun.py +95 -36
  85. ccxt/async_support/p2b.py +49 -23
  86. ccxt/async_support/paradex.py +75 -27
  87. ccxt/async_support/paymium.py +31 -11
  88. ccxt/async_support/phemex.py +91 -41
  89. ccxt/async_support/poloniex.py +80 -30
  90. ccxt/async_support/poloniexfutures.py +72 -30
  91. ccxt/async_support/probit.py +64 -22
  92. ccxt/async_support/timex.py +58 -19
  93. ccxt/async_support/tokocrypto.py +63 -22
  94. ccxt/async_support/tradeogre.py +7 -2
  95. ccxt/async_support/upbit.py +72 -25
  96. ccxt/async_support/vertex.py +74 -28
  97. ccxt/async_support/wavesexchange.py +29 -8
  98. ccxt/async_support/wazirx.py +51 -17
  99. ccxt/async_support/whitebit.py +105 -41
  100. ccxt/async_support/woo.py +162 -65
  101. ccxt/async_support/woofipro.py +118 -49
  102. ccxt/async_support/xt.py +150 -73
  103. ccxt/async_support/yobit.py +49 -16
  104. ccxt/async_support/zaif.py +30 -10
  105. ccxt/async_support/zonda.py +46 -16
  106. ccxt/base/exchange.py +34 -34
  107. ccxt/base/types.py +1 -0
  108. ccxt/bigone.py +71 -27
  109. ccxt/binance.py +555 -323
  110. ccxt/bingx.py +208 -108
  111. ccxt/bit2c.py +34 -12
  112. ccxt/bitbank.py +42 -14
  113. ccxt/bitbns.py +17 -9
  114. ccxt/bitfinex.py +68 -24
  115. ccxt/bitfinex2.py +116 -44
  116. ccxt/bitflyer.py +54 -18
  117. ccxt/bitget.py +277 -145
  118. ccxt/bithumb.py +39 -14
  119. ccxt/bitmart.py +145 -79
  120. ccxt/bitmex.py +90 -30
  121. ccxt/bitopro.py +66 -22
  122. ccxt/bitrue.py +109 -57
  123. ccxt/bitso.py +55 -19
  124. ccxt/bitstamp.py +84 -36
  125. ccxt/bitteam.py +51 -17
  126. ccxt/bitvavo.py +57 -19
  127. ccxt/bl3p.py +26 -10
  128. ccxt/blockchaincom.py +63 -21
  129. ccxt/blofin.py +95 -38
  130. ccxt/btcalpha.py +48 -16
  131. ccxt/btcbox.py +27 -9
  132. ccxt/btcmarkets.py +57 -19
  133. ccxt/btcturk.py +36 -12
  134. ccxt/bybit.py +251 -95
  135. ccxt/cex.py +65 -22
  136. ccxt/coinbase.py +138 -56
  137. ccxt/coinbaseexchange.py +76 -28
  138. ccxt/coinbaseinternational.py +75 -27
  139. ccxt/coincatch.py +191 -97
  140. ccxt/coincheck.py +33 -11
  141. ccxt/coinex.py +212 -101
  142. ccxt/coinlist.py +87 -30
  143. ccxt/coinmate.py +55 -24
  144. ccxt/coinmetro.py +52 -18
  145. ccxt/coinone.py +27 -10
  146. ccxt/coinsph.py +73 -27
  147. ccxt/coinspot.py +25 -9
  148. ccxt/cryptocom.py +103 -38
  149. ccxt/currencycom.py +70 -23
  150. ccxt/delta.py +90 -30
  151. ccxt/deribit.py +131 -50
  152. ccxt/digifinex.py +114 -51
  153. ccxt/exmo.py +104 -45
  154. ccxt/gate.py +298 -155
  155. ccxt/gemini.py +57 -20
  156. ccxt/hashkey.py +151 -66
  157. ccxt/hitbtc.py +156 -73
  158. ccxt/hollaex.py +76 -25
  159. ccxt/htx.py +297 -240
  160. ccxt/huobijp.py +1 -0
  161. ccxt/hyperliquid.py +94 -38
  162. ccxt/idex.py +73 -24
  163. ccxt/independentreserve.py +12 -5
  164. ccxt/indodax.py +53 -16
  165. ccxt/kraken.py +107 -35
  166. ccxt/krakenfutures.py +88 -34
  167. ccxt/kucoin.py +211 -109
  168. ccxt/kucoinfutures.py +119 -42
  169. ccxt/kuna.py +80 -39
  170. ccxt/latoken.py +70 -33
  171. ccxt/lbank.py +89 -38
  172. ccxt/luno.py +54 -19
  173. ccxt/lykke.py +54 -19
  174. ccxt/mercado.py +1 -0
  175. ccxt/mexc.py +226 -108
  176. ccxt/ndax.py +58 -19
  177. ccxt/novadax.py +67 -22
  178. ccxt/oceanex.py +58 -19
  179. ccxt/okcoin.py +81 -38
  180. ccxt/okx.py +270 -109
  181. ccxt/onetrading.py +3 -1
  182. ccxt/oxfun.py +95 -36
  183. ccxt/p2b.py +49 -23
  184. ccxt/paradex.py +75 -27
  185. ccxt/paymium.py +31 -11
  186. ccxt/phemex.py +91 -41
  187. ccxt/poloniex.py +80 -30
  188. ccxt/poloniexfutures.py +72 -30
  189. ccxt/pro/__init__.py +1 -1
  190. ccxt/pro/alpaca.py +15 -5
  191. ccxt/pro/ascendex.py +18 -6
  192. ccxt/pro/binance.py +200 -119
  193. ccxt/pro/bingx.py +44 -24
  194. ccxt/pro/bitfinex.py +13 -5
  195. ccxt/pro/bitget.py +75 -36
  196. ccxt/pro/bithumb.py +12 -4
  197. ccxt/pro/bitmart.py +44 -20
  198. ccxt/pro/bitmex.py +42 -14
  199. ccxt/pro/bitopro.py +15 -5
  200. ccxt/pro/bitrue.py +7 -3
  201. ccxt/pro/bitvavo.py +51 -17
  202. ccxt/pro/blockchaincom.py +18 -6
  203. ccxt/pro/blofin.py +36 -12
  204. ccxt/pro/bybit.py +100 -42
  205. ccxt/pro/cex.py +48 -16
  206. ccxt/pro/coinbase.py +32 -12
  207. ccxt/pro/coinbaseexchange.py +1 -1
  208. ccxt/pro/coinbaseinternational.py +34 -14
  209. ccxt/pro/coincatch.py +54 -19
  210. ccxt/pro/coincheck.py +6 -2
  211. ccxt/pro/coinex.py +40 -20
  212. ccxt/pro/coinone.py +9 -3
  213. ccxt/pro/cryptocom.py +70 -26
  214. ccxt/pro/deribit.py +36 -12
  215. ccxt/pro/exmo.py +10 -4
  216. ccxt/pro/gate.py +64 -30
  217. ccxt/pro/gemini.py +21 -7
  218. ccxt/pro/hashkey.py +26 -8
  219. ccxt/pro/hitbtc.py +61 -37
  220. ccxt/pro/hollaex.py +15 -5
  221. ccxt/pro/htx.py +39 -21
  222. ccxt/pro/hyperliquid.py +41 -14
  223. ccxt/pro/kraken.py +49 -17
  224. ccxt/pro/krakenfutures.py +47 -24
  225. ccxt/pro/kucoin.py +60 -31
  226. ccxt/pro/kucoinfutures.py +41 -19
  227. ccxt/pro/lbank.py +27 -9
  228. ccxt/pro/luno.py +3 -1
  229. ccxt/pro/mexc.py +35 -17
  230. ccxt/pro/ndax.py +12 -4
  231. ccxt/pro/okcoin.py +18 -6
  232. ccxt/pro/okx.py +76 -28
  233. ccxt/pro/onetrading.py +21 -7
  234. ccxt/pro/oxfun.py +54 -20
  235. ccxt/pro/p2b.py +23 -11
  236. ccxt/pro/paradex.py +12 -4
  237. ccxt/pro/phemex.py +31 -19
  238. ccxt/pro/poloniex.py +50 -22
  239. ccxt/pro/poloniexfutures.py +17 -7
  240. ccxt/pro/probit.py +18 -6
  241. ccxt/pro/upbit.py +25 -9
  242. ccxt/pro/vertex.py +20 -6
  243. ccxt/pro/wazirx.py +21 -7
  244. ccxt/pro/whitebit.py +25 -9
  245. ccxt/pro/woo.py +32 -12
  246. ccxt/pro/woofipro.py +35 -13
  247. ccxt/pro/xt.py +46 -26
  248. ccxt/probit.py +64 -22
  249. ccxt/timex.py +58 -19
  250. ccxt/tokocrypto.py +63 -22
  251. ccxt/tradeogre.py +7 -2
  252. ccxt/upbit.py +72 -25
  253. ccxt/vertex.py +74 -28
  254. ccxt/wavesexchange.py +29 -8
  255. ccxt/wazirx.py +51 -17
  256. ccxt/whitebit.py +105 -41
  257. ccxt/woo.py +162 -65
  258. ccxt/woofipro.py +118 -49
  259. ccxt/xt.py +150 -73
  260. ccxt/yobit.py +49 -16
  261. ccxt/zaif.py +30 -10
  262. ccxt/zonda.py +46 -16
  263. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
  264. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/RECORD +267 -267
  265. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
  266. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
  267. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/top_level.txt +0 -0
ccxt/async_support/okx.py CHANGED
@@ -1290,7 +1290,9 @@ class okx(Exchange, ImplicitAPI):
1290
1290
  async def fetch_status(self, params={}):
1291
1291
  """
1292
1292
  the latest known information on the availability of the exchange API
1293
- :see: https://www.okx.com/docs-v5/en/#status-get-status
1293
+
1294
+ https://www.okx.com/docs-v5/en/#status-get-status
1295
+
1294
1296
  :param dict [params]: extra parameters specific to the exchange API endpoint
1295
1297
  :returns dict: a `status structure <https://docs.ccxt.com/#/?id=exchange-status-structure>`
1296
1298
  """
@@ -1342,7 +1344,9 @@ class okx(Exchange, ImplicitAPI):
1342
1344
  async def fetch_time(self, params={}):
1343
1345
  """
1344
1346
  fetches the current integer timestamp in milliseconds from the exchange server
1345
- :see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-system-time
1347
+
1348
+ https://www.okx.com/docs-v5/en/#public-data-rest-api-get-system-time
1349
+
1346
1350
  :param dict [params]: extra parameters specific to the exchange API endpoint
1347
1351
  :returns int: the current integer timestamp in milliseconds from the exchange server
1348
1352
  """
@@ -1363,7 +1367,9 @@ class okx(Exchange, ImplicitAPI):
1363
1367
  async def fetch_accounts(self, params={}) -> List[Account]:
1364
1368
  """
1365
1369
  fetch all the accounts associated with a profile
1366
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
1370
+
1371
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
1372
+
1367
1373
  :param dict [params]: extra parameters specific to the exchange API endpoint
1368
1374
  :returns dict: a dictionary of `account structures <https://docs.ccxt.com/#/?id=account-structure>` indexed by the account type
1369
1375
  """
@@ -1405,7 +1411,9 @@ class okx(Exchange, ImplicitAPI):
1405
1411
  async def fetch_markets(self, params={}) -> List[Market]:
1406
1412
  """
1407
1413
  retrieves data on all markets for okx
1408
- :see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-instruments
1414
+
1415
+ https://www.okx.com/docs-v5/en/#rest-api-public-data-get-instruments
1416
+
1409
1417
  :param dict [params]: extra parameters specific to the exchange API endpoint
1410
1418
  :returns dict[]: an array of objects representing market data
1411
1419
  """
@@ -1618,7 +1626,9 @@ class okx(Exchange, ImplicitAPI):
1618
1626
  async def fetch_currencies(self, params={}) -> Currencies:
1619
1627
  """
1620
1628
  fetches all available currencies on an exchange
1621
- :see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
1629
+
1630
+ https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
1631
+
1622
1632
  :param dict [params]: extra parameters specific to the exchange API endpoint
1623
1633
  :returns dict: an associative dictionary of currencies
1624
1634
  """
@@ -1751,7 +1761,9 @@ class okx(Exchange, ImplicitAPI):
1751
1761
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
1752
1762
  """
1753
1763
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
1754
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-order-book
1764
+
1765
+ https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-order-book
1766
+
1755
1767
  :param str symbol: unified symbol of the market to fetch the order book for
1756
1768
  :param int [limit]: the maximum amount of order book entries to return
1757
1769
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1878,7 +1890,9 @@ class okx(Exchange, ImplicitAPI):
1878
1890
  async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
1879
1891
  """
1880
1892
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1881
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
1893
+
1894
+ https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
1895
+
1882
1896
  :param str symbol: unified symbol of the market to fetch the ticker for
1883
1897
  :param dict [params]: extra parameters specific to the exchange API endpoint
1884
1898
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -1922,7 +1936,9 @@ class okx(Exchange, ImplicitAPI):
1922
1936
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
1923
1937
  """
1924
1938
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1925
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
1939
+
1940
+ https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
1941
+
1926
1942
  :param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1927
1943
  :param dict [params]: extra parameters specific to the exchange API endpoint
1928
1944
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -1975,7 +1991,9 @@ class okx(Exchange, ImplicitAPI):
1975
1991
  async def fetch_mark_price(self, symbol: str, params={}) -> Ticker:
1976
1992
  """
1977
1993
  fetches mark price for the market
1978
- :see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-mark-price
1994
+
1995
+ https://www.okx.com/docs-v5/en/#public-data-rest-api-get-mark-price
1996
+
1979
1997
  :param str symbol: unified symbol of the market to fetch the ticker for
1980
1998
  :param dict [params]: extra parameters specific to the exchange API endpoint
1981
1999
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -2006,7 +2024,9 @@ class okx(Exchange, ImplicitAPI):
2006
2024
  async def fetch_mark_prices(self, symbols: Strings = None, params={}) -> Tickers:
2007
2025
  """
2008
2026
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
2009
- :see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-mark-price
2027
+
2028
+ https://www.okx.com/docs-v5/en/#public-data-rest-api-get-mark-price
2029
+
2010
2030
  :param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2011
2031
  :param dict [params]: extra parameters specific to the exchange API endpoint
2012
2032
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -2123,8 +2143,10 @@ class okx(Exchange, ImplicitAPI):
2123
2143
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
2124
2144
  """
2125
2145
  get the list of most recent trades for a particular symbol
2126
- :see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-trades
2127
- :see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-option-trades
2146
+
2147
+ https://www.okx.com/docs-v5/en/#rest-api-market-data-get-trades
2148
+ https://www.okx.com/docs-v5/en/#rest-api-public-data-get-option-trades
2149
+
2128
2150
  :param str symbol: unified symbol of the market to fetch trades for
2129
2151
  :param int [since]: timestamp in ms of the earliest trade to fetch
2130
2152
  :param int [limit]: the maximum amount of trades to fetch
@@ -2219,12 +2241,14 @@ class okx(Exchange, ImplicitAPI):
2219
2241
  async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
2220
2242
  """
2221
2243
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
2222
- :see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks
2223
- :see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks-history
2224
- :see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks
2225
- :see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks-history
2226
- :see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks
2227
- :see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks-history
2244
+
2245
+ https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks
2246
+ https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks-history
2247
+ https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks
2248
+ https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks-history
2249
+ https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks
2250
+ https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks-history
2251
+
2228
2252
  :param str symbol: unified symbol of the market to fetch OHLCV data for
2229
2253
  :param str timeframe: the length of time each candle represents
2230
2254
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -2309,7 +2333,9 @@ class okx(Exchange, ImplicitAPI):
2309
2333
  async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2310
2334
  """
2311
2335
  fetches historical funding rate prices
2312
- :see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate-history
2336
+
2337
+ https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate-history
2338
+
2313
2339
  :param str symbol: unified symbol of the market to fetch the funding rate history for
2314
2340
  :param int [since]: timestamp in ms of the earliest funding rate to fetch
2315
2341
  :param int [limit]: the maximum amount of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>` to fetch
@@ -2443,7 +2469,9 @@ class okx(Exchange, ImplicitAPI):
2443
2469
  async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
2444
2470
  """
2445
2471
  fetch the trading fees for a market
2446
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-fee-rates
2472
+
2473
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-fee-rates
2474
+
2447
2475
  :param str symbol: unified market symbol
2448
2476
  :param dict [params]: extra parameters specific to the exchange API endpoint
2449
2477
  :returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -2488,8 +2516,10 @@ class okx(Exchange, ImplicitAPI):
2488
2516
  async def fetch_balance(self, params={}) -> Balances:
2489
2517
  """
2490
2518
  query for balance and get the amount of funds available for trading or funds locked in orders
2491
- :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-balance
2492
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-balance
2519
+
2520
+ https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-balance
2521
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-balance
2522
+
2493
2523
  :param dict [params]: extra parameters specific to the exchange API endpoint
2494
2524
  :param str [params.type]: wallet type, ['funding' or 'trading'] default is 'trading'
2495
2525
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
@@ -2610,7 +2640,9 @@ class okx(Exchange, ImplicitAPI):
2610
2640
 
2611
2641
  async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
2612
2642
  """
2613
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
2643
+
2644
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
2645
+
2614
2646
  create a market buy order by providing the symbol and cost
2615
2647
  :param str symbol: unified symbol of the market to create an order in
2616
2648
  :param float cost: how much you want to trade in units of the quote currency
@@ -2627,7 +2659,9 @@ class okx(Exchange, ImplicitAPI):
2627
2659
 
2628
2660
  async def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
2629
2661
  """
2630
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
2662
+
2663
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
2664
+
2631
2665
  create a market buy order by providing the symbol and cost
2632
2666
  :param str symbol: unified symbol of the market to create an order in
2633
2667
  :param float cost: how much you want to trade in units of the quote currency
@@ -2867,9 +2901,11 @@ class okx(Exchange, ImplicitAPI):
2867
2901
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
2868
2902
  """
2869
2903
  create a trade order
2870
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
2871
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
2872
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-place-algo-order
2904
+
2905
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
2906
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
2907
+ https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-place-algo-order
2908
+
2873
2909
  :param str symbol: unified symbol of the market to create an order in
2874
2910
  :param str type: 'market' or 'limit'
2875
2911
  :param str side: 'buy' or 'sell'
@@ -2923,8 +2959,11 @@ class okx(Exchange, ImplicitAPI):
2923
2959
  async def create_orders(self, orders: List[OrderRequest], params={}):
2924
2960
  """
2925
2961
  create a list of trade orders
2926
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
2962
+
2963
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
2964
+
2927
2965
  :param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
2966
+ :param dict [params]: extra parameters specific to the exchange API endpoint
2928
2967
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2929
2968
  """
2930
2969
  await self.load_markets()
@@ -3045,8 +3084,10 @@ class okx(Exchange, ImplicitAPI):
3045
3084
  async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
3046
3085
  """
3047
3086
  edit a trade order
3048
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-amend-order
3049
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-amend-algo-order
3087
+
3088
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-amend-order
3089
+ https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-amend-algo-order
3090
+
3050
3091
  :param str id: order id
3051
3092
  :param str symbol: unified symbol of the market to create an order in
3052
3093
  :param str type: 'market' or 'limit'
@@ -3108,8 +3149,10 @@ class okx(Exchange, ImplicitAPI):
3108
3149
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
3109
3150
  """
3110
3151
  cancels an open order
3111
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-order
3112
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
3152
+
3153
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-order
3154
+ https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
3155
+
3113
3156
  :param str id: order id
3114
3157
  :param str symbol: unified symbol of the market the order was made in
3115
3158
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -3145,7 +3188,7 @@ class okx(Exchange, ImplicitAPI):
3145
3188
 
3146
3189
  def parse_ids(self, ids):
3147
3190
  """
3148
- * @ignore
3191
+ @ignore
3149
3192
  :param string[]|str ids: order ids
3150
3193
  :returns str[]: list of order ids
3151
3194
  """
@@ -3157,8 +3200,10 @@ class okx(Exchange, ImplicitAPI):
3157
3200
  async def cancel_orders(self, ids, symbol: Str = None, params={}):
3158
3201
  """
3159
3202
  cancel multiple orders
3160
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
3161
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
3203
+
3204
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
3205
+ https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
3206
+
3162
3207
  :param str[] ids: order ids
3163
3208
  :param str symbol: unified market symbol
3164
3209
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -3246,8 +3291,10 @@ class okx(Exchange, ImplicitAPI):
3246
3291
  async def cancel_orders_for_symbols(self, orders: List[CancellationRequest], params={}):
3247
3292
  """
3248
3293
  cancel multiple orders for multiple symbols
3249
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
3250
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
3294
+
3295
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
3296
+ https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
3297
+
3251
3298
  :param CancellationRequest[] orders: each order should contain the parameters required by cancelOrder namely id and symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}]
3252
3299
  :param dict [params]: extra parameters specific to the exchange API endpoint
3253
3300
  :param boolean [params.trigger]: whether the order is a stop/trigger order
@@ -3320,7 +3367,9 @@ class okx(Exchange, ImplicitAPI):
3320
3367
  async def cancel_all_orders_after(self, timeout: Int, params={}):
3321
3368
  """
3322
3369
  dead man's switch, cancel all orders after the given timeout
3323
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-all-after
3370
+
3371
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-all-after
3372
+
3324
3373
  :param number timeout: time in milliseconds, 0 represents cancel the timer
3325
3374
  :param dict [params]: extra parameters specific to the exchange API endpoint
3326
3375
  :returns dict: the api result
@@ -3558,8 +3607,10 @@ class okx(Exchange, ImplicitAPI):
3558
3607
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
3559
3608
  """
3560
3609
  fetch an order by the id
3561
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-details
3562
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-details
3610
+
3611
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-details
3612
+ https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-details
3613
+
3563
3614
  :param str id: the order id
3564
3615
  :param str symbol: unified market symbol
3565
3616
  :param dict [params]: extra and exchange specific parameters
@@ -3701,8 +3752,10 @@ class okx(Exchange, ImplicitAPI):
3701
3752
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
3702
3753
  """
3703
3754
  fetch all unfilled currently open orders
3704
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-list
3705
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-list
3755
+
3756
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-list
3757
+ https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-list
3758
+
3706
3759
  :param str symbol: unified market symbol
3707
3760
  :param int [since]: the earliest time in ms to fetch open orders for
3708
3761
  :param int [limit]: the maximum number of open orders structures to retrieve
@@ -3855,8 +3908,10 @@ class okx(Exchange, ImplicitAPI):
3855
3908
  async def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3856
3909
  """
3857
3910
  fetches information on multiple canceled orders made by the user
3858
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
3859
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
3911
+
3912
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
3913
+ https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
3914
+
3860
3915
  :param str symbol: unified market symbol of the market orders were made in
3861
3916
  :param int [since]: timestamp in ms of the earliest order, default is None
3862
3917
  :param int [limit]: max number of orders to return, default is None
@@ -4028,9 +4083,11 @@ class okx(Exchange, ImplicitAPI):
4028
4083
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
4029
4084
  """
4030
4085
  fetches information on multiple closed orders made by the user
4031
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
4032
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
4033
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-3-months
4086
+
4087
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
4088
+ https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
4089
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-3-months
4090
+
4034
4091
  :param str symbol: unified market symbol of the market orders were made in
4035
4092
  :param int [since]: the earliest time in ms to fetch orders for
4036
4093
  :param int [limit]: the maximum number of order structures to retrieve
@@ -4202,7 +4259,9 @@ class okx(Exchange, ImplicitAPI):
4202
4259
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
4203
4260
  """
4204
4261
  fetch all trades made by the user
4205
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
4262
+
4263
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
4264
+
4206
4265
  :param str symbol: unified market symbol
4207
4266
  :param int [since]: the earliest time in ms to fetch trades for
4208
4267
  :param int [limit]: the maximum number of trades structures to retrieve
@@ -4268,7 +4327,9 @@ class okx(Exchange, ImplicitAPI):
4268
4327
  async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
4269
4328
  """
4270
4329
  fetch all the trades made from a single order
4271
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
4330
+
4331
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
4332
+
4272
4333
  :param str id: order id
4273
4334
  :param str symbol: unified market symbol
4274
4335
  :param int [since]: the earliest time in ms to fetch trades for
@@ -4288,9 +4349,11 @@ class okx(Exchange, ImplicitAPI):
4288
4349
  async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
4289
4350
  """
4290
4351
  fetch the history of changes, actions done by the user or operations that altered balance of the user
4291
- :see: https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-7-days
4292
- :see: https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-3-months
4293
- :see: https://www.okx.com/docs-v5/en/#rest-api-funding-asset-bills-details
4352
+
4353
+ https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-7-days
4354
+ https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-3-months
4355
+ https://www.okx.com/docs-v5/en/#rest-api-funding-asset-bills-details
4356
+
4294
4357
  :param str [code]: unified currency code, default is None
4295
4358
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
4296
4359
  :param int [limit]: max number of ledger entries to return, default is None
@@ -4579,7 +4642,9 @@ class okx(Exchange, ImplicitAPI):
4579
4642
  async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
4580
4643
  """
4581
4644
  fetch a dictionary of addresses for a currency, indexed by network
4582
- :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
4645
+
4646
+ https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
4647
+
4583
4648
  :param str code: unified currency code of the currency for the deposit address
4584
4649
  :param dict [params]: extra parameters specific to the exchange API endpoint
4585
4650
  :returns dict: a dictionary of `address structures <https://docs.ccxt.com/#/?id=address-structure>` indexed by the network
@@ -4619,7 +4684,9 @@ class okx(Exchange, ImplicitAPI):
4619
4684
  async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
4620
4685
  """
4621
4686
  fetch the deposit address for a currency associated with self account
4622
- :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
4687
+
4688
+ https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
4689
+
4623
4690
  :param str code: unified currency code
4624
4691
  :param dict [params]: extra parameters specific to the exchange API endpoint
4625
4692
  :param str [params.network]: the network name for the deposit address
@@ -4647,7 +4714,9 @@ class okx(Exchange, ImplicitAPI):
4647
4714
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
4648
4715
  """
4649
4716
  make a withdrawal
4650
- :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
4717
+
4718
+ https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
4719
+
4651
4720
  :param str code: unified currency code
4652
4721
  :param float amount: the amount to withdraw
4653
4722
  :param str address: the address to withdraw to
@@ -4704,7 +4773,9 @@ class okx(Exchange, ImplicitAPI):
4704
4773
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
4705
4774
  """
4706
4775
  fetch all deposits made to an account
4707
- :see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
4776
+
4777
+ https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
4778
+
4708
4779
  :param str code: unified currency code
4709
4780
  :param int [since]: the earliest time in ms to fetch deposits for
4710
4781
  :param int [limit]: the maximum number of deposits structures to retrieve
@@ -4779,7 +4850,9 @@ class okx(Exchange, ImplicitAPI):
4779
4850
  async def fetch_deposit(self, id: str, code: Str = None, params={}):
4780
4851
  """
4781
4852
  fetch data on a currency deposit via the deposit id
4782
- :see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
4853
+
4854
+ https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
4855
+
4783
4856
  :param str id: deposit id
4784
4857
  :param str code: filter by currency code
4785
4858
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4801,7 +4874,9 @@ class okx(Exchange, ImplicitAPI):
4801
4874
  async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
4802
4875
  """
4803
4876
  fetch all withdrawals made from an account
4804
- :see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
4877
+
4878
+ https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
4879
+
4805
4880
  :param str code: unified currency code
4806
4881
  :param int [since]: the earliest time in ms to fetch withdrawals for
4807
4882
  :param int [limit]: the maximum number of withdrawals structures to retrieve
@@ -4868,7 +4943,9 @@ class okx(Exchange, ImplicitAPI):
4868
4943
  async def fetch_withdrawal(self, id: str, code: Str = None, params={}):
4869
4944
  """
4870
4945
  fetch data on a currency withdrawal via the withdrawal id
4871
- :see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
4946
+
4947
+ https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
4948
+
4872
4949
  :param str id: withdrawal id
4873
4950
  :param str code: unified currency code of the currency withdrawn, default is None
4874
4951
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -5049,7 +5126,9 @@ class okx(Exchange, ImplicitAPI):
5049
5126
  async def fetch_leverage(self, symbol: str, params={}) -> Leverage:
5050
5127
  """
5051
5128
  fetch the set leverage for a market
5052
- :see: https://www.okx.com/docs-v5/en/#rest-api-account-get-leverage
5129
+
5130
+ https://www.okx.com/docs-v5/en/#rest-api-account-get-leverage
5131
+
5053
5132
  :param str symbol: unified market symbol
5054
5133
  :param dict [params]: extra parameters specific to the exchange API endpoint
5055
5134
  :param str [params.marginMode]: 'cross' or 'isolated'
@@ -5113,7 +5192,9 @@ class okx(Exchange, ImplicitAPI):
5113
5192
  async def fetch_position(self, symbol: str, params={}):
5114
5193
  """
5115
5194
  fetch data on a single open contract trade position
5116
- :see: https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
5195
+
5196
+ https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
5197
+
5117
5198
  :param str symbol: unified market symbol of the market the position is held in, default is None
5118
5199
  :param dict [params]: extra parameters specific to the exchange API endpoint
5119
5200
  :param str [params.instType]: MARGIN, SWAP, FUTURES, OPTION
@@ -5184,8 +5265,10 @@ class okx(Exchange, ImplicitAPI):
5184
5265
 
5185
5266
  async def fetch_positions(self, symbols: Strings = None, params={}):
5186
5267
  """
5187
- :see: https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
5188
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-positions-history history
5268
+
5269
+ https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
5270
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-positions-history history
5271
+
5189
5272
  fetch all open positions
5190
5273
  :param str[]|None symbols: list of unified market symbols
5191
5274
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -5268,7 +5351,9 @@ class okx(Exchange, ImplicitAPI):
5268
5351
 
5269
5352
  async def fetch_positions_for_symbol(self, symbol: str, params={}):
5270
5353
  """
5271
- :see: https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
5354
+
5355
+ https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
5356
+
5272
5357
  fetch all open positions for specific symbol
5273
5358
  :param str symbol: unified market symbol
5274
5359
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -5438,7 +5523,9 @@ class okx(Exchange, ImplicitAPI):
5438
5523
  async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
5439
5524
  """
5440
5525
  transfer currency internally between wallets on the same account
5441
- :see: https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
5526
+
5527
+ https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
5528
+
5442
5529
  :param str code: unified currency code
5443
5530
  :param float amount: amount to transfer
5444
5531
  :param str fromAccount: account to transfer from
@@ -5608,7 +5695,9 @@ class okx(Exchange, ImplicitAPI):
5608
5695
  async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
5609
5696
  """
5610
5697
  fetch a history of internal transfers made on an account
5611
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
5698
+
5699
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
5700
+
5612
5701
  :param str code: unified currency code of the currency transferred
5613
5702
  :param int [since]: the earliest time in ms to fetch transfers for
5614
5703
  :param int [limit]: the maximum number of transfers structures to retrieve
@@ -5787,7 +5876,9 @@ class okx(Exchange, ImplicitAPI):
5787
5876
  async def fetch_funding_interval(self, symbol: str, params={}) -> FundingRate:
5788
5877
  """
5789
5878
  fetch the current funding rate interval
5790
- :see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
5879
+
5880
+ https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
5881
+
5791
5882
  :param str symbol: unified market symbol
5792
5883
  :param dict [params]: extra parameters specific to the exchange API endpoint
5793
5884
  :returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
@@ -5797,7 +5888,9 @@ class okx(Exchange, ImplicitAPI):
5797
5888
  async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
5798
5889
  """
5799
5890
  fetch the current funding rate
5800
- :see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
5891
+
5892
+ https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
5893
+
5801
5894
  :param str symbol: unified market symbol
5802
5895
  :param dict [params]: extra parameters specific to the exchange API endpoint
5803
5896
  :returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
@@ -5833,7 +5926,9 @@ class okx(Exchange, ImplicitAPI):
5833
5926
  async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
5834
5927
  """
5835
5928
  fetch the history of funding payments paid and received on self account
5836
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
5929
+
5930
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
5931
+
5837
5932
  :param str symbol: unified market symbol
5838
5933
  :param int [since]: the earliest time in ms to fetch funding history for
5839
5934
  :param int [limit]: the maximum number of funding history structures to retrieve
@@ -5983,7 +6078,9 @@ class okx(Exchange, ImplicitAPI):
5983
6078
  async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5984
6079
  """
5985
6080
  set the level of leverage for a market
5986
- :see: https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
6081
+
6082
+ https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
6083
+
5987
6084
  :param float leverage: the rate of leverage
5988
6085
  :param str symbol: unified market symbol
5989
6086
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6035,11 +6132,13 @@ class okx(Exchange, ImplicitAPI):
6035
6132
 
6036
6133
  async def fetch_position_mode(self, symbol: Str = None, params={}):
6037
6134
  """
6038
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
6135
+
6136
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
6137
+
6039
6138
  fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
6040
6139
  :param str symbol: unified symbol of the market to fetch the order book for
6041
6140
  :param dict [params]: extra parameters specific to the exchange API endpoint
6042
- :param str [param.accountId]: if you have multiple accounts, you must specify the account id to fetch the position mode
6141
+ :param str [params.accountId]: if you have multiple accounts, you must specify the account id to fetch the position mode
6043
6142
  :returns dict: an object detailing whether the market is in hedged or one-way mode
6044
6143
  """
6045
6144
  accounts = await self.fetch_accounts()
@@ -6066,7 +6165,9 @@ class okx(Exchange, ImplicitAPI):
6066
6165
  async def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
6067
6166
  """
6068
6167
  set hedged to True or False for a market
6069
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-position-mode
6168
+
6169
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-position-mode
6170
+
6070
6171
  :param bool hedged: set to True to use long_short_mode, False for net_mode
6071
6172
  :param str symbol: not used by okx setPositionMode
6072
6173
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6097,7 +6198,9 @@ class okx(Exchange, ImplicitAPI):
6097
6198
  async def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
6098
6199
  """
6099
6200
  set margin mode to 'cross' or 'isolated'
6100
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-leverage
6201
+
6202
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-leverage
6203
+
6101
6204
  :param str marginMode: 'cross' or 'isolated'
6102
6205
  :param str symbol: unified market symbol
6103
6206
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6142,7 +6245,9 @@ class okx(Exchange, ImplicitAPI):
6142
6245
  async def fetch_cross_borrow_rates(self, params={}) -> CrossBorrowRates:
6143
6246
  """
6144
6247
  fetch the borrow interest rates of all currencies
6145
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
6248
+
6249
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
6250
+
6146
6251
  :param dict [params]: extra parameters specific to the exchange API endpoint
6147
6252
  :returns dict: a list of `borrow rate structures <https://docs.ccxt.com/#/?id=borrow-rate-structure>`
6148
6253
  """
@@ -6169,7 +6274,9 @@ class okx(Exchange, ImplicitAPI):
6169
6274
  async def fetch_cross_borrow_rate(self, code: str, params={}) -> CrossBorrowRate:
6170
6275
  """
6171
6276
  fetch the rate of interest to borrow a currency for margin trading
6172
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
6277
+
6278
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
6279
+
6173
6280
  :param str code: unified currency code
6174
6281
  :param dict [params]: extra parameters specific to the exchange API endpoint
6175
6282
  :returns dict: a `borrow rate structure <https://docs.ccxt.com/#/?id=borrow-rate-structure>`
@@ -6247,7 +6354,9 @@ class okx(Exchange, ImplicitAPI):
6247
6354
  async def fetch_borrow_rate_histories(self, codes=None, since: Int = None, limit: Int = None, params={}):
6248
6355
  """
6249
6356
  retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is None
6250
- :see: https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
6357
+
6358
+ https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
6359
+
6251
6360
  :param str[]|None codes: list of unified currency codes, default is None
6252
6361
  :param int [since]: timestamp in ms of the earliest borrowRate, default is None
6253
6362
  :param int [limit]: max number of borrow rate prices to return, default is None
@@ -6286,7 +6395,9 @@ class okx(Exchange, ImplicitAPI):
6286
6395
  async def fetch_borrow_rate_history(self, code: str, since: Int = None, limit: Int = None, params={}):
6287
6396
  """
6288
6397
  retrieves a history of a currencies borrow interest rate at specific time slots
6289
- :see: https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
6398
+
6399
+ https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
6400
+
6290
6401
  :param str code: unified currency code
6291
6402
  :param int [since]: timestamp for the earliest borrow rate
6292
6403
  :param int [limit]: the maximum number of `borrow rate structures <https://docs.ccxt.com/#/?id=borrow-rate-structure>` to retrieve
@@ -6432,7 +6543,9 @@ class okx(Exchange, ImplicitAPI):
6432
6543
  async def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
6433
6544
  """
6434
6545
  remove margin from a position
6435
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
6546
+
6547
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
6548
+
6436
6549
  :param str symbol: unified market symbol
6437
6550
  :param float amount: the amount of margin to remove
6438
6551
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6443,7 +6556,9 @@ class okx(Exchange, ImplicitAPI):
6443
6556
  async def add_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
6444
6557
  """
6445
6558
  add margin
6446
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
6559
+
6560
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
6561
+
6447
6562
  :param str symbol: unified market symbol
6448
6563
  :param float amount: amount of margin to add
6449
6564
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6454,7 +6569,9 @@ class okx(Exchange, ImplicitAPI):
6454
6569
  async def fetch_market_leverage_tiers(self, symbol: str, params={}) -> List[LeverageTier]:
6455
6570
  """
6456
6571
  retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
6457
- :see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-position-tiers
6572
+
6573
+ https://www.okx.com/docs-v5/en/#rest-api-public-data-get-position-tiers
6574
+
6458
6575
  :param str symbol: unified market symbol
6459
6576
  :param dict [params]: extra parameters specific to the exchange API endpoint
6460
6577
  :param str [params.marginMode]: 'cross' or 'isolated'
@@ -6505,7 +6622,7 @@ class okx(Exchange, ImplicitAPI):
6505
6622
 
6506
6623
  def parse_market_leverage_tiers(self, info, market: Market = None) -> List[LeverageTier]:
6507
6624
  """
6508
- * @ignore
6625
+ @ignore
6509
6626
  :param dict info: Exchange response for 1 market
6510
6627
  :param dict market: CCXT market
6511
6628
  """
@@ -6530,8 +6647,10 @@ class okx(Exchange, ImplicitAPI):
6530
6647
  tiers = []
6531
6648
  for i in range(0, len(info)):
6532
6649
  tier = info[i]
6650
+ marketId = self.safe_string(tier, 'instId')
6533
6651
  tiers.append({
6534
6652
  'tier': self.safe_integer(tier, 'tier'),
6653
+ 'symbol': self.safe_symbol(marketId, market),
6535
6654
  'currency': market['quote'],
6536
6655
  'minNotional': self.safe_number(tier, 'minSz'),
6537
6656
  'maxNotional': self.safe_number(tier, 'maxSz'),
@@ -6544,7 +6663,9 @@ class okx(Exchange, ImplicitAPI):
6544
6663
  async def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
6545
6664
  """
6546
6665
  fetch the interest owed by the user for borrowing currency for margin trading
6547
- :see: https://www.okx.com/docs-v5/en/#rest-api-account-get-interest-accrued-data
6666
+
6667
+ https://www.okx.com/docs-v5/en/#rest-api-account-get-interest-accrued-data
6668
+
6548
6669
  :param str code: the unified currency code for the currency of the interest
6549
6670
  :param str symbol: the market symbol of an isolated margin market, if None, the interest for cross margin markets is returned
6550
6671
  :param int [since]: timestamp in ms of the earliest time to receive interest records for
@@ -6617,7 +6738,9 @@ class okx(Exchange, ImplicitAPI):
6617
6738
  async def borrow_cross_margin(self, code: str, amount: float, params={}):
6618
6739
  """
6619
6740
  create a loan to borrow margin(need to be VIP 5 and above)
6620
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-vip-loans-borrow-and-repay
6741
+
6742
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-vip-loans-borrow-and-repay
6743
+
6621
6744
  :param str code: unified currency code of the currency to borrow
6622
6745
  :param float amount: the amount to borrow
6623
6746
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6653,7 +6776,9 @@ class okx(Exchange, ImplicitAPI):
6653
6776
  async def repay_cross_margin(self, code: str, amount, params={}):
6654
6777
  """
6655
6778
  repay borrowed margin and interest
6656
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-vip-loans-borrow-and-repay
6779
+
6780
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-vip-loans-borrow-and-repay
6781
+
6657
6782
  :param str code: unified currency code of the currency to repay
6658
6783
  :param float amount: the amount to repay
6659
6784
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -6718,7 +6843,9 @@ class okx(Exchange, ImplicitAPI):
6718
6843
  async def fetch_open_interest(self, symbol: str, params={}):
6719
6844
  """
6720
6845
  Retrieves the open interest of a currency
6721
- :see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-open-interest
6846
+
6847
+ https://www.okx.com/docs-v5/en/#rest-api-public-data-get-open-interest
6848
+
6722
6849
  :param str symbol: Unified CCXT market symbol
6723
6850
  :param dict [params]: exchange specific parameters
6724
6851
  :returns dict} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure:
@@ -6756,8 +6883,10 @@ class okx(Exchange, ImplicitAPI):
6756
6883
  async def fetch_open_interest_history(self, symbol: str, timeframe='1d', since: Int = None, limit: Int = None, params={}):
6757
6884
  """
6758
6885
  Retrieves the open interest history of a currency
6759
- :see: https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-contracts-open-interest-and-volume
6760
- :see: https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-options-open-interest-and-volume
6886
+
6887
+ https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-contracts-open-interest-and-volume
6888
+ https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-options-open-interest-and-volume
6889
+
6761
6890
  :param str symbol: Unified CCXT currency code or unified symbol
6762
6891
  :param str timeframe: "5m", "1h", or "1d" for option only "1d" or "8h"
6763
6892
  :param int [since]: The time in ms of the earliest record to retrieve unix timestamp
@@ -6878,7 +7007,9 @@ class okx(Exchange, ImplicitAPI):
6878
7007
  async def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
6879
7008
  """
6880
7009
  fetch deposit and withdraw fees
6881
- :see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
7010
+
7011
+ https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
7012
+
6882
7013
  :param str[]|None codes: list of unified currency codes
6883
7014
  :param dict [params]: extra parameters specific to the exchange API endpoint
6884
7015
  :returns dict[]: a list of `fees structures <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -6993,7 +7124,9 @@ class okx(Exchange, ImplicitAPI):
6993
7124
  async def fetch_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
6994
7125
  """
6995
7126
  fetches historical settlement records
6996
- :see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-delivery-exercise-history
7127
+
7128
+ https://www.okx.com/docs-v5/en/#rest-api-public-data-get-delivery-exercise-history
7129
+
6997
7130
  :param str symbol: unified market symbol to fetch the settlement history for
6998
7131
  :param int [since]: timestamp in ms
6999
7132
  :param int [limit]: number of records
@@ -7086,7 +7219,9 @@ class okx(Exchange, ImplicitAPI):
7086
7219
  async def fetch_underlying_assets(self, params={}):
7087
7220
  """
7088
7221
  fetches the market ids of underlying assets for a specific contract market type
7089
- :see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-underlying
7222
+
7223
+ https://www.okx.com/docs-v5/en/#public-data-rest-api-get-underlying
7224
+
7090
7225
  :param dict [params]: exchange specific params
7091
7226
  :param str [params.type]: the contract market type, 'option', 'swap' or 'future', the default is 'option'
7092
7227
  :returns dict[]: a list of `underlying assets <https://docs.ccxt.com/#/?id=underlying-assets-structure>`
@@ -7120,7 +7255,9 @@ class okx(Exchange, ImplicitAPI):
7120
7255
  async def fetch_greeks(self, symbol: str, params={}) -> Greeks:
7121
7256
  """
7122
7257
  fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
7123
- :see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-option-market-data
7258
+
7259
+ https://www.okx.com/docs-v5/en/#public-data-rest-api-get-option-market-data
7260
+
7124
7261
  :param str symbol: unified symbol of the market to fetch greeks for
7125
7262
  :param dict [params]: extra parameters specific to the exchange API endpoint
7126
7263
  :returns dict: a `greeks structure <https://docs.ccxt.com/#/?id=greeks-structure>`
@@ -7224,15 +7361,17 @@ class okx(Exchange, ImplicitAPI):
7224
7361
  async def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
7225
7362
  """
7226
7363
  closes open positions for a market
7227
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-close-positions
7364
+
7365
+ https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-close-positions
7366
+
7228
7367
  :param str symbol: Unified CCXT market symbol
7229
7368
  :param str [side]: 'buy' or 'sell', leave in net mode
7230
7369
  :param dict [params]: extra parameters specific to the okx api endpoint
7231
7370
  :param str [params.clientOrderId]: a unique identifier for the order
7232
7371
  :param str [params.marginMode]: 'cross' or 'isolated', default is 'cross
7233
7372
  :param str [params.code]: *required in the case of closing cross MARGIN position for Single-currency margin* margin currency
7234
- *
7235
- * EXCHANGE SPECIFIC PARAMETERS
7373
+
7374
+ EXCHANGE SPECIFIC PARAMETERS
7236
7375
  :param boolean [params.autoCxl]: whether any pending orders for closing out needs to be automatically canceled when close position via a market order. False or True, the default is False
7237
7376
  :param str [params.tag]: order tag a combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters
7238
7377
  :returns dict[]: `A list of position structures <https://docs.ccxt.com/#/?id=position-structure>`
@@ -7284,7 +7423,9 @@ class okx(Exchange, ImplicitAPI):
7284
7423
  async def fetch_option(self, symbol: str, params={}) -> Option:
7285
7424
  """
7286
7425
  fetches option data that is commonly found in an option chain
7287
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
7426
+
7427
+ https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
7428
+
7288
7429
  :param str symbol: unified market symbol
7289
7430
  :param dict [params]: extra parameters specific to the exchange API endpoint
7290
7431
  :returns dict: an `option chain structure <https://docs.ccxt.com/#/?id=option-chain-structure>`
@@ -7328,8 +7469,10 @@ class okx(Exchange, ImplicitAPI):
7328
7469
  async def fetch_option_chain(self, code: str, params={}) -> OptionChain:
7329
7470
  """
7330
7471
  fetches data for an underlying asset that is commonly found in an option chain
7331
- :see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
7332
- :param str currency: base currency to fetch an option chain for
7472
+
7473
+ https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
7474
+
7475
+ :param str code: base currency to fetch an option chain for
7333
7476
  :param dict [params]: extra parameters specific to the exchange API endpoint
7334
7477
  :param str [params.uly]: the underlying asset, can be obtained from fetchUnderlyingAssets()
7335
7478
  :returns dict: a list of `option chain structures <https://docs.ccxt.com/#/?id=option-chain-structure>`
@@ -7417,7 +7560,9 @@ class okx(Exchange, ImplicitAPI):
7417
7560
  async def fetch_convert_quote(self, fromCode: str, toCode: str, amount: Num = None, params={}) -> Conversion:
7418
7561
  """
7419
7562
  fetch a quote for converting from one currency to another
7420
- :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-estimate-quote
7563
+
7564
+ https://www.okx.com/docs-v5/en/#funding-account-rest-api-estimate-quote
7565
+
7421
7566
  :param str fromCode: the currency that you want to sell and convert from
7422
7567
  :param str toCode: the currency that you want to buy and convert into
7423
7568
  :param float [amount]: how much you want to trade in units of the from currency
@@ -7467,7 +7612,9 @@ class okx(Exchange, ImplicitAPI):
7467
7612
  async def create_convert_trade(self, id: str, fromCode: str, toCode: str, amount: Num = None, params={}) -> Conversion:
7468
7613
  """
7469
7614
  convert from one currency to another
7470
- :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-convert-trade
7615
+
7616
+ https://www.okx.com/docs-v5/en/#funding-account-rest-api-convert-trade
7617
+
7471
7618
  :param str id: the id of the trade that you want to make
7472
7619
  :param str fromCode: the currency that you want to sell and convert from
7473
7620
  :param str toCode: the currency that you want to buy and convert into
@@ -7518,7 +7665,9 @@ class okx(Exchange, ImplicitAPI):
7518
7665
  async def fetch_convert_trade(self, id: str, code: Str = None, params={}) -> Conversion:
7519
7666
  """
7520
7667
  fetch the data for a conversion trade
7521
- :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-convert-history
7668
+
7669
+ https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-convert-history
7670
+
7522
7671
  :param str id: the id of the trade that you want to fetch
7523
7672
  :param str [code]: the unified currency code of the conversion trade
7524
7673
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -7565,7 +7714,9 @@ class okx(Exchange, ImplicitAPI):
7565
7714
  async def fetch_convert_trade_history(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Conversion]:
7566
7715
  """
7567
7716
  fetch the users history of conversion trades
7568
- :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-convert-history
7717
+
7718
+ https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-convert-history
7719
+
7569
7720
  :param str [code]: the unified currency code
7570
7721
  :param int [since]: the earliest time in ms to fetch conversions for
7571
7722
  :param int [limit]: the maximum number of conversion structures to retrieve
@@ -7679,7 +7830,9 @@ class okx(Exchange, ImplicitAPI):
7679
7830
  async def fetch_convert_currencies(self, params={}) -> Currencies:
7680
7831
  """
7681
7832
  fetches all available currencies that can be converted
7682
- :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-convert-currencies
7833
+
7834
+ https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-convert-currencies
7835
+
7683
7836
  :param dict [params]: extra parameters specific to the exchange API endpoint
7684
7837
  :returns dict: an associative dictionary of currencies
7685
7838
  """
@@ -7774,10 +7927,14 @@ class okx(Exchange, ImplicitAPI):
7774
7927
  async def fetch_margin_adjustment_history(self, symbol: Str = None, type: Str = None, since: Num = None, limit: Num = None, params={}) -> List[MarginModification]:
7775
7928
  """
7776
7929
  fetches the history of margin added or reduced from contract isolated positions
7777
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-7-days
7778
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
7930
+
7931
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-7-days
7932
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
7933
+
7779
7934
  :param str [symbol]: not used by okx fetchMarginAdjustmentHistory
7780
7935
  :param str [type]: "add" or "reduce"
7936
+ @param since
7937
+ @param limit
7781
7938
  :param dict params: extra parameters specific to the exchange api endpoint
7782
7939
  :param boolean [params.auto]: True if fetching auto margin increases
7783
7940
  :returns dict[]: a list of `margin structures <https://docs.ccxt.com/#/?id=margin-loan-structure>`
@@ -7864,14 +8021,16 @@ class okx(Exchange, ImplicitAPI):
7864
8021
  async def fetch_positions_history(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={}) -> List[Position]:
7865
8022
  """
7866
8023
  fetches historical positions
7867
- :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-positions-history
8024
+
8025
+ https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-positions-history
8026
+
7868
8027
  :param str [symbols]: unified market symbols
7869
8028
  :param int [since]: timestamp in ms of the earliest position to fetch
7870
8029
  :param int [limit]: the maximum amount of records to fetch, default=100, max=100
7871
8030
  :param dict params: extra parameters specific to the exchange api endpoint
7872
8031
  :param str [params.marginMode]: "cross" or "isolated"
7873
- *
7874
- * EXCHANGE SPECIFIC PARAMETERS
8032
+
8033
+ EXCHANGE SPECIFIC PARAMETERS
7875
8034
  :param str [params.instType]: margin, swap, futures or option
7876
8035
  :param str [params.type]: the type of latest close position 1: close position partially, 2:close all, 3:liquidation, 4:partial liquidation; 5:adl, is it is the latest type if there are several types for the same position
7877
8036
  :param str [params.posId]: position id, there is attribute expiration, the posid will be expired if it is more than 30 days after the last full close position, then position will use new posid
@@ -7938,7 +8097,9 @@ class okx(Exchange, ImplicitAPI):
7938
8097
  async def fetch_long_short_ratio_history(self, symbol: Str = None, timeframe: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LongShortRatio]:
7939
8098
  """
7940
8099
  fetches the long short ratio history for a unified market symbol
7941
- :see: https://www.okx.com/docs-v5/en/#trading-statistics-rest-api-get-contract-long-short-ratio
8100
+
8101
+ https://www.okx.com/docs-v5/en/#trading-statistics-rest-api-get-contract-long-short-ratio
8102
+
7942
8103
  :param str symbol: unified symbol of the market to fetch the long short ratio for
7943
8104
  :param str [timeframe]: the period for the ratio
7944
8105
  :param int [since]: the earliest time in ms to fetch ratios for