ccxt 4.5.28 → 4.5.30

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 (522) hide show
  1. package/README.md +24 -7
  2. package/dist/ccxt.browser.min.js +7 -7
  3. package/dist/cjs/ccxt.js +6 -1
  4. package/dist/cjs/src/abstract/bydfi.js +11 -0
  5. package/dist/cjs/src/alpaca.js +21 -21
  6. package/dist/cjs/src/apex.js +20 -20
  7. package/dist/cjs/src/arkham.js +22 -22
  8. package/dist/cjs/src/ascendex.js +28 -28
  9. package/dist/cjs/src/backpack.js +22 -22
  10. package/dist/cjs/src/base/Exchange.js +48 -38
  11. package/dist/cjs/src/base/functions/throttle.js +54 -5
  12. package/dist/cjs/src/bigone.js +19 -19
  13. package/dist/cjs/src/binance.js +83 -82
  14. package/dist/cjs/src/bingx.js +47 -47
  15. package/dist/cjs/src/bit2c.js +11 -11
  16. package/dist/cjs/src/bitbank.js +49 -48
  17. package/dist/cjs/src/bitbns.js +13 -13
  18. package/dist/cjs/src/bitfinex.js +33 -33
  19. package/dist/cjs/src/bitflyer.js +17 -17
  20. package/dist/cjs/src/bitget.js +58 -57
  21. package/dist/cjs/src/bithumb.js +10 -10
  22. package/dist/cjs/src/bitmart.js +44 -44
  23. package/dist/cjs/src/bitmex.js +24 -24
  24. package/dist/cjs/src/bitopro.js +20 -20
  25. package/dist/cjs/src/bitrue.js +18 -18
  26. package/dist/cjs/src/bitso.js +20 -20
  27. package/dist/cjs/src/bitstamp.js +21 -21
  28. package/dist/cjs/src/bittrade.js +20 -20
  29. package/dist/cjs/src/bitvavo.js +19 -19
  30. package/dist/cjs/src/blockchaincom.js +20 -20
  31. package/dist/cjs/src/blofin.js +26 -26
  32. package/dist/cjs/src/btcalpha.js +35 -34
  33. package/dist/cjs/src/btcbox.js +10 -10
  34. package/dist/cjs/src/btcmarkets.js +16 -16
  35. package/dist/cjs/src/btcturk.js +10 -10
  36. package/dist/cjs/src/bullish.js +27 -27
  37. package/dist/cjs/src/bybit.js +69 -67
  38. package/dist/cjs/src/bydfi.js +2907 -0
  39. package/dist/cjs/src/cex.js +18 -18
  40. package/dist/cjs/src/coinbase.js +74 -41
  41. package/dist/cjs/src/coinbaseexchange.js +22 -22
  42. package/dist/cjs/src/coinbaseinternational.js +22 -22
  43. package/dist/cjs/src/coincatch.js +39 -39
  44. package/dist/cjs/src/coincheck.js +11 -11
  45. package/dist/cjs/src/coinex.js +48 -48
  46. package/dist/cjs/src/coinmate.js +14 -14
  47. package/dist/cjs/src/coinmetro.js +14 -14
  48. package/dist/cjs/src/coinone.js +11 -11
  49. package/dist/cjs/src/coinsph.js +20 -20
  50. package/dist/cjs/src/coinspot.js +8 -8
  51. package/dist/cjs/src/cryptocom.js +32 -32
  52. package/dist/cjs/src/cryptomus.js +9 -9
  53. package/dist/cjs/src/deepcoin.js +33 -33
  54. package/dist/cjs/src/defx.js +23 -23
  55. package/dist/cjs/src/delta.js +29 -29
  56. package/dist/cjs/src/deribit.js +36 -36
  57. package/dist/cjs/src/derive.js +19 -19
  58. package/dist/cjs/src/digifinex.js +36 -36
  59. package/dist/cjs/src/dydx.js +25 -25
  60. package/dist/cjs/src/exmo.js +29 -29
  61. package/dist/cjs/src/foxbit.js +23 -23
  62. package/dist/cjs/src/gate.js +60 -59
  63. package/dist/cjs/src/gemini.js +16 -16
  64. package/dist/cjs/src/hashkey.js +35 -35
  65. package/dist/cjs/src/hibachi.js +24 -24
  66. package/dist/cjs/src/hitbtc.js +38 -38
  67. package/dist/cjs/src/hollaex.js +22 -22
  68. package/dist/cjs/src/htx.js +50 -50
  69. package/dist/cjs/src/hyperliquid.js +86 -45
  70. package/dist/cjs/src/independentreserve.js +13 -13
  71. package/dist/cjs/src/indodax.js +14 -14
  72. package/dist/cjs/src/kraken.js +30 -30
  73. package/dist/cjs/src/krakenfutures.js +21 -21
  74. package/dist/cjs/src/kucoin.js +156 -48
  75. package/dist/cjs/src/kucoinfutures.js +42 -40
  76. package/dist/cjs/src/latoken.js +16 -16
  77. package/dist/cjs/src/lbank.js +23 -23
  78. package/dist/cjs/src/luno.js +17 -17
  79. package/dist/cjs/src/mercado.js +11 -11
  80. package/dist/cjs/src/mexc.js +47 -47
  81. package/dist/cjs/src/modetrade.js +37 -35
  82. package/dist/cjs/src/ndax.js +19 -19
  83. package/dist/cjs/src/novadax.js +19 -19
  84. package/dist/cjs/src/oceanex.js +16 -16
  85. package/dist/cjs/src/okx.js +83 -83
  86. package/dist/cjs/src/onetrading.js +34 -33
  87. package/dist/cjs/src/oxfun.js +25 -25
  88. package/dist/cjs/src/p2b.js +11 -11
  89. package/dist/cjs/src/paradex.js +54 -54
  90. package/dist/cjs/src/paymium.js +20 -21
  91. package/dist/cjs/src/phemex.js +35 -35
  92. package/dist/cjs/src/poloniex.js +27 -27
  93. package/dist/cjs/src/pro/alpaca.js +5 -5
  94. package/dist/cjs/src/pro/apex.js +13 -11
  95. package/dist/cjs/src/pro/arkham.js +5 -5
  96. package/dist/cjs/src/pro/ascendex.js +5 -5
  97. package/dist/cjs/src/pro/backpack.js +16 -16
  98. package/dist/cjs/src/pro/binance.js +45 -41
  99. package/dist/cjs/src/pro/bingx.js +14 -12
  100. package/dist/cjs/src/pro/bitfinex.js +8 -8
  101. package/dist/cjs/src/pro/bitget.js +12 -12
  102. package/dist/cjs/src/pro/bithumb.js +3 -3
  103. package/dist/cjs/src/pro/bitmart.js +393 -34
  104. package/dist/cjs/src/pro/bitmex.js +9 -9
  105. package/dist/cjs/src/pro/bitopro.js +5 -5
  106. package/dist/cjs/src/pro/bitrue.js +2 -2
  107. package/dist/cjs/src/pro/bitstamp.js +3 -3
  108. package/dist/cjs/src/pro/bittrade.js +3 -3
  109. package/dist/cjs/src/pro/bitvavo.js +19 -19
  110. package/dist/cjs/src/pro/blockchaincom.js +5 -5
  111. package/dist/cjs/src/pro/blofin.js +10 -10
  112. package/dist/cjs/src/pro/bullish.js +6 -6
  113. package/dist/cjs/src/pro/bybit.js +24 -22
  114. package/dist/cjs/src/pro/bydfi.js +1077 -0
  115. package/dist/cjs/src/pro/cex.js +13 -13
  116. package/dist/cjs/src/pro/coinbase.js +13 -13
  117. package/dist/cjs/src/pro/coinbaseexchange.js +10 -10
  118. package/dist/cjs/src/pro/coinbaseinternational.js +8 -8
  119. package/dist/cjs/src/pro/coincatch.js +10 -10
  120. package/dist/cjs/src/pro/coincheck.js +2 -2
  121. package/dist/cjs/src/pro/coinex.js +10 -10
  122. package/dist/cjs/src/pro/coinone.js +3 -3
  123. package/dist/cjs/src/pro/cryptocom.js +25 -23
  124. package/dist/cjs/src/pro/deepcoin.js +8 -8
  125. package/dist/cjs/src/pro/defx.js +15 -15
  126. package/dist/cjs/src/pro/deribit.js +10 -10
  127. package/dist/cjs/src/pro/derive.js +6 -6
  128. package/dist/cjs/src/pro/dydx.js +3 -3
  129. package/dist/cjs/src/pro/exmo.js +7 -7
  130. package/dist/cjs/src/pro/gate.js +26 -62
  131. package/dist/cjs/src/pro/gemini.js +6 -6
  132. package/dist/cjs/src/pro/hashkey.js +11 -9
  133. package/dist/cjs/src/pro/hitbtc.js +8 -8
  134. package/dist/cjs/src/pro/hollaex.js +5 -5
  135. package/dist/cjs/src/pro/htx.js +9 -9
  136. package/dist/cjs/src/pro/hyperliquid.js +103 -14
  137. package/dist/cjs/src/pro/independentreserve.js +2 -2
  138. package/dist/cjs/src/pro/kraken.js +15 -15
  139. package/dist/cjs/src/pro/krakenfutures.js +10 -10
  140. package/dist/cjs/src/pro/kucoin.js +15 -15
  141. package/dist/cjs/src/pro/kucoinfutures.js +18 -16
  142. package/dist/cjs/src/pro/lbank.js +5 -5
  143. package/dist/cjs/src/pro/luno.js +2 -2
  144. package/dist/cjs/src/pro/mexc.js +13 -13
  145. package/dist/cjs/src/pro/modetrade.js +13 -11
  146. package/dist/cjs/src/pro/ndax.js +3 -3
  147. package/dist/cjs/src/pro/okx.js +25 -25
  148. package/dist/cjs/src/pro/onetrading.js +6 -6
  149. package/dist/cjs/src/pro/oxfun.js +13 -13
  150. package/dist/cjs/src/pro/p2b.js +5 -5
  151. package/dist/cjs/src/pro/paradex.js +8 -8
  152. package/dist/cjs/src/pro/phemex.js +7 -7
  153. package/dist/cjs/src/pro/poloniex.js +8 -8
  154. package/dist/cjs/src/pro/probit.js +6 -6
  155. package/dist/cjs/src/pro/toobit.js +20 -16
  156. package/dist/cjs/src/pro/upbit.js +9 -9
  157. package/dist/cjs/src/pro/whitebit.js +7 -7
  158. package/dist/cjs/src/pro/woo.js +18 -16
  159. package/dist/cjs/src/pro/woofipro.js +25 -23
  160. package/dist/cjs/src/pro/xt.js +7 -5
  161. package/dist/cjs/src/probit.js +18 -18
  162. package/dist/cjs/src/static_dependencies/ethers/utils/index.js +11 -0
  163. package/dist/cjs/src/timex.js +16 -16
  164. package/dist/cjs/src/tokocrypto.js +17 -17
  165. package/dist/cjs/src/toobit.js +33 -30
  166. package/dist/cjs/src/upbit.js +23 -23
  167. package/dist/cjs/src/wavesexchange.js +86 -85
  168. package/dist/cjs/src/whitebit.js +44 -44
  169. package/dist/cjs/src/woo.js +51 -49
  170. package/dist/cjs/src/woofipro.js +104 -82
  171. package/dist/cjs/src/xt.js +17 -12
  172. package/dist/cjs/src/yobit.js +15 -15
  173. package/dist/cjs/src/zaif.js +38 -9
  174. package/dist/cjs/src/zebpay.js +35 -20
  175. package/dist/cjs/src/zonda.js +14 -14
  176. package/js/ccxt.d.ts +8 -2
  177. package/js/ccxt.js +6 -2
  178. package/js/src/abstract/bydfi.d.ts +52 -0
  179. package/js/src/abstract/bydfi.js +11 -0
  180. package/js/src/alpaca.d.ts +21 -21
  181. package/js/src/alpaca.js +21 -21
  182. package/js/src/apex.d.ts +20 -20
  183. package/js/src/apex.js +20 -20
  184. package/js/src/arkham.d.ts +22 -22
  185. package/js/src/arkham.js +22 -22
  186. package/js/src/ascendex.d.ts +28 -28
  187. package/js/src/ascendex.js +28 -28
  188. package/js/src/backpack.d.ts +21 -21
  189. package/js/src/backpack.js +22 -22
  190. package/js/src/base/Exchange.d.ts +6 -3
  191. package/js/src/base/Exchange.js +48 -38
  192. package/js/src/base/functions/throttle.d.ts +22 -0
  193. package/js/src/base/functions/throttle.js +54 -5
  194. package/js/src/bigone.d.ts +19 -19
  195. package/js/src/bigone.js +19 -19
  196. package/js/src/binance.d.ts +82 -82
  197. package/js/src/binance.js +83 -82
  198. package/js/src/bingx.d.ts +46 -46
  199. package/js/src/bingx.js +47 -47
  200. package/js/src/bit2c.d.ts +11 -11
  201. package/js/src/bit2c.js +11 -11
  202. package/js/src/bitbank.d.ts +12 -12
  203. package/js/src/bitbank.js +49 -48
  204. package/js/src/bitbns.d.ts +13 -13
  205. package/js/src/bitbns.js +13 -13
  206. package/js/src/bitfinex.d.ts +33 -33
  207. package/js/src/bitfinex.js +33 -33
  208. package/js/src/bitflyer.d.ts +17 -17
  209. package/js/src/bitflyer.js +17 -17
  210. package/js/src/bitget.d.ts +57 -57
  211. package/js/src/bitget.js +58 -57
  212. package/js/src/bithumb.d.ts +10 -10
  213. package/js/src/bithumb.js +10 -10
  214. package/js/src/bitmart.d.ts +42 -42
  215. package/js/src/bitmart.js +44 -44
  216. package/js/src/bitmex.d.ts +24 -24
  217. package/js/src/bitmex.js +24 -24
  218. package/js/src/bitopro.d.ts +20 -20
  219. package/js/src/bitopro.js +20 -20
  220. package/js/src/bitrue.d.ts +18 -18
  221. package/js/src/bitrue.js +18 -18
  222. package/js/src/bitso.d.ts +20 -20
  223. package/js/src/bitso.js +20 -20
  224. package/js/src/bitstamp.d.ts +21 -21
  225. package/js/src/bitstamp.js +21 -21
  226. package/js/src/bittrade.d.ts +20 -20
  227. package/js/src/bittrade.js +20 -20
  228. package/js/src/bitvavo.d.ts +19 -19
  229. package/js/src/bitvavo.js +19 -19
  230. package/js/src/blockchaincom.d.ts +20 -20
  231. package/js/src/blockchaincom.js +20 -20
  232. package/js/src/blofin.d.ts +26 -26
  233. package/js/src/blofin.js +26 -26
  234. package/js/src/btcalpha.d.ts +14 -14
  235. package/js/src/btcalpha.js +35 -34
  236. package/js/src/btcbox.d.ts +10 -10
  237. package/js/src/btcbox.js +10 -10
  238. package/js/src/btcmarkets.d.ts +16 -16
  239. package/js/src/btcmarkets.js +16 -16
  240. package/js/src/btcturk.d.ts +10 -10
  241. package/js/src/btcturk.js +10 -10
  242. package/js/src/bullish.d.ts +26 -26
  243. package/js/src/bullish.js +27 -27
  244. package/js/src/bybit.d.ts +66 -66
  245. package/js/src/bybit.js +69 -67
  246. package/js/src/bydfi.d.ts +472 -0
  247. package/js/src/bydfi.js +2905 -0
  248. package/js/src/cex.d.ts +18 -18
  249. package/js/src/cex.js +18 -18
  250. package/js/src/coinbase.d.ts +51 -40
  251. package/js/src/coinbase.js +74 -41
  252. package/js/src/coinbaseexchange.d.ts +22 -22
  253. package/js/src/coinbaseexchange.js +22 -22
  254. package/js/src/coinbaseinternational.d.ts +22 -22
  255. package/js/src/coinbaseinternational.js +22 -22
  256. package/js/src/coincatch.d.ts +39 -39
  257. package/js/src/coincatch.js +39 -39
  258. package/js/src/coincheck.d.ts +11 -11
  259. package/js/src/coincheck.js +11 -11
  260. package/js/src/coinex.d.ts +48 -48
  261. package/js/src/coinex.js +48 -48
  262. package/js/src/coinmate.d.ts +14 -14
  263. package/js/src/coinmate.js +14 -14
  264. package/js/src/coinmetro.d.ts +14 -14
  265. package/js/src/coinmetro.js +14 -14
  266. package/js/src/coinone.d.ts +11 -11
  267. package/js/src/coinone.js +11 -11
  268. package/js/src/coinsph.d.ts +20 -20
  269. package/js/src/coinsph.js +20 -20
  270. package/js/src/coinspot.d.ts +8 -8
  271. package/js/src/coinspot.js +8 -8
  272. package/js/src/cryptocom.d.ts +32 -32
  273. package/js/src/cryptocom.js +32 -32
  274. package/js/src/cryptomus.d.ts +9 -9
  275. package/js/src/cryptomus.js +9 -9
  276. package/js/src/deepcoin.d.ts +33 -33
  277. package/js/src/deepcoin.js +33 -33
  278. package/js/src/defx.d.ts +23 -23
  279. package/js/src/defx.js +23 -23
  280. package/js/src/delta.d.ts +29 -29
  281. package/js/src/delta.js +29 -29
  282. package/js/src/deribit.d.ts +36 -36
  283. package/js/src/deribit.js +36 -36
  284. package/js/src/derive.d.ts +19 -19
  285. package/js/src/derive.js +19 -19
  286. package/js/src/digifinex.d.ts +36 -36
  287. package/js/src/digifinex.js +36 -36
  288. package/js/src/dydx.d.ts +22 -22
  289. package/js/src/dydx.js +25 -25
  290. package/js/src/exmo.d.ts +29 -29
  291. package/js/src/exmo.js +29 -29
  292. package/js/src/foxbit.d.ts +23 -23
  293. package/js/src/foxbit.js +23 -23
  294. package/js/src/gate.d.ts +57 -57
  295. package/js/src/gate.js +60 -59
  296. package/js/src/gemini.d.ts +16 -16
  297. package/js/src/gemini.js +16 -16
  298. package/js/src/hashkey.d.ts +35 -35
  299. package/js/src/hashkey.js +35 -35
  300. package/js/src/hibachi.d.ts +24 -24
  301. package/js/src/hibachi.js +24 -24
  302. package/js/src/hitbtc.d.ts +38 -38
  303. package/js/src/hitbtc.js +38 -38
  304. package/js/src/hollaex.d.ts +22 -22
  305. package/js/src/hollaex.js +22 -22
  306. package/js/src/htx.d.ts +50 -50
  307. package/js/src/htx.js +50 -50
  308. package/js/src/hyperliquid.d.ts +46 -36
  309. package/js/src/hyperliquid.js +86 -45
  310. package/js/src/independentreserve.d.ts +13 -13
  311. package/js/src/independentreserve.js +13 -13
  312. package/js/src/indodax.d.ts +14 -14
  313. package/js/src/indodax.js +14 -14
  314. package/js/src/kraken.d.ts +30 -30
  315. package/js/src/kraken.js +30 -30
  316. package/js/src/krakenfutures.d.ts +21 -21
  317. package/js/src/krakenfutures.js +21 -21
  318. package/js/src/kucoin.d.ts +58 -44
  319. package/js/src/kucoin.js +156 -48
  320. package/js/src/kucoinfutures.d.ts +35 -35
  321. package/js/src/kucoinfutures.js +42 -40
  322. package/js/src/latoken.d.ts +16 -16
  323. package/js/src/latoken.js +16 -16
  324. package/js/src/lbank.d.ts +23 -23
  325. package/js/src/lbank.js +23 -23
  326. package/js/src/luno.d.ts +17 -17
  327. package/js/src/luno.js +17 -17
  328. package/js/src/mercado.d.ts +11 -11
  329. package/js/src/mercado.js +11 -11
  330. package/js/src/mexc.d.ts +47 -47
  331. package/js/src/mexc.js +47 -47
  332. package/js/src/modetrade.d.ts +31 -31
  333. package/js/src/modetrade.js +37 -35
  334. package/js/src/ndax.d.ts +19 -19
  335. package/js/src/ndax.js +19 -19
  336. package/js/src/novadax.d.ts +19 -19
  337. package/js/src/novadax.js +19 -19
  338. package/js/src/oceanex.d.ts +16 -16
  339. package/js/src/oceanex.js +16 -16
  340. package/js/src/okx.d.ts +74 -74
  341. package/js/src/okx.js +83 -83
  342. package/js/src/onetrading.d.ts +34 -33
  343. package/js/src/onetrading.js +34 -33
  344. package/js/src/oxfun.d.ts +25 -25
  345. package/js/src/oxfun.js +25 -25
  346. package/js/src/p2b.d.ts +11 -11
  347. package/js/src/p2b.js +11 -11
  348. package/js/src/paradex.d.ts +54 -54
  349. package/js/src/paradex.js +54 -54
  350. package/js/src/paymium.d.ts +20 -21
  351. package/js/src/paymium.js +20 -21
  352. package/js/src/phemex.d.ts +30 -30
  353. package/js/src/phemex.js +35 -35
  354. package/js/src/poloniex.d.ts +26 -26
  355. package/js/src/poloniex.js +27 -27
  356. package/js/src/pro/alpaca.d.ts +5 -5
  357. package/js/src/pro/alpaca.js +5 -5
  358. package/js/src/pro/apex.d.ts +8 -8
  359. package/js/src/pro/apex.js +13 -11
  360. package/js/src/pro/arkham.d.ts +5 -5
  361. package/js/src/pro/arkham.js +5 -5
  362. package/js/src/pro/ascendex.d.ts +5 -5
  363. package/js/src/pro/ascendex.js +5 -5
  364. package/js/src/pro/backpack.d.ts +16 -16
  365. package/js/src/pro/backpack.js +16 -16
  366. package/js/src/pro/binance.d.ts +35 -35
  367. package/js/src/pro/binance.js +45 -41
  368. package/js/src/pro/bingx.d.ts +9 -9
  369. package/js/src/pro/bingx.js +14 -12
  370. package/js/src/pro/bitfinex.d.ts +8 -8
  371. package/js/src/pro/bitfinex.js +8 -8
  372. package/js/src/pro/bitget.d.ts +12 -12
  373. package/js/src/pro/bitget.js +12 -12
  374. package/js/src/pro/bithumb.d.ts +3 -3
  375. package/js/src/pro/bithumb.js +3 -3
  376. package/js/src/pro/bitmart.d.ts +120 -9
  377. package/js/src/pro/bitmart.js +393 -34
  378. package/js/src/pro/bitmex.d.ts +9 -9
  379. package/js/src/pro/bitmex.js +9 -9
  380. package/js/src/pro/bitopro.d.ts +5 -5
  381. package/js/src/pro/bitopro.js +5 -5
  382. package/js/src/pro/bitrue.d.ts +2 -2
  383. package/js/src/pro/bitrue.js +2 -2
  384. package/js/src/pro/bitstamp.d.ts +3 -3
  385. package/js/src/pro/bitstamp.js +3 -3
  386. package/js/src/pro/bittrade.d.ts +3 -3
  387. package/js/src/pro/bittrade.js +3 -3
  388. package/js/src/pro/bitvavo.d.ts +19 -19
  389. package/js/src/pro/bitvavo.js +19 -19
  390. package/js/src/pro/blockchaincom.d.ts +5 -5
  391. package/js/src/pro/blockchaincom.js +5 -5
  392. package/js/src/pro/blofin.d.ts +10 -10
  393. package/js/src/pro/blofin.js +10 -10
  394. package/js/src/pro/bullish.d.ts +6 -6
  395. package/js/src/pro/bullish.js +6 -6
  396. package/js/src/pro/bybit.d.ts +19 -19
  397. package/js/src/pro/bybit.js +24 -22
  398. package/js/src/pro/bydfi.d.ts +206 -0
  399. package/js/src/pro/bydfi.js +1076 -0
  400. package/js/src/pro/cex.d.ts +13 -13
  401. package/js/src/pro/cex.js +13 -13
  402. package/js/src/pro/coinbase.d.ts +13 -13
  403. package/js/src/pro/coinbase.js +13 -13
  404. package/js/src/pro/coinbaseexchange.d.ts +10 -10
  405. package/js/src/pro/coinbaseexchange.js +10 -10
  406. package/js/src/pro/coinbaseinternational.d.ts +8 -8
  407. package/js/src/pro/coinbaseinternational.js +8 -8
  408. package/js/src/pro/coincatch.d.ts +10 -10
  409. package/js/src/pro/coincatch.js +10 -10
  410. package/js/src/pro/coincheck.d.ts +2 -2
  411. package/js/src/pro/coincheck.js +2 -2
  412. package/js/src/pro/coinex.d.ts +10 -10
  413. package/js/src/pro/coinex.js +10 -10
  414. package/js/src/pro/coinone.d.ts +3 -3
  415. package/js/src/pro/coinone.js +3 -3
  416. package/js/src/pro/cryptocom.d.ts +20 -20
  417. package/js/src/pro/cryptocom.js +25 -23
  418. package/js/src/pro/deepcoin.d.ts +8 -8
  419. package/js/src/pro/deepcoin.js +8 -8
  420. package/js/src/pro/defx.d.ts +15 -15
  421. package/js/src/pro/defx.js +15 -15
  422. package/js/src/pro/deribit.d.ts +10 -10
  423. package/js/src/pro/deribit.js +10 -10
  424. package/js/src/pro/derive.d.ts +6 -6
  425. package/js/src/pro/derive.js +6 -6
  426. package/js/src/pro/dydx.d.ts +3 -3
  427. package/js/src/pro/dydx.js +3 -3
  428. package/js/src/pro/exmo.d.ts +7 -7
  429. package/js/src/pro/exmo.js +7 -7
  430. package/js/src/pro/gate.d.ts +22 -23
  431. package/js/src/pro/gate.js +26 -62
  432. package/js/src/pro/gemini.d.ts +6 -6
  433. package/js/src/pro/gemini.js +6 -6
  434. package/js/src/pro/hashkey.d.ts +6 -6
  435. package/js/src/pro/hashkey.js +11 -9
  436. package/js/src/pro/hitbtc.d.ts +8 -8
  437. package/js/src/pro/hitbtc.js +8 -8
  438. package/js/src/pro/hollaex.d.ts +5 -5
  439. package/js/src/pro/hollaex.js +5 -5
  440. package/js/src/pro/htx.d.ts +9 -9
  441. package/js/src/pro/htx.js +9 -9
  442. package/js/src/pro/hyperliquid.d.ts +38 -14
  443. package/js/src/pro/hyperliquid.js +103 -14
  444. package/js/src/pro/independentreserve.d.ts +2 -2
  445. package/js/src/pro/independentreserve.js +2 -2
  446. package/js/src/pro/kraken.d.ts +15 -15
  447. package/js/src/pro/kraken.js +15 -15
  448. package/js/src/pro/krakenfutures.d.ts +10 -10
  449. package/js/src/pro/krakenfutures.js +10 -10
  450. package/js/src/pro/kucoin.d.ts +15 -15
  451. package/js/src/pro/kucoin.js +15 -15
  452. package/js/src/pro/kucoinfutures.d.ts +13 -13
  453. package/js/src/pro/kucoinfutures.js +18 -16
  454. package/js/src/pro/lbank.d.ts +5 -5
  455. package/js/src/pro/lbank.js +5 -5
  456. package/js/src/pro/luno.d.ts +2 -2
  457. package/js/src/pro/luno.js +2 -2
  458. package/js/src/pro/mexc.d.ts +13 -13
  459. package/js/src/pro/mexc.js +13 -13
  460. package/js/src/pro/modetrade.d.ts +8 -8
  461. package/js/src/pro/modetrade.js +13 -11
  462. package/js/src/pro/ndax.d.ts +3 -3
  463. package/js/src/pro/ndax.js +3 -3
  464. package/js/src/pro/okx.d.ts +25 -25
  465. package/js/src/pro/okx.js +25 -25
  466. package/js/src/pro/onetrading.d.ts +6 -6
  467. package/js/src/pro/onetrading.js +6 -6
  468. package/js/src/pro/oxfun.d.ts +13 -13
  469. package/js/src/pro/oxfun.js +13 -13
  470. package/js/src/pro/p2b.d.ts +5 -5
  471. package/js/src/pro/p2b.js +5 -5
  472. package/js/src/pro/paradex.d.ts +8 -8
  473. package/js/src/pro/paradex.js +8 -8
  474. package/js/src/pro/phemex.d.ts +7 -7
  475. package/js/src/pro/phemex.js +7 -7
  476. package/js/src/pro/poloniex.d.ts +8 -8
  477. package/js/src/pro/poloniex.js +8 -8
  478. package/js/src/pro/probit.d.ts +6 -6
  479. package/js/src/pro/probit.js +6 -6
  480. package/js/src/pro/toobit.d.ts +9 -9
  481. package/js/src/pro/toobit.js +20 -16
  482. package/js/src/pro/upbit.d.ts +9 -9
  483. package/js/src/pro/upbit.js +9 -9
  484. package/js/src/pro/whitebit.d.ts +7 -7
  485. package/js/src/pro/whitebit.js +7 -7
  486. package/js/src/pro/woo.d.ts +13 -13
  487. package/js/src/pro/woo.js +18 -16
  488. package/js/src/pro/woofipro.d.ts +20 -20
  489. package/js/src/pro/woofipro.js +25 -23
  490. package/js/src/pro/xt.d.ts +2 -2
  491. package/js/src/pro/xt.js +7 -5
  492. package/js/src/probit.d.ts +18 -18
  493. package/js/src/probit.js +18 -18
  494. package/js/src/static_dependencies/ethers/utils/index.d.ts +2 -1
  495. package/js/src/static_dependencies/ethers/utils/index.js +8 -1
  496. package/js/src/timex.d.ts +16 -16
  497. package/js/src/timex.js +16 -16
  498. package/js/src/tokocrypto.d.ts +17 -17
  499. package/js/src/tokocrypto.js +17 -17
  500. package/js/src/toobit.d.ts +27 -27
  501. package/js/src/toobit.js +33 -30
  502. package/js/src/upbit.d.ts +23 -23
  503. package/js/src/upbit.js +23 -23
  504. package/js/src/wavesexchange.d.ts +15 -15
  505. package/js/src/wavesexchange.js +86 -85
  506. package/js/src/whitebit.d.ts +44 -44
  507. package/js/src/whitebit.js +44 -44
  508. package/js/src/woo.d.ts +45 -45
  509. package/js/src/woo.js +51 -49
  510. package/js/src/woofipro.d.ts +77 -77
  511. package/js/src/woofipro.js +104 -82
  512. package/js/src/xt.d.ts +12 -12
  513. package/js/src/xt.js +17 -12
  514. package/js/src/yobit.d.ts +15 -15
  515. package/js/src/yobit.js +15 -15
  516. package/js/src/zaif.d.ts +9 -9
  517. package/js/src/zaif.js +38 -9
  518. package/js/src/zebpay.d.ts +20 -20
  519. package/js/src/zebpay.js +35 -20
  520. package/js/src/zonda.d.ts +14 -14
  521. package/js/src/zonda.js +14 -14
  522. package/package.json +1 -1
