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
@@ -490,15 +490,15 @@ class bitfinex2 extends bitfinex2$1 {
490
490
  // Prices submit with a precision larger than 5 will be cut by the API.
491
491
  return this.decimalToPrecision(price, number.TRUNCATE, 8, number.DECIMAL_PLACES);
492
492
  }
493
+ /**
494
+ * @method
495
+ * @name bitfinex2#fetchStatus
496
+ * @description the latest known information on the availability of the exchange API
497
+ * @see https://docs.bitfinex.com/reference/rest-public-platform-status
498
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
499
+ * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
500
+ */
493
501
  async fetchStatus(params = {}) {
494
- /**
495
- * @method
496
- * @name bitfinex2#fetchStatus
497
- * @description the latest known information on the availability of the exchange API
498
- * @see https://docs.bitfinex.com/reference/rest-public-platform-status
499
- * @param {object} [params] extra parameters specific to the exchange API endpoint
500
- * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
501
- */
502
502
  //
503
503
  // [1] // operative
504
504
  // [0] // maintenance
@@ -513,15 +513,15 @@ class bitfinex2 extends bitfinex2$1 {
513
513
  'info': response,
514
514
  };
515
515
  }
516
+ /**
517
+ * @method
518
+ * @name bitfinex2#fetchMarkets
519
+ * @description retrieves data on all markets for bitfinex2
520
+ * @see https://docs.bitfinex.com/reference/rest-public-conf
521
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
522
+ * @returns {object[]} an array of objects representing market data
523
+ */
516
524
  async fetchMarkets(params = {}) {
517
- /**
518
- * @method
519
- * @name bitfinex2#fetchMarkets
520
- * @description retrieves data on all markets for bitfinex2
521
- * @see https://docs.bitfinex.com/reference/rest-public-conf
522
- * @param {object} [params] extra parameters specific to the exchange API endpoint
523
- * @returns {object[]} an array of objects representing market data
524
- */
525
525
  const spotMarketsInfoPromise = this.publicGetConfPubInfoPair(params);
526
526
  const futuresMarketsInfoPromise = this.publicGetConfPubInfoPairFutures(params);
527
527
  const marginIdsPromise = this.publicGetConfPubListPairMargin(params);
@@ -644,15 +644,15 @@ class bitfinex2 extends bitfinex2$1 {
644
644
  }
645
645
  return result;
646
646
  }
647
+ /**
648
+ * @method
649
+ * @name bitfinex2#fetchCurrencies
650
+ * @description fetches all available currencies on an exchange
651
+ * @see https://docs.bitfinex.com/reference/rest-public-conf
652
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
653
+ * @returns {object} an associative dictionary of currencies
654
+ */
647
655
  async fetchCurrencies(params = {}) {
648
- /**
649
- * @method
650
- * @name bitfinex2#fetchCurrencies
651
- * @description fetches all available currencies on an exchange
652
- * @see https://docs.bitfinex.com/reference/rest-public-conf
653
- * @param {object} [params] extra parameters specific to the exchange API endpoint
654
- * @returns {object} an associative dictionary of currencies
655
- */
656
656
  const labels = [
657
657
  'pub:list:currency',
658
658
  'pub:map:currency:sym',
@@ -835,15 +835,15 @@ class bitfinex2 extends bitfinex2$1 {
835
835
  }
836
836
  return result;
837
837
  }
838
+ /**
839
+ * @method
840
+ * @name bitfinex2#fetchBalance
841
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
842
+ * @see https://docs.bitfinex.com/reference/rest-auth-wallets
843
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
844
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
845
+ */
838
846
  async fetchBalance(params = {}) {
839
- /**
840
- * @method
841
- * @name bitfinex2#fetchBalance
842
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
843
- * @see https://docs.bitfinex.com/reference/rest-auth-wallets
844
- * @param {object} [params] extra parameters specific to the exchange API endpoint
845
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
846
- */
847
847
  // this api call does not return the 'used' amount - use the v1 version instead (which also returns zero balances)
848
848
  // there is a difference between this and the v1 api, namely trading wallet is called margin in v2
849
849
  await this.loadMarkets();
@@ -880,19 +880,19 @@ class bitfinex2 extends bitfinex2$1 {
880
880
  }
881
881
  return this.safeBalance(result);
882
882
  }
883
+ /**
884
+ * @method
885
+ * @name bitfinex2#transfer
886
+ * @description transfer currency internally between wallets on the same account
887
+ * @see https://docs.bitfinex.com/reference/rest-auth-transfer
888
+ * @param {string} code unified currency code
889
+ * @param {float} amount amount to transfer
890
+ * @param {string} fromAccount account to transfer from
891
+ * @param {string} toAccount account to transfer to
892
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
893
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
894
+ */
883
895
  async transfer(code, amount, fromAccount, toAccount, params = {}) {
884
- /**
885
- * @method
886
- * @name bitfinex2#transfer
887
- * @description transfer currency internally between wallets on the same account
888
- * @see https://docs.bitfinex.com/reference/rest-auth-transfer
889
- * @param {string} code unified currency code
890
- * @param {float} amount amount to transfer
891
- * @param {string} fromAccount account to transfer from
892
- * @param {string} toAccount account to transfer to
893
- * @param {object} [params] extra parameters specific to the exchange API endpoint
894
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
895
- */
896
896
  // transferring between derivatives wallet and regular wallet is not documented in their API
897
897
  // however we support it in CCXT (from just looking at web inspector)
898
898
  await this.loadMarkets();
@@ -1027,17 +1027,17 @@ class bitfinex2 extends bitfinex2$1 {
1027
1027
  }
1028
1028
  return currencyId;
1029
1029
  }
1030
+ /**
1031
+ * @method
1032
+ * @name bitfinex2#fetchOrderBook
1033
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1034
+ * @see https://docs.bitfinex.com/reference/rest-public-book
1035
+ * @param {string} symbol unified symbol of the market to fetch the order book for
1036
+ * @param {int} [limit] the maximum amount of order book entries to return, bitfinex only allows 1, 25, or 100
1037
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1038
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1039
+ */
1030
1040
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1031
- /**
1032
- * @method
1033
- * @name bitfinex2#fetchOrderBook
1034
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1035
- * @see https://docs.bitfinex.com/reference/rest-public-book
1036
- * @param {string} symbol unified symbol of the market to fetch the order book for
1037
- * @param {int} [limit] the maximum amount of order book entries to return, bitfinex only allows 1, 25, or 100
1038
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1039
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1040
- */
1041
1041
  await this.loadMarkets();
1042
1042
  const precision = this.safeValue(this.options, 'precision', 'R0');
1043
1043
  const market = this.market(symbol);
@@ -1145,16 +1145,16 @@ class bitfinex2 extends bitfinex2$1 {
1145
1145
  'info': result,
1146
1146
  }, market);
