ccxt 4.4.30 → 4.4.32

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 (496) hide show
  1. package/README.md +9 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ace.js +123 -123
  5. package/dist/cjs/src/alpaca.js +237 -237
  6. package/dist/cjs/src/ascendex.js +342 -341
  7. package/dist/cjs/src/bigone.js +242 -242
  8. package/dist/cjs/src/binance.js +1339 -1291
  9. package/dist/cjs/src/bingx.js +639 -639
  10. package/dist/cjs/src/bit2c.js +111 -111
  11. package/dist/cjs/src/bitbank.js +142 -142
  12. package/dist/cjs/src/bitbns.js +140 -140
  13. package/dist/cjs/src/bitfinex.js +231 -231
  14. package/dist/cjs/src/bitfinex2.js +403 -403
  15. package/dist/cjs/src/bitflyer.js +184 -184
  16. package/dist/cjs/src/bitget.js +848 -846
  17. package/dist/cjs/src/bithumb.js +125 -124
  18. package/dist/cjs/src/bitmart.js +525 -525
  19. package/dist/cjs/src/bitmex.js +317 -317
  20. package/dist/cjs/src/bitopro.js +221 -221
  21. package/dist/cjs/src/bitrue.js +315 -315
  22. package/dist/cjs/src/bitso.js +220 -220
  23. package/dist/cjs/src/bitstamp.js +251 -251
  24. package/dist/cjs/src/bitteam.js +183 -183
  25. package/dist/cjs/src/bitvavo.js +247 -251
  26. package/dist/cjs/src/bl3p.js +82 -82
  27. package/dist/cjs/src/blockchaincom.js +211 -211
  28. package/dist/cjs/src/blofin.js +332 -331
  29. package/dist/cjs/src/btcalpha.js +166 -166
  30. package/dist/cjs/src/btcbox.js +108 -108
  31. package/dist/cjs/src/btcmarkets.js +198 -198
  32. package/dist/cjs/src/btcturk.js +124 -124
  33. package/dist/cjs/src/bybit.js +906 -900
  34. package/dist/cjs/src/cex.js +227 -226
  35. package/dist/cjs/src/coinbase.js +481 -481
  36. package/dist/cjs/src/coinbaseexchange.js +274 -274
  37. package/dist/cjs/src/coinbaseinternational.js +304 -304
  38. package/dist/cjs/src/coincatch.js +650 -650
  39. package/dist/cjs/src/coincheck.js +113 -113
  40. package/dist/cjs/src/coinex.js +611 -601
  41. package/dist/cjs/src/coinlist.js +304 -303
  42. package/dist/cjs/src/coinmate.js +162 -161
  43. package/dist/cjs/src/coinmetro.js +187 -187
  44. package/dist/cjs/src/coinone.js +124 -123
  45. package/dist/cjs/src/coinsph.js +237 -237
  46. package/dist/cjs/src/coinspot.js +82 -82
  47. package/dist/cjs/src/cryptocom.js +342 -341
  48. package/dist/cjs/src/currencycom.js +225 -224
  49. package/dist/cjs/src/delta.js +320 -320
  50. package/dist/cjs/src/deribit.js +411 -408
  51. package/dist/cjs/src/digifinex.js +432 -431
  52. package/dist/cjs/src/exmo.js +328 -327
  53. package/dist/cjs/src/gate.js +830 -791
  54. package/dist/cjs/src/gemini.js +199 -198
  55. package/dist/cjs/src/hashkey.js +520 -517
  56. package/dist/cjs/src/hitbtc.js +465 -462
  57. package/dist/cjs/src/hollaex.js +253 -252
  58. package/dist/cjs/src/htx.js +791 -848
  59. package/dist/cjs/src/huobijp.js +219 -218
  60. package/dist/cjs/src/hyperliquid.js +421 -417
  61. package/dist/cjs/src/idex.js +238 -237
  62. package/dist/cjs/src/independentreserve.js +133 -132
  63. package/dist/cjs/src/indodax.js +177 -171
  64. package/dist/cjs/src/kraken.js +381 -377
  65. package/dist/cjs/src/krakenfutures.js +285 -279
  66. package/dist/cjs/src/kucoin.js +632 -622
  67. package/dist/cjs/src/kucoinfutures.js +533 -457
  68. package/dist/cjs/src/kuna.js +283 -282
  69. package/dist/cjs/src/latoken.js +211 -210
  70. package/dist/cjs/src/lbank.js +268 -267
  71. package/dist/cjs/src/luno.js +174 -173
  72. package/dist/cjs/src/lykke.js +172 -171
  73. package/dist/cjs/src/mercado.js +123 -122
  74. package/dist/cjs/src/mexc.js +650 -646
  75. package/dist/cjs/src/ndax.js +229 -228
  76. package/dist/cjs/src/novadax.js +230 -229
  77. package/dist/cjs/src/oceanex.js +187 -186
  78. package/dist/cjs/src/okcoin.js +286 -285
  79. package/dist/cjs/src/okx.js +909 -904
  80. package/dist/cjs/src/onetrading.js +218 -218
  81. package/dist/cjs/src/oxfun.js +335 -334
  82. package/dist/cjs/src/p2b.js +154 -154
  83. package/dist/cjs/src/paradex.js +249 -244
  84. package/dist/cjs/src/paymium.js +101 -101
  85. package/dist/cjs/src/phemex.js +388 -390
  86. package/dist/cjs/src/poloniex.js +270 -270
  87. package/dist/cjs/src/poloniexfutures.js +250 -250
  88. package/dist/cjs/src/pro/alpaca.js +64 -64
  89. package/dist/cjs/src/pro/ascendex.js +64 -64
  90. package/dist/cjs/src/pro/binance.js +546 -543
  91. package/dist/cjs/src/pro/bingx.js +116 -116
  92. package/dist/cjs/src/pro/bitfinex.js +42 -42
  93. package/dist/cjs/src/pro/bitfinex2.js +66 -66
  94. package/dist/cjs/src/pro/bitget.js +188 -181
  95. package/dist/cjs/src/pro/bithumb.js +40 -40
  96. package/dist/cjs/src/pro/bitmart.js +121 -119
  97. package/dist/cjs/src/pro/bitmex.js +135 -133
  98. package/dist/cjs/src/pro/bitopro.js +49 -49
  99. package/dist/cjs/src/pro/bitrue.js +19 -19
  100. package/dist/cjs/src/pro/bitstamp.js +29 -29
  101. package/dist/cjs/src/pro/bitvavo.js +299 -301
  102. package/dist/cjs/src/pro/blockchaincom.js +62 -62
  103. package/dist/cjs/src/pro/blofin.js +132 -130
  104. package/dist/cjs/src/pro/bybit.js +317 -313
  105. package/dist/cjs/src/pro/cex.js +168 -168
  106. package/dist/cjs/src/pro/coinbase.js +93 -91
  107. package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
  108. package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
  109. package/dist/cjs/src/pro/coincatch.js +150 -143
  110. package/dist/cjs/src/pro/coincheck.js +21 -21
  111. package/dist/cjs/src/pro/coinex.js +110 -110
  112. package/dist/cjs/src/pro/coinone.js +30 -30
  113. package/dist/cjs/src/pro/cryptocom.js +227 -227
  114. package/dist/cjs/src/pro/currencycom.js +45 -45
  115. package/dist/cjs/src/pro/deribit.js +127 -127
  116. package/dist/cjs/src/pro/exmo.js +66 -66
  117. package/dist/cjs/src/pro/gate.js +287 -283
  118. package/dist/cjs/src/pro/gemini.js +74 -74
  119. package/dist/cjs/src/pro/hashkey.js +87 -85
  120. package/dist/cjs/src/pro/hitbtc.js +190 -190
  121. package/dist/cjs/src/pro/hollaex.js +51 -51
  122. package/dist/cjs/src/pro/htx.js +96 -94
  123. package/dist/cjs/src/pro/huobijp.js +38 -38
  124. package/dist/cjs/src/pro/hyperliquid.js +151 -150
  125. package/dist/cjs/src/pro/idex.js +48 -48
  126. package/dist/cjs/src/pro/independentreserve.js +19 -19
  127. package/dist/cjs/src/pro/kraken.js +167 -167
  128. package/dist/cjs/src/pro/krakenfutures.js +137 -138
  129. package/dist/cjs/src/pro/kucoin.js +167 -168
  130. package/dist/cjs/src/pro/kucoinfutures.js +147 -147
  131. package/dist/cjs/src/pro/lbank.js +95 -95
  132. package/dist/cjs/src/pro/luno.js +21 -21
  133. package/dist/cjs/src/pro/mexc.js +102 -103
  134. package/dist/cjs/src/pro/ndax.js +42 -42
  135. package/dist/cjs/src/pro/okcoin.js +61 -61
  136. package/dist/cjs/src/pro/okx.js +332 -330
  137. package/dist/cjs/src/pro/onetrading.js +71 -71
  138. package/dist/cjs/src/pro/oxfun.js +193 -191
  139. package/dist/cjs/src/pro/p2b.js +77 -77
  140. package/dist/cjs/src/pro/paradex.js +39 -39
  141. package/dist/cjs/src/pro/phemex.js +94 -94
  142. package/dist/cjs/src/pro/poloniex.js +171 -171
  143. package/dist/cjs/src/pro/poloniexfutures.js +62 -62
  144. package/dist/cjs/src/pro/probit.js +63 -63
  145. package/dist/cjs/src/pro/upbit.js +80 -80
  146. package/dist/cjs/src/pro/vertex.js +65 -63
  147. package/dist/cjs/src/pro/wazirx.js +70 -70
  148. package/dist/cjs/src/pro/whitebit.js +83 -83
  149. package/dist/cjs/src/pro/woo.js +106 -104
  150. package/dist/cjs/src/pro/woofipro.js +105 -103
  151. package/dist/cjs/src/pro/xt.js +119 -119
  152. package/dist/cjs/src/probit.js +229 -229
  153. package/dist/cjs/src/timex.js +198 -197
  154. package/dist/cjs/src/tokocrypto.js +214 -213
  155. package/dist/cjs/src/tradeogre.js +92 -91
  156. package/dist/cjs/src/upbit.js +243 -242
  157. package/dist/cjs/src/vertex.js +258 -258
  158. package/dist/cjs/src/wavesexchange.js +176 -172
  159. package/dist/cjs/src/wazirx.js +168 -168
  160. package/dist/cjs/src/whitebit.js +361 -361
  161. package/dist/cjs/src/woo.js +571 -572
  162. package/dist/cjs/src/woofipro.js +392 -391
  163. package/dist/cjs/src/xt.js +436 -435
  164. package/dist/cjs/src/yobit.js +159 -158
  165. package/dist/cjs/src/zaif.js +103 -103
  166. package/dist/cjs/src/zonda.js +168 -168
  167. package/js/ccxt.d.ts +1 -1
  168. package/js/ccxt.js +1 -1
  169. package/js/src/ace.d.ts +123 -0
  170. package/js/src/ace.js +123 -123
  171. package/js/src/alpaca.d.ts +237 -0
  172. package/js/src/alpaca.js +237 -237
  173. package/js/src/ascendex.d.ts +339 -0
  174. package/js/src/ascendex.js +342 -341
  175. package/js/src/base/types.d.ts +1 -0
  176. package/js/src/bigone.d.ts +242 -0
  177. package/js/src/bigone.js +242 -242
  178. package/js/src/binance.d.ts +1306 -0
  179. package/js/src/binance.js +1339 -1291
  180. package/js/src/bingx.d.ts +639 -0
  181. package/js/src/bingx.js +639 -639
  182. package/js/src/bit2c.d.ts +111 -0
  183. package/js/src/bit2c.js +111 -111
  184. package/js/src/bitbank.d.ts +142 -0
  185. package/js/src/bitbank.js +142 -142
  186. package/js/src/bitbns.d.ts +140 -0
  187. package/js/src/bitbns.js +140 -140
  188. package/js/src/bitfinex.d.ts +231 -0
  189. package/js/src/bitfinex.js +231 -231
  190. package/js/src/bitfinex2.d.ts +403 -0
  191. package/js/src/bitfinex2.js +403 -403
  192. package/js/src/bitflyer.d.ts +184 -0
  193. package/js/src/bitflyer.js +184 -184
  194. package/js/src/bitget.d.ts +846 -0
  195. package/js/src/bitget.js +848 -846
  196. package/js/src/bithumb.d.ts +125 -0
  197. package/js/src/bithumb.js +125 -124
  198. package/js/src/bitmart.d.ts +525 -0
  199. package/js/src/bitmart.js +525 -525
  200. package/js/src/bitmex.d.ts +317 -0
  201. package/js/src/bitmex.js +317 -317
  202. package/js/src/bitopro.d.ts +221 -0
  203. package/js/src/bitopro.js +221 -221
  204. package/js/src/bitrue.d.ts +315 -0
  205. package/js/src/bitrue.js +315 -315
  206. package/js/src/bitso.d.ts +220 -0
  207. package/js/src/bitso.js +220 -220
  208. package/js/src/bitstamp.d.ts +251 -0
  209. package/js/src/bitstamp.js +251 -251
  210. package/js/src/bitteam.d.ts +183 -0
  211. package/js/src/bitteam.js +183 -183
  212. package/js/src/bitvavo.d.ts +247 -0
  213. package/js/src/bitvavo.js +247 -251
  214. package/js/src/bl3p.d.ts +82 -0
  215. package/js/src/bl3p.js +82 -82
  216. package/js/src/blockchaincom.d.ts +211 -0
  217. package/js/src/blockchaincom.js +211 -211
  218. package/js/src/blofin.d.ts +332 -0
  219. package/js/src/blofin.js +332 -331
  220. package/js/src/btcalpha.d.ts +166 -0
  221. package/js/src/btcalpha.js +166 -166
  222. package/js/src/btcbox.d.ts +108 -0
  223. package/js/src/btcbox.js +108 -108
  224. package/js/src/btcmarkets.d.ts +198 -0
  225. package/js/src/btcmarkets.js +198 -198
  226. package/js/src/btcturk.d.ts +124 -0
  227. package/js/src/btcturk.js +124 -124
  228. package/js/src/bybit.d.ts +906 -1
  229. package/js/src/bybit.js +906 -900
  230. package/js/src/cex.d.ts +227 -0
  231. package/js/src/cex.js +227 -226
  232. package/js/src/coinbase.d.ts +481 -0
  233. package/js/src/coinbase.js +481 -481
  234. package/js/src/coinbaseexchange.d.ts +274 -0
  235. package/js/src/coinbaseexchange.js +274 -274
  236. package/js/src/coinbaseinternational.d.ts +304 -0
  237. package/js/src/coinbaseinternational.js +304 -304
  238. package/js/src/coincatch.d.ts +646 -0
  239. package/js/src/coincatch.js +650 -650
  240. package/js/src/coincheck.d.ts +113 -0
  241. package/js/src/coincheck.js +113 -113
  242. package/js/src/coinex.d.ts +603 -0
  243. package/js/src/coinex.js +611 -601
  244. package/js/src/coinlist.d.ts +304 -0
  245. package/js/src/coinlist.js +304 -303
  246. package/js/src/coinmate.d.ts +162 -0
  247. package/js/src/coinmate.js +162 -161
  248. package/js/src/coinmetro.d.ts +187 -0
  249. package/js/src/coinmetro.js +187 -187
  250. package/js/src/coinone.d.ts +124 -0
  251. package/js/src/coinone.js +124 -123
  252. package/js/src/coinsph.d.ts +237 -0
  253. package/js/src/coinsph.js +237 -237
  254. package/js/src/coinspot.d.ts +82 -0
  255. package/js/src/coinspot.js +82 -82
  256. package/js/src/cryptocom.d.ts +342 -0
  257. package/js/src/cryptocom.js +342 -341
  258. package/js/src/currencycom.d.ts +225 -0
  259. package/js/src/currencycom.js +225 -224
  260. package/js/src/delta.d.ts +320 -0
  261. package/js/src/delta.js +320 -320
  262. package/js/src/deribit.d.ts +411 -0
  263. package/js/src/deribit.js +411 -408
  264. package/js/src/digifinex.d.ts +430 -0
  265. package/js/src/digifinex.js +432 -431
  266. package/js/src/exmo.d.ts +328 -0
  267. package/js/src/exmo.js +328 -327
  268. package/js/src/gate.d.ts +803 -1
  269. package/js/src/gate.js +830 -791
  270. package/js/src/gemini.d.ts +199 -0
  271. package/js/src/gemini.js +199 -198
  272. package/js/src/hashkey.d.ts +516 -0
  273. package/js/src/hashkey.js +520 -517
  274. package/js/src/hitbtc.d.ts +465 -0
  275. package/js/src/hitbtc.js +465 -462
  276. package/js/src/hollaex.d.ts +253 -0
  277. package/js/src/hollaex.js +253 -252
  278. package/js/src/htx.d.ts +765 -2
  279. package/js/src/htx.js +791 -848
  280. package/js/src/huobijp.d.ts +219 -0
  281. package/js/src/huobijp.js +219 -218
  282. package/js/src/hyperliquid.d.ts +419 -0
  283. package/js/src/hyperliquid.js +421 -417
  284. package/js/src/idex.d.ts +238 -0
  285. package/js/src/idex.js +238 -237
  286. package/js/src/independentreserve.d.ts +133 -0
  287. package/js/src/independentreserve.js +133 -132
  288. package/js/src/indodax.d.ts +171 -0
  289. package/js/src/indodax.js +177 -171
  290. package/js/src/kraken.d.ts +381 -0
  291. package/js/src/kraken.js +381 -377
  292. package/js/src/krakenfutures.d.ts +282 -0
  293. package/js/src/krakenfutures.js +285 -279
  294. package/js/src/kucoin.d.ts +613 -0
  295. package/js/src/kucoin.js +632 -622
  296. package/js/src/kucoinfutures.d.ts +441 -0
  297. package/js/src/kucoinfutures.js +533 -457
  298. package/js/src/kuna.d.ts +283 -0
  299. package/js/src/kuna.js +283 -282
  300. package/js/src/latoken.d.ts +211 -0
  301. package/js/src/latoken.js +211 -210
  302. package/js/src/lbank.d.ts +268 -0
  303. package/js/src/lbank.js +268 -267
  304. package/js/src/luno.d.ts +174 -0
  305. package/js/src/luno.js +174 -173
  306. package/js/src/lykke.d.ts +172 -0
  307. package/js/src/lykke.js +172 -171
  308. package/js/src/mercado.d.ts +123 -0
  309. package/js/src/mercado.js +123 -122
  310. package/js/src/mexc.d.ts +647 -0
  311. package/js/src/mexc.js +650 -646
  312. package/js/src/ndax.d.ts +229 -0
  313. package/js/src/ndax.js +229 -228
  314. package/js/src/novadax.d.ts +230 -0
  315. package/js/src/novadax.js +230 -229
  316. package/js/src/oceanex.d.ts +187 -0
  317. package/js/src/oceanex.js +187 -186
  318. package/js/src/okcoin.d.ts +286 -0
  319. package/js/src/okcoin.js +286 -285
  320. package/js/src/okx.d.ts +907 -0
  321. package/js/src/okx.js +909 -904
  322. package/js/src/onetrading.d.ts +218 -0
  323. package/js/src/onetrading.js +218 -218
  324. package/js/src/oxfun.d.ts +336 -3
  325. package/js/src/oxfun.js +335 -334
  326. package/js/src/p2b.d.ts +154 -0
  327. package/js/src/p2b.js +154 -154
  328. package/js/src/paradex.d.ts +241 -0
  329. package/js/src/paradex.js +249 -244
  330. package/js/src/paymium.d.ts +101 -0
  331. package/js/src/paymium.js +101 -101
  332. package/js/src/phemex.d.ts +366 -0
  333. package/js/src/phemex.js +388 -390
  334. package/js/src/poloniex.d.ts +270 -0
  335. package/js/src/poloniex.js +270 -270
  336. package/js/src/poloniexfutures.d.ts +250 -0
  337. package/js/src/poloniexfutures.js +250 -250
  338. package/js/src/pro/alpaca.d.ts +64 -0
  339. package/js/src/pro/alpaca.js +64 -64
  340. package/js/src/pro/ascendex.d.ts +64 -0
  341. package/js/src/pro/ascendex.js +64 -64
  342. package/js/src/pro/binance.d.ts +546 -0
  343. package/js/src/pro/binance.js +546 -543
  344. package/js/src/pro/bingx.d.ts +116 -0
  345. package/js/src/pro/bingx.js +116 -116
  346. package/js/src/pro/bitfinex.d.ts +42 -0
  347. package/js/src/pro/bitfinex.js +42 -42
  348. package/js/src/pro/bitfinex2.d.ts +66 -0
  349. package/js/src/pro/bitfinex2.js +66 -66
  350. package/js/src/pro/bitget.d.ts +187 -0
  351. package/js/src/pro/bitget.js +188 -181
  352. package/js/src/pro/bithumb.d.ts +40 -0
  353. package/js/src/pro/bithumb.js +40 -40
  354. package/js/src/pro/bitmart.d.ts +121 -0
  355. package/js/src/pro/bitmart.js +121 -119
  356. package/js/src/pro/bitmex.d.ts +135 -0
  357. package/js/src/pro/bitmex.js +135 -133
  358. package/js/src/pro/bitopro.d.ts +49 -0
  359. package/js/src/pro/bitopro.js +49 -49
  360. package/js/src/pro/bitrue.d.ts +19 -0
  361. package/js/src/pro/bitrue.js +19 -19
  362. package/js/src/pro/bitstamp.d.ts +29 -0
  363. package/js/src/pro/bitstamp.js +29 -29
  364. package/js/src/pro/bitvavo.d.ts +254 -1
  365. package/js/src/pro/bitvavo.js +299 -301
  366. package/js/src/pro/blockchaincom.d.ts +62 -0
  367. package/js/src/pro/blockchaincom.js +62 -62
  368. package/js/src/pro/blofin.d.ts +132 -0
  369. package/js/src/pro/blofin.js +132 -130
  370. package/js/src/pro/bybit.d.ts +317 -0
  371. package/js/src/pro/bybit.js +317 -313
  372. package/js/src/pro/cex.d.ts +168 -0
  373. package/js/src/pro/cex.js +168 -168
  374. package/js/src/pro/coinbase.d.ts +93 -0
  375. package/js/src/pro/coinbase.js +93 -91
  376. package/js/src/pro/coinbaseexchange.d.ts +95 -0
  377. package/js/src/pro/coinbaseexchange.js +95 -95
  378. package/js/src/pro/coinbaseinternational.d.ts +111 -0
  379. package/js/src/pro/coinbaseinternational.js +111 -111
  380. package/js/src/pro/coincatch.d.ts +150 -0
  381. package/js/src/pro/coincatch.js +150 -143
  382. package/js/src/pro/coincheck.d.ts +21 -0
  383. package/js/src/pro/coincheck.js +21 -21
  384. package/js/src/pro/coinex.d.ts +110 -0
  385. package/js/src/pro/coinex.js +110 -110
  386. package/js/src/pro/coinone.d.ts +30 -0
  387. package/js/src/pro/coinone.js +30 -30
  388. package/js/src/pro/cryptocom.d.ts +227 -0
  389. package/js/src/pro/cryptocom.js +227 -227
  390. package/js/src/pro/currencycom.d.ts +45 -0
  391. package/js/src/pro/currencycom.js +45 -45
  392. package/js/src/pro/deribit.d.ts +127 -0
  393. package/js/src/pro/deribit.js +127 -127
  394. package/js/src/pro/exmo.d.ts +66 -0
  395. package/js/src/pro/exmo.js +66 -66
  396. package/js/src/pro/gate.d.ts +287 -0
  397. package/js/src/pro/gate.js +287 -283
  398. package/js/src/pro/gemini.d.ts +74 -0
  399. package/js/src/pro/gemini.js +74 -74
  400. package/js/src/pro/hashkey.d.ts +87 -0
  401. package/js/src/pro/hashkey.js +87 -85
  402. package/js/src/pro/hitbtc.d.ts +190 -0
  403. package/js/src/pro/hitbtc.js +190 -190
  404. package/js/src/pro/hollaex.d.ts +51 -0
  405. package/js/src/pro/hollaex.js +51 -51
  406. package/js/src/pro/htx.d.ts +96 -0
  407. package/js/src/pro/htx.js +96 -94
  408. package/js/src/pro/huobijp.d.ts +38 -0
  409. package/js/src/pro/huobijp.js +38 -38
  410. package/js/src/pro/hyperliquid.d.ts +151 -0
  411. package/js/src/pro/hyperliquid.js +151 -150
  412. package/js/src/pro/idex.d.ts +48 -0
  413. package/js/src/pro/idex.js +48 -48
  414. package/js/src/pro/independentreserve.d.ts +19 -0
  415. package/js/src/pro/independentreserve.js +19 -19
  416. package/js/src/pro/kraken.d.ts +167 -0
  417. package/js/src/pro/kraken.js +167 -167
  418. package/js/src/pro/krakenfutures.d.ts +137 -0
  419. package/js/src/pro/krakenfutures.js +137 -138
  420. package/js/src/pro/kucoin.d.ts +167 -0
  421. package/js/src/pro/kucoin.js +167 -168
  422. package/js/src/pro/kucoinfutures.d.ts +147 -0
  423. package/js/src/pro/kucoinfutures.js +147 -147
  424. package/js/src/pro/lbank.d.ts +95 -0
  425. package/js/src/pro/lbank.js +95 -95
  426. package/js/src/pro/luno.d.ts +21 -0
  427. package/js/src/pro/luno.js +21 -21
  428. package/js/src/pro/mexc.d.ts +101 -0
  429. package/js/src/pro/mexc.js +102 -103
  430. package/js/src/pro/ndax.d.ts +42 -0
  431. package/js/src/pro/ndax.js +42 -42
  432. package/js/src/pro/okcoin.d.ts +61 -0
  433. package/js/src/pro/okcoin.js +61 -61
  434. package/js/src/pro/okx.d.ts +332 -0
  435. package/js/src/pro/okx.js +332 -330
  436. package/js/src/pro/onetrading.d.ts +71 -0
  437. package/js/src/pro/onetrading.js +71 -71
  438. package/js/src/pro/oxfun.d.ts +193 -0
  439. package/js/src/pro/oxfun.js +193 -191
  440. package/js/src/pro/p2b.d.ts +77 -0
  441. package/js/src/pro/p2b.js +77 -77
  442. package/js/src/pro/paradex.d.ts +39 -0
  443. package/js/src/pro/paradex.js +39 -39
  444. package/js/src/pro/phemex.d.ts +94 -0
  445. package/js/src/pro/phemex.js +94 -94
  446. package/js/src/pro/poloniex.d.ts +171 -0
  447. package/js/src/pro/poloniex.js +171 -171
  448. package/js/src/pro/poloniexfutures.d.ts +62 -0
  449. package/js/src/pro/poloniexfutures.js +62 -62
  450. package/js/src/pro/probit.d.ts +63 -0
  451. package/js/src/pro/probit.js +63 -63
  452. package/js/src/pro/upbit.d.ts +80 -0
  453. package/js/src/pro/upbit.js +80 -80
  454. package/js/src/pro/vertex.d.ts +65 -0
  455. package/js/src/pro/vertex.js +65 -63
  456. package/js/src/pro/wazirx.d.ts +70 -0
  457. package/js/src/pro/wazirx.js +70 -70
  458. package/js/src/pro/whitebit.d.ts +83 -0
  459. package/js/src/pro/whitebit.js +83 -83
  460. package/js/src/pro/woo.d.ts +106 -0
  461. package/js/src/pro/woo.js +106 -104
  462. package/js/src/pro/woofipro.d.ts +105 -0
  463. package/js/src/pro/woofipro.js +105 -103
  464. package/js/src/pro/xt.d.ts +119 -0
  465. package/js/src/pro/xt.js +119 -119
  466. package/js/src/probit.d.ts +229 -0
  467. package/js/src/probit.js +229 -229
  468. package/js/src/timex.d.ts +198 -0
  469. package/js/src/timex.js +198 -197
  470. package/js/src/tokocrypto.d.ts +214 -0
  471. package/js/src/tokocrypto.js +214 -213
  472. package/js/src/tradeogre.d.ts +92 -0
  473. package/js/src/tradeogre.js +92 -91
  474. package/js/src/upbit.d.ts +243 -0
  475. package/js/src/upbit.js +243 -242
  476. package/js/src/vertex.d.ts +258 -0
  477. package/js/src/vertex.js +258 -258
  478. package/js/src/wavesexchange.d.ts +176 -0
  479. package/js/src/wavesexchange.js +176 -172
  480. package/js/src/wazirx.d.ts +168 -0
  481. package/js/src/wazirx.js +168 -168
  482. package/js/src/whitebit.d.ts +361 -0
  483. package/js/src/whitebit.js +361 -361
  484. package/js/src/woo.d.ts +571 -0
  485. package/js/src/woo.js +571 -572
  486. package/js/src/woofipro.d.ts +392 -0
  487. package/js/src/woofipro.js +392 -391
  488. package/js/src/xt.d.ts +439 -4
  489. package/js/src/xt.js +436 -435
  490. package/js/src/yobit.d.ts +159 -0
  491. package/js/src/yobit.js +159 -158
  492. package/js/src/zaif.d.ts +103 -0
  493. package/js/src/zaif.js +103 -103
  494. package/js/src/zonda.d.ts +168 -0
  495. package/js/src/zonda.js +168 -168
  496. package/package.json +1 -1