@@ -147,6 +147,8 @@ class Exchange {
147
147
  this.tokenBucket = undefined;
148
148
  this.throttler = undefined;
149
149
  this.enableRateLimit = undefined;
150
+ this.rollingWindowSize = 0.0; // set to 0.0 to use leaky bucket rate limiter
151
+ this.rateLimiterAlgorithm = 'leakyBucket';
150
152
  this.httpExceptions = undefined;
151
153
  this.limits = undefined;
152
154
  this.markets_by_id = undefined;
@@ -1921,6 +1923,7 @@ class Exchange {
1921
1923
  'price': { 'min': undefined, 'max': undefined },
1922
1924
  'cost': { 'min': undefined, 'max': undefined },
1923
1925
  },
1926
+ 'rollingWindowSize': 60000, // default 60 seconds, requires rateLimiterAlgorithm to be set as 'rollingWindow'
1924
1927
  };
1925
1928
  }
1926
1929
  safeBoolN(dictionaryOrList, keys, defaultValue = undefined) {
@@ -2631,7 +2634,7 @@ class Exchange {
2631
2634
  * @param {int} [since] timestamp in ms of the earliest change to fetch
2632
2635
  * @param {int} [limit] the maximum amount of changes to fetch
2633
2636
  * @param {object} params extra parameters specific to the exchange api endpoint
2634
- * @returns {object[]} a list of [margin structures]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
2637
+ * @returns {object[]} a list of [margin structures]{@link https://docs.ccxt.com/?id=margin-loan-structure}
2635
2638
  */
2636
2639
  throw new errors.NotSupported(this.id + ' fetchMarginAdjustmentHistory() is not supported yet');
2637
2640
  }
@@ -2716,12 +2719,16 @@ class Exchange {
2716
2719
  if (this.rateLimit > 0) {
2717
2720
  refillRate = 1 / this.rateLimit;
2718
2721
  }
2722
+ const useLeaky = (this.rollingWindowSize === 0.0) || (this.rateLimiterAlgorithm === 'leakyBucket');
2723
+ const algorithm = useLeaky ? 'leakyBucket' : 'rollingWindow';
2719
2724
  const defaultBucket = {
2720
2725
  'delay': 0.001,
2721
2726
  'capacity': 1,
2722
2727
  'cost': 1,
2723
- 'maxCapacity': this.safeInteger(this.options, 'maxRequestsQueue', 1000),
2724
2728
  'refillRate': refillRate,
2729
+ 'algorithm': algorithm,
2730
+ 'windowSize': this.rollingWindowSize,
2731
+ 'rateLimit': this.rateLimit,
2725
2732
  };
2726
2733
  const existingBucket = (this.tokenBucket === undefined) ? {} : this.tokenBucket;
2727
2734
  this.tokenBucket = this.extend(defaultBucket, existingBucket);
@@ -4962,7 +4969,7 @@ class Exchange {
4962
4969
  * @description fetches all open positions for specific symbol, unlike fetchPositions (which is designed to work with multiple symbols) so this method might be preffered for one-market position, because of less rate-limit consumption and speed
4963
4970
  * @param {string} symbol unified market symbol
4964
4971
  * @param {object} params extra parameters specific to the endpoint
4965
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure} with maximum 3 items - possible one position for "one-way" mode, and possible two positions (long & short) for "two-way" (a.k.a. hedge) mode
4972
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/?id=position-structure} with maximum 3 items - possible one position for "one-way" mode, and possible two positions (long & short) for "two-way" (a.k.a. hedge) mode
4966
4973
  */
4967
4974
  throw new errors.NotSupported(this.id + ' fetchPositionsForSymbol() is not supported yet');
4968
4975
  }
@@ -4973,7 +4980,7 @@ class Exchange {
4973
4980
  * @description fetches all open positions for specific symbol, unlike fetchPositions (which is designed to work with multiple symbols) so this method might be preffered for one-market position, because of less rate-limit consumption and speed
4974
4981
  * @param {string} symbol unified market symbol
4975
4982
  * @param {object} params extra parameters specific to the endpoint
4976
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure} with maximum 3 items - possible one position for "one-way" mode, and possible two positions (long & short) for "two-way" (a.k.a. hedge) mode
4983
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/?id=position-structure} with maximum 3 items - possible one position for "one-way" mode, and possible two positions (long & short) for "two-way" (a.k.a. hedge) mode
4977
4984
  */