1147
1147
  }
1148
+ /**
1149
+ * @method
1150
+ * @name bitfinex2#fetchTickers
1151
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1152
+ * @see https://docs.bitfinex.com/reference/rest-public-tickers
1153
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1154
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1155
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1156
+ */
1148
1157
  async fetchTickers(symbols = undefined, params = {}) {
1149
- /**
1150
- * @method
1151
- * @name bitfinex2#fetchTickers
1152
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1153
- * @see https://docs.bitfinex.com/reference/rest-public-tickers
1154
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1155
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1156
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1157
- */
1158
1158
  await this.loadMarkets();
1159
1159
  symbols = this.marketSymbols(symbols);
1160
1160
  const request = {};
@@ -1215,16 +1215,16 @@ class bitfinex2 extends bitfinex2$1 {
1215
1215
  }
1216
1216
  return this.filterByArrayTickers(result, 'symbol', symbols);
1217
1217
  }
1218
+ /**
1219
+ * @method
1220
+ * @name bitfinex2#fetchTicker
1221
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1222
+ * @see https://docs.bitfinex.com/reference/rest-public-ticker
1223
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1224
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1225
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1226
+ */
1218
1227
  async fetchTicker(symbol, params = {}) {
1219
- /**
1220
- * @method
1221
- * @name bitfinex2#fetchTicker
1222
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1223
- * @see https://docs.bitfinex.com/reference/rest-public-ticker
1224
- * @param {string} symbol unified symbol of the market to fetch the ticker for
1225
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1226
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1227
- */
1228
1228
  await this.loadMarkets();
1229
1229
  const market = this.market(symbol);
1230
1230
  const request = {
@@ -1318,20 +1318,20 @@ class bitfinex2 extends bitfinex2$1 {
1318
1318
  'info': tradeList,
1319
1319
  }, market);
1320
1320
  }
1321
+ /**
1322
+ * @method
1323
+ * @name bitfinex2#fetchTrades
1324
+ * @description get the list of most recent trades for a particular symbol
1325
+ * @see https://docs.bitfinex.com/reference/rest-public-trades
1326
+ * @param {string} symbol unified symbol of the market to fetch trades for
1327
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
1328
+ * @param {int} [limit] the maximum amount of trades to fetch, default 120, max 10000
1329
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1330
+ * @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)
1331
+ * @param {int} [params.until] the latest time in ms to fetch entries for
1332
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1333
+ */
1321
1334
  async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
1322
- /**
1323
- * @method
1324
- * @name bitfinex2#fetchTrades
1325
- * @description get the list of most recent trades for a particular symbol
1326
- * @see https://docs.bitfinex.com/reference/rest-public-trades
1327
- * @param {string} symbol unified symbol of the market to fetch trades for
1328
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
1329
- * @param {int} [limit] the maximum amount of trades to fetch, default 120, max 10000
1330
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1331
- * @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)
1332
- * @param {int} [params.until] the latest time in ms to fetch entries for
1333
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1334
- */
1335
1335
  await this.loadMarkets();
1336
1336
  let paginate = false;
1337
1337
  [paginate, params] = this.handleOptionAndParams(params, 'fetchTrades', 'paginate');
@@ -1370,21 +1370,21 @@ class bitfinex2 extends bitfinex2$1 {
1370
1370
  }
1371
1371
  return this.parseTrades(tradesList, market, undefined, limit);
1372
1372
  }