package/js/src/okx.d.ts CHANGED
@@ -10,73 +10,608 @@ export default class okx extends Exchange {
10
10
  convertToInstrumentType(type: any): string;
11
11
  createExpiredOptionMarket(symbol: string): MarketInterface;
12
12
  safeMarket(marketId?: Str, market?: Market, delimiter?: Str, marketType?: Str): MarketInterface;
13
+ /**
14
+ * @method
15
+ * @name okx#fetchStatus
16
+ * @description the latest known information on the availability of the exchange API
17
+ * @see https://www.okx.com/docs-v5/en/#status-get-status
18
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
19
+ * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
20
+ */
13
21
  fetchStatus(params?: {}): Promise<Dict>;
22
+ /**
23
+ * @method
24
+ * @name okx#fetchTime
25
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
26
+ * @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-system-time
27
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
28
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
29
+ */
14
30
  fetchTime(params?: {}): Promise<number>;
31
+ /**
32
+ * @method
33
+ * @name okx#fetchAccounts
34
+ * @description fetch all the accounts associated with a profile
35
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
36
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
37
+ * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
38
+ */
15
39
  fetchAccounts(params?: {}): Promise<Account[]>;
40
+ /**
41
+ * @method
42
+ * @name okx#fetchMarkets
43
+ * @description retrieves data on all markets for okx
44
+ * @see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-instruments
45
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
46
+ * @returns {object[]} an array of objects representing market data
47
+ */
16
48
  fetchMarkets(params?: {}): Promise<Market[]>;
17
49
  parseMarket(market: Dict): Market;
18
50
  fetchMarketsByType(type: any, params?: {}): Promise<MarketInterface[]>;
51
+ /**
52
+ * @method
53
+ * @name okx#fetchCurrencies
54
+ * @description fetches all available currencies on an exchange
55
+ * @see https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
56
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
57
+ * @returns {object} an associative dictionary of currencies
58
+ */
19
59
  fetchCurrencies(params?: {}): Promise<Currencies>;
60
+ /**
61
+ * @method
62
+ * @name okx#fetchOrderBook
63
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
64
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-order-book
65
+ * @param {string} symbol unified symbol of the market to fetch the order book for
66
+ * @param {int} [limit] the maximum amount of order book entries to return
67
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
68
+ * @param {string} [params.method] 'publicGetMarketBooksFull' or 'publicGetMarketBooks' default is 'publicGetMarketBooks'
69
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
70
+ */
20
71
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
21
72
  parseTicker(ticker: Dict, market?: Market): Ticker;
73
+ /**
74
+ * @method
75
+ * @name okx#fetchTicker
76
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
77
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
78
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
79
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
80
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
81
+ */
22
82
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
83
+ /**
84
+ * @method
85
+ * @name okx#fetchTickers
86
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
87
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
88
+ * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
89
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
90
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
91
+ */
23
92
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
93
+ /**
94
+ * @method
95
+ * @name okx#fetchMarkPrice
96
+ * @description fetches mark price for the market
97
+ * @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-mark-price
98
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
99
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
100
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
101
+ */
24
102
  fetchMarkPrice(symbol: string, params?: {}): Promise<Ticker>;
103
+ /**
104
+ * @method
105
+ * @name okx#fetchMarkPrices
106
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
107
+ * @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-mark-price
108
+ * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
109
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
110
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
111
+ */
25
112
  fetchMarkPrices(symbols?: Strings, params?: {}): Promise<Tickers>;
26
113
  parseTrade(trade: Dict, market?: Market): Trade;
114
+ /**
115
+ * @method
116
+ * @name okx#fetchTrades
117
+ * @description get the list of most recent trades for a particular symbol
118
+ * @see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-trades
119
+ * @see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-option-trades
120
+ * @param {string} symbol unified symbol of the market to fetch trades for
121
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
122
+ * @param {int} [limit] the maximum amount of trades to fetch
123
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
124
+ * @param {boolean} [params.paginate] *only applies to publicGetMarketHistoryTrades* default false, when true will automatically paginate by calling this endpoint multiple times
125
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
126
+ */
27
127
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
28
128
  parseOHLCV(ohlcv: any, market?: Market): OHLCV;
129
+ /**
130
+ * @method
131
+ * @name okx#fetchOHLCV
132
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
133
+ * @see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks
134
+ * @see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks-history
135
+ * @see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks
136
+ * @see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks-history
137
+ * @see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks
138
+ * @see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks-history
139
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
140
+ * @param {string} timeframe the length of time each candle represents
141
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
142
+ * @param {int} [limit] the maximum amount of candles to fetch
143
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
144
+ * @param {string} [params.price] "mark" or "index" for mark price and index price candles
145
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
146
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
147
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
148
+ */
29
149
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
150
+ /**
151
+ * @method
152
+ * @name okx#fetchFundingRateHistory
153
+ * @description fetches historical funding rate prices
154
+ * @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate-history
155
+ * @param {string} symbol unified symbol of the market to fetch the funding rate history for
156
+ * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
157
+ * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
158
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
159
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
160
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
161
+ */
30
162
  fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
31
163
  parseBalanceByType(type: any, response: any): Balances;
32
164
  parseTradingBalance(response: any): Balances;
33
165
  parseFundingBalance(response: any): Balances;
34
166
  parseTradingFee(fee: Dict, market?: Market): TradingFeeInterface;
167
+ /**
168
+ * @method
169
+ * @name okx#fetchTradingFee
170
+ * @description fetch the trading fees for a market
171
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-fee-rates
172
+ * @param {string} symbol unified market symbol
173
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
174
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
175
+ */
35
176
  fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
177
+ /**
178
+ * @method
179
+ * @name okx#fetchBalance
180
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
181
+ * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-balance
182
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-balance
183
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
184
+ * @param {string} [params.type] wallet type, ['funding' or 'trading'] default is 'trading'
185
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
186
+ */
36
187
  fetchBalance(params?: {}): Promise<Balances>;
188
+ /**
189
+ * @method
190
+ * @name okx#createMarketBuyOrderWithCost
191
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
192
+ * @description create a market buy order by providing the symbol and cost
193
+ * @param {string} symbol unified symbol of the market to create an order in
194
+ * @param {float} cost how much you want to trade in units of the quote currency
195
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
196
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
197
+ */
37
198
  createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
199
+ /**
200
+ * @method
201
+ * @name okx#createMarketSellOrderWithCost
202
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
203
+ * @description create a market buy order by providing the symbol and cost
204
+ * @param {string} symbol unified symbol of the market to create an order in
205
+ * @param {float} cost how much you want to trade in units of the quote currency
206
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
207
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
208
+ */
38
209
  createMarketSellOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
39
210
  createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
211
+ /**
212
+ * @method
213
+ * @name okx#createOrder
214
+ * @description create a trade order
215
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
216
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
217
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-place-algo-order
218
+ * @param {string} symbol unified symbol of the market to create an order in
219
+ * @param {string} type 'market' or 'limit'
220
+ * @param {string} side 'buy' or 'sell'
221
+ * @param {float} amount how much of currency you want to trade in units of base currency
222
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
223
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
224
+ * @param {bool} [params.reduceOnly] a mark to reduce the position size for margin, swap and future orders
225
+ * @param {bool} [params.postOnly] true to place a post only order
226
+ * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
227
+ * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
228
+ * @param {float} [params.takeProfit.price] used for take profit limit orders, not used for take profit market price orders
229
+ * @param {string} [params.takeProfit.type] 'market' or 'limit' used to specify the take profit price type
230
+ * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
231
+ * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
232
+ * @param {float} [params.stopLoss.price] used for stop loss limit orders, not used for stop loss market price orders
233
+ * @param {string} [params.stopLoss.type] 'market' or 'limit' used to specify the stop loss price type
234
+ * @param {string} [params.positionSide] if position mode is one-way: set to 'net', if position mode is hedge-mode: set to 'long' or 'short'
235
+ * @param {string} [params.trailingPercent] the percent to trail away from the current market price
236
+ * @param {string} [params.tpOrdKind] 'condition' or 'limit', the default is 'condition'
237
+ * @param {bool} [params.hedged] *swap and future only* true for hedged mode, false for one way mode
238
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
239
+ */
40
240
  createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
241
+ /**
242
+ * @method
243
+ * @name okx#createOrders
244
+ * @description create a list of trade orders
245
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
246
+ * @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
247
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
248
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
249
+ */
41
250
  createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
42
251
  editOrderRequest(id: string, symbol: any, type: any, side: any, amount?: any, price?: any, params?: {}): any;
252
+ /**
253
+ * @method
254
+ * @name okx#editOrder
255
+ * @description edit a trade order
256
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-amend-order
257
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-amend-algo-order
258
+ * @param {string} id order id
259
+ * @param {string} symbol unified symbol of the market to create an order in
260
+ * @param {string} type 'market' or 'limit'
261
+ * @param {string} side 'buy' or 'sell'
262
+ * @param {float} amount how much of the currency you want to trade in units of the base currency
263
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
264
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
265
+ * @param {string} [params.clientOrderId] client order id, uses id if not passed
266
+ * @param {float} [params.stopLossPrice] stop loss trigger price
267
+ * @param {float} [params.newSlOrdPx] the stop loss order price, set to stopLossPrice if the type is market
268
+ * @param {string} [params.newSlTriggerPxType] 'last', 'index' or 'mark' used to specify the stop loss trigger price type, default is 'last'
269
+ * @param {float} [params.takeProfitPrice] take profit trigger price
270
+ * @param {float} [params.newTpOrdPx] the take profit order price, set to takeProfitPrice if the type is market
271
+ * @param {string} [params.newTpTriggerPxType] 'last', 'index' or 'mark' used to specify the take profit trigger price type, default is 'last'
272
+ * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
273
+ * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
274
+ * @param {float} [params.stopLoss.price] used for stop loss limit orders, not used for stop loss market price orders
275
+ * @param {string} [params.stopLoss.type] 'market' or 'limit' used to specify the stop loss price type
276
+ * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
277
+ * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
278
+ * @param {float} [params.takeProfit.price] used for take profit limit orders, not used for take profit market price orders
279
+ * @param {string} [params.takeProfit.type] 'market' or 'limit' used to specify the take profit price type
280
+ * @param {string} [params.newTpOrdKind] 'condition' or 'limit', the default is 'condition'
281
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
282
+ */
43
283
  editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
284
+ /**
285
+ * @method
286
+ * @name okx#cancelOrder
287
+ * @description cancels an open order
288
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-order
289
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
290
+ * @param {string} id order id
291
+ * @param {string} symbol unified symbol of the market the order was made in
292
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
293
+ * @param {boolean} [params.trigger] true if trigger orders
294
+ * @param {boolean} [params.trailing] set to true if you want to cancel a trailing order
295
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
296
+ */
44
297
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
45
298
  parseIds(ids: any): any;
299
+ /**
300
+ * @method
301
+ * @name okx#cancelOrders
302
+ * @description cancel multiple orders
303
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
304
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
305
+ * @param {string[]} ids order ids
306
+ * @param {string} symbol unified market symbol
307
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
308
+ * @param {boolean} [params.trigger] whether the order is a stop/trigger order
309
+ * @param {boolean} [params.trailing] set to true if you want to cancel trailing orders
310
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
311
+ */
46
312
  cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
313
+ /**
314
+ * @method
315
+ * @name okx#cancelOrdersForSymbols
316
+ * @description cancel multiple orders for multiple symbols
317
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
318
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
319
+ * @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"}]
320
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
321
+ * @param {boolean} [params.trigger] whether the order is a stop/trigger order
322
+ * @param {boolean} [params.trailing] set to true if you want to cancel trailing orders
323
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
324
+ */
47
325
  cancelOrdersForSymbols(orders: CancellationRequest[], params?: {}): Promise<Order[]>;
326
+ /**
327
+ * @method
328
+ * @name okx#cancelAllOrdersAfter
329
+ * @description dead man's switch, cancel all orders after the given timeout
330
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-all-after
331
+ * @param {number} timeout time in milliseconds, 0 represents cancel the timer
332
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
333
+ * @returns {object} the api result
334
+ */
48
335
  cancelAllOrdersAfter(timeout: Int, params?: {}): Promise<any>;
49
336
  parseOrderStatus(status: Str): string;
50
337
  parseOrder(order: Dict, market?: Market): Order;
338
+ /**
339
+ * @method
340
+ * @name okx#fetchOrder
341
+ * @description fetch an order by the id
342
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-details
343
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-details
344
+ * @param {string} id the order id
345
+ * @param {string} symbol unified market symbol
346
+ * @param {object} [params] extra and exchange specific parameters
347
+ * @param {boolean} [params.trigger] true if fetching trigger orders
348
+ * @returns [an order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
349
+ */
51
350
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
351
+ /**
352
+ * @method
353
+ * @name okx#fetchOpenOrders
354
+ * @description fetch all unfilled currently open orders
355
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-list
356
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-list
357
+ * @param {string} symbol unified market symbol
358
+ * @param {int} [since] the earliest time in ms to fetch open orders for
359
+ * @param {int} [limit] the maximum number of open orders structures to retrieve
360
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
361
+ * @param {bool} [params.stop] True if fetching trigger or conditional orders
362
+ * @param {string} [params.ordType] "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
363
+ * @param {string} [params.algoId] Algo ID "'433845797218942976'"
364
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
365
+ * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
366
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
367
+ */
52
368
  fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
369
+ /**
370
+ * @method
371
+ * @name okx#fetchCanceledOrders
372
+ * @description fetches information on multiple canceled orders made by the user
373
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
374
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
375
+ * @param {string} symbol unified market symbol of the market orders were made in
376
+ * @param {int} [since] timestamp in ms of the earliest order, default is undefined
377
+ * @param {int} [limit] max number of orders to return, default is undefined
378
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
379
+ * @param {bool} [params.stop] True if fetching trigger or conditional orders
380
+ * @param {string} [params.ordType] "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
381
+ * @param {string} [params.algoId] Algo ID "'433845797218942976'"
382
+ * @param {int} [params.until] timestamp in ms to fetch orders for
383
+ * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
384
+ * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
385
+ */
53
386
  fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
387
+ /**
388
+ * @method
389
+ * @name okx#fetchClosedOrders
390
+ * @description fetches information on multiple closed orders made by the user
391
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
392
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
393
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-3-months
394
+ * @param {string} symbol unified market symbol of the market orders were made in
395
+ * @param {int} [since] the earliest time in ms to fetch orders for
396
+ * @param {int} [limit] the maximum number of order structures to retrieve
397
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
398
+ * @param {bool} [params.trigger] True if fetching trigger or conditional orders
399
+ * @param {string} [params.ordType] "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
400
+ * @param {string} [params.algoId] Algo ID "'433845797218942976'"
401
+ * @param {int} [params.until] timestamp in ms to fetch orders for
402
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
403
+ * @param {string} [params.method] method to be used, either 'privateGetTradeOrdersHistory', 'privateGetTradeOrdersHistoryArchive' or 'privateGetTradeOrdersAlgoHistory' default is 'privateGetTradeOrdersHistory'
404
+ * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
405
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
406
+ */
54
407
  fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
408
+ /**
409
+ * @method
410
+ * @name okx#fetchMyTrades
411
+ * @description fetch all trades made by the user
412
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
413
+ * @param {string} symbol unified market symbol
414
+ * @param {int} [since] the earliest time in ms to fetch trades for
415
+ * @param {int} [limit] the maximum number of trades structures to retrieve
416
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
417
+ * @param {int} [params.until] Timestamp in ms of the latest time to retrieve trades for
418
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
419
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
420
+ */
55
421
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
422
+ /**
423
+ * @method
424
+ * @name okx#fetchOrderTrades
425
+ * @description fetch all the trades made from a single order
426
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
427
+ * @param {string} id order id
428
+ * @param {string} symbol unified market symbol
429
+ * @param {int} [since] the earliest time in ms to fetch trades for
430
+ * @param {int} [limit] the maximum number of trades to retrieve
431
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
432
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
433
+ */
56
434
  fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
435
+ /**
436
+ * @method
437
+ * @name okx#fetchLedger
438
+ * @description fetch the history of changes, actions done by the user or operations that altered balance of the user
439
+ * @see https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-7-days
440
+ * @see https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-3-months
441
+ * @see https://www.okx.com/docs-v5/en/#rest-api-funding-asset-bills-details
442
+ * @param {string} [code] unified currency code, default is undefined
443
+ * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
444
+ * @param {int} [limit] max number of ledger entries to return, default is undefined
445
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
446
+ * @param {string} [params.marginMode] 'cross' or 'isolated'
447
+ * @param {int} [params.until] the latest time in ms to fetch entries for
448
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
449
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
450
+ */
57
451
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
58
452
  parseLedgerEntryType(type: any): string;
59
453
  parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
60
454
  parseDepositAddress(depositAddress: any, currency?: Currency): DepositAddress;
455
+ /**
456
+ * @method
457
+ * @name okx#fetchDepositAddressesByNetwork
458
+ * @description fetch a dictionary of addresses for a currency, indexed by network
459
+ * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
460
+ * @param {string} code unified currency code of the currency for the deposit address
461
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
462
+ * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure} indexed by the network
463
+ */
61
464
  fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<DepositAddress[]>;
465
+ /**
466
+ * @method
467
+ * @name okx#fetchDepositAddress
468
+ * @description fetch the deposit address for a currency associated with this account
469
+ * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
470
+ * @param {string} code unified currency code
471
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
472
+ * @param {string} [params.network] the network name for the deposit address
473
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
474
+ */
62
475
  fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
476
+ /**
477
+ * @method
478
+ * @name okx#withdraw
479
+ * @description make a withdrawal
480
+ * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
481
+ * @param {string} code unified currency code
482
+ * @param {float} amount the amount to withdraw
483
+ * @param {string} address the address to withdraw to
484
+ * @param {string} tag
485
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
486
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
487
+ */
63
488
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
489
+ /**
490
+ * @method
491
+ * @name okx#fetchDeposits
492
+ * @description fetch all deposits made to an account
493
+ * @see https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
494
+ * @param {string} code unified currency code
495
+ * @param {int} [since] the earliest time in ms to fetch deposits for
496
+ * @param {int} [limit] the maximum number of deposits structures to retrieve
497
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
498
+ * @param {int} [params.until] the latest time in ms to fetch entries for
499
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
500
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
501
+ */
64
502
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
503
+ /**
504
+ * @method
505
+ * @name okx#fetchDeposit
506
+ * @description fetch data on a currency deposit via the deposit id
507
+ * @see https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
508
+ * @param {string} id deposit id
509
+ * @param {string} code filter by currency code
510
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
511
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
512
+ */
65
513
  fetchDeposit(id: string, code?: Str, params?: {}): Promise<Transaction>;
514
+ /**
515
+ * @method
516
+ * @name okx#fetchWithdrawals
517
+ * @description fetch all withdrawals made from an account
518
+ * @see https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
519
+ * @param {string} code unified currency code
520
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
521
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
522
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
523
+ * @param {int} [params.until] the latest time in ms to fetch entries for
524
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
525
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
526
+ */
66
527
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
528
+ /**
529
+ * @method
530
+ * @name okx#fetchWithdrawal
531
+ * @description fetch data on a currency withdrawal via the withdrawal id
532
+ * @see https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
533
+ * @param {string} id withdrawal id
534
+ * @param {string} code unified currency code of the currency withdrawn, default is undefined
535
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
536
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
537
+ */
67
538
  fetchWithdrawal(id: string, code?: Str, params?: {}): Promise<Transaction>;
68
539
  parseTransactionStatus(status: Str): string;
69
540
  parseTransaction(transaction: Dict, currency?: Currency): Transaction;
541
+ /**
542
+ * @method
543
+ * @name okx#fetchLeverage
544
+ * @description fetch the set leverage for a market
545
+ * @see https://www.okx.com/docs-v5/en/#rest-api-account-get-leverage
546
+ * @param {string} symbol unified market symbol
547
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
548
+ * @param {string} [params.marginMode] 'cross' or 'isolated'
549
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
550
+ */
70
551
  fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
71
552
  parseLeverage(leverage: Dict, market?: Market): Leverage;
553
+ /**
554
+ * @method
555
+ * @name okx#fetchPosition
556
+ * @description fetch data on a single open contract trade position
557
+ * @see https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
558
+ * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
559
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
560
+ * @param {string} [params.instType] MARGIN, SWAP, FUTURES, OPTION
561
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
562
+ */
72
563
  fetchPosition(symbol: string, params?: {}): Promise<Position>;
564
+ /**
565
+ * @method
566
+ * @name okx#fetchPositions
567
+ * @see https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
568
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-positions-history history
569
+ * @description fetch all open positions
570
+ * @param {string[]|undefined} symbols list of unified market symbols
571
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
572
+ * @param {string} [params.instType] MARGIN, SWAP, FUTURES, OPTION
573
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
574
+ */
73
575
  fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
576
+ /**
577
+ * @method
578
+ * @name okx#fetchPositions
579
+ * @see https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
580
+ * @description fetch all open positions for specific symbol
581
+ * @param {string} symbol unified market symbol
582
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
583
+ * @param {string} [params.instType] MARGIN (if needed)
584
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
585
+ */
74
586
  fetchPositionsForSymbol(symbol: string, params?: {}): Promise<Position[]>;
75
587
  parsePosition(position: Dict, market?: Market): Position;
588
+ /**
589
+ * @method
590
+ * @name okx#transfer
591
+ * @description transfer currency internally between wallets on the same account
592
+ * @see https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
593
+ * @param {string} code unified currency code
594
+ * @param {float} amount amount to transfer
595
+ * @param {string} fromAccount account to transfer from
596
+ * @param {string} toAccount account to transfer to
597
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
598
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
599
+ */
76
600
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
77
601
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
78
602
  parseTransferStatus(status: Str): Str;
79
603
  fetchTransfer(id: string, code?: Str, params?: {}): Promise<TransferEntry>;
604
+ /**
605
+ * @method
606
+ * @name okx#fetchTransfers
607
+ * @description fetch a history of internal transfers made on an account
608
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
609
+ * @param {string} code unified currency code of the currency transferred
610
+ * @param {int} [since] the earliest time in ms to fetch transfers for
611
+ * @param {int} [limit] the maximum number of transfers structures to retrieve
612
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
613
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
614
+ */
80
615
  fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
81
616
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
82
617
  url: string;
@@ -86,17 +621,106 @@ export default class okx extends Exchange {
86
621
  };
87
622
  parseFundingRate(contract: any, market?: Market): FundingRate;
88
623
  parseFundingInterval(interval: any): string;
624
+ /**
625
+ * @method
626
+ * @name okx#fetchFundingInterval
627
+ * @description fetch the current funding rate interval
628
+ * @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
629
+ * @param {string} symbol unified market symbol
630
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
631
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
632
+ */
89
633
  fetchFundingInterval(symbol: string, params?: {}): Promise<FundingRate>;
634
+ /**
635
+ * @method
636
+ * @name okx#fetchFundingRate
637
+ * @description fetch the current funding rate
638
+ * @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
639
+ * @param {string} symbol unified market symbol
640
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
641
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
642
+ */
90
643
  fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
644
+ /**
645
+ * @method
646
+ * @name okx#fetchFundingHistory
647
+ * @description fetch the history of funding payments paid and received on this account
648
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
649
+ * @param {string} symbol unified market symbol
650
+ * @param {int} [since] the earliest time in ms to fetch funding history for
651
+ * @param {int} [limit] the maximum number of funding history structures to retrieve
652
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
653
+ * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
654
+ */
91
655
  fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingHistory[]>;
656
+ /**
657
+ * @method
658
+ * @name okx#setLeverage
659
+ * @description set the level of leverage for a market
660
+ * @see https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
661
+ * @param {float} leverage the rate of leverage
662
+ * @param {string} symbol unified market symbol
663
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
664
+ * @param {string} [params.marginMode] 'cross' or 'isolated'
665
+ * @param {string} [params.posSide] 'long' or 'short' for isolated margin long/short mode on futures and swap markets
666
+ * @returns {object} response from the exchange
667
+ */
92
668
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
669
+ /**
670
+ * @method
671
+ * @name okx#fetchPositionMode
672
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
673
+ * @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
674
+ * @param {string} symbol unified symbol of the market to fetch the order book for
675
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
676
+ * @param {string} [params.accountId] if you have multiple accounts, you must specify the account id to fetch the position mode
677
+ * @returns {object} an object detailing whether the market is in hedged or one-way mode
678
+ */
93
679
  fetchPositionMode(symbol?: Str, params?: {}): Promise<{
94
680
  info: any;
95
681
  hedged: boolean;
96
682
  }>;
683
+ /**
684
+ * @method
685
+ * @name okx#setPositionMode
686
+ * @description set hedged to true or false for a market
687
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-position-mode
688
+ * @param {bool} hedged set to true to use long_short_mode, false for net_mode
689
+ * @param {string} symbol not used by okx setPositionMode
690
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
691
+ * @returns {object} response from the exchange
692
+ */
97
693
  setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
694
+ /**
695
+ * @method
696
+ * @name okx#setMarginMode
697
+ * @description set margin mode to 'cross' or 'isolated'
698
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-leverage
699
+ * @param {string} marginMode 'cross' or 'isolated'
700
+ * @param {string} symbol unified market symbol
701
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
702
+ * @param {int} [params.leverage] leverage
703
+ * @returns {object} response from the exchange
704
+ */
98
705
  setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
706
+ /**
707
+ * @method
708
+ * @name okx#fetchCrossBorrowRates
709
+ * @description fetch the borrow interest rates of all currencies
710
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
711
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
712
+ * @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
713
+ */
99
714
  fetchCrossBorrowRates(params?: {}): Promise<CrossBorrowRates>;
715
+ /**
716
+ * @method
717
+ * @name okx#fetchCrossBorrowRate
718
+ * @description fetch the rate of interest to borrow a currency for margin trading
719
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
720
+ * @param {string} code unified currency code
721
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
722
+ * @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
723
+ */
100
724
  fetchCrossBorrowRate(code: string, params?: {}): Promise<CrossBorrowRate>;
101
725
  parseBorrowRate(info: any, currency?: Currency): {
102
726
  currency: string;
@@ -107,16 +731,92 @@ export default class okx extends Exchange {
107
731
  info: any;
108
732
  };
109
733
  parseBorrowRateHistories(response: any, codes: any, since: any, limit: any): Dict;
734
+ /**
735
+ * @method
736
+ * @name okx#fetchBorrowRateHistories
737
+ * @description retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is undefined
738
+ * @see https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
739
+ * @param {string[]|undefined} codes list of unified currency codes, default is undefined
740
+ * @param {int} [since] timestamp in ms of the earliest borrowRate, default is undefined
741
+ * @param {int} [limit] max number of borrow rate prices to return, default is undefined
742
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
743
+ * @returns {object} a dictionary of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure} indexed by the market symbol
744
+ */
110
745
  fetchBorrowRateHistories(codes?: any, since?: Int, limit?: Int, params?: {}): Promise<Dict>;
746
+ /**
747
+ * @method
748
+ * @name okx#fetchBorrowRateHistory
749
+ * @description retrieves a history of a currencies borrow interest rate at specific time slots
750
+ * @see https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
751
+ * @param {string} code unified currency code
752
+ * @param {int} [since] timestamp for the earliest borrow rate
753
+ * @param {int} [limit] the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure} to retrieve
754
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
755
+ * @returns {object[]} an array of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
756
+ */
111
757
  fetchBorrowRateHistory(code: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
112
758
  modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<MarginModification>;
113
759
  parseMarginModification(data: Dict, market?: Market): MarginModification;
760
+ /**
761
+ * @method
762
+ * @name okx#reduceMargin
763
+ * @description remove margin from a position
764
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
765
+ * @param {string} symbol unified market symbol
766
+ * @param {float} amount the amount of margin to remove
767
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
768
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
769
+ */
114
770
  reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
771
+ /**
772
+ * @method
773
+ * @name okx#addMargin
774
+ * @description add margin
775
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
776
+ * @param {string} symbol unified market symbol
777
+ * @param {float} amount amount of margin to add
778
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
779
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
780
+ */
115
781
  addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
782
+ /**
783
+ * @method
784
+ * @name okx#fetchMarketLeverageTiers
785
+ * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
786
+ * @see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-position-tiers
787
+ * @param {string} symbol unified market symbol
788
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
789
+ * @param {string} [params.marginMode] 'cross' or 'isolated'
790
+ * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
791
+ */
116
792
  fetchMarketLeverageTiers(symbol: string, params?: {}): Promise<LeverageTier[]>;
117
793
  parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[];
794
+ /**
795
+ * @method
796
+ * @name okx#fetchBorrowInterest
797
+ * @description fetch the interest owed by the user for borrowing currency for margin trading
798
+ * @see https://www.okx.com/docs-v5/en/#rest-api-account-get-interest-accrued-data
799
+ * @param {string} code the unified currency code for the currency of the interest
800
+ * @param {string} symbol the market symbol of an isolated margin market, if undefined, the interest for cross margin markets is returned
801
+ * @param {int} [since] timestamp in ms of the earliest time to receive interest records for
802
+ * @param {int} [limit] the number of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure} to retrieve
803
+ * @param {object} [params] exchange specific parameters
804
+ * @param {int} [params.type] Loan type 1 - VIP loans 2 - Market loans *Default is Market loans*
805
+ * @param {string} [params.marginMode] 'cross' or 'isolated'
806
+ * @returns {object[]} An list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
807
+ */
118
808
  fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<BorrowInterest[]>;
119
809
  parseBorrowInterest(info: Dict, market?: Market): BorrowInterest;
810
+ /**
811
+ * @method
812
+ * @name okx#borrowCrossMargin
813
+ * @description create a loan to borrow margin (need to be VIP 5 and above)
814
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-vip-loans-borrow-and-repay
815
+ * @param {string} code unified currency code of the currency to borrow
816
+ * @param {float} amount the amount to borrow
817
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
818
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
819
+ */
120
820
  borrowCrossMargin(code: string, amount: number, params?: {}): Promise<{
121
821
  id: any;
122
822
  currency: string;
@@ -126,6 +826,17 @@ export default class okx extends Exchange {
126
826
  datetime: any;
127
827
  info: any;
128
828
  }>;
829
+ /**
830
+ * @method
831
+ * @name okx#repayCrossMargin
832
+ * @description repay borrowed margin and interest
833
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-vip-loans-borrow-and-repay
834
+ * @param {string} code unified currency code of the currency to repay
835
+ * @param {float} amount the amount to repay
836
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
837
+ * @param {string} [params.id] the order ID of borrowing, it is necessary while repaying
838
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
839
+ */
129
840
  repayCrossMargin(code: string, amount: any, params?: {}): Promise<{
130
841
  id: any;
131
842
  currency: string;
@@ -144,12 +855,55 @@ export default class okx extends Exchange {
144
855
  datetime: any;
145
856
  info: any;
146
857
  };
858
+ /**
859
+ * @method
860
+ * @name okx#fetchOpenInterest
861
+ * @description Retrieves the open interest of a currency
862
+ * @see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-open-interest
863
+ * @param {string} symbol Unified CCXT market symbol
864
+ * @param {object} [params] exchange specific parameters
865
+ * @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
866
+ */
147
867
  fetchOpenInterest(symbol: string, params?: {}): Promise<import("./base/types.js").OpenInterest>;
868
+ /**
869
+ * @method
870
+ * @name okx#fetchOpenInterestHistory
871
+ * @description Retrieves the open interest history of a currency
872
+ * @see https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-contracts-open-interest-and-volume
873
+ * @see https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-options-open-interest-and-volume
874
+ * @param {string} symbol Unified CCXT currency code or unified symbol
875
+ * @param {string} timeframe "5m", "1h", or "1d" for option only "1d" or "8h"
876
+ * @param {int} [since] The time in ms of the earliest record to retrieve as a unix timestamp
877
+ * @param {int} [limit] Not used by okx, but parsed internally by CCXT
878
+ * @param {object} [params] Exchange specific parameters
879
+ * @param {int} [params.until] The time in ms of the latest record to retrieve as a unix timestamp
880
+ * @returns An array of [open interest structures]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
881
+ */
148
882
  fetchOpenInterestHistory(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").OpenInterest[]>;
149
883
  parseOpenInterest(interest: any, market?: Market): import("./base/types.js").OpenInterest;
150
884
  setSandboxMode(enable: boolean): void;
885
+ /**
886
+ * @method
887
+ * @name okx#fetchDepositWithdrawFees
888
+ * @description fetch deposit and withdraw fees
889
+ * @see https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
890
+ * @param {string[]|undefined} codes list of unified currency codes
891
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
892
+ * @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
893
+ */
151
894
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<Dict>;
152
895
  parseDepositWithdrawFees(response: any, codes?: any, currencyIdKey?: any): Dict;
896
+ /**
897
+ * @method
898
+ * @name okx#fetchSettlementHistory
899
+ * @description fetches historical settlement records
900
+ * @see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-delivery-exercise-history
901
+ * @param {string} symbol unified market symbol to fetch the settlement history for
902
+ * @param {int} [since] timestamp in ms
903
+ * @param {int} [limit] number of records
904
+ * @param {object} [params] exchange specific params
905
+ * @returns {object[]} a list of [settlement history objects]{@link https://docs.ccxt.com/#/?id=settlement-history-structure}
906
+ */
153
907
  fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
154
908
  parseSettlement(settlement: any, market: any): {
155
909
  info: any;
@@ -159,22 +913,175 @@ export default class okx extends Exchange {
159
913
  datetime: any;
160
914
  };
161
915
  parseSettlements(settlements: any, market: any): any[];
916
+ /**
917
+ * @method
918
+ * @name okx#fetchUnderlyingAssets
919
+ * @description fetches the market ids of underlying assets for a specific contract market type
920
+ * @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-underlying
921
+ * @param {object} [params] exchange specific params
922
+ * @param {string} [params.type] the contract market type, 'option', 'swap' or 'future', the default is 'option'
923
+ * @returns {object[]} a list of [underlying assets]{@link https://docs.ccxt.com/#/?id=underlying-assets-structure}
924
+ */
162
925
  fetchUnderlyingAssets(params?: {}): Promise<any>;
926
+ /**
927
+ * @method
928
+ * @name okx#fetchGreeks
929
+ * @description fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
930
+ * @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-option-market-data
931
+ * @param {string} symbol unified symbol of the market to fetch greeks for
932
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
933
+ * @returns {object} a [greeks structure]{@link https://docs.ccxt.com/#/?id=greeks-structure}
934
+ */
163
935
  fetchGreeks(symbol: string, params?: {}): Promise<Greeks>;
164
936
  parseGreeks(greeks: Dict, market?: Market): Greeks;
937
+ /**
938
+ * @method
939
+ * @name okx#closePosition
940
+ * @description closes open positions for a market
941
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-close-positions
942
+ * @param {string} symbol Unified CCXT market symbol
943
+ * @param {string} [side] 'buy' or 'sell', leave as undefined in net mode
944
+ * @param {object} [params] extra parameters specific to the okx api endpoint
945
+ * @param {string} [params.clientOrderId] a unique identifier for the order
946
+ * @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross;
947
+ * @param {string} [params.code] *required in the case of closing cross MARGIN position for Single-currency margin* margin currency
948
+ *
949
+ * EXCHANGE SPECIFIC PARAMETERS
950
+ * @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
951
+ * @param {string} [params.tag] order tag a combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters
952
+ * @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
953
+ */
165
954
  closePosition(symbol: string, side?: OrderSide, params?: {}): Promise<Order>;
955
+ /**
956
+ * @method
957
+ * @name okx#fetchOption
958
+ * @description fetches option data that is commonly found in an option chain
959
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
960
+ * @param {string} symbol unified market symbol
961
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
962
+ * @returns {object} an [option chain structure]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
963
+ */
166
964
  fetchOption(symbol: string, params?: {}): Promise<Option>;
965
+ /**
966
+ * @method
967
+ * @name okx#fetchOptionChain
968
+ * @description fetches data for an underlying asset that is commonly found in an option chain
969
+ * @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
970
+ * @param {string} code base currency to fetch an option chain for
971
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
972
+ * @param {string} [params.uly] the underlying asset, can be obtained from fetchUnderlyingAssets ()
973
+ * @returns {object} a list of [option chain structures]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
974
+ */
167
975
  fetchOptionChain(code: string, params?: {}): Promise<OptionChain>;
168
976
  parseOption(chain: Dict, currency?: Currency, market?: Market): Option;
977
+ /**
978
+ * @method
979
+ * @name okx#fetchConvertQuote
980
+ * @description fetch a quote for converting from one currency to another
981
+ * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-estimate-quote
982
+ * @param {string} fromCode the currency that you want to sell and convert from
983
+ * @param {string} toCode the currency that you want to buy and convert into
984
+ * @param {float} [amount] how much you want to trade in units of the from currency
985
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
986
+ * @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
987
+ */
169
988
  fetchConvertQuote(fromCode: string, toCode: string, amount?: Num, params?: {}): Promise<Conversion>;
989
+ /**
990
+ * @method
991
+ * @name okx#createConvertTrade
992
+ * @description convert from one currency to another
993
+ * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-convert-trade
994
+ * @param {string} id the id of the trade that you want to make
995
+ * @param {string} fromCode the currency that you want to sell and convert from
996
+ * @param {string} toCode the currency that you want to buy and convert into
997
+ * @param {float} [amount] how much you want to trade in units of the from currency
998
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
999
+ * @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
1000
+ */
170
1001
  createConvertTrade(id: string, fromCode: string, toCode: string, amount?: Num, params?: {}): Promise<Conversion>;
1002
+ /**
1003
+ * @method
1004
+ * @name okx#fetchConvertTrade
1005
+ * @description fetch the data for a conversion trade
1006
+ * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-convert-history
1007
+ * @param {string} id the id of the trade that you want to fetch
1008
+ * @param {string} [code] the unified currency code of the conversion trade
1009
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1010
+ * @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
1011
+ */
171
1012
  fetchConvertTrade(id: string, code?: Str, params?: {}): Promise<Conversion>;
1013
+ /**
1014
+ * @method
1015
+ * @name okx#fetchConvertTradeHistory
1016
+ * @description fetch the users history of conversion trades
1017
+ * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-convert-history
1018
+ * @param {string} [code] the unified currency code
1019
+ * @param {int} [since] the earliest time in ms to fetch conversions for
1020
+ * @param {int} [limit] the maximum number of conversion structures to retrieve
1021
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1022
+ * @param {int} [params.until] timestamp in ms of the latest conversion to fetch
1023
+ * @returns {object[]} a list of [conversion structures]{@link https://docs.ccxt.com/#/?id=conversion-structure}
1024
+ */
172
1025
  fetchConvertTradeHistory(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Conversion[]>;
173
1026
  parseConversion(conversion: Dict, fromCurrency?: Currency, toCurrency?: Currency): Conversion;
1027
+ /**
1028
+ * @method
1029
+ * @name okx#fetchConvertCurrencies
1030
+ * @description fetches all available currencies that can be converted
1031
+ * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-convert-currencies
1032
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1033
+ * @returns {object} an associative dictionary of currencies
1034
+ */
174
1035
  fetchConvertCurrencies(params?: {}): Promise<Currencies>;
175
1036
  handleErrors(httpCode: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
1037
+ /**
1038
+ * @method
1039
+ * @name okx#fetchMarginAdjustmentHistory
1040
+ * @description fetches the history of margin added or reduced from contract isolated positions
1041
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-7-days
1042
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
1043
+ * @param {string} [symbol] not used by okx fetchMarginAdjustmentHistory
1044
+ * @param {string} [type] "add" or "reduce"
1045
+ * @param {int} [since] the earliest time in ms to fetch margin adjustment history for
1046
+ * @param {int} [limit] the maximum number of entries to retrieve
1047
+ * @param {object} params extra parameters specific to the exchange api endpoint
1048
+ * @param {boolean} [params.auto] true if fetching auto margin increases
1049
+ * @returns {object[]} a list of [margin structures]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
1050
+ */
176
1051
  fetchMarginAdjustmentHistory(symbol?: Str, type?: Str, since?: Num, limit?: Num, params?: {}): Promise<MarginModification[]>;
1052
+ /**
1053
+ * @method
1054
+ * @name okx#fetchPositionsHistory
1055
+ * @description fetches historical positions
1056
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-positions-history
1057
+ * @param {string} [symbols] unified market symbols
1058
+ * @param {int} [since] timestamp in ms of the earliest position to fetch
1059
+ * @param {int} [limit] the maximum amount of records to fetch, default=100, max=100
1060
+ * @param {object} params extra parameters specific to the exchange api endpoint
1061
+ * @param {string} [params.marginMode] "cross" or "isolated"
1062
+ *
1063
+ * EXCHANGE SPECIFIC PARAMETERS
1064
+ * @param {string} [params.instType] margin, swap, futures or option
1065
+ * @param {string} [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
1066
+ * @param {string} [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
1067
+ * @param {string} [params.before] timestamp in ms of the earliest position to fetch based on the last update time of the position
1068
+ * @param {string} [params.after] timestamp in ms of the latest position to fetch based on the last update time of the position
1069
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
1070
+ */
177
1071
  fetchPositionsHistory(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
1072
+ /**
1073
+ * @method
1074
+ * @name okx#fetchLongShortRatioHistory
1075
+ * @description fetches the long short ratio history for a unified market symbol
1076
+ * @see https://www.okx.com/docs-v5/en/#trading-statistics-rest-api-get-contract-long-short-ratio
1077
+ * @param {string} symbol unified symbol of the market to fetch the long short ratio for
1078
+ * @param {string} [timeframe] the period for the ratio
1079
+ * @param {int} [since] the earliest time in ms to fetch ratios for
1080
+ * @param {int} [limit] the maximum number of long short ratio structures to retrieve
1081
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1082
+ * @param {int} [params.until] timestamp in ms of the latest ratio to fetch
1083
+ * @returns {object[]} an array of [long short ratio structures]{@link https://docs.ccxt.com/#/?id=long-short-ratio-structure}
1084
+ */
178
1085
  fetchLongShortRatioHistory(symbol?: Str, timeframe?: Str, since?: Int, limit?: Int, params?: {}): Promise<LongShortRatio[]>;
179
1086
  parseLongShortRatio(info: Dict, market?: Market): LongShortRatio;
180
1087
  }