ccxt 4.4.30 → 4.4.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (496) hide show
  1. package/README.md +9 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ace.js +123 -123
  5. package/dist/cjs/src/alpaca.js +237 -237
  6. package/dist/cjs/src/ascendex.js +342 -341
  7. package/dist/cjs/src/bigone.js +242 -242
  8. package/dist/cjs/src/binance.js +1339 -1291
  9. package/dist/cjs/src/bingx.js +639 -639
  10. package/dist/cjs/src/bit2c.js +111 -111
  11. package/dist/cjs/src/bitbank.js +142 -142
  12. package/dist/cjs/src/bitbns.js +140 -140
  13. package/dist/cjs/src/bitfinex.js +231 -231
  14. package/dist/cjs/src/bitfinex2.js +403 -403
  15. package/dist/cjs/src/bitflyer.js +184 -184
  16. package/dist/cjs/src/bitget.js +848 -846
  17. package/dist/cjs/src/bithumb.js +125 -124
  18. package/dist/cjs/src/bitmart.js +525 -525
  19. package/dist/cjs/src/bitmex.js +317 -317
  20. package/dist/cjs/src/bitopro.js +221 -221
  21. package/dist/cjs/src/bitrue.js +315 -315
  22. package/dist/cjs/src/bitso.js +220 -220
  23. package/dist/cjs/src/bitstamp.js +251 -251
  24. package/dist/cjs/src/bitteam.js +183 -183
  25. package/dist/cjs/src/bitvavo.js +247 -251
  26. package/dist/cjs/src/bl3p.js +82 -82
  27. package/dist/cjs/src/blockchaincom.js +211 -211
  28. package/dist/cjs/src/blofin.js +332 -331
  29. package/dist/cjs/src/btcalpha.js +166 -166
  30. package/dist/cjs/src/btcbox.js +108 -108
  31. package/dist/cjs/src/btcmarkets.js +198 -198
  32. package/dist/cjs/src/btcturk.js +124 -124
  33. package/dist/cjs/src/bybit.js +906 -900
  34. package/dist/cjs/src/cex.js +227 -226
  35. package/dist/cjs/src/coinbase.js +481 -481
  36. package/dist/cjs/src/coinbaseexchange.js +274 -274
  37. package/dist/cjs/src/coinbaseinternational.js +304 -304
  38. package/dist/cjs/src/coincatch.js +650 -650
  39. package/dist/cjs/src/coincheck.js +113 -113
  40. package/dist/cjs/src/coinex.js +611 -601
  41. package/dist/cjs/src/coinlist.js +304 -303
  42. package/dist/cjs/src/coinmate.js +162 -161
  43. package/dist/cjs/src/coinmetro.js +187 -187
  44. package/dist/cjs/src/coinone.js +124 -123
  45. package/dist/cjs/src/coinsph.js +237 -237
  46. package/dist/cjs/src/coinspot.js +82 -82
  47. package/dist/cjs/src/cryptocom.js +342 -341
  48. package/dist/cjs/src/currencycom.js +225 -224
  49. package/dist/cjs/src/delta.js +320 -320
  50. package/dist/cjs/src/deribit.js +411 -408
  51. package/dist/cjs/src/digifinex.js +432 -431
  52. package/dist/cjs/src/exmo.js +328 -327
  53. package/dist/cjs/src/gate.js +830 -791
  54. package/dist/cjs/src/gemini.js +199 -198
  55. package/dist/cjs/src/hashkey.js +520 -517
  56. package/dist/cjs/src/hitbtc.js +465 -462
  57. package/dist/cjs/src/hollaex.js +253 -252
  58. package/dist/cjs/src/htx.js +791 -848
  59. package/dist/cjs/src/huobijp.js +219 -218
  60. package/dist/cjs/src/hyperliquid.js +421 -417
  61. package/dist/cjs/src/idex.js +238 -237
  62. package/dist/cjs/src/independentreserve.js +133 -132
  63. package/dist/cjs/src/indodax.js +177 -171
  64. package/dist/cjs/src/kraken.js +381 -377
  65. package/dist/cjs/src/krakenfutures.js +285 -279
  66. package/dist/cjs/src/kucoin.js +632 -622
  67. package/dist/cjs/src/kucoinfutures.js +533 -457
  68. package/dist/cjs/src/kuna.js +283 -282
  69. package/dist/cjs/src/latoken.js +211 -210
  70. package/dist/cjs/src/lbank.js +268 -267
  71. package/dist/cjs/src/luno.js +174 -173
  72. package/dist/cjs/src/lykke.js +172 -171
  73. package/dist/cjs/src/mercado.js +123 -122
  74. package/dist/cjs/src/mexc.js +650 -646
  75. package/dist/cjs/src/ndax.js +229 -228
  76. package/dist/cjs/src/novadax.js +230 -229
  77. package/dist/cjs/src/oceanex.js +187 -186
  78. package/dist/cjs/src/okcoin.js +286 -285
  79. package/dist/cjs/src/okx.js +909 -904
  80. package/dist/cjs/src/onetrading.js +218 -218
  81. package/dist/cjs/src/oxfun.js +335 -334
  82. package/dist/cjs/src/p2b.js +154 -154
  83. package/dist/cjs/src/paradex.js +249 -244
  84. package/dist/cjs/src/paymium.js +101 -101
  85. package/dist/cjs/src/phemex.js +388 -390
  86. package/dist/cjs/src/poloniex.js +270 -270
  87. package/dist/cjs/src/poloniexfutures.js +250 -250
  88. package/dist/cjs/src/pro/alpaca.js +64 -64
  89. package/dist/cjs/src/pro/ascendex.js +64 -64
  90. package/dist/cjs/src/pro/binance.js +546 -543
  91. package/dist/cjs/src/pro/bingx.js +116 -116
  92. package/dist/cjs/src/pro/bitfinex.js +42 -42
  93. package/dist/cjs/src/pro/bitfinex2.js +66 -66
  94. package/dist/cjs/src/pro/bitget.js +188 -181
  95. package/dist/cjs/src/pro/bithumb.js +40 -40
  96. package/dist/cjs/src/pro/bitmart.js +121 -119
  97. package/dist/cjs/src/pro/bitmex.js +135 -133
  98. package/dist/cjs/src/pro/bitopro.js +49 -49
  99. package/dist/cjs/src/pro/bitrue.js +19 -19
  100. package/dist/cjs/src/pro/bitstamp.js +29 -29
  101. package/dist/cjs/src/pro/bitvavo.js +299 -301
  102. package/dist/cjs/src/pro/blockchaincom.js +62 -62
  103. package/dist/cjs/src/pro/blofin.js +132 -130
  104. package/dist/cjs/src/pro/bybit.js +317 -313
  105. package/dist/cjs/src/pro/cex.js +168 -168
  106. package/dist/cjs/src/pro/coinbase.js +93 -91
  107. package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
  108. package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
  109. package/dist/cjs/src/pro/coincatch.js +150 -143
  110. package/dist/cjs/src/pro/coincheck.js +21 -21
  111. package/dist/cjs/src/pro/coinex.js +110 -110
  112. package/dist/cjs/src/pro/coinone.js +30 -30
  113. package/dist/cjs/src/pro/cryptocom.js +227 -227
  114. package/dist/cjs/src/pro/currencycom.js +45 -45
  115. package/dist/cjs/src/pro/deribit.js +127 -127
  116. package/dist/cjs/src/pro/exmo.js +66 -66
  117. package/dist/cjs/src/pro/gate.js +287 -283
  118. package/dist/cjs/src/pro/gemini.js +74 -74
  119. package/dist/cjs/src/pro/hashkey.js +87 -85
  120. package/dist/cjs/src/pro/hitbtc.js +190 -190
  121. package/dist/cjs/src/pro/hollaex.js +51 -51
  122. package/dist/cjs/src/pro/htx.js +96 -94
  123. package/dist/cjs/src/pro/huobijp.js +38 -38
  124. package/dist/cjs/src/pro/hyperliquid.js +151 -150
  125. package/dist/cjs/src/pro/idex.js +48 -48
  126. package/dist/cjs/src/pro/independentreserve.js +19 -19
  127. package/dist/cjs/src/pro/kraken.js +167 -167
  128. package/dist/cjs/src/pro/krakenfutures.js +137 -138
  129. package/dist/cjs/src/pro/kucoin.js +167 -168
  130. package/dist/cjs/src/pro/kucoinfutures.js +147 -147
  131. package/dist/cjs/src/pro/lbank.js +95 -95
  132. package/dist/cjs/src/pro/luno.js +21 -21
  133. package/dist/cjs/src/pro/mexc.js +102 -103
  134. package/dist/cjs/src/pro/ndax.js +42 -42
  135. package/dist/cjs/src/pro/okcoin.js +61 -61
  136. package/dist/cjs/src/pro/okx.js +332 -330
  137. package/dist/cjs/src/pro/onetrading.js +71 -71
  138. package/dist/cjs/src/pro/oxfun.js +193 -191
  139. package/dist/cjs/src/pro/p2b.js +77 -77
  140. package/dist/cjs/src/pro/paradex.js +39 -39
  141. package/dist/cjs/src/pro/phemex.js +94 -94
  142. package/dist/cjs/src/pro/poloniex.js +171 -171
  143. package/dist/cjs/src/pro/poloniexfutures.js +62 -62
  144. package/dist/cjs/src/pro/probit.js +63 -63
  145. package/dist/cjs/src/pro/upbit.js +80 -80
  146. package/dist/cjs/src/pro/vertex.js +65 -63
  147. package/dist/cjs/src/pro/wazirx.js +70 -70
  148. package/dist/cjs/src/pro/whitebit.js +83 -83
  149. package/dist/cjs/src/pro/woo.js +106 -104
  150. package/dist/cjs/src/pro/woofipro.js +105 -103
  151. package/dist/cjs/src/pro/xt.js +119 -119
  152. package/dist/cjs/src/probit.js +229 -229
  153. package/dist/cjs/src/timex.js +198 -197
  154. package/dist/cjs/src/tokocrypto.js +214 -213
  155. package/dist/cjs/src/tradeogre.js +92 -91
  156. package/dist/cjs/src/upbit.js +243 -242
  157. package/dist/cjs/src/vertex.js +258 -258
  158. package/dist/cjs/src/wavesexchange.js +176 -172
  159. package/dist/cjs/src/wazirx.js +168 -168
  160. package/dist/cjs/src/whitebit.js +361 -361
  161. package/dist/cjs/src/woo.js +571 -572
  162. package/dist/cjs/src/woofipro.js +392 -391
  163. package/dist/cjs/src/xt.js +436 -435
  164. package/dist/cjs/src/yobit.js +159 -158
  165. package/dist/cjs/src/zaif.js +103 -103
  166. package/dist/cjs/src/zonda.js +168 -168
  167. package/js/ccxt.d.ts +1 -1
  168. package/js/ccxt.js +1 -1
  169. package/js/src/ace.d.ts +123 -0
  170. package/js/src/ace.js +123 -123
  171. package/js/src/alpaca.d.ts +237 -0
  172. package/js/src/alpaca.js +237 -237
  173. package/js/src/ascendex.d.ts +339 -0
  174. package/js/src/ascendex.js +342 -341
  175. package/js/src/base/types.d.ts +1 -0
  176. package/js/src/bigone.d.ts +242 -0
  177. package/js/src/bigone.js +242 -242
  178. package/js/src/binance.d.ts +1306 -0
  179. package/js/src/binance.js +1339 -1291
  180. package/js/src/bingx.d.ts +639 -0
  181. package/js/src/bingx.js +639 -639
  182. package/js/src/bit2c.d.ts +111 -0
  183. package/js/src/bit2c.js +111 -111
  184. package/js/src/bitbank.d.ts +142 -0
  185. package/js/src/bitbank.js +142 -142
  186. package/js/src/bitbns.d.ts +140 -0
  187. package/js/src/bitbns.js +140 -140
  188. package/js/src/bitfinex.d.ts +231 -0
  189. package/js/src/bitfinex.js +231 -231
  190. package/js/src/bitfinex2.d.ts +403 -0
  191. package/js/src/bitfinex2.js +403 -403
  192. package/js/src/bitflyer.d.ts +184 -0
  193. package/js/src/bitflyer.js +184 -184
  194. package/js/src/bitget.d.ts +846 -0
  195. package/js/src/bitget.js +848 -846
  196. package/js/src/bithumb.d.ts +125 -0
  197. package/js/src/bithumb.js +125 -124
  198. package/js/src/bitmart.d.ts +525 -0
  199. package/js/src/bitmart.js +525 -525
  200. package/js/src/bitmex.d.ts +317 -0
  201. package/js/src/bitmex.js +317 -317
  202. package/js/src/bitopro.d.ts +221 -0
  203. package/js/src/bitopro.js +221 -221
  204. package/js/src/bitrue.d.ts +315 -0
  205. package/js/src/bitrue.js +315 -315
  206. package/js/src/bitso.d.ts +220 -0
  207. package/js/src/bitso.js +220 -220
  208. package/js/src/bitstamp.d.ts +251 -0
  209. package/js/src/bitstamp.js +251 -251
  210. package/js/src/bitteam.d.ts +183 -0
  211. package/js/src/bitteam.js +183 -183
  212. package/js/src/bitvavo.d.ts +247 -0
  213. package/js/src/bitvavo.js +247 -251
  214. package/js/src/bl3p.d.ts +82 -0
  215. package/js/src/bl3p.js +82 -82
  216. package/js/src/blockchaincom.d.ts +211 -0
  217. package/js/src/blockchaincom.js +211 -211
  218. package/js/src/blofin.d.ts +332 -0
  219. package/js/src/blofin.js +332 -331
  220. package/js/src/btcalpha.d.ts +166 -0
  221. package/js/src/btcalpha.js +166 -166
  222. package/js/src/btcbox.d.ts +108 -0
  223. package/js/src/btcbox.js +108 -108
  224. package/js/src/btcmarkets.d.ts +198 -0
  225. package/js/src/btcmarkets.js +198 -198
  226. package/js/src/btcturk.d.ts +124 -0
  227. package/js/src/btcturk.js +124 -124
  228. package/js/src/bybit.d.ts +906 -1
  229. package/js/src/bybit.js +906 -900
  230. package/js/src/cex.d.ts +227 -0
  231. package/js/src/cex.js +227 -226
  232. package/js/src/coinbase.d.ts +481 -0
  233. package/js/src/coinbase.js +481 -481
  234. package/js/src/coinbaseexchange.d.ts +274 -0
  235. package/js/src/coinbaseexchange.js +274 -274
  236. package/js/src/coinbaseinternational.d.ts +304 -0
  237. package/js/src/coinbaseinternational.js +304 -304
  238. package/js/src/coincatch.d.ts +646 -0
  239. package/js/src/coincatch.js +650 -650
  240. package/js/src/coincheck.d.ts +113 -0
  241. package/js/src/coincheck.js +113 -113
  242. package/js/src/coinex.d.ts +603 -0
  243. package/js/src/coinex.js +611 -601
  244. package/js/src/coinlist.d.ts +304 -0
  245. package/js/src/coinlist.js +304 -303
  246. package/js/src/coinmate.d.ts +162 -0
  247. package/js/src/coinmate.js +162 -161
  248. package/js/src/coinmetro.d.ts +187 -0
  249. package/js/src/coinmetro.js +187 -187
  250. package/js/src/coinone.d.ts +124 -0
  251. package/js/src/coinone.js +124 -123
  252. package/js/src/coinsph.d.ts +237 -0
  253. package/js/src/coinsph.js +237 -237
  254. package/js/src/coinspot.d.ts +82 -0
  255. package/js/src/coinspot.js +82 -82
  256. package/js/src/cryptocom.d.ts +342 -0
  257. package/js/src/cryptocom.js +342 -341
  258. package/js/src/currencycom.d.ts +225 -0
  259. package/js/src/currencycom.js +225 -224
  260. package/js/src/delta.d.ts +320 -0
  261. package/js/src/delta.js +320 -320
  262. package/js/src/deribit.d.ts +411 -0
  263. package/js/src/deribit.js +411 -408
  264. package/js/src/digifinex.d.ts +430 -0
  265. package/js/src/digifinex.js +432 -431
  266. package/js/src/exmo.d.ts +328 -0
  267. package/js/src/exmo.js +328 -327
  268. package/js/src/gate.d.ts +803 -1
  269. package/js/src/gate.js +830 -791
  270. package/js/src/gemini.d.ts +199 -0
  271. package/js/src/gemini.js +199 -198
  272. package/js/src/hashkey.d.ts +516 -0
  273. package/js/src/hashkey.js +520 -517
  274. package/js/src/hitbtc.d.ts +465 -0
  275. package/js/src/hitbtc.js +465 -462
  276. package/js/src/hollaex.d.ts +253 -0
  277. package/js/src/hollaex.js +253 -252
  278. package/js/src/htx.d.ts +765 -2
  279. package/js/src/htx.js +791 -848
  280. package/js/src/huobijp.d.ts +219 -0
  281. package/js/src/huobijp.js +219 -218
  282. package/js/src/hyperliquid.d.ts +419 -0
  283. package/js/src/hyperliquid.js +421 -417
  284. package/js/src/idex.d.ts +238 -0
  285. package/js/src/idex.js +238 -237
  286. package/js/src/independentreserve.d.ts +133 -0
  287. package/js/src/independentreserve.js +133 -132
  288. package/js/src/indodax.d.ts +171 -0
  289. package/js/src/indodax.js +177 -171
  290. package/js/src/kraken.d.ts +381 -0
  291. package/js/src/kraken.js +381 -377
  292. package/js/src/krakenfutures.d.ts +282 -0
  293. package/js/src/krakenfutures.js +285 -279
  294. package/js/src/kucoin.d.ts +613 -0
  295. package/js/src/kucoin.js +632 -622
  296. package/js/src/kucoinfutures.d.ts +441 -0
  297. package/js/src/kucoinfutures.js +533 -457
  298. package/js/src/kuna.d.ts +283 -0
  299. package/js/src/kuna.js +283 -282
  300. package/js/src/latoken.d.ts +211 -0
  301. package/js/src/latoken.js +211 -210
  302. package/js/src/lbank.d.ts +268 -0
  303. package/js/src/lbank.js +268 -267
  304. package/js/src/luno.d.ts +174 -0
  305. package/js/src/luno.js +174 -173
  306. package/js/src/lykke.d.ts +172 -0
  307. package/js/src/lykke.js +172 -171
  308. package/js/src/mercado.d.ts +123 -0
  309. package/js/src/mercado.js +123 -122
  310. package/js/src/mexc.d.ts +647 -0
  311. package/js/src/mexc.js +650 -646
  312. package/js/src/ndax.d.ts +229 -0
  313. package/js/src/ndax.js +229 -228
  314. package/js/src/novadax.d.ts +230 -0
  315. package/js/src/novadax.js +230 -229
  316. package/js/src/oceanex.d.ts +187 -0
  317. package/js/src/oceanex.js +187 -186
  318. package/js/src/okcoin.d.ts +286 -0
  319. package/js/src/okcoin.js +286 -285
  320. package/js/src/okx.d.ts +907 -0
  321. package/js/src/okx.js +909 -904
  322. package/js/src/onetrading.d.ts +218 -0
  323. package/js/src/onetrading.js +218 -218
  324. package/js/src/oxfun.d.ts +336 -3
  325. package/js/src/oxfun.js +335 -334
  326. package/js/src/p2b.d.ts +154 -0
  327. package/js/src/p2b.js +154 -154
  328. package/js/src/paradex.d.ts +241 -0
  329. package/js/src/paradex.js +249 -244
  330. package/js/src/paymium.d.ts +101 -0
  331. package/js/src/paymium.js +101 -101
  332. package/js/src/phemex.d.ts +366 -0
  333. package/js/src/phemex.js +388 -390
  334. package/js/src/poloniex.d.ts +270 -0
  335. package/js/src/poloniex.js +270 -270
  336. package/js/src/poloniexfutures.d.ts +250 -0
  337. package/js/src/poloniexfutures.js +250 -250
  338. package/js/src/pro/alpaca.d.ts +64 -0
  339. package/js/src/pro/alpaca.js +64 -64
  340. package/js/src/pro/ascendex.d.ts +64 -0
  341. package/js/src/pro/ascendex.js +64 -64
  342. package/js/src/pro/binance.d.ts +546 -0
  343. package/js/src/pro/binance.js +546 -543
  344. package/js/src/pro/bingx.d.ts +116 -0
  345. package/js/src/pro/bingx.js +116 -116
  346. package/js/src/pro/bitfinex.d.ts +42 -0
  347. package/js/src/pro/bitfinex.js +42 -42
  348. package/js/src/pro/bitfinex2.d.ts +66 -0
  349. package/js/src/pro/bitfinex2.js +66 -66
  350. package/js/src/pro/bitget.d.ts +187 -0
  351. package/js/src/pro/bitget.js +188 -181
  352. package/js/src/pro/bithumb.d.ts +40 -0
  353. package/js/src/pro/bithumb.js +40 -40
  354. package/js/src/pro/bitmart.d.ts +121 -0
  355. package/js/src/pro/bitmart.js +121 -119
  356. package/js/src/pro/bitmex.d.ts +135 -0
  357. package/js/src/pro/bitmex.js +135 -133
  358. package/js/src/pro/bitopro.d.ts +49 -0
  359. package/js/src/pro/bitopro.js +49 -49
  360. package/js/src/pro/bitrue.d.ts +19 -0
  361. package/js/src/pro/bitrue.js +19 -19
  362. package/js/src/pro/bitstamp.d.ts +29 -0
  363. package/js/src/pro/bitstamp.js +29 -29
  364. package/js/src/pro/bitvavo.d.ts +254 -1
  365. package/js/src/pro/bitvavo.js +299 -301
  366. package/js/src/pro/blockchaincom.d.ts +62 -0
  367. package/js/src/pro/blockchaincom.js +62 -62
  368. package/js/src/pro/blofin.d.ts +132 -0
  369. package/js/src/pro/blofin.js +132 -130
  370. package/js/src/pro/bybit.d.ts +317 -0
  371. package/js/src/pro/bybit.js +317 -313
  372. package/js/src/pro/cex.d.ts +168 -0
  373. package/js/src/pro/cex.js +168 -168
  374. package/js/src/pro/coinbase.d.ts +93 -0
  375. package/js/src/pro/coinbase.js +93 -91
  376. package/js/src/pro/coinbaseexchange.d.ts +95 -0
  377. package/js/src/pro/coinbaseexchange.js +95 -95
  378. package/js/src/pro/coinbaseinternational.d.ts +111 -0
  379. package/js/src/pro/coinbaseinternational.js +111 -111
  380. package/js/src/pro/coincatch.d.ts +150 -0
  381. package/js/src/pro/coincatch.js +150 -143
  382. package/js/src/pro/coincheck.d.ts +21 -0
  383. package/js/src/pro/coincheck.js +21 -21
  384. package/js/src/pro/coinex.d.ts +110 -0
  385. package/js/src/pro/coinex.js +110 -110
  386. package/js/src/pro/coinone.d.ts +30 -0
  387. package/js/src/pro/coinone.js +30 -30
  388. package/js/src/pro/cryptocom.d.ts +227 -0
  389. package/js/src/pro/cryptocom.js +227 -227
  390. package/js/src/pro/currencycom.d.ts +45 -0
  391. package/js/src/pro/currencycom.js +45 -45
  392. package/js/src/pro/deribit.d.ts +127 -0
  393. package/js/src/pro/deribit.js +127 -127
  394. package/js/src/pro/exmo.d.ts +66 -0
  395. package/js/src/pro/exmo.js +66 -66
  396. package/js/src/pro/gate.d.ts +287 -0
  397. package/js/src/pro/gate.js +287 -283
  398. package/js/src/pro/gemini.d.ts +74 -0
  399. package/js/src/pro/gemini.js +74 -74
  400. package/js/src/pro/hashkey.d.ts +87 -0
  401. package/js/src/pro/hashkey.js +87 -85
  402. package/js/src/pro/hitbtc.d.ts +190 -0
  403. package/js/src/pro/hitbtc.js +190 -190
  404. package/js/src/pro/hollaex.d.ts +51 -0
  405. package/js/src/pro/hollaex.js +51 -51
  406. package/js/src/pro/htx.d.ts +96 -0
  407. package/js/src/pro/htx.js +96 -94
  408. package/js/src/pro/huobijp.d.ts +38 -0
  409. package/js/src/pro/huobijp.js +38 -38
  410. package/js/src/pro/hyperliquid.d.ts +151 -0
  411. package/js/src/pro/hyperliquid.js +151 -150
  412. package/js/src/pro/idex.d.ts +48 -0
  413. package/js/src/pro/idex.js +48 -48
  414. package/js/src/pro/independentreserve.d.ts +19 -0
  415. package/js/src/pro/independentreserve.js +19 -19
  416. package/js/src/pro/kraken.d.ts +167 -0
  417. package/js/src/pro/kraken.js +167 -167
  418. package/js/src/pro/krakenfutures.d.ts +137 -0
  419. package/js/src/pro/krakenfutures.js +137 -138
  420. package/js/src/pro/kucoin.d.ts +167 -0
  421. package/js/src/pro/kucoin.js +167 -168
  422. package/js/src/pro/kucoinfutures.d.ts +147 -0
  423. package/js/src/pro/kucoinfutures.js +147 -147
  424. package/js/src/pro/lbank.d.ts +95 -0
  425. package/js/src/pro/lbank.js +95 -95
  426. package/js/src/pro/luno.d.ts +21 -0
  427. package/js/src/pro/luno.js +21 -21
  428. package/js/src/pro/mexc.d.ts +101 -0
  429. package/js/src/pro/mexc.js +102 -103
  430. package/js/src/pro/ndax.d.ts +42 -0
  431. package/js/src/pro/ndax.js +42 -42
  432. package/js/src/pro/okcoin.d.ts +61 -0
  433. package/js/src/pro/okcoin.js +61 -61
  434. package/js/src/pro/okx.d.ts +332 -0
  435. package/js/src/pro/okx.js +332 -330
  436. package/js/src/pro/onetrading.d.ts +71 -0
  437. package/js/src/pro/onetrading.js +71 -71
  438. package/js/src/pro/oxfun.d.ts +193 -0
  439. package/js/src/pro/oxfun.js +193 -191
  440. package/js/src/pro/p2b.d.ts +77 -0
  441. package/js/src/pro/p2b.js +77 -77
  442. package/js/src/pro/paradex.d.ts +39 -0
  443. package/js/src/pro/paradex.js +39 -39
  444. package/js/src/pro/phemex.d.ts +94 -0
  445. package/js/src/pro/phemex.js +94 -94
  446. package/js/src/pro/poloniex.d.ts +171 -0
  447. package/js/src/pro/poloniex.js +171 -171
  448. package/js/src/pro/poloniexfutures.d.ts +62 -0
  449. package/js/src/pro/poloniexfutures.js +62 -62
  450. package/js/src/pro/probit.d.ts +63 -0
  451. package/js/src/pro/probit.js +63 -63
  452. package/js/src/pro/upbit.d.ts +80 -0
  453. package/js/src/pro/upbit.js +80 -80
  454. package/js/src/pro/vertex.d.ts +65 -0
  455. package/js/src/pro/vertex.js +65 -63
  456. package/js/src/pro/wazirx.d.ts +70 -0
  457. package/js/src/pro/wazirx.js +70 -70
  458. package/js/src/pro/whitebit.d.ts +83 -0
  459. package/js/src/pro/whitebit.js +83 -83
  460. package/js/src/pro/woo.d.ts +106 -0
  461. package/js/src/pro/woo.js +106 -104
  462. package/js/src/pro/woofipro.d.ts +105 -0
  463. package/js/src/pro/woofipro.js +105 -103
  464. package/js/src/pro/xt.d.ts +119 -0
  465. package/js/src/pro/xt.js +119 -119
  466. package/js/src/probit.d.ts +229 -0
  467. package/js/src/probit.js +229 -229
  468. package/js/src/timex.d.ts +198 -0
  469. package/js/src/timex.js +198 -197
  470. package/js/src/tokocrypto.d.ts +214 -0
  471. package/js/src/tokocrypto.js +214 -213
  472. package/js/src/tradeogre.d.ts +92 -0
  473. package/js/src/tradeogre.js +92 -91
  474. package/js/src/upbit.d.ts +243 -0
  475. package/js/src/upbit.js +243 -242
  476. package/js/src/vertex.d.ts +258 -0
  477. package/js/src/vertex.js +258 -258
  478. package/js/src/wavesexchange.d.ts +176 -0
  479. package/js/src/wavesexchange.js +176 -172
  480. package/js/src/wazirx.d.ts +168 -0
  481. package/js/src/wazirx.js +168 -168
  482. package/js/src/whitebit.d.ts +361 -0
  483. package/js/src/whitebit.js +361 -361
  484. package/js/src/woo.d.ts +571 -0
  485. package/js/src/woo.js +571 -572
  486. package/js/src/woofipro.d.ts +392 -0
  487. package/js/src/woofipro.js +392 -391
  488. package/js/src/xt.d.ts +439 -4
  489. package/js/src/xt.js +436 -435
  490. package/js/src/yobit.d.ts +159 -0
  491. package/js/src/yobit.js +159 -158
  492. package/js/src/zaif.d.ts +103 -0
  493. package/js/src/zaif.js +103 -103
  494. package/js/src/zonda.d.ts +168 -0
  495. package/js/src/zonda.js +168 -168
  496. package/package.json +1 -1