1373
+ /**
1374
+ * @method
1375
+ * @name bitfinex2#fetchOHLCV
1376
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1377
+ * @see https://docs.bitfinex.com/reference/rest-public-candles
1378
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1379
+ * @param {string} timeframe the length of time each candle represents
1380
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
1381
+ * @param {int} [limit] the maximum amount of candles to fetch, default 100 max 10000
1382
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1383
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1384
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
1385
+ * @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)
1386
+ */
1373
1387
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = 100, params = {}) {
1374
- /**
1375
- * @method
1376
- * @name bitfinex2#fetchOHLCV
1377
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1378
- * @see https://docs.bitfinex.com/reference/rest-public-candles
1379
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1380
- * @param {string} timeframe the length of time each candle represents
1381
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
1382
- * @param {int} [limit] the maximum amount of candles to fetch, default 100 max 10000
1383
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1384
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1385
- * @param {int} [params.until] timestamp in ms of the latest candle to fetch
1386
- * @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)
1387
- */
1388
1388
  await this.loadMarkets();
1389
1389
  let paginate = false;
1390
1390
  [paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
@@ -1641,29 +1641,29 @@ class bitfinex2 extends bitfinex2$1 {
1641
1641
  params = this.omit(params, ['triggerPrice', 'stopPrice', 'timeInForce', 'postOnly', 'reduceOnly', 'trailingAmount', 'clientOrderId']);
1642
1642
  return this.extend(request, params);
1643
1643
  }
1644
+ /**
1645
+ * @method
1646
+ * @name bitfinex2#createOrder
1647
+ * @description create an order on the exchange
1648
+ * @see https://docs.bitfinex.com/reference/rest-auth-submit-order
1649
+ * @param {string} symbol unified CCXT market symbol
1650
+ * @param {string} type 'limit' or 'market'
1651
+ * @param {string} side 'buy' or 'sell'
1652
+ * @param {float} amount the amount of currency to trade
1653
+ * @param {float} [price] price of the order
1654
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1655
+ * @param {float} [params.stopPrice] the price that triggers a trigger order
1656
+ * @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
1657
+ * @param {boolean} [params.postOnly] set to true if you want to make a post only order
1658
+ * @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
1659
+ * @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
1660
+ * @param {int} [params.lev] leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive.
1661
+ * @param {string} [params.price_aux_limit] order price for stop limit orders
1662
+ * @param {string} [params.price_oco_stop] OCO stop price
1663
+ * @param {string} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
1664
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1665
+ */
1644
1666
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
1645
- /**
1646
- * @method
1647
- * @name bitfinex2#createOrder
1648
- * @description create an order on the exchange
1649
- * @see https://docs.bitfinex.com/reference/rest-auth-submit-order
1650
- * @param {string} symbol unified CCXT market symbol
1651
- * @param {string} type 'limit' or 'market'
1652
- * @param {string} side 'buy' or 'sell'
1653
- * @param {float} amount the amount of currency to trade
1654
- * @param {float} [price] price of the order
1655
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1656
- * @param {float} [params.stopPrice] the price that triggers a trigger order
1657
- * @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
1658
- * @param {boolean} [params.postOnly] set to true if you want to make a post only order
1659
- * @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
1660
- * @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
1661
- * @param {int} [params.lev] leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive.
1662
- * @param {string} [params.price_aux_limit] order price for stop limit orders
1663
- * @param {string} [params.price_oco_stop] OCO stop price
1664
- * @param {string} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
1665
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1666
- */
1667
1667
  await this.loadMarkets();
1668
1668
  const market = this.market(symbol);
1669
1669
  const request = this.createOrderRequest(symbol, type, side, amount, price, params);
@@ -1725,16 +1725,16 @@ class bitfinex2 extends bitfinex2$1 {
1725
1725
  const order = this.safeList(orders, 0);
1726
1726
  return this.parseOrder(this.extend({ 'result': order }), market);
1727
1727
  }
1728
+ /**
1729
+ * @method
1730
+ * @name bitfinex2#createOrders
1731
+ * @description create a list of trade orders
1732
+ * @see https://docs.bitfinex.com/reference/rest-auth-order-multi
1733
+ * @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
1734
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1735
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1736
+ */
1728
1737
  async createOrders(orders, params = {}) {
1729
- /**
1730
- * @method
1731
- * @name bitfinex2#createOrders
1732
- * @description create a list of trade orders
1733
- * @see https://docs.bitfinex.com/reference/rest-auth-order-multi
1734
- * @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
1735
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1736
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1737
- */
1738
1738
  await this.loadMarkets();
1739
1739
  const ordersRequests = [];
1740
1740
  for (let i = 0; i < orders.length; i++) {
@@ -1786,16 +1786,16 @@ class bitfinex2 extends bitfinex2$1 {
1786
1786
  }
1787
1787
  return this.parseOrders(results);
1788
1788
  }
1789
+ /**
1790
+ * @method
1791
+ * @name bitfinex2#cancelAllOrders
1792
+ * @description cancel all open orders
1793
+ * @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
1794
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1795
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1796
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1797
+ */
1789
1798
  async cancelAllOrders(symbol = undefined, params = {}) {
1790
- /**
1791
- * @method
1792
- * @name bitfinex2#cancelAllOrders
1793
- * @description cancel all open orders
1794
- * @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
1795
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1796
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1797
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1798
- */
1799
1799
  await this.loadMarkets();
1800
1800
  const request = {
1801
1801
  'all': 1,
@@ -1808,17 +1808,17 @@ class bitfinex2 extends bitfinex2$1 {
1808
1808
  }
1809
1809
  return this.parseOrders(ordersList);
1810
1810
  }
1811
+ /**
1812
+ * @method
1813
+ * @name bitfinex2#cancelOrder
1814
+ * @description cancels an open order
1815
+ * @see https://docs.bitfinex.com/reference/rest-auth-cancel-order
1816
+ * @param {string} id order id
1817
+ * @param {string} symbol Not used by bitfinex2 cancelOrder ()
1818
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1819
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1820
+ */
1811
1821
  async cancelOrder(id, symbol = undefined, params = {}) {
1812
- /**
1813
- * @method
1814
- * @name bitfinex2#cancelOrder
1815
- * @description cancels an open order
1816
- * @see https://docs.bitfinex.com/reference/rest-auth-cancel-order
1817
- * @param {string} id order id
1818
- * @param {string} symbol Not used by bitfinex2 cancelOrder ()
1819
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1820
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1821
- */
1822
1822
  await this.loadMarkets();
1823
1823
  const cid = this.safeValue2(params, 'cid', 'clientOrderId'); // client order id
1824
1824
  let request = undefined;
@@ -1843,17 +1843,17 @@ class bitfinex2 extends bitfinex2$1 {
1843
1843
  const orderObject = { 'result': order };
1844
1844
  return this.parseOrder(orderObject);
1845
1845
  }
1846
+ /**
1847
+ * @method
1848
+ * @name bitfinex2#cancelOrders
1849
+ * @description cancel multiple orders at the same time
1850
+ * @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
1851
+ * @param {string[]} ids order ids
1852
+ * @param {string} symbol unified market symbol, default is undefined
1853
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1854
+ * @returns {object} an array of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1855
+ */
1846
1856
  async cancelOrders(ids, symbol = undefined, params = {}) {
1847
- /**
1848
- * @method
1849
- * @name bitfinex2#cancelOrders
1850
- * @description cancel multiple orders at the same time
1851
- * @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
1852
- * @param {string[]} ids order ids
1853
- * @param {string} symbol unified market symbol, default is undefined
1854
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1855
- * @returns {object} an array of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1856
- */
1857
1857
  await this.loadMarkets();
1858
1858
  for (let i = 0; i < ids.length; i++) {
1859
1859
  ids[i] = this.parseToNumeric(ids[i]);
@@ -1923,18 +1923,18 @@ class bitfinex2 extends bitfinex2$1 {
1923
1923
  }
1924
1924
  return this.parseOrders(ordersList, market);
1925
1925
  }
1926
+ /**
1927
+ * @method
1928
+ * @name bitfinex2#fetchOpenOrder
1929
+ * @description fetch an open order by it's id
1930
+ * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
1931
+ * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
1932
+ * @param {string} id order id
1933
+ * @param {string} symbol unified market symbol, default is undefined
1934
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1935
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1936
+ */
1926
1937
  async fetchOpenOrder(id, symbol = undefined, params = {}) {
1927
- /**
1928
- * @method
1929
- * @name bitfinex2#fetchOpenOrder
1930
- * @description fetch an open order by it's id
1931
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
1932
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
1933
- * @param {string} id order id
1934
- * @param {string} symbol unified market symbol, default is undefined
1935
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1936
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1937
- */
1938
1938
  const request = {
1939
1939
  'id': [parseInt(id)],
1940
1940
  };
@@ -1945,18 +1945,18 @@ class bitfinex2 extends bitfinex2$1 {
1945
1945
  }
1946
1946
  return order;
1947
1947
  }
1948
+ /**
1949
+ * @method
1950
+ * @name bitfinex2#fetchClosedOrder
1951
+ * @description fetch an open order by it's id
1952
+ * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
1953
+ * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
1954
+ * @param {string} id order id
1955
+ * @param {string} symbol unified market symbol, default is undefined
1956
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1957
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1958
+ */
1948
1959
  async fetchClosedOrder(id, symbol = undefined, params = {}) {
1949
- /**
1950
- * @method
1951
- * @name bitfinex2#fetchClosedOrder
1952
- * @description fetch an open order by it's id
1953
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
1954
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
1955
- * @param {string} id order id
1956
- * @param {string} symbol unified market symbol, default is undefined
1957
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1958
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1959
- */
1960
1960
  const request = {
1961
1961
  'id': [parseInt(id)],
1962
1962
  };
@@ -1967,19 +1967,19 @@ class bitfinex2 extends bitfinex2$1 {
1967
1967
  }
1968
1968
  return order;
1969
1969
  }
1970
+ /**
1971
+ * @method
1972
+ * @name bitfinex2#fetchOpenOrders
1973
+ * @description fetch all unfilled currently open orders
1974
+ * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
1975
+ * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
1976
+ * @param {string} symbol unified market symbol
1977
+ * @param {int} [since] the earliest time in ms to fetch open orders for
1978
+ * @param {int} [limit] the maximum number of open orders structures to retrieve
1979
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1980
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1981
+ */
1970
1982
  async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1971
- /**
1972
- * @method
1973
- * @name bitfinex2#fetchOpenOrders
1974
- * @description fetch all unfilled currently open orders
1975
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
1976
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
1977
- * @param {string} symbol unified market symbol
1978
- * @param {int} [since] the earliest time in ms to fetch open orders for
1979
- * @param {int} [limit] the maximum number of open orders structures to retrieve
1980
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1981
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1982
- */
1983
1983
  await this.loadMarkets();
1984
1984
  const request = {};
1985
1985
  let market = undefined;
@@ -2036,21 +2036,21 @@ class bitfinex2 extends bitfinex2$1 {
2036
2036
  }
2037
2037
  return this.parseOrders(ordersList, market, since, limit);
2038
2038
  }
2039
+ /**
2040
+ * @method
2041
+ * @name bitfinex2#fetchClosedOrders
2042
+ * @description fetches information on multiple closed orders made by the user
2043
+ * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
2044
+ * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
2045
+ * @param {string} symbol unified market symbol of the market orders were made in
2046
+ * @param {int} [since] the earliest time in ms to fetch orders for
2047
+ * @param {int} [limit] the maximum number of order structures to retrieve
2048
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2049
+ * @param {int} [params.until] the latest time in ms to fetch entries for
2050
+ * @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)
2051
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2052
+ */
2039
2053
  async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2040
- /**
2041
- * @method
2042
- * @name bitfinex2#fetchClosedOrders
2043
- * @description fetches information on multiple closed orders made by the user
2044
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
2045
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
2046
- * @param {string} symbol unified market symbol of the market orders were made in
2047
- * @param {int} [since] the earliest time in ms to fetch orders for
2048
- * @param {int} [limit] the maximum number of order structures to retrieve
2049
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2050
- * @param {int} [params.until] the latest time in ms to fetch entries for
2051
- * @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)
2052
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2053
- */
2054
2054
  // returns the most recent closed or canceled orders up to circa two weeks ago
2055
2055
  await this.loadMarkets();
2056
2056
  let paginate = false;
@@ -2120,19 +2120,19 @@ class bitfinex2 extends bitfinex2$1 {
2120
2120
  }
2121
2121
  return this.parseOrders(ordersList, market, since, limit);
2122
2122
  }
2123
+ /**
2124
+ * @method
2125
+ * @name bitfinex2#fetchOrderTrades
2126
+ * @description fetch all the trades made from a single order
2127
+ * @see https://docs.bitfinex.com/reference/rest-auth-order-trades
2128
+ * @param {string} id order id
2129
+ * @param {string} symbol unified market symbol
2130
+ * @param {int} [since] the earliest time in ms to fetch trades for
2131
+ * @param {int} [limit] the maximum number of trades to retrieve
2132
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2133
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
2134
+ */
2123
2135
  async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
2124
- /**
2125
- * @method
2126
- * @name bitfinex2#fetchOrderTrades
2127
- * @description fetch all the trades made from a single order
2128
- * @see https://docs.bitfinex.com/reference/rest-auth-order-trades
2129
- * @param {string} id order id
2130
- * @param {string} symbol unified market symbol
2131
- * @param {int} [since] the earliest time in ms to fetch trades for
2132
- * @param {int} [limit] the maximum number of trades to retrieve
2133
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2134
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
2135
- */
2136
2136
  if (symbol === undefined) {
2137
2137
  throw new errors.ArgumentsRequired(this.id + ' fetchOrderTrades() requires a symbol argument');
2138
2138
  }
@@ -2151,19 +2151,19 @@ class bitfinex2 extends bitfinex2$1 {
2151
2151
  }
2152
2152
  return this.parseTrades(tradesList, market, since, limit);
2153
2153
  }
2154
+ /**
2155
+ * @method
2156
+ * @name bitfinex2#fetchMyTrades
2157
+ * @description fetch all trades made by the user
2158
+ * @see https://docs.bitfinex.com/reference/rest-auth-trades
2159
+ * @see https://docs.bitfinex.com/reference/rest-auth-trades-by-symbol
2160
+ * @param {string} symbol unified market symbol
2161
+ * @param {int} [since] the earliest time in ms to fetch trades for
2162
+ * @param {int} [limit] the maximum number of trades structures to retrieve
2163
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2164
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
2165
+ */
2154
2166
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2155
- /**
2156
- * @method
2157
- * @name bitfinex2#fetchMyTrades
2158
- * @description fetch all trades made by the user
2159
- * @see https://docs.bitfinex.com/reference/rest-auth-trades
2160
- * @see https://docs.bitfinex.com/reference/rest-auth-trades-by-symbol
2161
- * @param {string} symbol unified market symbol
2162
- * @param {int} [since] the earliest time in ms to fetch trades for
2163
- * @param {int} [limit] the maximum number of trades structures to retrieve
2164
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2165
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
2166
- */
2167
2167
  await this.loadMarkets();
2168
2168
  let market = undefined;
2169
2169
  const request = {
@@ -2190,32 +2190,32 @@ class bitfinex2 extends bitfinex2$1 {
2190
2190
  }
2191
2191
  return this.parseTrades(tradesList, market, since, limit);
2192
2192
  }
2193
+ /**
2194
+ * @method
2195
+ * @name bitfinex2#createDepositAddress
2196
+ * @description create a currency deposit address
2197
+ * @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
2198
+ * @param {string} code unified currency code of the currency for the deposit address
2199
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2200
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
2201
+ */
2193
2202
  async createDepositAddress(code, params = {}) {
2194
- /**
2195
- * @method
2196
- * @name bitfinex2#createDepositAddress
2197
- * @description create a currency deposit address
2198
- * @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
2199
- * @param {string} code unified currency code of the currency for the deposit address
2200
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2201
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
2202
- */
2203
2203
  await this.loadMarkets();
2204
2204
  const request = {
2205
2205
  'op_renew': 1,
2206
2206
  };
2207
2207
  return await this.fetchDepositAddress(code, this.extend(request, params));
2208
2208
  }
2209
+ /**
2210
+ * @method
2211
+ * @name bitfinex2#fetchDepositAddress
2212
+ * @description fetch the deposit address for a currency associated with this account
2213
+ * @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
2214
+ * @param {string} code unified currency code
2215
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2216
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
2217
+ */
2209
2218
  async fetchDepositAddress(code, params = {}) {
2210
- /**
2211
- * @method
2212
- * @name bitfinex2#fetchDepositAddress
2213
- * @description fetch the deposit address for a currency associated with this account
2214
- * @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
2215
- * @param {string} code unified currency code
2216
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2217
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
2218
- */
2219
2219
  await this.loadMarkets();
2220
2220
  const currency = this.currency(code);
2221
2221
  // if not provided explicitly we will try to match using the currency name
@@ -2422,15 +2422,15 @@ class bitfinex2 extends bitfinex2$1 {
2422
2422
  },
2423
2423
  };
2424
2424
  }
2425
+ /**
2426
+ * @method
2427
+ * @name bitfinex2#fetchTradingFees
2428
+ * @description fetch the trading fees for multiple markets
2429
+ * @see https://docs.bitfinex.com/reference/rest-auth-summary
2430
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2431
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
2432
+ */
2425
2433
  async fetchTradingFees(params = {}) {
2426
- /**
2427
- * @method
2428
- * @name bitfinex2#fetchTradingFees
2429
- * @description fetch the trading fees for multiple markets
2430
- * @see https://docs.bitfinex.com/reference/rest-auth-summary
2431
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2432
- * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
2433
- */
2434
2434
  await this.loadMarkets();
2435
2435
  const response = await this.privatePostAuthRSummary(params);
2436
2436
  //
@@ -2536,19 +2536,19 @@ class bitfinex2 extends bitfinex2$1 {
2536
2536
  }
2537
2537
  return result;
2538
2538
  }
2539
+ /**
2540
+ * @method
2541
+ * @name bitfinex2#fetchDepositsWithdrawals
2542
+ * @description fetch history of deposits and withdrawals
2543
+ * @see https://docs.bitfinex.com/reference/movement-info
2544
+ * @see https://docs.bitfinex.com/reference/rest-auth-movements
2545
+ * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
2546
+ * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
2547
+ * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
2548
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2549
+ * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2550
+ */
2539
2551
  async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
2540
- /**
2541
- * @method
2542
- * @name bitfinex2#fetchDepositsWithdrawals
2543
- * @description fetch history of deposits and withdrawals
2544
- * @see https://docs.bitfinex.com/reference/movement-info
2545
- * @see https://docs.bitfinex.com/reference/rest-auth-movements
2546
- * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
2547
- * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
2548
- * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
2549
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2550
- * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2551
- */
2552
2552
  await this.loadMarkets();
2553
2553
  let currency = undefined;
2554
2554
  const request = {};
@@ -2597,19 +2597,19 @@ class bitfinex2 extends bitfinex2$1 {
2597
2597
  //
2598
2598
  return this.parseTransactions(response, currency, since, limit);
2599
2599
  }
2600
+ /**
2601
+ * @method
2602
+ * @name bitfinex2#withdraw
2603
+ * @description make a withdrawal
2604
+ * @see https://docs.bitfinex.com/reference/rest-auth-withdraw
2605
+ * @param {string} code unified currency code
2606
+ * @param {float} amount the amount to withdraw
2607
+ * @param {string} address the address to withdraw to
2608
+ * @param {string} tag
2609
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2610
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2611
+ */
2600
2612
  async withdraw(code, amount, address, tag = undefined, params = {}) {
2601
- /**
2602
- * @method
2603
- * @name bitfinex2#withdraw
2604
- * @description make a withdrawal
2605
- * @see https://docs.bitfinex.com/reference/rest-auth-withdraw
2606
- * @param {string} code unified currency code
2607
- * @param {float} amount the amount to withdraw
2608
- * @param {string} address the address to withdraw to
2609
- * @param {string} tag
2610
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2611
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2612
- */
2613
2613
  this.checkAddress(address);
2614
2614
  await this.loadMarkets();
2615
2615
  const currency = this.currency(code);
@@ -2687,16 +2687,16 @@ class bitfinex2 extends bitfinex2$1 {
2687
2687
  'address': address,
2688
2688
  });
2689
2689
  }
2690
+ /**
2691
+ * @method
2692
+ * @name bitfinex2#fetchPositions
2693
+ * @description fetch all open positions
2694
+ * @see https://docs.bitfinex.com/reference/rest-auth-positions
2695
+ * @param {string[]|undefined} symbols list of unified market symbols
2696
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2697
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2698
+ */
2690
2699
  async fetchPositions(symbols = undefined, params = {}) {
2691
- /**
2692
- * @method
2693
- * @name bitfinex2#fetchPositions
2694
- * @description fetch all open positions
2695
- * @see https://docs.bitfinex.com/reference/rest-auth-positions
2696
- * @param {string[]|undefined} symbols list of unified market symbols
2697
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2698
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2699
- */
2700
2700
  await this.loadMarkets();
2701
2701
  symbols = this.marketSymbols(symbols);
2702
2702
  const response = await this.privatePostAuthRPositions(params);
@@ -2947,20 +2947,20 @@ class bitfinex2 extends bitfinex2$1 {
2947
2947
  'fee': undefined,
2948
2948
  }, currency);
2949
2949
  }