4978
4985
  throw new errors.NotSupported(this.id + ' fetchPositionsForSymbol() is not supported yet');
4979
4986
  }
@@ -5430,7 +5437,7 @@ class Exchange {
5430
5437
  * @param {string} clientOrderId client order Id
5431
5438
  * @param {string} symbol unified symbol of the market to create an order in
5432
5439
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5433
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5440
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5434
5441
  */
5435
5442
  async fetchOrderWithClientOrderId(clientOrderId, symbol = undefined, params = {}) {
5436
5443
  const extendedParams = this.extend(params, { 'clientOrderId': clientOrderId });
@@ -5476,7 +5483,7 @@ class Exchange {
5476
5483
  * @param {float} trailingAmount the quote amount to trail away from the current market price
5477
5484
  * @param {float} [trailingTriggerPrice] the price to activate a trailing order, default uses the price argument
5478
5485
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5479
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5486
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5480
5487
  */
5481
5488
  if (trailingAmount === undefined) {
5482
5489
  throw new errors.ArgumentsRequired(this.id + ' createTrailingAmountOrder() requires a trailingAmount argument');
@@ -5503,7 +5510,7 @@ class Exchange {
5503
5510
  * @param {float} trailingAmount the quote amount to trail away from the current market price
5504
5511
  * @param {float} [trailingTriggerPrice] the price to activate a trailing order, default uses the price argument
5505
5512
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5506
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5513
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5507
5514
  */
5508
5515
  if (trailingAmount === undefined) {
5509
5516
  throw new errors.ArgumentsRequired(this.id + ' createTrailingAmountOrderWs() requires a trailingAmount argument');
@@ -5530,7 +5537,7 @@ class Exchange {
5530
5537
  * @param {float} trailingPercent the percent to trail away from the current market price
5531
5538
  * @param {float} [trailingTriggerPrice] the price to activate a trailing order, default uses the price argument
5532
5539
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5533
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5540
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5534
5541
  */
5535
5542
  if (trailingPercent === undefined) {
5536
5543
  throw new errors.ArgumentsRequired(this.id + ' createTrailingPercentOrder() requires a trailingPercent argument');
@@ -5557,7 +5564,7 @@ class Exchange {
5557
5564
  * @param {float} trailingPercent the percent to trail away from the current market price
5558
5565
  * @param {float} [trailingTriggerPrice] the price to activate a trailing order, default uses the price argument
5559
5566
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5560
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5567
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5561
5568
  */
5562
5569
  if (trailingPercent === undefined) {
5563
5570
  throw new errors.ArgumentsRequired(this.id + ' createTrailingPercentOrderWs() requires a trailingPercent argument');
@@ -5580,7 +5587,7 @@ class Exchange {
5580
5587
  * @param {string} side 'buy' or 'sell'
5581
5588
  * @param {float} cost how much you want to trade in units of the quote currency
5582
5589
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5583
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5590
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5584
5591
  */
5585
5592
  if (this.has['createMarketOrderWithCost'] || (this.has['createMarketBuyOrderWithCost'] && this.has['createMarketSellOrderWithCost'])) {
5586
5593
  return await this.createOrder(symbol, 'market', side, cost, 1, params);
@@ -5595,7 +5602,7 @@ class Exchange {
5595
5602
  * @param {string} symbol unified symbol of the market to create an order in
5596
5603
  * @param {float} cost how much you want to trade in units of the quote currency
5597
5604
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5598
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5605
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5599
5606
  */
5600
5607
  if (this.options['createMarketBuyOrderRequiresPrice'] || this.has['createMarketBuyOrderWithCost']) {
5601
5608
  return await this.createOrder(symbol, 'market', 'buy', cost, 1, params);
@@ -5610,7 +5617,7 @@ class Exchange {
5610
5617
  * @param {string} symbol unified symbol of the market to create an order in
5611
5618
  * @param {float} cost how much you want to trade in units of the quote currency
5612
5619
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5613
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5620
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5614
5621
  */
5615
5622
  if (this.options['createMarketSellOrderRequiresPrice'] || this.has['createMarketSellOrderWithCost']) {
5616
5623
  return await this.createOrder(symbol, 'market', 'sell', cost, 1, params);
@@ -5626,7 +5633,7 @@ class Exchange {
5626
5633
  * @param {string} side 'buy' or 'sell'
5627
5634
  * @param {float} cost how much you want to trade in units of the quote currency
5628
5635
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5629
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5636
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5630
5637
  */
5631
5638
  if (this.has['createMarketOrderWithCostWs'] || (this.has['createMarketBuyOrderWithCostWs'] && this.has['createMarketSellOrderWithCostWs'])) {
5632
5639
  return await this.createOrderWs(symbol, 'market', side, cost, 1, params);
@@ -5645,7 +5652,7 @@ class Exchange {
5645
5652
  * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
5646
5653
  * @param {float} triggerPrice the price to trigger the stop order, in units of the quote currency
5647
5654
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5648
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5655
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5649
5656
  */
5650
5657
  if (triggerPrice === undefined) {
5651
5658
  throw new errors.ArgumentsRequired(this.id + ' createTriggerOrder() requires a triggerPrice argument');
@@ -5668,7 +5675,7 @@ class Exchange {
5668
5675
  * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
5669
5676
  * @param {float} triggerPrice the price to trigger the stop order, in units of the quote currency
5670
5677
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5671
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5678
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5672
5679
  */
5673
5680
  if (triggerPrice === undefined) {
5674
5681
  throw new errors.ArgumentsRequired(this.id + ' createTriggerOrderWs() requires a triggerPrice argument');
@@ -5691,7 +5698,7 @@ class Exchange {
5691
5698
  * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
5692
5699
  * @param {float} stopLossPrice the price to trigger the stop loss order, in units of the quote currency
5693
5700
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5694
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5701
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5695
5702
  */
5696
5703
  if (stopLossPrice === undefined) {
5697
5704
  throw new errors.ArgumentsRequired(this.id + ' createStopLossOrder() requires a stopLossPrice argument');
@@ -5714,7 +5721,7 @@ class Exchange {
5714
5721
  * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
5715
5722
  * @param {float} stopLossPrice the price to trigger the stop loss order, in units of the quote currency
5716
5723
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5717
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5724
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5718
5725
  */
5719
5726
  if (stopLossPrice === undefined) {
5720
5727
  throw new errors.ArgumentsRequired(this.id + ' createStopLossOrderWs() requires a stopLossPrice argument');
@@ -5737,7 +5744,7 @@ class Exchange {
5737
5744
  * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
5738
5745
  * @param {float} takeProfitPrice the price to trigger the take profit order, in units of the quote currency
5739
5746
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5740
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5747
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5741
5748
  */
5742
5749
  if (takeProfitPrice === undefined) {
5743
5750
  throw new errors.ArgumentsRequired(this.id + ' createTakeProfitOrder() requires a takeProfitPrice argument');
@@ -5760,7 +5767,7 @@ class Exchange {
5760
5767
  * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
5761
5768
  * @param {float} takeProfitPrice the price to trigger the take profit order, in units of the quote currency
5762
5769
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5763
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5770
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5764
5771
  */
5765
5772
  if (takeProfitPrice === undefined) {
5766
5773
  throw new errors.ArgumentsRequired(this.id + ' createTakeProfitOrderWs() requires a takeProfitPrice argument');
@@ -5792,7 +5799,7 @@ class Exchange {
5792
5799
  * @param {float} [params.stopLossLimitPrice] *not available on all exchanges* stop loss for a limit stop loss order
5793
5800
  * @param {float} [params.takeProfitAmount] *not available on all exchanges* the amount for a take profit
5794
5801
  * @param {float} [params.stopLossAmount] *not available on all exchanges* the amount for a stop loss
5795
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5802
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5796
5803
  */
5797
5804
  params = this.setTakeProfitAndStopLossParams(symbol, type, side, amount, price, takeProfit, stopLoss, params);
5798
5805
  if (this.has['createOrderWithTakeProfitAndStopLoss']) {
@@ -5870,7 +5877,7 @@ class Exchange {
5870
5877
  * @param {float} [params.stopLossLimitPrice] *not available on all exchanges* stop loss for a limit stop loss order
5871
5878
  * @param {float} [params.takeProfitAmount] *not available on all exchanges* the amount for a take profit
5872
5879
  * @param {float} [params.stopLossAmount] *not available on all exchanges* the amount for a stop loss
5873
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5880
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5874
5881
  */
5875
5882
  params = this.setTakeProfitAndStopLossParams(symbol, type, side, amount, price, takeProfit, stopLoss, params);
5876
5883
  if (this.has['createOrderWithTakeProfitAndStopLossWs']) {
@@ -5897,7 +5904,7 @@ class Exchange {
5897
5904
  * @param {string} clientOrderId client order Id
5898
5905
  * @param {string} symbol unified symbol of the market to create an order in
5899
5906
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5900
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5907
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5901
5908
  */
5902
5909
  async cancelOrderWithClientOrderId(clientOrderId, symbol = undefined, params = {}) {
5903
5910
  const extendedParams = this.extend(params, { 'clientOrderId': clientOrderId });
@@ -5916,7 +5923,7 @@ class Exchange {
5916
5923
  * @param {string[]} clientOrderIds client order Ids
5917
5924
  * @param {string} symbol unified symbol of the market to create an order in
5918
5925
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5919
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5926
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
5920
5927
  */
5921
5928
  async cancelOrdersWithClientOrderIds(clientOrderIds, symbol = undefined, params = {}) {
5922
5929
  const extendedParams = this.extend(params, { 'clientOrderIds': clientOrderIds });
@@ -6025,7 +6032,7 @@ class Exchange {
6025
6032
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
6026
6033
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
6027
6034
  * @param {object} [params] extra parameters specific to the exchange API endpoint
6028
- * @returns {object} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
6035
+ * @returns {object} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
6029
6036
  */
6030
6037
  throw new errors.NotSupported(this.id + ' fetchDepositsWithdrawals() is not supported yet');
6031
6038
  }
@@ -6440,6 +6447,9 @@ class Exchange {
6440
6447
  const query = this.extend(params, { 'stopPrice': triggerPrice });
6441
6448
  return await this.createOrderWs(symbol, 'market', side, amount, undefined, query);
6442
6449
  }
6450
+ async createSubAccount(name, params = {}) {
6451
+ throw new errors.NotSupported(this.id + ' createSubAccount() is not supported yet');
6452
+ }
6443
6453
  safeCurrencyCode(currencyId, currency = undefined) {
6444
6454
  currency = this.safeCurrency(currencyId, currency);
6445
6455
  return currency['code'];
@@ -7055,7 +7065,7 @@ class Exchange {
7055
7065
  * @param {object} market ccxt market
7056
7066
  * @param {int} [since] when defined, the response items are filtered to only include items after this timestamp
7057
7067
  * @param {int} [limit] limits the number of items in the response
7058
- * @returns {object[]} an array of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
7068
+ * @returns {object[]} an array of [funding history structures]{@link https://docs.ccxt.com/?id=funding-history-structure}
7059
7069
  */
7060
7070
  const result = [];
7061
7071
  for (let i = 0; i < incomes.length; i++) {
@@ -7092,7 +7102,7 @@ class Exchange {
7092
7102
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
7093
7103
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
7094
7104
  * @param {object} [params] extra parameters specific to the exchange API endpoint
7095
- * @returns {object} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
7105
+ * @returns {object} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
7096
7106
  */
7097
7107
  if (this.has['fetchDepositsWithdrawals']) {
7098
7108
  return await this.fetchDepositsWithdrawals(code, since, limit, params);
@@ -7498,7 +7508,7 @@ class Exchange {
7498
7508
  * @param {object} market ccxt market
7499
7509
  * @param {int} [since] when defined, the response items are filtered to only include items after this timestamp
7500
7510
  * @param {int} [limit] limits the number of items in the response
7501
- * @returns {object[]} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
7511
+ * @returns {object[]} an array of [liquidation structures]{@link https://docs.ccxt.com/?id=liquidation-structure}
7502
7512
  */
7503
7513
  const result = [];
7504
7514
  for (let i = 0; i < liquidations.length; i++) {
@@ -7713,7 +7723,7 @@ class Exchange {
7713
7723
  * @param {int} [since] timestamp in ms of the position
7714
7724
  * @param {int} [limit] the maximum amount of candles to fetch, default=1000
7715
7725
  * @param {object} params extra parameters specific to the exchange api endpoint
7716
- * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
7726
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/?id=position-structure}
7717
7727
  */
7718
7728
  if (this.has['fetchPositionsHistory']) {
7719
7729
  const positions = await this.fetchPositionsHistory([symbol], since, limit, params);
@@ -7732,7 +7742,7 @@ class Exchange {
7732
7742
  * @param {int} [since] timestamp in ms of the position
7733
7743
  * @param {int} [limit] the maximum amount of candles to fetch, default=1000
7734
7744
  * @param {object} params extra parameters specific to the exchange api endpoint
7735
- * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
7745
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/?id=position-structure}
7736
7746
  */
7737
7747
  throw new errors.NotSupported(this.id + ' fetchPositionsHistory () is not supported yet');
7738
7748
  }
@@ -7759,7 +7769,7 @@ class Exchange {
7759
7769
  * @param {string} id transfer id
7760
7770
  * @param {[string]} code unified currency code
7761
7771
  * @param {object} params extra parameters specific to the exchange api endpoint
7762
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
7772
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/?id=transfer-structure}
7763
7773
  */
7764
7774
  throw new errors.NotSupported(this.id + ' fetchTransfer () is not supported yet');
7765
7775
  }
@@ -7772,7 +7782,7 @@ class Exchange {
7772
7782
  * @param {int} [since] timestamp in ms of the earliest transfer to fetch
7773
7783
  * @param {int} [limit] the maximum amount of transfers to fetch
7774
7784
  * @param {object} params extra parameters specific to the exchange api endpoint
7775
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
7785
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/?id=transfer-structure}
7776
7786
  */
7777
7787
  throw new errors.NotSupported(this.id + ' fetchTransfers () is not supported yet');
7778
7788
  }
@@ -7795,7 +7805,7 @@ class Exchange {
7795
7805
  * @description watches a mark price for a specific market
7796
7806
  * @param {string} symbol unified symbol of the market to fetch the ticker for
7797
7807
  * @param {object} [params] extra parameters specific to the exchange API endpoint
7798
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
7808
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
7799
7809
  */
7800
7810
  throw new errors.NotSupported(this.id + ' watchMarkPrice () is not supported yet');
7801
7811
  }
@@ -7806,7 +7816,7 @@ class Exchange {
7806
7816
  * @description watches the mark price for all markets
7807
7817
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
7808
7818
  * @param {object} [params] extra parameters specific to the exchange API endpoint
7809
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
7819
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
7810
7820
  */
7811
7821
  throw new errors.NotSupported(this.id + ' watchMarkPrices () is not supported yet');
7812
7822
  }
@@ -7820,7 +7830,7 @@ class Exchange {
7820
7830
  * @param {string} address the address to withdraw to
7821
7831
  * @param {string} tag
7822
7832
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
7823
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
7833
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
7824
7834
  */
7825
7835
  throw new errors.NotSupported(this.id + ' withdrawWs () is not supported yet');
7826
7836
  }
@@ -7831,7 +7841,7 @@ class Exchange {
7831
7841
  * @description unWatches information on multiple trades made by the user
7832
7842
  * @param {string} symbol unified market symbol of the market orders were made in
7833
7843
  * @param {object} [params] extra parameters specific to the exchange API endpoint
7834
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
7844
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
7835
7845
  */
7836
7846
  throw new errors.NotSupported(this.id + ' unWatchMyTrades () is not supported yet');
7837
7847
  }
@@ -7842,7 +7852,7 @@ class Exchange {
7842
7852
  * @description create a list of trade orders
7843
7853
  * @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
7844
7854
  * @param {object} [params] extra parameters specific to the exchange API endpoint
7845
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
7855
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
7846
7856
  */
7847
7857
  throw new errors.NotSupported(this.id + ' createOrdersWs () is not supported yet');
7848
7858
  }
@@ -7854,7 +7864,7 @@ class Exchange {
7854
7864
  * @param {string} symbol unified symbol of the market to fetch the order book for
7855
7865
  * @param {int} [limit] the maximum amount of order book entries to return
7856
7866
  * @param {object} [params] extra parameters specific to the exchange API endpoint
7857
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
7867
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
7858
7868
  */
7859
7869
  throw new errors.NotSupported(this.id + ' fetchOrdersByStatusWs () is not supported yet');
7860
7870
  }
@@ -7865,7 +7875,7 @@ class Exchange {
7865
7875
  * @description unWatches best bid & ask for symbols
7866
7876
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
7867
7877
  * @param {object} [params] extra parameters specific to the exchange API endpoint
7868
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
7878
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
7869
7879
  */
7870
7880
  throw new errors.NotSupported(this.id + ' unWatchBidsAsks () is not supported yet');
7871
7881
  }
@@ -12,15 +12,21 @@ class Throttler {
12
12
  'refillRate': 1.0,
13
13
  'delay': 0.001,
14
14
  'capacity': 1.0,
15
- 'maxCapacity': 2000,
16
15
  'tokens': 0,
17
16
  'cost': 1.0,
17
+ 'algorithm': 'leakyBucket',
18
+ 'windowSize': 60000.0,
19
+ 'maxWeight': undefined, // rolling window - rollingWindowSize / rateLimit // ms_of_window / ms_of_rate_limit
18
20
  };
19
21
  Object.assign(this.config, config);
22
+ if (this.config['algorithm'] !== 'leakyBucket') {
23
+ this.config['maxWeight'] = this.config.windowSize / this.config.rateLimit;
24
+ }
20
25
  this.queue = [];
21
26
  this.running = false;
27
+ this.timestamps = [];
22
28
  }
23
- async loop() {
29
+ async leakyBucketLoop() {
24
30
  let lastTimestamp = time.now();
25
31
  while (this.running) {
26
32
  const { resolver, cost } = this.queue[0];
@@ -44,14 +50,57 @@ class Throttler {
44
50
  }
45
51
  }
46
52
  }
53
+ async rollingWindowLoop() {
54
+ while (this.running) {
55
+ const { resolver, cost } = this.queue[0];
56
+ const nowTime = time.now();
57
+ const cutOffTime = nowTime - this.config.windowSize;
58
+ let totalCost = 0;
59
+ // Remove expired timestamps & sum the remaining requests
60
+ const timestamps = [];
61
+ for (let i = 0; i < this.timestamps.length; i++) {
62
+ const element = this.timestamps[i];
63
+ if (element.timestamp > cutOffTime) {
64
+ totalCost += element.cost;
65
+ timestamps.push(element);
66
+ }
67
+ }
68
+ this.timestamps = timestamps;
69
+ // handle current request
70
+ if (totalCost + cost <= this.config.maxWeight) {
71
+ // Enough capacity, proceed with request
72
+ this.timestamps.push({ timestamp: nowTime, cost });
73
+ resolver();
74
+ this.queue.shift();
75
+ await Promise.resolve(); // Yield control to event loop
76
+ if (this.queue.length === 0) {
77
+ this.running = false;
78
+ }
79
+ }
80
+ else {
81
+ // Calculate the wait time until the oldest request expires
82
+ const earliestRequestTime = this.timestamps[0].timestamp;
83
+ const waitTime = (earliestRequestTime + this.config.windowSize) - nowTime;
84
+ // Ensure waitTime is positive before sleeping
85
+ if (waitTime > 0) {
86
+ await time.sleep(waitTime);
87
+ }
88
+ }
89
+ }
90
+ }
91
+ async loop() {
92
+ if (this.config['algorithm'] === 'leakyBucket') {
93
+ await this.leakyBucketLoop();
94
+ }
95
+ else {
96
+ await this.rollingWindowLoop();
97
+ }
98
+ }
47
99
  throttle(cost = undefined) {
48
100
  let resolver;
49
101
  const promise = new Promise((resolve, reject) => {
50
102
  resolver = resolve;
51
103
  });
52
- if (this.queue.length > this.config['maxCapacity']) {
53
- throw new Error('throttle queue is over maxCapacity (' + this.config['maxCapacity'].toString() + '), see https://docs.ccxt.com/#/README?id=maximum-requests-capacity');
54
- }
55
104
  cost = (cost === undefined) ? this.config['cost'] : cost;
56
105
  this.queue.push({ resolver, cost });
57
106
  if (!this.running) {
@@ -873,7 +873,7 @@ class bigone extends bigone$1["default"] {
873
873
  * @see https://open.big.one/docs/spot_tickers.html
874
874
  * @param {string} symbol unified symbol of the market to fetch the ticker for
875
875
  * @param {object} [params] extra parameters specific to the exchange API endpoint
876
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
876
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
877
877
  */
878
878
  async fetchTicker(symbol, params = {}) {
879
879
  await this.loadMarkets();
@@ -916,7 +916,7 @@ class bigone extends bigone$1["default"] {
916
916
  * @see https://open.big.one/docs/spot_tickers.html
917
917
  * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
918
918
  * @param {object} [params] extra parameters specific to the exchange API endpoint
919
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
919
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
920
920
  */
921
921
  async fetchTickers(symbols = undefined, params = {}) {
922
922
  await this.loadMarkets();
@@ -1026,7 +1026,7 @@ class bigone extends bigone$1["default"] {
1026
1026
  * @param {string} symbol unified symbol of the market to fetch the order book for
1027
1027
  * @param {int} [limit] the maximum amount of order book entries to return
1028
1028
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1029
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1029
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
1030
1030
  */
1031
1031
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1032
1032
  await this.loadMarkets();
@@ -1270,7 +1270,7 @@ class bigone extends bigone$1["default"] {
1270
1270
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
1271
1271
  * @param {int} [limit] the maximum amount of trades to fetch
1272
1272
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1273
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1273
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
1274
1274
  */
1275
1275
  async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
1276
1276
  await this.loadMarkets();
@@ -1423,7 +1423,7 @@ class bigone extends bigone$1["default"] {
1423
1423
  * @see https://open.big.one/docs/fund_accounts.html
1424
1424
  * @see https://open.big.one/docs/spot_accounts.html
1425
1425
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1426
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1426
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
1427
1427
  */
1428
1428
  async fetchBalance(params = {}) {
1429
1429
  await this.loadMarkets();
@@ -1541,7 +1541,7 @@ class bigone extends bigone$1["default"] {
1541
1541
  * @param {string} symbol unified symbol of the market to create an order in
1542
1542
  * @param {float} cost how much you want to trade in units of the quote currency
1543
1543
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1544
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1544
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
1545
1545
  */
1546
1546
  async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
1547
1547
  await this.loadMarkets();
@@ -1571,7 +1571,7 @@ class bigone extends bigone$1["default"] {
1571
1571
  * EXCHANGE SPECIFIC PARAMETERS
1572
1572
  * @param {string} [params.operator] *stop order only* GTE or LTE (default)
1573
1573
  * @param {string} [params.client_order_id] must match ^[a-zA-Z0-9-_]{1,36}$ this regex. client_order_id is unique in 24 hours, If created 24 hours later and the order closed, it will be released and can be reused
1574
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1574
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
1575
1575
  */
1576
1576
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
1577
1577
  await this.loadMarkets();
@@ -1674,7 +1674,7 @@ class bigone extends bigone$1["default"] {
1674
1674
  * @param {string} id order id
1675
1675
  * @param {string} symbol Not used by bigone cancelOrder ()
1676
1676
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1677
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1677
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
1678
1678
  */
1679
1679
  async cancelOrder(id, symbol = undefined, params = {}) {
1680
1680
  await this.loadMarkets();
@@ -1702,7 +1702,7 @@ class bigone extends bigone$1["default"] {
1702
1702
  * @see https://open.big.one/docs/spot_orders.html#cancel-all-orders
1703
1703
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1704
1704
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1705
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1705
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
1706
1706
  */
1707
1707
  async cancelAllOrders(symbol = undefined, params = {}) {
1708
1708
  await this.loadMarkets();
@@ -1753,7 +1753,7 @@ class bigone extends bigone$1["default"] {
1753
1753
  * @param {string} id the order id
1754
1754
  * @param {string} symbol not used by bigone fetchOrder
1755
1755
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1756
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1756
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
1757
1757
  */
1758
1758
  async fetchOrder(id, symbol = undefined, params = {}) {
1759
1759
  await this.loadMarkets();
@@ -1771,7 +1771,7 @@ class bigone extends bigone$1["default"] {
1771
1771
  * @param {int} [since] the earliest time in ms to fetch orders for
1772
1772
  * @param {int} [limit] the maximum number of order structures to retrieve
1773
1773
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1774
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1774
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
1775
1775
  */
1776
1776
  async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1777
1777
  if (symbol === undefined) {
@@ -1822,7 +1822,7 @@ class bigone extends bigone$1["default"] {
1822
1822
  * @param {int} [since] the earliest time in ms to fetch trades for
1823
1823
  * @param {int} [limit] the maximum number of trades structures to retrieve
1824
1824
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1825
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1825
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
1826
1826
  */
1827
1827
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1828
1828
  if (symbol === undefined) {
@@ -1892,7 +1892,7 @@ class bigone extends bigone$1["default"] {
1892
1892
  * @param {int} [since] the earliest time in ms to fetch open orders for
1893
1893
  * @param {int} [limit] the maximum number of open orders structures to retrieve
1894
1894
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1895
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1895
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
1896
1896
  */
1897
1897
  async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1898
1898
  const request = {
@@ -1909,7 +1909,7 @@ class bigone extends bigone$1["default"] {
1909
1909
  * @param {int} [since] the earliest time in ms to fetch orders for
1910
1910
  * @param {int} [limit] the maximum number of order structures to retrieve
1911
1911
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1912
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1912
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
1913
1913
  */
1914
1914
  async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1915
1915
  const request = {
@@ -1962,7 +1962,7 @@ class bigone extends bigone$1["default"] {
1962
1962
  * @see https://open.big.one/docs/spot_deposit.html#get-deposite-address-of-one-asset-of-user
1963
1963
  * @param {string} code unified currency code
1964
1964
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1965
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1965
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/?id=address-structure}
1966
1966
  */
1967
1967
  async fetchDepositAddress(code, params = {}) {
1968
1968
  await this.loadMarkets();
@@ -2115,7 +2115,7 @@ class bigone extends bigone$1["default"] {
2115
2115
  * @param {int} [since] the earliest time in ms to fetch deposits for
2116
2116
  * @param {int} [limit] the maximum number of deposits structures to retrieve
2117
2117
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2118
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2118
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
2119
2119
  */
2120
2120
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
2121
2121
  await this.loadMarkets();
@@ -2167,7 +2167,7 @@ class bigone extends bigone$1["default"] {
2167
2167
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
2168
2168
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
2169
2169
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2170
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2170
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
2171
2171
  */
2172
2172
  async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
2173
2173
  await this.loadMarkets();
@@ -2220,7 +2220,7 @@ class bigone extends bigone$1["default"] {
2220
2220
  * @param {string} fromAccount 'SPOT', 'FUND', or 'CONTRACT'
2221
2221
  * @param {string} toAccount 'SPOT', 'FUND', or 'CONTRACT'
2222
2222
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2223
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
2223
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/?id=transfer-structure}
2224
2224
  */
2225
2225
  async transfer(code, amount, fromAccount, toAccount, params = {}) {
2226
2226
  await this.loadMarkets();
@@ -2292,7 +2292,7 @@ class bigone extends bigone$1["default"] {
2292
2292
  * @param {string} address the address to withdraw to
2293
2293
  * @param {string} tag
2294
2294
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2295
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2295
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
2296
2296
  */
2297
2297
  async withdraw(code, amount, address, tag = undefined, params = {}) {
2298
2298
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);