package/js/src/bitget.js CHANGED
@@ -1521,15 +1521,15 @@ export default class bitget extends Exchange {
1521
1521
  params = this.omit(params, 'productType');
1522
1522
  return [productType, params];
1523
1523
  }
1524
+ /**
1525
+ * @method
1526
+ * @name bitget#fetchTime
1527
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
1528
+ * @see https://www.bitget.com/api-doc/common/public/Get-Server-Time
1529
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1530
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
1531
+ */
1524
1532
  async fetchTime(params = {}) {
1525
- /**
1526
- * @method
1527
- * @name bitget#fetchTime
1528
- * @description fetches the current integer timestamp in milliseconds from the exchange server
1529
- * @see https://www.bitget.com/api-doc/common/public/Get-Server-Time
1530
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1531
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
1532
- */
1533
1533
  const response = await this.publicCommonGetV2PublicTime(params);
1534
1534
  //
1535
1535
  // {
@@ -1544,17 +1544,17 @@ export default class bitget extends Exchange {
1544
1544
  const data = this.safeValue(response, 'data', {});
1545
1545
  return this.safeInteger(data, 'serverTime');
1546
1546
  }
1547
+ /**
1548
+ * @method
1549
+ * @name bitget#fetchMarkets
1550
+ * @description retrieves data on all markets for bitget
1551
+ * @see https://www.bitget.com/api-doc/spot/market/Get-Symbols
1552
+ * @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
1553
+ * @see https://www.bitget.com/api-doc/margin/common/support-currencies
1554
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1555
+ * @returns {object[]} an array of objects representing market data
1556
+ */
1547
1557
  async fetchMarkets(params = {}) {
1548
- /**
1549
- * @method
1550
- * @name bitget#fetchMarkets
1551
- * @description retrieves data on all markets for bitget
1552
- * @see https://www.bitget.com/api-doc/spot/market/Get-Symbols
1553
- * @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
1554
- * @see https://www.bitget.com/api-doc/margin/common/support-currencies
1555
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1556
- * @returns {object[]} an array of objects representing market data
1557
- */
1558
1558
  if (this.options['adjustForTimeDifference']) {
1559
1559
  await this.loadTimeDifference();
1560
1560
  }
@@ -1823,15 +1823,15 @@ export default class bitget extends Exchange {
1823
1823
  'info': market,
1824
1824
  };
1825
1825
  }
1826
+ /**
1827
+ * @method
1828
+ * @name bitget#fetchCurrencies
1829
+ * @description fetches all available currencies on an exchange
1830
+ * @see https://www.bitget.com/api-doc/spot/market/Get-Coin-List
1831
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1832
+ * @returns {object} an associative dictionary of currencies
1833
+ */
1826
1834
  async fetchCurrencies(params = {}) {
1827
- /**
1828
- * @method
1829
- * @name bitget#fetchCurrencies
1830
- * @description fetches all available currencies on an exchange
1831
- * @see https://www.bitget.com/api-doc/spot/market/Get-Coin-List
1832
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1833
- * @returns {object} an associative dictionary of currencies
1834
- */
1835
1835
  const response = await this.publicSpotGetV2SpotPublicCoins(params);
1836
1836
  //
1837
1837
  // {
@@ -1952,21 +1952,21 @@ export default class bitget extends Exchange {
1952
1952
  }
1953
1953
  return result;
1954
1954
  }
1955
+ /**
1956
+ * @method
1957
+ * @name bitget#fetchMarketLeverageTiers
1958
+ * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
1959
+ * @see https://www.bitget.com/api-doc/contract/position/Get-Query-Position-Lever
1960
+ * @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Tier-Data
1961
+ * @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Tier-Data
1962
+ * @param {string} symbol unified market symbol
1963
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1964
+ * @param {string} [params.marginMode] for spot margin 'cross' or 'isolated', default is 'isolated'
1965
+ * @param {string} [params.code] required for cross spot margin
1966
+ * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
1967
+ * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
1968
+ */
1955
1969
  async fetchMarketLeverageTiers(symbol, params = {}) {
1956
- /**
1957
- * @method
1958
- * @name bitget#fetchMarketLeverageTiers
1959
- * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
1960
- * @see https://www.bitget.com/api-doc/contract/position/Get-Query-Position-Lever
1961
- * @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Tier-Data
1962
- * @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Tier-Data
1963
- * @param {string} symbol unified market symbol
1964
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1965
- * @param {string} [params.marginMode] for spot margin 'cross' or 'isolated', default is 'isolated'
1966
- * @param {string} [params.code] required for cross spot margin
1967
- * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
1968
- * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
1969
- */
1970
1970
  await this.loadMarkets();
1971
1971
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
1972
1972
  let market = undefined;
@@ -2113,8 +2113,10 @@ export default class bitget extends Exchange {
2113
2113
  const maxNotional = this.safeNumberN(item, ['endUnit', 'maxBorrowableAmount', 'baseMaxBorrowableAmount']);
2114
2114
  const marginCurrency = this.safeString2(item, 'coin', 'baseCoin');
2115
2115
  const currencyId = (marginCurrency !== undefined) ? marginCurrency : market['base'];
2116
+ const marketId = this.safeString(item, 'symbol');
2116
2117
  tiers.push({
2117
2118
  'tier': this.safeInteger2(item, 'level', 'tier'),
2119
+ 'symbol': this.safeSymbol(marketId, market),
2118
2120
  'currency': this.safeCurrencyCode(currencyId),
2119
2121
  'minNotional': minNotional,
2120
2122
  'maxNotional': maxNotional,
@@ -2126,21 +2128,21 @@ export default class bitget extends Exchange {
2126
2128
  }
2127
2129
  return tiers;
2128
2130
  }
2131
+ /**
2132
+ * @method
2133
+ * @name bitget#fetchDeposits
2134
+ * @description fetch all deposits made to an account
2135
+ * @see https://www.bitget.com/api-doc/spot/account/Get-Deposit-Record
2136
+ * @param {string} code unified currency code
2137
+ * @param {int} [since] the earliest time in ms to fetch deposits for
2138
+ * @param {int} [limit] the maximum number of deposits structures to retrieve
2139
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2140
+ * @param {int} [params.until] end time in milliseconds
2141
+ * @param {string} [params.idLessThan] return records with id less than the provided value
2142
+ * @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)
2143
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2144
+ */
2129
2145
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
2130
- /**
2131
- * @method
2132
- * @name bitget#fetchDeposits
2133
- * @description fetch all deposits made to an account
2134
- * @see https://www.bitget.com/api-doc/spot/account/Get-Deposit-Record
2135
- * @param {string} code unified currency code
2136
- * @param {int} [since] the earliest time in ms to fetch deposits for
2137
- * @param {int} [limit] the maximum number of deposits structures to retrieve
2138
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2139
- * @param {int} [params.until] end time in milliseconds
2140
- * @param {string} [params.idLessThan] return records with id less than the provided value
2141
- * @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)
2142
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2143
- */
2144
2146
  await this.loadMarkets();
2145
2147
  let paginate = false;
2146
2148
  [paginate, params] = this.handleOptionAndParams(params, 'fetchDeposits', 'paginate');
@@ -2190,20 +2192,20 @@ export default class bitget extends Exchange {
2190
2192
  const rawTransactions = this.safeList(response, 'data', []);
2191
2193
  return this.parseTransactions(rawTransactions, currency, since, limit);
2192
2194
  }
2195
+ /**
2196
+ * @method
2197
+ * @name bitget#withdraw
2198
+ * @description make a withdrawal
2199
+ * @see https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
2200
+ * @param {string} code unified currency code
2201
+ * @param {float} amount the amount to withdraw
2202
+ * @param {string} address the address to withdraw to
2203
+ * @param {string} tag
2204
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2205
+ * @param {string} [params.chain] the blockchain network the withdrawal is taking place on
2206
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2207
+ */
2193
2208
  async withdraw(code, amount, address, tag = undefined, params = {}) {
2194
- /**
2195
- * @method
2196
- * @name bitget#withdraw
2197
- * @description make a withdrawal
2198
- * @see https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
2199
- * @param {string} code unified currency code
2200
- * @param {float} amount the amount to withdraw
2201
- * @param {string} address the address to withdraw to
2202
- * @param {string} tag
2203
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2204
- * @param {string} [params.chain] the blockchain network the withdrawal is taking place on
2205
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2206
- */
2207
2209
  this.checkAddress(address);
2208
2210
  const chain = this.safeString2(params, 'chain', 'network');
2209
2211
  params = this.omit(params, 'network');
@@ -2271,21 +2273,21 @@ export default class bitget extends Exchange {
2271
2273
  }
2272
2274
  return result;
2273
2275
  }
2276
+ /**
2277
+ * @method
2278
+ * @name bitget#fetchWithdrawals
2279
+ * @description fetch all withdrawals made from an account
2280
+ * @see https://www.bitget.com/api-doc/spot/account/Get-Withdraw-Record
2281
+ * @param {string} code unified currency code
2282
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
2283
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
2284
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2285
+ * @param {int} [params.until] end time in milliseconds
2286
+ * @param {string} [params.idLessThan] return records with id less than the provided value
2287
+ * @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)
2288
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2289
+ */
2274
2290
  async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
2275
- /**
2276
- * @method
2277
- * @name bitget#fetchWithdrawals
2278
- * @description fetch all withdrawals made from an account
2279
- * @see https://www.bitget.com/api-doc/spot/account/Get-Withdraw-Record
2280
- * @param {string} code unified currency code
2281
- * @param {int} [since] the earliest time in ms to fetch withdrawals for
2282
- * @param {int} [limit] the maximum number of withdrawals structures to retrieve
2283
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2284
- * @param {int} [params.until] end time in milliseconds
2285
- * @param {string} [params.idLessThan] return records with id less than the provided value
2286
- * @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)
2287
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2288
- */
2289
2291
  await this.loadMarkets();
2290
2292
  let paginate = false;
2291
2293
  [paginate, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'paginate');
@@ -2424,16 +2426,16 @@ export default class bitget extends Exchange {
2424
2426
  };
2425
2427
  return this.safeString(statuses, status, status);
2426
2428
  }
2429
+ /**
2430
+ * @method
2431
+ * @name bitget#fetchDepositAddress
2432
+ * @description fetch the deposit address for a currency associated with this account
2433
+ * @see https://www.bitget.com/api-doc/spot/account/Get-Deposit-Address
2434
+ * @param {string} code unified currency code
2435
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2436
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
2437
+ */
2427
2438
  async fetchDepositAddress(code, params = {}) {
2428
- /**
2429
- * @method
2430
- * @name bitget#fetchDepositAddress
2431
- * @description fetch the deposit address for a currency associated with this account
2432
- * @see https://www.bitget.com/api-doc/spot/account/Get-Deposit-Address
2433
- * @param {string} code unified currency code
2434
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2435
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
2436
- */
2437
2439
  await this.loadMarkets();
2438
2440
  const networkCode = this.safeString2(params, 'chain', 'network');
2439
2441
  params = this.omit(params, 'network');
@@ -2491,18 +2493,18 @@ export default class bitget extends Exchange {
2491
2493
  'tag': this.safeString(depositAddress, 'tag'),
2492
2494
  };
2493
2495
  }
2496
+ /**
2497
+ * @method
2498
+ * @name bitget#fetchOrderBook
2499
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
2500
+ * @see https://www.bitget.com/api-doc/spot/market/Get-Orderbook
2501
+ * @see https://www.bitget.com/api-doc/contract/market/Get-Merge-Depth
2502
+ * @param {string} symbol unified symbol of the market to fetch the order book for
2503
+ * @param {int} [limit] the maximum amount of order book entries to return
2504
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2505
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
2506
+ */
2494
2507
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
2495
- /**
2496
- * @method
2497
- * @name bitget#fetchOrderBook
2498
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
2499
- * @see https://www.bitget.com/api-doc/spot/market/Get-Orderbook
2500
- * @see https://www.bitget.com/api-doc/contract/market/Get-Merge-Depth
2501
- * @param {string} symbol unified symbol of the market to fetch the order book for
2502
- * @param {int} [limit] the maximum amount of order book entries to return
2503
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2504
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
2505
- */
2506
2508
  await this.loadMarkets();
2507
2509
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
2508
2510
  let market = undefined;
@@ -2665,17 +2667,17 @@ export default class bitget extends Exchange {
2665
2667
  'info': ticker,
2666
2668
  }, market);
2667
2669
  }
2670
+ /**
2671
+ * @method
2672
+ * @name bitget#fetchTicker
2673
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
2674
+ * @see https://www.bitget.com/api-doc/spot/market/Get-Tickers
2675
+ * @see https://www.bitget.com/api-doc/contract/market/Get-Ticker
2676
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
2677
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2678
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2679
+ */
2668
2680
  async fetchTicker(symbol, params = {}) {
2669
- /**
2670
- * @method
2671
- * @name bitget#fetchTicker
2672
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
2673
- * @see https://www.bitget.com/api-doc/spot/market/Get-Tickers
2674
- * @see https://www.bitget.com/api-doc/contract/market/Get-Ticker
2675
- * @param {string} symbol unified symbol of the market to fetch the ticker for
2676
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2677
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2678
- */
2679
2681
  await this.loadMarkets();
2680
2682
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
2681
2683
  let market = undefined;
@@ -2765,16 +2767,16 @@ export default class bitget extends Exchange {
2765
2767
  const data = this.safeList(response, 'data', []);
2766
2768
  return this.parseTicker(data[0], market);
2767
2769
  }
2770
+ /**
2771
+ * @method
2772
+ * @name bitget#fetchMarkPrice
2773
+ * @description fetches the mark price for a specific market
2774
+ * @see https://www.bitget.com/api-doc/contract/market/Get-Symbol-Price
2775
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
2776
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2777
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2778
+ */
2768
2779
  async fetchMarkPrice(symbol, params = {}) {
2769
- /**
2770
- * @method
2771
- * @name bitget#fetchMarkPrice
2772
- * @description fetches the mark price for a specific market
2773
- * @see https://www.bitget.com/api-doc/contract/market/Get-Symbol-Price
2774
- * @param {string} symbol unified symbol of the market to fetch the ticker for
2775
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2776
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2777
- */
2778
2780
  await this.loadMarkets();
2779
2781
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
2780
2782
  let market = undefined;
@@ -2801,19 +2803,19 @@ export default class bitget extends Exchange {
2801
2803
  const data = this.safeList(response, 'data', []);
2802
2804
  return this.parseTicker(data[0], market);
2803
2805
  }
2806
+ /**
2807
+ * @method
2808
+ * @name bitget#fetchTickers
2809
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
2810
+ * @see https://www.bitget.com/api-doc/spot/market/Get-Tickers
2811
+ * @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
2812
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2813
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2814
+ * @param {string} [params.subType] *contract only* 'linear', 'inverse'
2815
+ * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
2816
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2817
+ */
2804
2818
  async fetchTickers(symbols = undefined, params = {}) {
2805
- /**
2806
- * @method
2807
- * @name bitget#fetchTickers
2808
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
2809
- * @see https://www.bitget.com/api-doc/spot/market/Get-Tickers
2810
- * @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
2811
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2812
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2813
- * @param {string} [params.subType] *contract only* 'linear', 'inverse'
2814
- * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
2815
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2816
- */
2817
2819
  await this.loadMarkets();
2818
2820
  let market = undefined;
2819
2821
  if (symbols !== undefined) {
@@ -3025,23 +3027,23 @@ export default class bitget extends Exchange {
3025
3027
  'fee': fee,
3026
3028
  }, market);
3027
3029
  }
3030
+ /**
3031
+ * @method
3032
+ * @name bitget#fetchTrades
3033
+ * @description get the list of most recent trades for a particular symbol
3034
+ * @see https://www.bitget.com/api-doc/spot/market/Get-Recent-Trades
3035
+ * @see https://www.bitget.com/api-doc/spot/market/Get-Market-Trades
3036
+ * @see https://www.bitget.com/api-doc/contract/market/Get-Recent-Fills
3037
+ * @see https://www.bitget.com/api-doc/contract/market/Get-Fills-History
3038
+ * @param {string} symbol unified symbol of the market to fetch trades for
3039
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
3040
+ * @param {int} [limit] the maximum amount of trades to fetch
3041
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3042
+ * @param {int} [params.until] *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* the latest time in ms to fetch trades for
3043
+ * @param {boolean} [params.paginate] *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* default false, when true will automatically paginate by calling this endpoint multiple times
3044
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
3045
+ */
3028
3046
  async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
3029
- /**
3030
- * @method
3031
- * @name bitget#fetchTrades
3032
- * @description get the list of most recent trades for a particular symbol
3033
- * @see https://www.bitget.com/api-doc/spot/market/Get-Recent-Trades
3034
- * @see https://www.bitget.com/api-doc/spot/market/Get-Market-Trades
3035
- * @see https://www.bitget.com/api-doc/contract/market/Get-Recent-Fills
3036
- * @see https://www.bitget.com/api-doc/contract/market/Get-Fills-History
3037
- * @param {string} symbol unified symbol of the market to fetch trades for
3038
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
3039
- * @param {int} [limit] the maximum amount of trades to fetch
3040
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3041
- * @param {int} [params.until] *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* the latest time in ms to fetch trades for
3042
- * @param {boolean} [params.paginate] *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* default false, when true will automatically paginate by calling this endpoint multiple times
3043
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
3044
- */
3045
3047
  await this.loadMarkets();
3046
3048
  let paginate = false;
3047
3049
  [paginate, params] = this.handleOptionAndParams(params, 'fetchTrades', 'paginate');
@@ -3145,17 +3147,17 @@ export default class bitget extends Exchange {
3145
3147
  const data = this.safeList(response, 'data', []);
3146
3148
  return this.parseTrades(data, market, since, limit);
3147
3149
  }
3150
+ /**
3151
+ * @method
3152
+ * @name bitget#fetchTradingFee
3153
+ * @description fetch the trading fees for a market
3154
+ * @see https://www.bitget.com/api-doc/common/public/Get-Trade-Rate
3155
+ * @param {string} symbol unified market symbol
3156
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3157
+ * @param {string} [params.marginMode] 'isolated' or 'cross', for finding the fee rate of spot margin trading pairs
3158
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
3159
+ */
3148
3160
  async fetchTradingFee(symbol, params = {}) {
3149
- /**
3150
- * @method
3151
- * @name bitget#fetchTradingFee
3152
- * @description fetch the trading fees for a market
3153
- * @see https://www.bitget.com/api-doc/common/public/Get-Trade-Rate
3154
- * @param {string} symbol unified market symbol
3155
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3156
- * @param {string} [params.marginMode] 'isolated' or 'cross', for finding the fee rate of spot margin trading pairs
3157
- * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
3158
- */
3159
3161
  await this.loadMarkets();
3160
3162
  const market = this.market(symbol);
3161
3163
  const request = {
@@ -3189,19 +3191,19 @@ export default class bitget extends Exchange {
3189
3191
  const data = this.safeValue(response, 'data', {});
3190
3192
  return this.parseTradingFee(data, market);
3191
3193
  }
3194
+ /**
3195
+ * @method
3196
+ * @name bitget#fetchTradingFees
3197
+ * @description fetch the trading fees for multiple markets
3198
+ * @see https://www.bitget.com/api-doc/spot/market/Get-Symbols
3199
+ * @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
3200
+ * @see https://www.bitget.com/api-doc/margin/common/support-currencies
3201
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3202
+ * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
3203
+ * @param {boolean} [params.margin] set to true for spot margin
3204
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
3205
+ */
3192
3206
  async fetchTradingFees(params = {}) {
3193
- /**
3194
- * @method
3195
- * @name bitget#fetchTradingFees
3196
- * @description fetch the trading fees for multiple markets
3197
- * @see https://www.bitget.com/api-doc/spot/market/Get-Symbols
3198
- * @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
3199
- * @see https://www.bitget.com/api-doc/margin/common/support-currencies
3200
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3201
- * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
3202
- * @param {boolean} [params.margin] set to true for spot margin
3203
- * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
3204
- */
3205
3207
  await this.loadMarkets();
3206
3208
  let response = undefined;
3207
3209
  let marginMode = undefined;
@@ -3342,27 +3344,27 @@ export default class bitget extends Exchange {
3342
3344
  this.safeNumber(ohlcv, 5),
3343
3345
  ];
3344
3346
  }
3347
+ /**
3348
+ * @method
3349
+ * @name bitget#fetchOHLCV
3350
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
3351
+ * @see https://www.bitget.com/api-doc/spot/market/Get-Candle-Data
3352
+ * @see https://www.bitget.com/api-doc/spot/market/Get-History-Candle-Data
3353
+ * @see https://www.bitget.com/api-doc/contract/market/Get-Candle-Data
3354
+ * @see https://www.bitget.com/api-doc/contract/market/Get-History-Candle-Data
3355
+ * @see https://www.bitget.com/api-doc/contract/market/Get-History-Index-Candle-Data
3356
+ * @see https://www.bitget.com/api-doc/contract/market/Get-History-Mark-Candle-Data
3357
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
3358
+ * @param {string} timeframe the length of time each candle represents
3359
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
3360
+ * @param {int} [limit] the maximum amount of candles to fetch
3361
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3362
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
3363
+ * @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)
3364
+ * @param {string} [params.price] *swap only* "mark" (to fetch mark price candles) or "index" (to fetch index price candles)
3365
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
3366
+ */
3345
3367
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
3346
- /**
3347
- * @method
3348
- * @name bitget#fetchOHLCV
3349
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
3350
- * @see https://www.bitget.com/api-doc/spot/market/Get-Candle-Data
3351
- * @see https://www.bitget.com/api-doc/spot/market/Get-History-Candle-Data
3352
- * @see https://www.bitget.com/api-doc/contract/market/Get-Candle-Data
3353
- * @see https://www.bitget.com/api-doc/contract/market/Get-History-Candle-Data
3354
- * @see https://www.bitget.com/api-doc/contract/market/Get-History-Index-Candle-Data
3355
- * @see https://www.bitget.com/api-doc/contract/market/Get-History-Mark-Candle-Data
3356
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
3357
- * @param {string} timeframe the length of time each candle represents
3358
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
3359
- * @param {int} [limit] the maximum amount of candles to fetch
3360
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3361
- * @param {int} [params.until] timestamp in ms of the latest candle to fetch
3362
- * @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)
3363
- * @param {string} [params.price] *swap only* "mark" (to fetch mark price candles) or "index" (to fetch index price candles)
3364
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
3365
- */
3366
3368
  await this.loadMarkets();
3367
3369
  const defaultLimit = 100; // default 100, max 1000
3368
3370
  const maxLimitForRecentEndpoint = 1000;
@@ -3488,21 +3490,21 @@ export default class bitget extends Exchange {
3488
3490
  const data = this.safeList(response, 'data', response);
3489
3491
  return this.parseOHLCVs(data, market, timeframe, since, limit);
3490
3492
  }
3493
+ /**
3494
+ * @method
3495
+ * @name bitget#fetchBalance
3496
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
3497
+ * @see https://www.bitget.com/api-doc/spot/account/Get-Account-Assets
3498
+ * @see https://www.bitget.com/api-doc/contract/account/Get-Account-List
3499
+ * @see https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Assets
3500
+ * @see https://www.bitget.com/api-doc/margin/isolated/account/Get-Isolated-Assets
3501
+ * @see https://bitgetlimited.github.io/apidoc/en/margin/#get-cross-assets
3502
+ * @see https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-assets
3503
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3504
+ * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
3505
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
3506
+ */
3491
3507
  async fetchBalance(params = {}) {
3492
- /**
3493
- * @method
3494
- * @name bitget#fetchBalance
3495
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
3496
- * @see https://www.bitget.com/api-doc/spot/account/Get-Account-Assets
3497
- * @see https://www.bitget.com/api-doc/contract/account/Get-Account-List
3498
- * @see https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Assets
3499
- * @see https://www.bitget.com/api-doc/margin/isolated/account/Get-Isolated-Assets
3500
- * @see https://bitgetlimited.github.io/apidoc/en/margin/#get-cross-assets
3501
- * @see https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-assets
3502
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3503
- * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
3504
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
3505
- */
3506
3508
  await this.loadMarkets();
3507
3509
  const request = {};
3508
3510
  let marketType = undefined;
@@ -4119,19 +4121,19 @@ export default class bitget extends Exchange {
4119
4121
  'trades': undefined,
4120
4122
  }, market);
4121
4123
  }
4124
+ /**
4125
+ * @method
4126
+ * @name bitget#createMarketBuyOrderWithCost
4127
+ * @description create a market buy order by providing the symbol and cost
4128
+ * @see https://www.bitget.com/api-doc/spot/trade/Place-Order
4129
+ * @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
4130
+ * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
4131
+ * @param {string} symbol unified symbol of the market to create an order in
4132
+ * @param {float} cost how much you want to trade in units of the quote currency
4133
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4134
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4135
+ */
4122
4136
  async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
4123
- /**
4124
- * @method
4125
- * @name bitget#createMarketBuyOrderWithCost
4126
- * @description create a market buy order by providing the symbol and cost
4127
- * @see https://www.bitget.com/api-doc/spot/trade/Place-Order
4128
- * @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
4129
- * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
4130
- * @param {string} symbol unified symbol of the market to create an order in
4131
- * @param {float} cost how much you want to trade in units of the quote currency
4132
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4133
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4134
- */
4135
4137
  await this.loadMarkets();
4136
4138
  const market = this.market(symbol);
4137
4139
  if (!market['spot']) {
@@ -4140,48 +4142,48 @@ export default class bitget extends Exchange {
4140
4142
  params['createMarketBuyOrderRequiresPrice'] = false;
4141
4143
  return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
4142
4144
  }
4145
+ /**
4146
+ * @method
4147
+ * @name bitget#createOrder
4148
+ * @description create a trade order
4149
+ * @see https://www.bitget.com/api-doc/spot/trade/Place-Order
4150
+ * @see https://www.bitget.com/api-doc/spot/plan/Place-Plan-Order
4151
+ * @see https://www.bitget.com/api-doc/contract/trade/Place-Order
4152
+ * @see https://www.bitget.com/api-doc/contract/plan/Place-Tpsl-Order
4153
+ * @see https://www.bitget.com/api-doc/contract/plan/Place-Plan-Order
4154
+ * @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
4155
+ * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
4156
+ * @param {string} symbol unified symbol of the market to create an order in
4157
+ * @param {string} type 'market' or 'limit'
4158
+ * @param {string} side 'buy' or 'sell'
4159
+ * @param {float} amount how much you want to trade in units of the base currency
4160
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4161
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4162
+ * @param {float} [params.cost] *spot only* how much you want to trade in units of the quote currency, for market buy orders only
4163
+ * @param {float} [params.triggerPrice] *swap only* The price at which a trigger order is triggered at
4164
+ * @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
4165
+ * @param {float} [params.takeProfitPrice] *swap only* The price at which a take profit order is triggered at
4166
+ * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
4167
+ * @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
4168
+ * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
4169
+ * @param {float} [params.stopLoss.triggerPrice] *swap only* stop loss trigger price
4170
+ * @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
4171
+ * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
4172
+ * @param {string} [params.loanType] *spot margin only* 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal'
4173
+ * @param {string} [params.holdSide] *contract stopLossPrice, takeProfitPrice only* Two-way position: ('long' or 'short'), one-way position: ('buy' or 'sell')
4174
+ * @param {float} [params.stopLoss.price] *swap only* the execution price for a stop loss attached to a trigger order
4175
+ * @param {float} [params.takeProfit.price] *swap only* the execution price for a take profit attached to a trigger order
4176
+ * @param {string} [params.stopLoss.type] *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
4177
+ * @param {string} [params.takeProfit.type] *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
4178
+ * @param {string} [params.trailingPercent] *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10
4179
+ * @param {string} [params.trailingTriggerPrice] *swap and future only* the price to trigger a trailing stop order, default uses the price argument
4180
+ * @param {string} [params.triggerType] *swap and future only* 'fill_price', 'mark_price' or 'index_price'
4181
+ * @param {boolean} [params.oneWayMode] *swap and future only* required to set this to true in one_way_mode and you can leave this as undefined in hedge_mode, can adjust the mode using the setPositionMode() method
4182
+ * @param {bool} [params.hedged] *swap and future only* true for hedged mode, false for one way mode, default is false
4183
+ * @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
4184
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4185
+ */
4143
4186
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
4144
- /**
4145
- * @method
4146
- * @name bitget#createOrder
4147
- * @description create a trade order
4148
- * @see https://www.bitget.com/api-doc/spot/trade/Place-Order
4149
- * @see https://www.bitget.com/api-doc/spot/plan/Place-Plan-Order
4150
- * @see https://www.bitget.com/api-doc/contract/trade/Place-Order
4151
- * @see https://www.bitget.com/api-doc/contract/plan/Place-Tpsl-Order
4152
- * @see https://www.bitget.com/api-doc/contract/plan/Place-Plan-Order
4153
- * @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
4154
- * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
4155
- * @param {string} symbol unified symbol of the market to create an order in
4156
- * @param {string} type 'market' or 'limit'
4157
- * @param {string} side 'buy' or 'sell'
4158
- * @param {float} amount how much you want to trade in units of the base currency
4159
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4160
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4161
- * @param {float} [params.cost] *spot only* how much you want to trade in units of the quote currency, for market buy orders only
4162
- * @param {float} [params.triggerPrice] *swap only* The price at which a trigger order is triggered at
4163
- * @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
4164
- * @param {float} [params.takeProfitPrice] *swap only* The price at which a take profit order is triggered at
4165
- * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
4166
- * @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
4167
- * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
4168
- * @param {float} [params.stopLoss.triggerPrice] *swap only* stop loss trigger price
4169
- * @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
4170
- * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
4171
- * @param {string} [params.loanType] *spot margin only* 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal'
4172
- * @param {string} [params.holdSide] *contract stopLossPrice, takeProfitPrice only* Two-way position: ('long' or 'short'), one-way position: ('buy' or 'sell')
4173
- * @param {float} [params.stopLoss.price] *swap only* the execution price for a stop loss attached to a trigger order
4174
- * @param {float} [params.takeProfit.price] *swap only* the execution price for a take profit attached to a trigger order
4175
- * @param {string} [params.stopLoss.type] *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
4176
- * @param {string} [params.takeProfit.type] *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
4177
- * @param {string} [params.trailingPercent] *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10
4178
- * @param {string} [params.trailingTriggerPrice] *swap and future only* the price to trigger a trailing stop order, default uses the price argument
4179
- * @param {string} [params.triggerType] *swap and future only* 'fill_price', 'mark_price' or 'index_price'
4180
- * @param {boolean} [params.oneWayMode] *swap and future only* required to set this to true in one_way_mode and you can leave this as undefined in hedge_mode, can adjust the mode using the setPositionMode() method
4181
- * @param {bool} [params.hedged] *swap and future only* true for hedged mode, false for one way mode, default is false
4182
- * @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
4183
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4184
- */
4185
4187
  await this.loadMarkets();
4186
4188
  const market = this.market(symbol);
4187
4189
  const marginParams = this.handleMarginModeAndParams('createOrder', params);
@@ -4466,19 +4468,19 @@ export default class bitget extends Exchange {
4466
4468
  }
4467
4469
  return this.extend(request, params);
4468
4470
  }
4471
+ /**
4472
+ * @method
4473
+ * @name bitget#createOrders
4474
+ * @description create a list of trade orders (all orders should be of the same symbol)
4475
+ * @see https://www.bitget.com/api-doc/spot/trade/Batch-Place-Orders
4476
+ * @see https://www.bitget.com/api-doc/contract/trade/Batch-Order
4477
+ * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Order
4478
+ * @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Order
4479
+ * @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
4480
+ * @param {object} [params] extra parameters specific to the api endpoint
4481
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4482
+ */
4469
4483
  async createOrders(orders, params = {}) {
4470
- /**
4471
- * @method
4472
- * @name bitget#createOrders
4473
- * @description create a list of trade orders (all orders should be of the same symbol)
4474
- * @see https://www.bitget.com/api-doc/spot/trade/Batch-Place-Orders
4475
- * @see https://www.bitget.com/api-doc/contract/trade/Batch-Order
4476
- * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Order
4477
- * @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Order
4478
- * @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
4479
- * @param {object} [params] extra parameters specific to the api endpoint
4480
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4481
- */
4482
4484
  await this.loadMarkets();
4483
4485
  const ordersRequests = [];
4484
4486
  let symbol = undefined;
@@ -4578,38 +4580,38 @@ export default class bitget extends Exchange {
4578
4580
  const both = this.arrayConcat(orderInfo, failure);
4579
4581
  return this.parseOrders(both, market);
4580
4582
  }
4583
+ /**
4584
+ * @method
4585
+ * @name bitget#editOrder
4586
+ * @description edit a trade order
4587
+ * @see https://www.bitget.com/api-doc/spot/plan/Modify-Plan-Order
4588
+ * @see https://www.bitget.com/api-doc/contract/trade/Modify-Order
4589
+ * @see https://www.bitget.com/api-doc/contract/plan/Modify-Tpsl-Order
4590
+ * @see https://www.bitget.com/api-doc/contract/plan/Modify-Plan-Order
4591
+ * @param {string} id cancel order id
4592
+ * @param {string} symbol unified symbol of the market to create an order in
4593
+ * @param {string} type 'market' or 'limit'
4594
+ * @param {string} side 'buy' or 'sell'
4595
+ * @param {float} amount how much you want to trade in units of the base currency
4596
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4597
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4598
+ * @param {float} [params.triggerPrice] the price that a trigger order is triggered at
4599
+ * @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
4600
+ * @param {float} [params.takeProfitPrice] *swap only* The price at which a take profit order is triggered at
4601
+ * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
4602
+ * @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
4603
+ * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
4604
+ * @param {float} [params.stopLoss.triggerPrice] *swap only* stop loss trigger price
4605
+ * @param {float} [params.stopLoss.price] *swap only* the execution price for a stop loss attached to a trigger order
4606
+ * @param {float} [params.takeProfit.price] *swap only* the execution price for a take profit attached to a trigger order
4607
+ * @param {string} [params.stopLoss.type] *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
4608
+ * @param {string} [params.takeProfit.type] *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
4609
+ * @param {string} [params.trailingPercent] *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10
4610
+ * @param {string} [params.trailingTriggerPrice] *swap and future only* the price to trigger a trailing stop order, default uses the price argument
4611
+ * @param {string} [params.newTriggerType] *swap and future only* 'fill_price', 'mark_price' or 'index_price'
4612
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4613
+ */
4581
4614
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
4582
- /**
4583
- * @method
4584
- * @name bitget#editOrder
4585
- * @description edit a trade order
4586
- * @see https://www.bitget.com/api-doc/spot/plan/Modify-Plan-Order
4587
- * @see https://www.bitget.com/api-doc/contract/trade/Modify-Order
4588
- * @see https://www.bitget.com/api-doc/contract/plan/Modify-Tpsl-Order
4589
- * @see https://www.bitget.com/api-doc/contract/plan/Modify-Plan-Order
4590
- * @param {string} id cancel order id
4591
- * @param {string} symbol unified symbol of the market to create an order in
4592
- * @param {string} type 'market' or 'limit'
4593
- * @param {string} side 'buy' or 'sell'
4594
- * @param {float} amount how much you want to trade in units of the base currency
4595
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4596
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4597
- * @param {float} [params.triggerPrice] the price that a trigger order is triggered at
4598
- * @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
4599
- * @param {float} [params.takeProfitPrice] *swap only* The price at which a take profit order is triggered at
4600
- * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
4601
- * @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
4602
- * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
4603
- * @param {float} [params.stopLoss.triggerPrice] *swap only* stop loss trigger price
4604
- * @param {float} [params.stopLoss.price] *swap only* the execution price for a stop loss attached to a trigger order
4605
- * @param {float} [params.takeProfit.price] *swap only* the execution price for a take profit attached to a trigger order
4606
- * @param {string} [params.stopLoss.type] *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
4607
- * @param {string} [params.takeProfit.type] *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
4608
- * @param {string} [params.trailingPercent] *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10
4609
- * @param {string} [params.trailingTriggerPrice] *swap and future only* the price to trigger a trailing stop order, default uses the price argument
4610
- * @param {string} [params.newTriggerType] *swap and future only* 'fill_price', 'mark_price' or 'index_price'
4611
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4612
- */
4613
4615
  await this.loadMarkets();
4614
4616
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
4615
4617
  let market = undefined;
@@ -4756,26 +4758,26 @@ export default class bitget extends Exchange {
4756
4758
  const data = this.safeDict(response, 'data', {});
4757
4759
  return this.parseOrder(data, market);
4758
4760
  }
4761
+ /**
4762
+ * @method
4763
+ * @name bitget#cancelOrder
4764
+ * @description cancels an open order
4765
+ * @see https://www.bitget.com/api-doc/spot/trade/Cancel-Order
4766
+ * @see https://www.bitget.com/api-doc/spot/plan/Cancel-Plan-Order
4767
+ * @see https://www.bitget.com/api-doc/contract/trade/Cancel-Order
4768
+ * @see https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
4769
+ * @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Cancel-Order
4770
+ * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Cancel-Order
4771
+ * @param {string} id order id
4772
+ * @param {string} symbol unified symbol of the market the order was made in
4773
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4774
+ * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
4775
+ * @param {boolean} [params.stop] set to true for canceling trigger orders
4776
+ * @param {string} [params.planType] *swap only* either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
4777
+ * @param {boolean} [params.trailing] set to true if you want to cancel a trailing order
4778
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4779
+ */
4759
4780
  async cancelOrder(id, symbol = undefined, params = {}) {
4760
- /**
4761
- * @method
4762
- * @name bitget#cancelOrder
4763
- * @description cancels an open order
4764
- * @see https://www.bitget.com/api-doc/spot/trade/Cancel-Order
4765
- * @see https://www.bitget.com/api-doc/spot/plan/Cancel-Plan-Order
4766
- * @see https://www.bitget.com/api-doc/contract/trade/Cancel-Order
4767
- * @see https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
4768
- * @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Cancel-Order
4769
- * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Cancel-Order
4770
- * @param {string} id order id
4771
- * @param {string} symbol unified symbol of the market the order was made in
4772
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4773
- * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
4774
- * @param {boolean} [params.stop] set to true for canceling trigger orders
4775
- * @param {string} [params.planType] *swap only* either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
4776
- * @param {boolean} [params.trailing] set to true if you want to cancel a trailing order
4777
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4778
- */
4779
4781
  if (symbol === undefined) {
4780
4782
  throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
4781
4783
  }
@@ -4899,23 +4901,23 @@ export default class bitget extends Exchange {
4899
4901
  }
4900
4902
  return this.parseOrder(order, market);
4901
4903
  }
4904
+ /**
4905
+ * @method
4906
+ * @name bitget#cancelOrders
4907
+ * @description cancel multiple orders
4908
+ * @see https://www.bitget.com/api-doc/spot/trade/Batch-Cancel-Orders
4909
+ * @see https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
4910
+ * @see https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
4911
+ * @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Cancel-Order
4912
+ * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Cancel-Orders
4913
+ * @param {string[]} ids order ids
4914
+ * @param {string} symbol unified market symbol, default is undefined
4915
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4916
+ * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
4917
+ * @param {boolean} [params.stop] *contract only* set to true for canceling trigger orders
4918
+ * @returns {object} an array of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4919
+ */
4902
4920
  async cancelOrders(ids, symbol = undefined, params = {}) {
4903
- /**
4904
- * @method
4905
- * @name bitget#cancelOrders
4906
- * @description cancel multiple orders
4907
- * @see https://www.bitget.com/api-doc/spot/trade/Batch-Cancel-Orders
4908
- * @see https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
4909
- * @see https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
4910
- * @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Cancel-Order
4911
- * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Cancel-Orders
4912
- * @param {string[]} ids order ids
4913
- * @param {string} symbol unified market symbol, default is undefined
4914
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4915
- * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
4916
- * @param {boolean} [params.stop] *contract only* set to true for canceling trigger orders
4917
- * @returns {object} an array of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4918
- */
4919
4921
  if (symbol === undefined) {
4920
4922
  throw new ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
4921
4923
  }
@@ -4995,22 +4997,22 @@ export default class bitget extends Exchange {
4995
4997
  const orders = this.safeList(data, 'successList', []);
4996
4998
  return this.parseOrders(orders, market);
4997
4999
  }
5000
+ /**
5001
+ * @method
5002
+ * @name bitget#cancelAllOrders
5003
+ * @description cancel all open orders
5004
+ * @see https://www.bitget.com/api-doc/spot/trade/Cancel-Symbol-Orders
5005
+ * @see https://www.bitget.com/api-doc/spot/plan/Batch-Cancel-Plan-Order
5006
+ * @see https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
5007
+ * @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-cancel-orders
5008
+ * @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-cancel-order
5009
+ * @param {string} symbol unified market symbol
5010
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5011
+ * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
5012
+ * @param {boolean} [params.stop] *contract only* set to true for canceling trigger orders
5013
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5014
+ */
4998
5015
  async cancelAllOrders(symbol = undefined, params = {}) {
4999
- /**
5000
- * @method
5001
- * @name bitget#cancelAllOrders
5002
- * @description cancel all open orders
5003
- * @see https://www.bitget.com/api-doc/spot/trade/Cancel-Symbol-Orders
5004
- * @see https://www.bitget.com/api-doc/spot/plan/Batch-Cancel-Plan-Order
5005
- * @see https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
5006
- * @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-cancel-orders
5007
- * @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-cancel-order
5008
- * @param {string} symbol unified market symbol
5009
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5010
- * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
5011
- * @param {boolean} [params.stop] *contract only* set to true for canceling trigger orders
5012
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5013
- */
5014
5016
  if (symbol === undefined) {
5015
5017
  throw new ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument');
5016
5018
  }
@@ -5121,18 +5123,18 @@ export default class bitget extends Exchange {
5121
5123
  const responseList = this.arrayConcat(resultList, failureList);
5122
5124
  return this.parseOrders(responseList);
5123
5125
  }
5126
+ /**
5127
+ * @method
5128
+ * @name bitget#fetchOrder
5129
+ * @description fetches information on an order made by the user
5130
+ * @see https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
5131
+ * @see https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
5132
+ * @param {string} id the order id
5133
+ * @param {string} symbol unified symbol of the market the order was made in
5134
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5135
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5136
+ */
5124
5137
  async fetchOrder(id, symbol = undefined, params = {}) {
5125
- /**
5126
- * @method
5127
- * @name bitget#fetchOrder
5128
- * @description fetches information on an order made by the user
5129
- * @see https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
5130
- * @see https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
5131
- * @param {string} id the order id
5132
- * @param {string} symbol unified symbol of the market the order was made in
5133
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5134
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5135
- */
5136
5138
  if (symbol === undefined) {
5137
5139
  throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
5138
5140
  }
@@ -5245,29 +5247,29 @@ export default class bitget extends Exchange {
5245
5247
  // const first = this.safeDict (data, 0, data);
5246
5248
  // return this.parseOrder (first, market);
5247
5249
  }
5250
+ /**
5251
+ * @method
5252
+ * @name bitget#fetchOpenOrders
5253
+ * @description fetch all unfilled currently open orders
5254
+ * @see https://www.bitget.com/api-doc/spot/trade/Get-Unfilled-Orders
5255
+ * @see https://www.bitget.com/api-doc/spot/plan/Get-Current-Plan-Order
5256
+ * @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-Pending
5257
+ * @see https://www.bitget.com/api-doc/contract/plan/get-orders-plan-pending
5258
+ * @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Open-Orders
5259
+ * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Open-Orders
5260
+ * @param {string} symbol unified market symbol
5261
+ * @param {int} [since] the earliest time in ms to fetch open orders for
5262
+ * @param {int} [limit] the maximum number of open order structures to retrieve
5263
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5264
+ * @param {int} [params.until] the latest time in ms to fetch orders for
5265
+ * @param {string} [params.planType] *contract stop only* 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
5266
+ * @param {boolean} [params.stop] set to true for fetching trigger orders
5267
+ * @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)
5268
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
5269
+ * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
5270
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5271
+ */
5248
5272
  async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
5249
- /**
5250
- * @method
5251
- * @name bitget#fetchOpenOrders
5252
- * @description fetch all unfilled currently open orders
5253
- * @see https://www.bitget.com/api-doc/spot/trade/Get-Unfilled-Orders
5254
- * @see https://www.bitget.com/api-doc/spot/plan/Get-Current-Plan-Order
5255
- * @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-Pending
5256
- * @see https://www.bitget.com/api-doc/contract/plan/get-orders-plan-pending
5257
- * @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Open-Orders
5258
- * @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Open-Orders
5259
- * @param {string} symbol unified market symbol
5260
- * @param {int} [since] the earliest time in ms to fetch open orders for
5261
- * @param {int} [limit] the maximum number of open order structures to retrieve
5262
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5263
- * @param {int} [params.until] the latest time in ms to fetch orders for
5264
- * @param {string} [params.planType] *contract stop only* 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
5265
- * @param {boolean} [params.stop] set to true for fetching trigger orders
5266
- * @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)
5267
- * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
5268
- * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
5269
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5270
- */
5271
5273
  await this.loadMarkets();
5272
5274
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
5273
5275
  let market = undefined;
@@ -5556,75 +5558,75 @@ export default class bitget extends Exchange {
5556
5558
  }
5557
5559
  return this.parseOrders(data, market, since, limit);
5558
5560
  }
5561
+ /**
5562
+ * @method
5563
+ * @name bitget#fetchClosedOrders
5564
+ * @description fetches information on multiple closed orders made by the user
5565
+ * @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
5566
+ * @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
5567
+ * @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
5568
+ * @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
5569
+ * @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
5570
+ * @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
5571
+ * @param {string} symbol unified market symbol of the closed orders
5572
+ * @param {int} [since] timestamp in ms of the earliest order
5573
+ * @param {int} [limit] the max number of closed orders to return
5574
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5575
+ * @param {int} [params.until] the latest time in ms to fetch entries for
5576
+ * @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)
5577
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
5578
+ * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
5579
+ * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
5580
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5581
+ */
5559
5582
  async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
5560
- /**
5561
- * @method
5562
- * @name bitget#fetchClosedOrders
5563
- * @description fetches information on multiple closed orders made by the user
5564
- * @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
5565
- * @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
5566
- * @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
5567
- * @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
5568
- * @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
5569
- * @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
5570
- * @param {string} symbol unified market symbol of the closed orders
5571
- * @param {int} [since] timestamp in ms of the earliest order
5572
- * @param {int} [limit] the max number of closed orders to return
5573
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5574
- * @param {int} [params.until] the latest time in ms to fetch entries for
5575
- * @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)
5576
- * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
5577
- * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
5578
- * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
5579
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5580
- */
5581
5583
  await this.loadMarkets();
5582
5584
  const orders = await this.fetchCanceledAndClosedOrders(symbol, since, limit, params);
5583
5585
  return this.filterBy(orders, 'status', 'closed');
5584
5586
  }
5587
+ /**
5588
+ * @method
5589
+ * @name bitget#fetchCanceledOrders
5590
+ * @description fetches information on multiple canceled orders made by the user
5591
+ * @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
5592
+ * @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
5593
+ * @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
5594
+ * @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
5595
+ * @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
5596
+ * @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
5597
+ * @param {string} symbol unified market symbol of the canceled orders
5598
+ * @param {int} [since] timestamp in ms of the earliest order
5599
+ * @param {int} [limit] the max number of canceled orders to return
5600
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5601
+ * @param {int} [params.until] the latest time in ms to fetch entries for
5602
+ * @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)
5603
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
5604
+ * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
5605
+ * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
5606
+ * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5607
+ */
5585
5608
  async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
5586
- /**
5587
- * @method
5588
- * @name bitget#fetchCanceledOrders
5589
- * @description fetches information on multiple canceled orders made by the user
5590
- * @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
5591
- * @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
5592
- * @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
5593
- * @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
5594
- * @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
5595
- * @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
5596
- * @param {string} symbol unified market symbol of the canceled orders
5597
- * @param {int} [since] timestamp in ms of the earliest order
5598
- * @param {int} [limit] the max number of canceled orders to return
5599
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5600
- * @param {int} [params.until] the latest time in ms to fetch entries for
5601
- * @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)
5602
- * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
5603
- * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
5604
- * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
5605
- * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5606
- */
5607
5609
  await this.loadMarkets();
5608
5610
  const orders = await this.fetchCanceledAndClosedOrders(symbol, since, limit, params);
5609
5611
  return this.filterBy(orders, 'status', 'canceled');
5610
5612
  }
5613
+ /**
5614
+ * @method
5615
+ * @name bitget#fetchCanceledAndClosedOrders
5616
+ * @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
5617
+ * @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
5618
+ * @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
5619
+ * @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
5620
+ * @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
5621
+ * @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
5622
+ * @description fetches information on multiple canceled and closed orders made by the user
5623
+ * @param {string} symbol unified market symbol of the market orders were made in
5624
+ * @param {int} [since] the earliest time in ms to fetch orders for
5625
+ * @param {int} [limit] the maximum number of order structures to retrieve
5626
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5627
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5628
+ */
5611
5629
  async fetchCanceledAndClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
5612
- /**
5613
- * @method
5614
- * @name bitget#fetchCanceledAndClosedOrders
5615
- * @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
5616
- * @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
5617
- * @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
5618
- * @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
5619
- * @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
5620
- * @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
5621
- * @description fetches information on multiple canceled and closed orders made by the user
5622
- * @param {string} symbol unified market symbol of the market orders were made in
5623
- * @param {int} [since] the earliest time in ms to fetch orders for
5624
- * @param {int} [limit] the maximum number of order structures to retrieve
5625
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5626
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5627
- */
5628
5630
  await this.loadMarkets();
5629
5631
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
5630
5632
  let market = undefined;
@@ -5921,23 +5923,23 @@ export default class bitget extends Exchange {
5921
5923
  const orders = this.safeList(response, 'data', []);
5922
5924
  return this.parseOrders(orders, market, since, limit);
5923
5925
  }
5926
+ /**
5927
+ * @method
5928
+ * @name bitget#fetchLedger
5929
+ * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
5930
+ * @see https://www.bitget.com/api-doc/spot/account/Get-Account-Bills
5931
+ * @see https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
5932
+ * @param {string} [code] unified currency code, default is undefined
5933
+ * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
5934
+ * @param {int} [limit] max number of ledger entries to return, default is undefined
5935
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5936
+ * @param {int} [params.until] end time in ms
5937
+ * @param {string} [params.symbol] *contract only* unified market symbol
5938
+ * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
5939
+ * @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)
5940
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
5941
+ */
5924
5942
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
5925
- /**
5926
- * @method
5927
- * @name bitget#fetchLedger
5928
- * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
5929
- * @see https://www.bitget.com/api-doc/spot/account/Get-Account-Bills
5930
- * @see https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
5931
- * @param {string} [code] unified currency code, default is undefined
5932
- * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
5933
- * @param {int} [limit] max number of ledger entries to return, default is undefined
5934
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5935
- * @param {int} [params.until] end time in ms
5936
- * @param {string} [params.symbol] *contract only* unified market symbol
5937
- * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
5938
- * @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)
5939
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
5940
- */
5941
5943
  await this.loadMarkets();
5942
5944
  const symbol = this.safeString(params, 'symbol');
5943
5945
  params = this.omit(params, 'symbol');
@@ -6146,23 +6148,23 @@ export default class bitget extends Exchange {
6146
6148
  };
6147
6149
  return this.safeString(types, type, type);
6148
6150
  }
6151
+ /**
6152
+ * @method
6153
+ * @name bitget#fetchMyTrades
6154
+ * @description fetch all trades made by the user
6155
+ * @see https://www.bitget.com/api-doc/spot/trade/Get-Fills
6156
+ * @see https://www.bitget.com/api-doc/contract/trade/Get-Order-Fills
6157
+ * @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-Fills
6158
+ * @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Transaction-Details
6159
+ * @param {string} symbol unified market symbol
6160
+ * @param {int} [since] the earliest time in ms to fetch trades for
6161
+ * @param {int} [limit] the maximum number of trades structures to retrieve
6162
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
6163
+ * @param {int} [params.until] the latest time in ms to fetch trades for
6164
+ * @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)
6165
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
6166
+ */
6149
6167
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
6150
- /**
6151
- * @method
6152
- * @name bitget#fetchMyTrades
6153
- * @description fetch all trades made by the user
6154
- * @see https://www.bitget.com/api-doc/spot/trade/Get-Fills
6155
- * @see https://www.bitget.com/api-doc/contract/trade/Get-Order-Fills
6156
- * @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-Fills
6157
- * @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Transaction-Details
6158
- * @param {string} symbol unified market symbol
6159
- * @param {int} [since] the earliest time in ms to fetch trades for
6160
- * @param {int} [limit] the maximum number of trades structures to retrieve
6161
- * @param {object} [params] extra parameters specific to the exchange API endpoint
6162
- * @param {int} [params.until] the latest time in ms to fetch trades for
6163
- * @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)
6164
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
6165
- */
6166
6168
  if (symbol === undefined) {
6167
6169
  throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
6168
6170
  }
@@ -6335,16 +6337,16 @@ export default class bitget extends Exchange {
6335
6337
  }
6336
6338
  return this.parseTrades(data, market, since, limit);
6337
6339
  }
6340
+ /**
6341
+ * @method
6342
+ * @name bitget#fetchPosition
6343
+ * @description fetch data on a single open contract trade position
6344
+ * @see https://www.bitget.com/api-doc/contract/position/get-single-position
6345
+ * @param {string} symbol unified market symbol of the market the position is held in
6346
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
6347
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
6348
+ */
6338
6349
  async fetchPosition(symbol, params = {}) {
6339
- /**
6340
- * @method
6341
- * @name bitget#fetchPosition
6342
- * @description fetch data on a single open contract trade position
6343
- * @see https://www.bitget.com/api-doc/contract/position/get-single-position
6344
- * @param {string} symbol unified market symbol of the market the position is held in
6345
- * @param {object} [params] extra parameters specific to the exchange API endpoint
6346
- * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
6347
- */
6348
6350
  await this.loadMarkets();
6349
6351
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
6350
6352
  let market = undefined;
@@ -6397,22 +6399,22 @@ export default class bitget extends Exchange {
6397
6399
  const first = this.safeDict(data, 0, {});
6398
6400
  return this.parsePosition(first, market);
6399
6401
  }
6402
+ /**
6403
+ * @method
6404
+ * @name bitget#fetchPositions
6405
+ * @description fetch all open positions
6406
+ * @see https://www.bitget.com/api-doc/contract/position/get-all-position
6407
+ * @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
6408
+ * @param {string[]} [symbols] list of unified market symbols
6409
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
6410
+ * @param {string} [params.marginCoin] the settle currency of the positions, needs to match the productType
6411
+ * @param {string} [params.productType] 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
6412
+ * @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)
6413
+ * @param {boolean} [params.useHistoryEndpoint] default false, when true will use the historic endpoint to fetch positions
6414
+ * @param {string} [params.method] either (default) 'privateMixGetV2MixPositionAllPosition' or 'privateMixGetV2MixPositionHistoryPosition'
6415
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
6416
+ */
6400
6417
  async fetchPositions(symbols = undefined, params = {}) {
6401
- /**
6402
- * @method
6403
- * @name bitget#fetchPositions
6404
- * @description fetch all open positions
6405
- * @see https://www.bitget.com/api-doc/contract/position/get-all-position
6406
- * @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
6407
- * @param {string[]} [symbols] list of unified market symbols
6408
- * @param {object} [params] extra parameters specific to the exchange API endpoint
6409
- * @param {string} [params.marginCoin] the settle currency of the positions, needs to match the productType
6410
- * @param {string} [params.productType] 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
6411
- * @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)
6412
- * @param {boolean} [params.useHistoryEndpoint] default false, when true will use the historic endpoint to fetch positions
6413
- * @param {string} [params.method] either (default) 'privateMixGetV2MixPositionAllPosition' or 'privateMixGetV2MixPositionHistoryPosition'
6414
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
6415
- */
6416
6418
  await this.loadMarkets();
6417
6419
  let paginate = false;
6418
6420
  [paginate, params] = this.handleOptionAndParams(params, 'fetchPositions', 'paginate');
@@ -6728,19 +6730,19 @@ export default class bitget extends Exchange {
6728
6730
  'takeProfitPrice': undefined,
6729
6731
  });
6730
6732
  }
6733
+ /**
6734
+ * @method
6735
+ * @name bitget#fetchFundingRateHistory
6736
+ * @description fetches historical funding rate prices
6737
+ * @see https://www.bitget.com/api-doc/contract/market/Get-History-Funding-Rate
6738
+ * @param {string} symbol unified symbol of the market to fetch the funding rate history for
6739
+ * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
6740
+ * @param {int} [limit] the maximum amount of funding rate structures to fetch
6741
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
6742
+ * @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)
6743
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
6744
+ */
6731
6745
  async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
6732
- /**
6733
- * @method
6734
- * @name bitget#fetchFundingRateHistory
6735
- * @description fetches historical funding rate prices
6736
- * @see https://www.bitget.com/api-doc/contract/market/Get-History-Funding-Rate
6737
- * @param {string} symbol unified symbol of the market to fetch the funding rate history for
6738
- * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
6739
- * @param {int} [limit] the maximum amount of funding rate structures to fetch
6740
- * @param {object} [params] extra parameters specific to the exchange API endpoint
6741
- * @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)
6742
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
6743
- */
6744
6746
  if (symbol === undefined) {
6745
6747
  throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
6746
6748
  }
@@ -6803,16 +6805,16 @@ export default class bitget extends Exchange {
6803
6805
  const sorted = this.sortBy(rates, 'timestamp');
6804
6806
  return this.filterBySymbolSinceLimit(sorted, market['symbol'], since, limit);
6805
6807
  }
6808
+ /**
6809
+ * @method
6810
+ * @name bitget#fetchFundingRate
6811
+ * @description fetch the current funding rate
6812
+ * @see https://www.bitget.com/api-doc/contract/market/Get-Current-Funding-Rate
6813
+ * @param {string} symbol unified market symbol
6814
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
6815
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
6816
+ */
6806
6817
  async fetchFundingRate(symbol, params = {}) {
6807
- /**
6808
- * @method
6809
- * @name bitget#fetchFundingRate
6810
- * @description fetch the current funding rate
6811
- * @see https://www.bitget.com/api-doc/contract/market/Get-Current-Funding-Rate
6812
- * @param {string} symbol unified market symbol
6813
- * @param {object} [params] extra parameters specific to the exchange API endpoint
6814
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
6815
- */
6816
6818
  await this.loadMarkets();
6817
6819
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
6818
6820
  let market = undefined;
@@ -6849,18 +6851,18 @@ export default class bitget extends Exchange {
6849
6851
  const data = this.safeValue(response, 'data', []);
6850
6852
  return this.parseFundingRate(data[0], market);
6851
6853
  }
6854
+ /**
6855
+ * @method
6856
+ * @name bitget#fetchFundingRates
6857
+ * @description fetch the current funding rates for all markets
6858
+ * @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
6859
+ * @param {string[]} [symbols] list of unified market symbols
6860
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
6861
+ * @param {string} [params.subType] *contract only* 'linear', 'inverse'
6862
+ * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
6863
+ * @returns {object} a dictionary of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
6864
+ */
6852
6865
  async fetchFundingRates(symbols = undefined, params = {}) {
6853
- /**
6854
- * @method
6855
- * @name bitget#fetchFundingRates
6856
- * @description fetch the current funding rates for all markets
6857
- * @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
6858
- * @param {string[]} [symbols] list of unified market symbols
6859
- * @param {object} [params] extra parameters specific to the exchange API endpoint
6860
- * @param {string} [params.subType] *contract only* 'linear', 'inverse'
6861
- * @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
6862
- * @returns {object} a dictionary of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
6863
- */
6864
6866
  await this.loadMarkets();
6865
6867
  let market = undefined;
6866
6868
  if (symbols !== undefined) {
@@ -6988,20 +6990,20 @@ export default class bitget extends Exchange {
6988
6990
  'interval': intervalString,
6989
6991
  };
6990
6992
  }
6993
+ /**
6994
+ * @method
6995
+ * @name bitget#fetchFundingHistory
6996
+ * @description fetch the funding history
6997
+ * @see https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
6998
+ * @param {string} symbol unified market symbol
6999
+ * @param {int} [since] the starting timestamp in milliseconds
7000
+ * @param {int} [limit] the number of entries to return
7001
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7002
+ * @param {int} [params.until] the latest time in ms to fetch funding history for
7003
+ * @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)
7004
+ * @returns {object[]} a list of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
7005
+ */
6991
7006
  async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
6992
- /**
6993
- * @method
6994
- * @name bitget#fetchFundingHistory
6995
- * @description fetch the funding history
6996
- * @see https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
6997
- * @param {string} symbol unified market symbol
6998
- * @param {int} [since] the starting timestamp in milliseconds
6999
- * @param {int} [limit] the number of entries to return
7000
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7001
- * @param {int} [params.until] the latest time in ms to fetch funding history for
7002
- * @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)
7003
- * @returns {object[]} a list of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
7004
- */
7005
7007
  await this.loadMarkets();
7006
7008
  if (symbol === undefined) {
7007
7009
  throw new ArgumentsRequired(this.id + ' fetchFundingHistory() requires a symbol argument');
@@ -7166,17 +7168,17 @@ export default class bitget extends Exchange {
7166
7168
  'datetime': undefined,
7167
7169
  };
7168
7170
  }
7171
+ /**
7172
+ * @method
7173
+ * @name bitget#reduceMargin
7174
+ * @description remove margin from a position
7175
+ * @see https://www.bitget.com/api-doc/contract/account/Change-Margin
7176
+ * @param {string} symbol unified market symbol
7177
+ * @param {float} amount the amount of margin to remove
7178
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7179
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
7180
+ */
7169
7181
  async reduceMargin(symbol, amount, params = {}) {
7170
- /**
7171
- * @method
7172
- * @name bitget#reduceMargin
7173
- * @description remove margin from a position
7174
- * @see https://www.bitget.com/api-doc/contract/account/Change-Margin
7175
- * @param {string} symbol unified market symbol
7176
- * @param {float} amount the amount of margin to remove
7177
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7178
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
7179
- */
7180
7182
  if (amount > 0) {
7181
7183
  throw new BadRequest(this.id + ' reduceMargin() amount parameter must be a negative value');
7182
7184
  }
@@ -7186,33 +7188,33 @@ export default class bitget extends Exchange {
7186
7188
  }
7187
7189
  return await this.modifyMarginHelper(symbol, amount, 'reduce', params);
7188
7190
  }
7191
+ /**
7192
+ * @method
7193
+ * @name bitget#addMargin
7194
+ * @description add margin
7195
+ * @see https://www.bitget.com/api-doc/contract/account/Change-Margin
7196
+ * @param {string} symbol unified market symbol
7197
+ * @param {float} amount the amount of margin to add
7198
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7199
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
7200
+ */
7189
7201
  async addMargin(symbol, amount, params = {}) {
7190
- /**
7191
- * @method
7192
- * @name bitget#addMargin
7193
- * @description add margin
7194
- * @see https://www.bitget.com/api-doc/contract/account/Change-Margin
7195
- * @param {string} symbol unified market symbol
7196
- * @param {float} amount the amount of margin to add
7197
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7198
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
7199
- */
7200
7202
  const holdSide = this.safeString(params, 'holdSide');
7201
7203
  if (holdSide === undefined) {
7202
7204
  throw new ArgumentsRequired(this.id + ' addMargin() requires a holdSide parameter, either long or short');
7203
7205
  }
7204
7206
  return await this.modifyMarginHelper(symbol, amount, 'add', params);
7205
7207
  }
7208
+ /**
7209
+ * @method
7210
+ * @name bitget#fetchLeverage
7211
+ * @description fetch the set leverage for a market
7212
+ * @see https://www.bitget.com/api-doc/contract/account/Get-Single-Account
7213
+ * @param {string} symbol unified market symbol
7214
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7215
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
7216
+ */
7206
7217
  async fetchLeverage(symbol, params = {}) {
7207
- /**
7208
- * @method
7209
- * @name bitget#fetchLeverage
7210
- * @description fetch the set leverage for a market
7211
- * @see https://www.bitget.com/api-doc/contract/account/Get-Single-Account
7212
- * @param {string} symbol unified market symbol
7213
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7214
- * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
7215
- */
7216
7218
  await this.loadMarkets();
7217
7219
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
7218
7220
  let market = undefined;
@@ -7271,18 +7273,18 @@ export default class bitget extends Exchange {
7271
7273
  'shortLeverage': this.safeInteger(leverage, 'isolatedShortLever'),
7272
7274
  };
7273
7275
  }
7276
+ /**
7277
+ * @method
7278
+ * @name bitget#setLeverage
7279
+ * @description set the level of leverage for a market
7280
+ * @see https://www.bitget.com/api-doc/contract/account/Change-Leverage
7281
+ * @param {int} leverage the rate of leverage
7282
+ * @param {string} symbol unified market symbol
7283
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7284
+ * @param {string} [params.holdSide] *isolated only* position direction, 'long' or 'short'
7285
+ * @returns {object} response from the exchange
7286
+ */
7274
7287
  async setLeverage(leverage, symbol = undefined, params = {}) {
7275
- /**
7276
- * @method
7277
- * @name bitget#setLeverage
7278
- * @description set the level of leverage for a market
7279
- * @see https://www.bitget.com/api-doc/contract/account/Change-Leverage
7280
- * @param {int} leverage the rate of leverage
7281
- * @param {string} symbol unified market symbol
7282
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7283
- * @param {string} [params.holdSide] *isolated only* position direction, 'long' or 'short'
7284
- * @returns {object} response from the exchange
7285
- */
7286
7288
  if (symbol === undefined) {
7287
7289
  throw new ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
7288
7290
  }
@@ -7323,17 +7325,17 @@ export default class bitget extends Exchange {
7323
7325
  //
7324
7326
  return response;
7325
7327
  }
7328
+ /**
7329
+ * @method
7330
+ * @name bitget#setMarginMode
7331
+ * @description set margin mode to 'cross' or 'isolated'
7332
+ * @see https://www.bitget.com/api-doc/contract/account/Change-Margin-Mode
7333
+ * @param {string} marginMode 'cross' or 'isolated'
7334
+ * @param {string} symbol unified market symbol
7335
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7336
+ * @returns {object} response from the exchange
7337
+ */
7326
7338
  async setMarginMode(marginMode, symbol = undefined, params = {}) {
7327
- /**
7328
- * @method
7329
- * @name bitget#setMarginMode
7330
- * @description set margin mode to 'cross' or 'isolated'
7331
- * @see https://www.bitget.com/api-doc/contract/account/Change-Margin-Mode
7332
- * @param {string} marginMode 'cross' or 'isolated'
7333
- * @param {string} symbol unified market symbol
7334
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7335
- * @returns {object} response from the exchange
7336
- */
7337
7339
  if (symbol === undefined) {
7338
7340
  throw new ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
7339
7341
  }
@@ -7379,18 +7381,18 @@ export default class bitget extends Exchange {
7379
7381
  //
7380
7382
  return response;
7381
7383
  }
7384
+ /**
7385
+ * @method
7386
+ * @name bitget#setPositionMode
7387
+ * @description set hedged to true or false for a market
7388
+ * @see https://www.bitget.com/api-doc/contract/account/Change-Hold-Mode
7389
+ * @param {bool} hedged set to true to use dualSidePosition
7390
+ * @param {string} symbol not used by bitget setPositionMode ()
7391
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7392
+ * @param {string} [params.productType] required if symbol is undefined: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
7393
+ * @returns {object} response from the exchange
7394
+ */
7382
7395
  async setPositionMode(hedged, symbol = undefined, params = {}) {
7383
- /**
7384
- * @method
7385
- * @name bitget#setPositionMode
7386
- * @description set hedged to true or false for a market
7387
- * @see https://www.bitget.com/api-doc/contract/account/Change-Hold-Mode
7388
- * @param {bool} hedged set to true to use dualSidePosition
7389
- * @param {string} symbol not used by bitget setPositionMode ()
7390
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7391
- * @param {string} [params.productType] required if symbol is undefined: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
7392
- * @returns {object} response from the exchange
7393
- */
7394
7396
  await this.loadMarkets();
7395
7397
  const posMode = hedged ? 'hedge_mode' : 'one_way_mode';
7396
7398
  let market = undefined;
@@ -7423,16 +7425,16 @@ export default class bitget extends Exchange {
7423
7425
  //
7424
7426
  return response;
7425
7427
  }
7428
+ /**
7429
+ * @method
7430
+ * @name bitget#fetchOpenInterest
7431
+ * @description retrieves the open interest of a contract trading pair
7432
+ * @see https://www.bitget.com/api-doc/contract/market/Get-Open-Interest
7433
+ * @param {string} symbol unified CCXT market symbol
7434
+ * @param {object} [params] exchange specific parameters
7435
+ * @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
7436
+ */
7426
7437
  async fetchOpenInterest(symbol, params = {}) {
7427
- /**
7428
- * @method
7429
- * @name bitget#fetchOpenInterest
7430
- * @description retrieves the open interest of a contract trading pair
7431
- * @see https://www.bitget.com/api-doc/contract/market/Get-Open-Interest
7432
- * @param {string} symbol unified CCXT market symbol
7433
- * @param {object} [params] exchange specific parameters
7434
- * @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
7435
- */
7436
7438
  await this.loadMarkets();
7437
7439
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
7438
7440
  let market = undefined;
@@ -7496,19 +7498,19 @@ export default class bitget extends Exchange {
7496
7498
  'info': interest,
7497
7499
  }, market);
7498
7500
  }
7501
+ /**
7502
+ * @method
7503
+ * @name bitget#fetchTransfers
7504
+ * @description fetch a history of internal transfers made on an account
7505
+ * @see https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords
7506
+ * @param {string} code unified currency code of the currency transferred
7507
+ * @param {int} [since] the earliest time in ms to fetch transfers for
7508
+ * @param {int} [limit] the maximum number of transfers structures to retrieve
7509
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7510
+ * @param {int} [params.until] the latest time in ms to fetch entries for
7511
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
7512
+ */
7499
7513
  async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
7500
- /**
7501
- * @method
7502
- * @name bitget#fetchTransfers
7503
- * @description fetch a history of internal transfers made on an account
7504
- * @see https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords
7505
- * @param {string} code unified currency code of the currency transferred
7506
- * @param {int} [since] the earliest time in ms to fetch transfers for
7507
- * @param {int} [limit] the maximum number of transfers structures to retrieve
7508
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7509
- * @param {int} [params.until] the latest time in ms to fetch entries for
7510
- * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
7511
- */
7512
7514
  if (code === undefined) {
7513
7515
  throw new ArgumentsRequired(this.id + ' fetchTransfers() requires a code argument');
7514
7516
  }
@@ -7556,21 +7558,21 @@ export default class bitget extends Exchange {
7556
7558
  const data = this.safeList(response, 'data', []);
7557
7559
  return this.parseTransfers(data, currency, since, limit);
7558
7560
  }
7561
+ /**
7562
+ * @method
7563
+ * @name bitget#transfer
7564
+ * @description transfer currency internally between wallets on the same account
7565
+ * @see https://www.bitget.com/api-doc/spot/account/Wallet-Transfer
7566
+ * @param {string} code unified currency code
7567
+ * @param {float} amount amount to transfer
7568
+ * @param {string} fromAccount account to transfer from
7569
+ * @param {string} toAccount account to transfer to
7570
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7571
+ * @param {string} [params.symbol] unified CCXT market symbol, required when transferring to or from an account type that is a leveraged position-by-position account
7572
+ * @param {string} [params.clientOid] custom id
7573
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
7574
+ */
7559
7575
  async transfer(code, amount, fromAccount, toAccount, params = {}) {
7560
- /**
7561
- * @method
7562
- * @name bitget#transfer
7563
- * @description transfer currency internally between wallets on the same account
7564
- * @see https://www.bitget.com/api-doc/spot/account/Wallet-Transfer
7565
- * @param {string} code unified currency code
7566
- * @param {float} amount amount to transfer
7567
- * @param {string} fromAccount account to transfer from
7568
- * @param {string} toAccount account to transfer to
7569
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7570
- * @param {string} [params.symbol] unified CCXT market symbol, required when transferring to or from an account type that is a leveraged position-by-position account
7571
- * @param {string} [params.clientOid] custom id
7572
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
7573
- */
7574
7576
  await this.loadMarkets();
7575
7577
  const currency = this.currency(code);
7576
7578
  const accountsByType = this.safeValue(this.options, 'accountsByType', {});
@@ -7709,16 +7711,16 @@ export default class bitget extends Exchange {
7709
7711
  }
7710
7712
  return result;
7711
7713
  }
7714
+ /**
7715
+ * @method
7716
+ * @name bitget#fetchDepositWithdrawFees
7717
+ * @description fetch deposit and withdraw fees
7718
+ * @see https://www.bitget.com/api-doc/spot/market/Get-Coin-List
7719
+ * @param {string[]|undefined} codes list of unified currency codes
7720
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7721
+ * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
7722
+ */
7712
7723
  async fetchDepositWithdrawFees(codes = undefined, params = {}) {
7713
- /**
7714
- * @method
7715
- * @name bitget#fetchDepositWithdrawFees
7716
- * @description fetch deposit and withdraw fees
7717
- * @see https://www.bitget.com/api-doc/spot/market/Get-Coin-List
7718
- * @param {string[]|undefined} codes list of unified currency codes
7719
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7720
- * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
7721
- */
7722
7724
  await this.loadMarkets();
7723
7725
  const response = await this.publicSpotGetV2SpotPublicCoins(params);
7724
7726
  //
@@ -7753,17 +7755,17 @@ export default class bitget extends Exchange {
7753
7755
  const data = this.safeList(response, 'data', []);
7754
7756
  return this.parseDepositWithdrawFees(data, codes, 'coin');
7755
7757
  }
7758
+ /**
7759
+ * @method
7760
+ * @name bitget#borrowCrossMargin
7761
+ * @description create a loan to borrow margin
7762
+ * @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow
7763
+ * @param {string} code unified currency code of the currency to borrow
7764
+ * @param {string} amount the amount to borrow
7765
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7766
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
7767
+ */
7756
7768
  async borrowCrossMargin(code, amount, params = {}) {
7757
- /**
7758
- * @method
7759
- * @name bitget#borrowCrossMargin
7760
- * @description create a loan to borrow margin
7761
- * @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow
7762
- * @param {string} code unified currency code of the currency to borrow
7763
- * @param {string} amount the amount to borrow
7764
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7765
- * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
7766
- */
7767
7769
  await this.loadMarkets();
7768
7770
  const currency = this.currency(code);
7769
7771
  const request = {
@@ -7786,18 +7788,18 @@ export default class bitget extends Exchange {
7786
7788
  const data = this.safeValue(response, 'data', {});
7787
7789
  return this.parseMarginLoan(data, currency);
7788
7790
  }
7791
+ /**
7792
+ * @method
7793
+ * @name bitget#borrowIsolatedMargin
7794
+ * @description create a loan to borrow margin
7795
+ * @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow
7796
+ * @param {string} symbol unified market symbol
7797
+ * @param {string} code unified currency code of the currency to borrow
7798
+ * @param {string} amount the amount to borrow
7799
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7800
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
7801
+ */
7789
7802
  async borrowIsolatedMargin(symbol, code, amount, params = {}) {
7790
- /**
7791
- * @method
7792
- * @name bitget#borrowIsolatedMargin
7793
- * @description create a loan to borrow margin
7794
- * @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow
7795
- * @param {string} symbol unified market symbol
7796
- * @param {string} code unified currency code of the currency to borrow
7797
- * @param {string} amount the amount to borrow
7798
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7799
- * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
7800
- */
7801
7803
  await this.loadMarkets();
7802
7804
  const currency = this.currency(code);
7803
7805
  const market = this.market(symbol);
@@ -7823,18 +7825,18 @@ export default class bitget extends Exchange {
7823
7825
  const data = this.safeValue(response, 'data', {});
7824
7826
  return this.parseMarginLoan(data, currency, market);
7825
7827
  }
7828
+ /**
7829
+ * @method
7830
+ * @name bitget#repayIsolatedMargin
7831
+ * @description repay borrowed margin and interest
7832
+ * @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Repay
7833
+ * @param {string} symbol unified market symbol
7834
+ * @param {string} code unified currency code of the currency to repay
7835
+ * @param {string} amount the amount to repay
7836
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7837
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
7838
+ */
7826
7839
  async repayIsolatedMargin(symbol, code, amount, params = {}) {
7827
- /**
7828
- * @method
7829
- * @name bitget#repayIsolatedMargin
7830
- * @description repay borrowed margin and interest
7831
- * @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Repay
7832
- * @param {string} symbol unified market symbol
7833
- * @param {string} code unified currency code of the currency to repay
7834
- * @param {string} amount the amount to repay
7835
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7836
- * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
7837
- */
7838
7840
  await this.loadMarkets();
7839
7841
  const currency = this.currency(code);
7840
7842
  const market = this.market(symbol);
@@ -7861,17 +7863,17 @@ export default class bitget extends Exchange {
7861
7863
  const data = this.safeValue(response, 'data', {});
7862
7864
  return this.parseMarginLoan(data, currency, market);
7863
7865
  }
7866
+ /**
7867
+ * @method
7868
+ * @name bitget#repayCrossMargin
7869
+ * @description repay borrowed margin and interest
7870
+ * @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Repay
7871
+ * @param {string} code unified currency code of the currency to repay
7872
+ * @param {string} amount the amount to repay
7873
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
7874
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
7875
+ */
7864
7876
  async repayCrossMargin(code, amount, params = {}) {
7865
- /**
7866
- * @method
7867
- * @name bitget#repayCrossMargin
7868
- * @description repay borrowed margin and interest
7869
- * @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Repay
7870
- * @param {string} code unified currency code of the currency to repay
7871
- * @param {string} amount the amount to repay
7872
- * @param {object} [params] extra parameters specific to the exchange API endpoint
7873
- * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
7874
- */
7875
7877
  await this.loadMarkets();
7876
7878
  const currency = this.currency(code);
7877
7879
  const request = {
@@ -7949,22 +7951,22 @@ export default class bitget extends Exchange {
7949
7951
  'info': info,
7950
7952
  };
7951
7953
  }
7954
+ /**
7955
+ * @method
7956
+ * @name bitget#fetchMyLiquidations
7957
+ * @description retrieves the users liquidated positions
7958
+ * @see https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Liquidation-Records
7959
+ * @see https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Liquidation-Records
7960
+ * @param {string} [symbol] unified CCXT market symbol
7961
+ * @param {int} [since] the earliest time in ms to fetch liquidations for
7962
+ * @param {int} [limit] the maximum number of liquidation structures to retrieve
7963
+ * @param {object} [params] exchange specific parameters for the bitget api endpoint
7964
+ * @param {int} [params.until] timestamp in ms of the latest liquidation
7965
+ * @param {string} [params.marginMode] 'cross' or 'isolated' default value is 'cross'
7966
+ * @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)
7967
+ * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
7968
+ */
7952
7969
  async fetchMyLiquidations(symbol = undefined, since = undefined, limit = undefined, params = {}) {
7953
- /**
7954
- * @method
7955
- * @name bitget#fetchMyLiquidations
7956
- * @description retrieves the users liquidated positions
7957
- * @see https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Liquidation-Records
7958
- * @see https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Liquidation-Records
7959
- * @param {string} [symbol] unified CCXT market symbol
7960
- * @param {int} [since] the earliest time in ms to fetch liquidations for
7961
- * @param {int} [limit] the maximum number of liquidation structures to retrieve
7962
- * @param {object} [params] exchange specific parameters for the bitget api endpoint
7963
- * @param {int} [params.until] timestamp in ms of the latest liquidation
7964
- * @param {string} [params.marginMode] 'cross' or 'isolated' default value is 'cross'
7965
- * @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)
7966
- * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
7967
- */
7968
7970
  await this.loadMarkets();
7969
7971
  let paginate = false;
7970
7972
  [paginate, params] = this.handleOptionAndParams(params, 'fetchMyLiquidations', 'paginate');
@@ -8108,16 +8110,16 @@ export default class bitget extends Exchange {
8108
8110
  'datetime': this.iso8601(timestamp),
8109
8111
  });
8110
8112
  }
8113
+ /**
8114
+ * @method
8115
+ * @name bitget#fetchIsolatedBorrowRate
8116
+ * @description fetch the rate of interest to borrow a currency for margin trading
8117
+ * @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Margin-Interest-Rate-And-Max-Borrowable-Amount
8118
+ * @param {string} symbol unified market symbol
8119
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8120
+ * @returns {object} an [isolated borrow rate structure]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
8121
+ */
8111
8122
  async fetchIsolatedBorrowRate(symbol, params = {}) {
8112
- /**
8113
- * @method
8114
- * @name bitget#fetchIsolatedBorrowRate
8115
- * @description fetch the rate of interest to borrow a currency for margin trading
8116
- * @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Margin-Interest-Rate-And-Max-Borrowable-Amount
8117
- * @param {string} symbol unified market symbol
8118
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8119
- * @returns {object} an [isolated borrow rate structure]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
8120
- */
8121
8123
  await this.loadMarkets();
8122
8124
  const market = this.market(symbol);
8123
8125
  const request = {
@@ -8223,17 +8225,17 @@ export default class bitget extends Exchange {
8223
8225
  'info': info,
8224
8226
  };
8225
8227
  }
8228
+ /**
8229
+ * @method
8230
+ * @name bitget#fetchCrossBorrowRate
8231
+ * @description fetch the rate of interest to borrow a currency for margin trading
8232
+ * @see https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Margin-Interest-Rate-And-Borrowable
8233
+ * @param {string} code unified currency code
8234
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8235
+ * @param {string} [params.symbol] required for isolated margin
8236
+ * @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
8237
+ */
8226
8238
  async fetchCrossBorrowRate(code, params = {}) {
8227
- /**
8228
- * @method
8229
- * @name bitget#fetchCrossBorrowRate
8230
- * @description fetch the rate of interest to borrow a currency for margin trading
8231
- * @see https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Margin-Interest-Rate-And-Borrowable
8232
- * @param {string} code unified currency code
8233
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8234
- * @param {string} [params.symbol] required for isolated margin
8235
- * @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
8236
- */
8237
8239
  await this.loadMarkets();
8238
8240
  const currency = this.currency(code);
8239
8241
  const request = {
@@ -8303,21 +8305,21 @@ export default class bitget extends Exchange {
8303
8305
  'info': info,
8304
8306
  };
8305
8307
  }
8308
+ /**
8309
+ * @method
8310
+ * @name bitget#fetchBorrowInterest
8311
+ * @description fetch the interest owed by the user for borrowing currency for margin trading
8312
+ * @see https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Interest-Records
8313
+ * @see https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Interest-Records
8314
+ * @param {string} [code] unified currency code
8315
+ * @param {string} [symbol] unified market symbol when fetching interest in isolated markets
8316
+ * @param {int} [since] the earliest time in ms to fetch borrow interest for
8317
+ * @param {int} [limit] the maximum number of structures to retrieve
8318
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8319
+ * @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)
8320
+ * @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
8321
+ */
8306
8322
  async fetchBorrowInterest(code = undefined, symbol = undefined, since = undefined, limit = undefined, params = {}) {
8307
- /**
8308
- * @method
8309
- * @name bitget#fetchBorrowInterest
8310
- * @description fetch the interest owed by the user for borrowing currency for margin trading
8311
- * @see https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Interest-Records
8312
- * @see https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Interest-Records
8313
- * @param {string} [code] unified currency code
8314
- * @param {string} [symbol] unified market symbol when fetching interest in isolated markets
8315
- * @param {int} [since] the earliest time in ms to fetch borrow interest for
8316
- * @param {int} [limit] the maximum number of structures to retrieve
8317
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8318
- * @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)
8319
- * @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
8320
- */
8321
8323
  await this.loadMarkets();
8322
8324
  let paginate = false;
8323
8325
  [paginate, params] = this.handleOptionAndParams(params, 'fetchBorrowInterest', 'paginate');
@@ -8456,17 +8458,17 @@ export default class bitget extends Exchange {
8456
8458
  'datetime': this.iso8601(timestamp),
8457
8459
  };
8458
8460
  }
8461
+ /**
8462
+ * @method
8463
+ * @name bitget#closePosition
8464
+ * @description closes an open position for a market
8465
+ * @see https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
8466
+ * @param {string} symbol unified CCXT market symbol
8467
+ * @param {string} [side] one-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short'
8468
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8469
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
8470
+ */
8459
8471
  async closePosition(symbol, side = undefined, params = {}) {
8460
- /**
8461
- * @method
8462
- * @name bitget#closePosition
8463
- * @description closes an open position for a market
8464
- * @see https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
8465
- * @param {string} symbol unified CCXT market symbol
8466
- * @param {string} [side] one-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short'
8467
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8468
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
8469
- */
8470
8472
  await this.loadMarkets();
8471
8473
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
8472
8474
  let market = undefined;
@@ -8508,16 +8510,16 @@ export default class bitget extends Exchange {
8508
8510
  const order = this.safeList(data, 'successList', []);
8509
8511
  return this.parseOrder(order[0], market);
8510
8512
  }
8513
+ /**
8514
+ * @method
8515
+ * @name bitget#closeAllPositions
8516
+ * @description closes all open positions for a market type
8517
+ * @see https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
8518
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8519
+ * @param {string} [params.productType] 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
8520
+ * @returns {object[]} A list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
8521
+ */
8511
8522
  async closeAllPositions(params = {}) {
8512
- /**
8513
- * @method
8514
- * @name bitget#closeAllPositions
8515
- * @description closes all open positions for a market type
8516
- * @see https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
8517
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8518
- * @param {string} [params.productType] 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
8519
- * @returns {object[]} A list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
8520
- */
8521
8523
  await this.loadMarkets();
8522
8524
  let productType = undefined;
8523
8525
  [productType, params] = this.handleProductTypeAndParams(undefined, params);
@@ -8546,16 +8548,16 @@ export default class bitget extends Exchange {
8546
8548
  const orderInfo = this.safeList(data, 'successList', []);
8547
8549
  return this.parsePositions(orderInfo, undefined, params);
8548
8550
  }
8551
+ /**
8552
+ * @method
8553
+ * @name bitget#fetchMarginMode
8554
+ * @description fetches the margin mode of a trading pair
8555
+ * @see https://www.bitget.com/api-doc/contract/account/Get-Single-Account
8556
+ * @param {string} symbol unified symbol of the market to fetch the margin mode for
8557
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8558
+ * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
8559
+ */
8549
8560
  async fetchMarginMode(symbol, params = {}) {
8550
- /**
8551
- * @method
8552
- * @name bitget#fetchMarginMode
8553
- * @description fetches the margin mode of a trading pair
8554
- * @see https://www.bitget.com/api-doc/contract/account/Get-Single-Account
8555
- * @param {string} symbol unified symbol of the market to fetch the margin mode for
8556
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8557
- * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
8558
- */
8559
8561
  await this.loadMarkets();
8560
8562
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
8561
8563
  let market = undefined;
@@ -8614,22 +8616,22 @@ export default class bitget extends Exchange {
8614
8616
  'marginMode': marginType,
8615
8617
  };
8616
8618
  }
8619
+ /**
8620
+ * @method
8621
+ * @name bitget#fetchPositionsHistory
8622
+ * @description fetches historical positions
8623
+ * @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
8624
+ * @param {string[]} [symbols] unified contract symbols
8625
+ * @param {int} [since] timestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
8626
+ * @param {int} [limit] the maximum amount of records to fetch, default=20, max=100
8627
+ * @param {object} params extra parameters specific to the exchange api endpoint
8628
+ * @param {int} [params.until] timestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
8629
+ *
8630
+ * EXCHANGE SPECIFIC PARAMETERS
8631
+ * @param {string} [params.productType] USDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
8632
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
8633
+ */
8617
8634
  async fetchPositionsHistory(symbols = undefined, since = undefined, limit = undefined, params = {}) {
8618
- /**
8619
- * @method
8620
- * @name bitget#fetchPositionsHistory
8621
- * @description fetches historical positions
8622
- * @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
8623
- * @param {string[]} [symbols] unified contract symbols
8624
- * @param {int} [since] timestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
8625
- * @param {int} [limit] the maximum amount of records to fetch, default=20, max=100
8626
- * @param {object} params extra parameters specific to the exchange api endpoint
8627
- * @param {int} [params.until] timestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
8628
- *
8629
- * EXCHANGE SPECIFIC PARAMETERS
8630
- * @param {string} [params.productType] USDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
8631
- * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
8632
- */
8633
8635
  await this.loadMarkets();
8634
8636
  const until = this.safeInteger(params, 'until');
8635
8637
  params = this.omit(params, 'until');
@@ -8685,18 +8687,18 @@ export default class bitget extends Exchange {
8685
8687
  const positions = this.parsePositions(responseList, symbols, params);
8686
8688
  return this.filterBySinceLimit(positions, since, limit);
8687
8689
  }
8690
+ /**
8691
+ * @method
8692
+ * @name bitget#fetchConvertQuote
8693
+ * @description fetch a quote for converting from one currency to another
8694
+ * @see https://www.bitget.com/api-doc/common/convert/Get-Quoted-Price
8695
+ * @param {string} fromCode the currency that you want to sell and convert from
8696
+ * @param {string} toCode the currency that you want to buy and convert into
8697
+ * @param {float} [amount] how much you want to trade in units of the from currency
8698
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8699
+ * @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
8700
+ */
8688
8701
  async fetchConvertQuote(fromCode, toCode, amount = undefined, params = {}) {
8689
- /**
8690
- * @method
8691
- * @name bitget#fetchConvertQuote
8692
- * @description fetch a quote for converting from one currency to another
8693
- * @see https://www.bitget.com/api-doc/common/convert/Get-Quoted-Price
8694
- * @param {string} fromCode the currency that you want to sell and convert from
8695
- * @param {string} toCode the currency that you want to buy and convert into
8696
- * @param {float} [amount] how much you want to trade in units of the from currency
8697
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8698
- * @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
8699
- */
8700
8702
  await this.loadMarkets();
8701
8703
  const request = {
8702
8704
  'fromCoin': fromCode,
@@ -8727,21 +8729,21 @@ export default class bitget extends Exchange {
8727
8729
  const toCurrency = this.currency(toCurrencyId);
8728
8730
  return this.parseConversion(data, fromCurrency, toCurrency);
8729
8731
  }
8732
+ /**
8733
+ * @method
8734
+ * @name bitget#createConvertTrade
8735
+ * @description convert from one currency to another
8736
+ * @see https://www.bitget.com/api-doc/common/convert/Trade
8737
+ * @param {string} id the id of the trade that you want to make
8738
+ * @param {string} fromCode the currency that you want to sell and convert from
8739
+ * @param {string} toCode the currency that you want to buy and convert into
8740
+ * @param {float} amount how much you want to trade in units of the from currency
8741
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8742
+ * @param {string} params.price the price of the conversion, obtained from fetchConvertQuote()
8743
+ * @param {string} params.toAmount the amount you want to trade in units of the toCurrency, obtained from fetchConvertQuote()
8744
+ * @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
8745
+ */
8730
8746
  async createConvertTrade(id, fromCode, toCode, amount = undefined, params = {}) {
8731
- /**
8732
- * @method
8733
- * @name bitget#createConvertTrade
8734
- * @description convert from one currency to another
8735
- * @see https://www.bitget.com/api-doc/common/convert/Trade
8736
- * @param {string} id the id of the trade that you want to make
8737
- * @param {string} fromCode the currency that you want to sell and convert from
8738
- * @param {string} toCode the currency that you want to buy and convert into
8739
- * @param {float} amount how much you want to trade in units of the from currency
8740
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8741
- * @param {string} params.price the price of the conversion, obtained from fetchConvertQuote()
8742
- * @param {string} params.toAmount the amount you want to trade in units of the toCurrency, obtained from fetchConvertQuote()
8743
- * @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
8744
- */
8745
8747
  await this.loadMarkets();
8746
8748
  const price = this.safeString2(params, 'price', 'cnvtPrice');
8747
8749
  if (price === undefined) {
@@ -8779,18 +8781,18 @@ export default class bitget extends Exchange {
8779
8781
  const toCurrency = this.currency(toCurrencyId);
8780
8782
  return this.parseConversion(data, undefined, toCurrency);
8781
8783
  }
8784
+ /**
8785
+ * @method
8786
+ * @name bitget#fetchConvertTradeHistory
8787
+ * @description fetch the users history of conversion trades
8788
+ * @see https://www.bitget.com/api-doc/common/convert/Get-Convert-Record
8789
+ * @param {string} [code] the unified currency code
8790
+ * @param {int} [since] the earliest time in ms to fetch conversions for
8791
+ * @param {int} [limit] the maximum number of conversion structures to retrieve
8792
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8793
+ * @returns {object[]} a list of [conversion structures]{@link https://docs.ccxt.com/#/?id=conversion-structure}
8794
+ */
8782
8795
  async fetchConvertTradeHistory(code = undefined, since = undefined, limit = undefined, params = {}) {
8783
- /**
8784
- * @method
8785
- * @name bitget#fetchConvertTradeHistory
8786
- * @description fetch the users history of conversion trades
8787
- * @see https://www.bitget.com/api-doc/common/convert/Get-Convert-Record
8788
- * @param {string} [code] the unified currency code
8789
- * @param {int} [since] the earliest time in ms to fetch conversions for
8790
- * @param {int} [limit] the maximum number of conversion structures to retrieve
8791
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8792
- * @returns {object[]} a list of [conversion structures]{@link https://docs.ccxt.com/#/?id=conversion-structure}
8793
- */
8794
8796
  await this.loadMarkets();
8795
8797
  const request = {};
8796
8798
  const msInDay = 86400000;
@@ -8893,15 +8895,15 @@ export default class bitget extends Exchange {
8893
8895
  'fee': this.safeNumber(conversion, 'fee'),
8894
8896
  };
8895
8897
  }
8898
+ /**
8899
+ * @method
8900
+ * @name bitget#fetchConvertCurrencies
8901
+ * @description fetches all available currencies that can be converted
8902
+ * @see https://www.bitget.com/api-doc/common/convert/Get-Convert-Currencies
8903
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8904
+ * @returns {object} an associative dictionary of currencies
8905
+ */
8896
8906
  async fetchConvertCurrencies(params = {}) {
8897
- /**
8898
- * @method
8899
- * @name bitget#fetchConvertCurrencies
8900
- * @description fetches all available currencies that can be converted
8901
- * @see https://www.bitget.com/api-doc/common/convert/Get-Convert-Currencies
8902
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8903
- * @returns {object} an associative dictionary of currencies
8904
- */
8905
8907
  await this.loadMarkets();
8906
8908
  const response = await this.privateConvertGetV2ConvertCurrencies(params);
8907
8909
  //
@@ -8956,16 +8958,16 @@ export default class bitget extends Exchange {
8956
8958
  }
8957
8959
  return result;
8958
8960
  }
8961
+ /**
8962
+ * @method
8963
+ * @name bitget#fetchFundingInterval
8964
+ * @description fetch the current funding rate interval
8965
+ * @see https://www.bitget.com/api-doc/contract/market/Get-Symbol-Next-Funding-Time
8966
+ * @param {string} symbol unified market symbol
8967
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
8968
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
8969
+ */
8959
8970
  async fetchFundingInterval(symbol, params = {}) {
8960
- /**
8961
- * @method
8962
- * @name bitget#fetchFundingInterval
8963
- * @description fetch the current funding rate interval
8964
- * @see https://www.bitget.com/api-doc/contract/market/Get-Symbol-Next-Funding-Time
8965
- * @param {string} symbol unified market symbol
8966
- * @param {object} [params] extra parameters specific to the exchange API endpoint
8967
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
8968
- */
8969
8971
  await this.loadMarkets();
8970
8972
  const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
8971
8973
  let market = undefined;
@@ -9001,20 +9003,20 @@ export default class bitget extends Exchange {
9001
9003
  const first = this.safeDict(data, 0, {});
9002
9004
  return this.parseFundingRate(first, market);
9003
9005
  }
9006
+ /**
9007
+ * @method
9008
+ * @name bitget#fetchLongShortRatioHistory
9009
+ * @description fetches the long short ratio history for a unified market symbol
9010
+ * @see https://www.bitget.com/api-doc/common/apidata/Margin-Ls-Ratio
9011
+ * @see https://www.bitget.com/api-doc/common/apidata/Account-Long-Short
9012
+ * @param {string} symbol unified symbol of the market to fetch the long short ratio for
9013
+ * @param {string} [timeframe] the period for the ratio
9014
+ * @param {int} [since] the earliest time in ms to fetch ratios for
9015
+ * @param {int} [limit] the maximum number of long short ratio structures to retrieve
9016
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
9017
+ * @returns {object[]} an array of [long short ratio structures]{@link https://docs.ccxt.com/#/?id=long-short-ratio-structure}
9018
+ */
9004
9019
  async fetchLongShortRatioHistory(symbol = undefined, timeframe = undefined, since = undefined, limit = undefined, params = {}) {
9005
- /**
9006
- * @method
9007
- * @name bitget#fetchLongShortRatioHistory
9008
- * @description fetches the long short ratio history for a unified market symbol
9009
- * @see https://www.bitget.com/api-doc/common/apidata/Margin-Ls-Ratio
9010
- * @see https://www.bitget.com/api-doc/common/apidata/Account-Long-Short
9011
- * @param {string} symbol unified symbol of the market to fetch the long short ratio for
9012
- * @param {string} [timeframe] the period for the ratio
9013
- * @param {int} [since] the earliest time in ms to fetch ratios for
9014
- * @param {int} [limit] the maximum number of long short ratio structures to retrieve
9015
- * @param {object} [params] extra parameters specific to the exchange API endpoint
9016
- * @returns {object[]} an array of [long short ratio structures]{@link https://docs.ccxt.com/#/?id=long-short-ratio-structure}
9017
- */
9018
9020
  await this.loadMarkets();
9019
9021
  const market = this.market(symbol);
9020
9022
  const request = {