2950
+ /**
2951
+ * @method
2952
+ * @name bitfinex2#fetchLedger
2953
+ * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
2954
+ * @see https://docs.bitfinex.com/reference/rest-auth-ledgers
2955
+ * @param {string} [code] unified currency code, default is undefined
2956
+ * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
2957
+ * @param {int} [limit] max number of ledger entries to return, default is undefined, max is 2500
2958
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2959
+ * @param {int} [params.until] timestamp in ms of the latest ledger entry
2960
+ * @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)
2961
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
2962
+ */
2950
2963
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
2951
- /**
2952
- * @method
2953
- * @name bitfinex2#fetchLedger
2954
- * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
2955
- * @see https://docs.bitfinex.com/reference/rest-auth-ledgers
2956
- * @param {string} [code] unified currency code, default is undefined
2957
- * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
2958
- * @param {int} [limit] max number of ledger entries to return, default is undefined, max is 2500
2959
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2960
- * @param {int} [params.until] timestamp in ms of the latest ledger entry
2961
- * @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)
2962
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
2963
- */
2964
2964
  await this.loadMarkets();
2965
2965
  let paginate = false;
2966
2966
  [paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
@@ -3007,16 +3007,16 @@ class bitfinex2 extends bitfinex2$1 {
3007
3007
  }
3008
3008
  return this.parseLedger(ledgerObjects, currency, since, limit);
3009
3009
  }
3010
+ /**
3011
+ * @method
3012
+ * @name bitfinex2#fetchFundingRates
3013
+ * @description fetch the current funding rate for multiple symbols
3014
+ * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
3015
+ * @param {string[]} symbols list of unified market symbols
3016
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3017
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
3018
+ */
3010
3019
  async fetchFundingRates(symbols = undefined, params = {}) {
3011
- /**
3012
- * @method
3013
- * @name bitfinex2#fetchFundingRates
3014
- * @description fetch the current funding rate for multiple symbols
3015
- * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
3016
- * @param {string[]} symbols list of unified market symbols
3017
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3018
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
3019
- */
3020
3020
  if (symbols === undefined) {
3021
3021
  throw new errors.ArgumentsRequired(this.id + ' fetchFundingRates() requires a symbols argument');
3022
3022
  }
@@ -3058,20 +3058,20 @@ class bitfinex2 extends bitfinex2$1 {
3058
3058
  //
3059
3059
  return this.parseFundingRates(response);
3060
3060
  }
3061
+ /**
3062
+ * @method
3063
+ * @name bitfinex2#fetchFundingRateHistory
3064
+ * @description fetches historical funding rate prices
3065
+ * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
3066
+ * @param {string} symbol unified market symbol
3067
+ * @param {int} [since] timestamp in ms of the earliest funding rate entry
3068
+ * @param {int} [limit] max number of funding rate entrys to return
3069
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3070
+ * @param {int} [params.until] timestamp in ms of the latest funding rate
3071
+ * @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)
3072
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
3073
+ */
3061
3074
  async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3062
- /**
3063
- * @method
3064
- * @name bitfinex2#fetchFundingRateHistory
3065
- * @description fetches historical funding rate prices
3066
- * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
3067
- * @param {string} symbol unified market symbol
3068
- * @param {int} [since] timestamp in ms of the earliest funding rate entry
3069
- * @param {int} [limit] max number of funding rate entrys to return
3070
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3071
- * @param {int} [params.until] timestamp in ms of the latest funding rate
3072
- * @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)
3073
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
3074
- */
3075
3075
  if (symbol === undefined) {
3076
3076
  throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
3077
3077
  }
@@ -3239,16 +3239,16 @@ class bitfinex2 extends bitfinex2$1 {
3239
3239
  'previousFundingDatetime': undefined,
3240
3240
  };
3241
3241
  }
3242
+ /**
3243
+ * @method
3244
+ * @name bitfinex2#fetchOpenInterest
3245
+ * @description retrieves the open interest of a contract trading pair
3246
+ * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
3247
+ * @param {string} symbol unified CCXT market symbol
3248
+ * @param {object} [params] exchange specific parameters
3249
+ * @returns {object} an [open interest structure]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
3250
+ */
3242
3251
  async fetchOpenInterest(symbol, params = {}) {
3243
- /**
3244
- * @method
3245
- * @name bitfinex2#fetchOpenInterest
3246
- * @description retrieves the open interest of a contract trading pair
3247
- * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
3248
- * @param {string} symbol unified CCXT market symbol
3249
- * @param {object} [params] exchange specific parameters
3250
- * @returns {object} an [open interest structure]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
3251
- */
3252
3252
  await this.loadMarkets();
3253
3253
  const market = this.market(symbol);
3254
3254
  const request = {
@@ -3288,21 +3288,21 @@ class bitfinex2 extends bitfinex2$1 {
3288
3288
  const oi = this.safeList(response, 0);
3289
3289
  return this.parseOpenInterest(oi, market);
3290
3290
  }
3291
+ /**
3292
+ * @method
3293
+ * @name bitfinex2#fetchOpenInterestHistory
3294
+ * @description retrieves the open interest history of a currency
3295
+ * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
3296
+ * @param {string} symbol unified CCXT market symbol
3297
+ * @param {string} timeframe the time period of each row of data, not used by bitfinex2
3298
+ * @param {int} [since] the time in ms of the earliest record to retrieve as a unix timestamp
3299
+ * @param {int} [limit] the number of records in the response
3300
+ * @param {object} [params] exchange specific parameters
3301
+ * @param {int} [params.until] the time in ms of the latest record to retrieve as a unix timestamp
3302
+ * @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)
3303
+ * @returns An array of [open interest structures]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
3304
+ */
3291
3305
  async fetchOpenInterestHistory(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
3292
- /**
3293
- * @method
3294
- * @name bitfinex2#fetchOpenInterestHistory
3295
- * @description retrieves the open interest history of a currency
3296
- * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
3297
- * @param {string} symbol unified CCXT market symbol
3298
- * @param {string} timeframe the time period of each row of data, not used by bitfinex2
3299
- * @param {int} [since] the time in ms of the earliest record to retrieve as a unix timestamp
3300
- * @param {int} [limit] the number of records in the response
3301
- * @param {object} [params] exchange specific parameters
3302
- * @param {int} [params.until] the time in ms of the latest record to retrieve as a unix timestamp
3303
- * @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)
3304
- * @returns An array of [open interest structures]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
3305
- */
3306
3306
  await this.loadMarkets();
3307
3307
  let paginate = false;
3308
3308
  [paginate, params] = this.handleOptionAndParams(params, 'fetchOpenInterestHistory', 'paginate');
@@ -3424,20 +3424,20 @@ class bitfinex2 extends bitfinex2$1 {
3424
3424
  'info': interest,
3425
3425
  }, market);
3426
3426
  }
3427
+ /**
3428
+ * @method
3429
+ * @name bitfinex2#fetchLiquidations
3430
+ * @description retrieves the public liquidations of a trading pair
3431
+ * @see https://docs.bitfinex.com/reference/rest-public-liquidations
3432
+ * @param {string} symbol unified CCXT market symbol
3433
+ * @param {int} [since] the earliest time in ms to fetch liquidations for
3434
+ * @param {int} [limit] the maximum number of liquidation structures to retrieve
3435
+ * @param {object} [params] exchange specific parameters
3436
+ * @param {int} [params.until] timestamp in ms of the latest liquidation
3437
+ * @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)
3438
+ * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
3439
+ */
3427
3440
  async fetchLiquidations(symbol, since = undefined, limit = undefined, params = {}) {
3428
- /**
3429
- * @method
3430
- * @name bitfinex2#fetchLiquidations
3431
- * @description retrieves the public liquidations of a trading pair
3432
- * @see https://docs.bitfinex.com/reference/rest-public-liquidations
3433
- * @param {string} symbol unified CCXT market symbol
3434
- * @param {int} [since] the earliest time in ms to fetch liquidations for
3435
- * @param {int} [limit] the maximum number of liquidation structures to retrieve
3436
- * @param {object} [params] exchange specific parameters
3437
- * @param {int} [params.until] timestamp in ms of the latest liquidation
3438
- * @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)
3439
- * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
3440
- */
3441
3441
  await this.loadMarkets();
3442
3442
  let paginate = false;
3443
3443
  [paginate, params] = this.handleOptionAndParams(params, 'fetchLiquidations', 'paginate');
@@ -3514,17 +3514,17 @@ class bitfinex2 extends bitfinex2$1 {
3514
3514
  'datetime': this.iso8601(timestamp),
3515
3515
  });
3516
3516
  }
3517
+ /**
3518
+ * @method
3519
+ * @name bitfinex2#setMargin
3520
+ * @description either adds or reduces margin in a swap position in order to set the margin to a specific value
3521
+ * @see https://docs.bitfinex.com/reference/rest-auth-deriv-pos-collateral-set
3522
+ * @param {string} symbol unified market symbol of the market to set margin in
3523
+ * @param {float} amount the amount to set the margin to
3524
+ * @param {object} [params] parameters specific to the exchange API endpoint
3525
+ * @returns {object} A [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
3526
+ */
3517
3527
  async setMargin(symbol, amount, params = {}) {
3518
- /**
3519
- * @method
3520
- * @name bitfinex2#setMargin
3521
- * @description either adds or reduces margin in a swap position in order to set the margin to a specific value
3522
- * @see https://docs.bitfinex.com/reference/rest-auth-deriv-pos-collateral-set
3523
- * @param {string} symbol unified market symbol of the market to set margin in
3524
- * @param {float} amount the amount to set the margin to
3525
- * @param {object} [params] parameters specific to the exchange API endpoint
3526
- * @returns {object} A [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
3527
- */
3528
3528
  await this.loadMarkets();
3529
3529
  const market = this.market(symbol);
3530
3530
  if (!market['swap']) {
@@ -3570,18 +3570,18 @@ class bitfinex2 extends bitfinex2$1 {
3570
3570
  'datetime': undefined,
3571
3571
  };
3572
3572
  }
3573
+ /**
3574
+ * @method
3575
+ * @name bitfinex2#fetchOrder
3576
+ * @description fetches information on an order made by the user
3577
+ * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
3578
+ * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
3579
+ * @param {string} id the order id
3580
+ * @param {string} [symbol] unified symbol of the market the order was made in
3581
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3582
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3583
+ */
3573
3584
  async fetchOrder(id, symbol = undefined, params = {}) {
3574
- /**
3575
- * @method
3576
- * @name bitfinex2#fetchOrder
3577
- * @description fetches information on an order made by the user
3578
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
3579
- * @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
3580
- * @param {string} id the order id
3581
- * @param {string} [symbol] unified symbol of the market the order was made in
3582
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3583
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3584
- */
3585
3585
  await this.loadMarkets();
3586
3586
  const request = {
3587
3587
  'id': [this.parseToNumeric(id)],
@@ -3637,28 +3637,28 @@ class bitfinex2 extends bitfinex2$1 {
3637
3637
  const order = this.safeList(response, 0);
3638
3638
  return this.parseOrder(order, market);
3639
3639
  }
3640
+ /**
3641
+ * @method
3642
+ * @name bitfinex2#editOrder
3643
+ * @description edit a trade order
3644
+ * @see https://docs.bitfinex.com/reference/rest-auth-update-order
3645
+ * @param {string} id edit order id
3646
+ * @param {string} symbol unified symbol of the market to edit an order in
3647
+ * @param {string} type 'market' or 'limit'
3648
+ * @param {string} side 'buy' or 'sell'
3649
+ * @param {float} amount how much you want to trade in units of the base currency
3650
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
3651
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3652
+ * @param {float} [params.stopPrice] the price that triggers a trigger order
3653
+ * @param {boolean} [params.postOnly] set to true if you want to make a post only order
3654
+ * @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
3655
+ * @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
3656
+ * @param {int} [params.leverage] leverage for a derivative order, supported by derivative symbol orders only, the value should be between 1 and 100 inclusive
3657
+ * @param {int} [params.clientOrderId] a unique client order id for the order
3658
+ * @param {float} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
3659
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3660
+ */
3640
3661
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
3641
- /**
3642
- * @method
3643
- * @name bitfinex2#editOrder
3644
- * @description edit a trade order
3645
- * @see https://docs.bitfinex.com/reference/rest-auth-update-order
3646
- * @param {string} id edit order id
3647
- * @param {string} symbol unified symbol of the market to edit an order in
3648
- * @param {string} type 'market' or 'limit'
3649
- * @param {string} side 'buy' or 'sell'
3650
- * @param {float} amount how much you want to trade in units of the base currency
3651
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
3652
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3653
- * @param {float} [params.stopPrice] the price that triggers a trigger order
3654
- * @param {boolean} [params.postOnly] set to true if you want to make a post only order
3655
- * @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
3656
- * @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
3657
- * @param {int} [params.leverage] leverage for a derivative order, supported by derivative symbol orders only, the value should be between 1 and 100 inclusive
3658
- * @param {int} [params.clientOrderId] a unique client order id for the order
3659
- * @param {float} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
3660
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3661
- */
3662
3662
  await this.loadMarkets();
3663
3663
  const market = this.market(symbol);
3664
3664
  const request = {