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/gate.d.ts CHANGED
@@ -7,10 +7,39 @@ import type { Int, OrderSide, OrderType, OHLCV, Trade, FundingRateHistory, OpenI
7
7
  export default class gate extends Exchange {
8
8
  describe(): any;
9
9
  setSandboxMode(enable: boolean): void;
10
+ /**
11
+ * @method
12
+ * @name gate#isUnifiedEnabled
13
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
14
+ * @description returns unifiedAccount so the user can check if the unified account is enabled
15
+ * @see https://www.gate.io/docs/developers/apiv4/#get-account-detail
16
+ * @returns {boolean} true or false if the enabled unified account is enabled or not and sets the unifiedAccount option if it is undefined
17
+ */
10
18
  loadUnifiedStatus(params?: {}): Promise<void>;
11
19
  upgradeUnifiedTradeAccount(params?: {}): Promise<any>;
20
+ /**
21
+ * @method
22
+ * @name gate#fetchTime
23
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
24
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-server-current-time
25
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
26
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
27
+ */
28
+ fetchTime(params?: {}): Promise<number>;
12
29
  createExpiredOptionMarket(symbol: string): MarketInterface;
13
30
  safeMarket(marketId?: Str, market?: Market, delimiter?: Str, marketType?: Str): MarketInterface;
31
+ /**
32
+ * @method
33
+ * @name gate#fetchMarkets
34
+ * @description retrieves data on all markets for gate
35
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-currency-pairs-supported // spot
36
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading // margin
37
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts // swap
38
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2 // future
39
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time // option
40
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
41
+ * @returns {object[]} an array of objects representing market data
42
+ */
14
43
  fetchMarkets(params?: {}): Promise<Market[]>;
15
44
  fetchSpotMarkets(params?: {}): Promise<any[]>;
16
45
  fetchContractMarkets(params?: {}): Promise<any[]>;
@@ -72,14 +101,67 @@ export default class gate extends Exchange {
72
101
  multiOrderSpotPrepareRequest(market?: any, trigger?: boolean, params?: {}): any[];
73
102
  getMarginMode(stop: any, params: any): any[];
74
103
  getSettlementCurrencies(type: any, method: any): any;
104
+ /**
105
+ * @method
106
+ * @name gate#fetchCurrencies
107
+ * @description fetches all available currencies on an exchange
108
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-currencies-details
109
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
110
+ * @returns {object} an associative dictionary of currencies
111
+ */
75
112
  fetchCurrencies(params?: {}): Promise<Currencies>;
113
+ /**
114
+ * @method
115
+ * @name gate#fetchFundingRate
116
+ * @description fetch the current funding rate
117
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-a-single-contract
118
+ * @param {string} symbol unified market symbol
119
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
120
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
121
+ */
76
122
  fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
123
+ /**
124
+ * @method
125
+ * @name gate#fetchFundingRates
126
+ * @description fetch the funding rate for multiple markets
127
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
128
+ * @param {string[]|undefined} symbols list of unified market symbols
129
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
130
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
131
+ */
77
132
  fetchFundingRates(symbols?: Strings, params?: {}): Promise<FundingRates>;
78
133
  parseFundingRate(contract: any, market?: Market): FundingRate;
79
134
  parseFundingInterval(interval: any): string;
80
135
  fetchNetworkDepositAddress(code: string, params?: {}): Promise<Dict>;
136
+ /**
137
+ * @method
138
+ * @name gate#fetchDepositAddress
139
+ * @description fetch the deposit address for a currency associated with this account
140
+ * @see https://www.gate.io/docs/developers/apiv4/en/#generate-currency-deposit-address
141
+ * @param {string} code unified currency code
142
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
143
+ * @param {string} [params.network] unified network code (not used directly by gate.io but used by ccxt to filter the response)
144
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
145
+ */
81
146
  fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
147
+ /**
148
+ * @method
149
+ * @name gate#fetchTradingFee
150
+ * @description fetch the trading fees for a market
151
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
152
+ * @param {string} symbol unified market symbol
153
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
154
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
155
+ */
82
156
  fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
157
+ /**
158
+ * @method
159
+ * @name gate#fetchTradingFees
160
+ * @description fetch the trading fees for multiple markets
161
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
162
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
163
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
164
+ */
83
165
  fetchTradingFees(params?: {}): Promise<TradingFees>;
84
166
  parseTradingFees(response: any): Dict;
85
167
  parseTradingFee(info: any, market?: Market): {
@@ -90,9 +172,40 @@ export default class gate extends Exchange {
90
172
  percentage: any;
91
173
  tierBased: any;
92
174
  };
175
+ /**
176
+ * @method
177
+ * @name gate#fetchTransactionFees
178
+ * @deprecated
179
+ * @description please use fetchDepositWithdrawFees instead
180
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
181
+ * @param {string[]|undefined} codes list of unified currency codes
182
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
183
+ * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
184
+ */
93
185
  fetchTransactionFees(codes?: Strings, params?: {}): Promise<Dict>;
186
+ /**
187
+ * @method
188
+ * @name gate#fetchDepositWithdrawFees
189
+ * @description fetch deposit and withdraw fees
190
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
191
+ * @param {string[]|undefined} codes list of unified currency codes
192
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
193
+ * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
194
+ */
94
195
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
95
196
  parseDepositWithdrawFee(fee: any, currency?: Currency): Dict;
197
+ /**
198
+ * @method
199
+ * @name gate#fetchFundingHistory
200
+ * @description fetch the history of funding payments paid and received on this account
201
+ * @see https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
202
+ * @see https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
203
+ * @param {string} symbol unified market symbol
204
+ * @param {int} [since] the earliest time in ms to fetch funding history for
205
+ * @param {int} [limit] the maximum number of funding history structures to retrieve
206
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
207
+ * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
208
+ */
96
209
  fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingHistory[]>;
97
210
  parseFundingHistories(response: any, symbol: any, since: any, limit: any): FundingHistory[];
98
211
  parseFundingHistory(info: any, market?: Market): {
@@ -104,55 +217,489 @@ export default class gate extends Exchange {
104
217
  id: any;
105
218
  amount: number;
106
219
  };
220
+ /**
221
+ * @method
222
+ * @name gate#fetchOrderBook
223
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
224
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-order-book
225
+ * @see https://www.gate.io/docs/developers/apiv4/en/#futures-order-book
226
+ * @see https://www.gate.io/docs/developers/apiv4/en/#futures-order-book-2
227
+ * @see https://www.gate.io/docs/developers/apiv4/en/#options-order-book
228
+ * @param {string} symbol unified symbol of the market to fetch the order book for
229
+ * @param {int} [limit] the maximum amount of order book entries to return
230
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
231
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
232
+ */
107
233
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
234
+ /**
235
+ * @method
236
+ * @name gate#fetchTicker
237
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
238
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
239
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers
240
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers-2
241
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
242
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
243
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
244
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
245
+ */
108
246
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
109
247
  parseTicker(ticker: Dict, market?: Market): Ticker;
248
+ /**
249
+ * @method
250
+ * @name gate#fetchTickers
251
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
252
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
253
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers
254
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-futures-tickers-2
255
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
256
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
257
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
258
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
259
+ */
110
260
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
111
261
  parseBalanceHelper(entry: any): import("./base/types.js").BalanceAccount;
262
+ /**
263
+ * @method
264
+ * @name gate#fetchBalance
265
+ * @param {object} [params] exchange specific parameters
266
+ * @param {string} [params.type] spot, margin, swap or future, if not provided this.options['defaultType'] is used
267
+ * @param {string} [params.settle] 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future
268
+ * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used
269
+ * @param {string} [params.symbol] margin only - unified ccxt symbol
270
+ * @param {boolean} [params.unifiedAccount] default false, set to true for fetching the unified account balance
271
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
272
+ */
112
273
  fetchBalance(params?: {}): Promise<Balances>;
274
+ /**
275
+ * @method
276
+ * @name gateio#fetchOHLCV
277
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
278
+ * @see https://www.gate.io/docs/developers/apiv4/en/#market-candlesticks // spot
279
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-futures-candlesticks // swap
280
+ * @see https://www.gate.io/docs/developers/apiv4/en/#market-candlesticks // future
281
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-options-candlesticks // option
282
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
283
+ * @param {string} timeframe the length of time each candle represents
284
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
285
+ * @param {int} [limit] the maximum amount of candles to fetch, limit is conflicted with since and params["until"], If either since and params["until"] is specified, request will be rejected
286
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
287
+ * @param {string} [params.price] "mark" or "index" for mark price and index price candles
288
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
289
+ * @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)
290
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume (units in quote currency)
291
+ */
113
292
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
114
293
  fetchOptionOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
294
+ /**
295
+ * @method
296
+ * @name gate#fetchFundingRateHistory
297
+ * @description fetches historical funding rate prices
298
+ * @see https://www.gate.io/docs/developers/apiv4/en/#funding-rate-history
299
+ * @param {string} symbol unified symbol of the market to fetch the funding rate history for
300
+ * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
301
+ * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
302
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
303
+ * @param {int} [params.until] timestamp in ms of the latest funding rate to fetch
304
+ * @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)
305
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
306
+ */
115
307
  fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
116
308
  parseOHLCV(ohlcv: any, market?: Market): OHLCV;
309
+ /**
310
+ * @method
311
+ * @name gate#fetchTrades
312
+ * @description get the list of most recent trades for a particular symbol
313
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-market-trades
314
+ * @see https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history
315
+ * @see https://www.gate.io/docs/developers/apiv4/en/#futures-trading-history-2
316
+ * @see https://www.gate.io/docs/developers/apiv4/en/#options-trade-history
317
+ * @param {string} symbol unified symbol of the market to fetch trades for
318
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
319
+ * @param {int} [limit] the maximum amount of trades to fetch
320
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
321
+ * @param {int} [params.until] timestamp in ms of the latest trade to fetch
322
+ * @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)
323
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
324
+ */
117
325
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
326
+ /**
327
+ * @method
328
+ * @name gate#fetchOrderTrades
329
+ * @description fetch all the trades made from a single order
330
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
331
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
332
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
333
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
334
+ * @param {string} id order id
335
+ * @param {string} symbol unified market symbol
336
+ * @param {int} [since] the earliest time in ms to fetch trades for
337
+ * @param {int} [limit] the maximum number of trades to retrieve
338
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
339
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
340
+ */
118
341
  fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
342
+ /**
343
+ * @method
344
+ * @name gate#fetchMyTrades
345
+ * @description Fetch personal trading history
346
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
347
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-2
348
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-3
349
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history-4
350
+ * @param {string} symbol unified market symbol
351
+ * @param {int} [since] the earliest time in ms to fetch trades for
352
+ * @param {int} [limit] the maximum number of trades structures to retrieve
353
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
354
+ * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used
355
+ * @param {string} [params.type] 'spot', 'swap', or 'future', if not provided this.options['defaultMarginMode'] is used
356
+ * @param {int} [params.until] The latest timestamp, in ms, that fetched trades were made
357
+ * @param {int} [params.page] *spot only* Page number
358
+ * @param {string} [params.order_id] *spot only* Filter trades with specified order ID. symbol is also required if this field is present
359
+ * @param {string} [params.order] *contract only* Futures order ID, return related data only if specified
360
+ * @param {int} [params.offset] *contract only* list offset, starting from 0
361
+ * @param {string} [params.last_id] *contract only* specify list staring point using the id of last record in previous list-query results
362
+ * @param {int} [params.count_total] *contract only* whether to return total number matched, default to 0(no return)
363
+ * @param {bool} [params.unifiedAccount] set to true for fetching trades in a unified account
364
+ * @param {bool} [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)
365
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
366
+ */
119
367
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
120
368
  parseTrade(trade: Dict, market?: Market): Trade;
369
+ /**
370
+ * @method
371
+ * @name gate#fetchDeposits
372
+ * @description fetch all deposits made to an account
373
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-deposit-records
374
+ * @param {string} code unified currency code
375
+ * @param {int} [since] the earliest time in ms to fetch deposits for
376
+ * @param {int} [limit] the maximum number of deposits structures to retrieve
377
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
378
+ * @param {int} [params.until] end time in ms
379
+ * @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)
380
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
381
+ */
121
382
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
383
+ /**
384
+ * @method
385
+ * @name gate#fetchWithdrawals
386
+ * @description fetch all withdrawals made from an account
387
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-records
388
+ * @param {string} code unified currency code
389
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
390
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
391
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
392
+ * @param {int} [params.until] end time in ms
393
+ * @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)
394
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
395
+ */
122
396
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
397
+ /**
398
+ * @method
399
+ * @name gate#withdraw
400
+ * @description make a withdrawal
401
+ * @see https://www.gate.io/docs/developers/apiv4/en/#withdraw
402
+ * @param {string} code unified currency code
403
+ * @param {float} amount the amount to withdraw
404
+ * @param {string} address the address to withdraw to
405
+ * @param {string} tag
406
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
407
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
408
+ */
123
409
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
124
410
  parseTransactionStatus(status: Str): string;
125
411
  parseTransactionType(type: any): string;
126
412
  parseTransaction(transaction: Dict, currency?: Currency): Transaction;
413
+ /**
414
+ * @method
415
+ * @name gate#createOrder
416
+ * @description Create an order on the exchange
417
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-an-order
418
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order
419
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
420
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-2
421
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
422
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-a-price-triggered-order-3
423
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
424
+ * @param {string} symbol Unified CCXT market symbol
425
+ * @param {string} type 'limit' or 'market' *"market" is contract only*
426
+ * @param {string} side 'buy' or 'sell'
427
+ * @param {float} amount the amount of currency to trade
428
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
429
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
430
+ * @param {float} [params.stopPrice] The price at which a trigger order is triggered at
431
+ * @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
432
+ * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
433
+ * @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
434
+ * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used
435
+ * @param {int} [params.iceberg] Amount to display for the iceberg order, Null or 0 for normal orders, Set to -1 to hide the order completely
436
+ * @param {string} [params.text] User defined information
437
+ * @param {string} [params.account] *spot and margin only* "spot", "margin" or "cross_margin"
438
+ * @param {bool} [params.auto_borrow] *margin only* Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough
439
+ * @param {string} [params.settle] *contract only* Unified Currency Code for settle currency
440
+ * @param {bool} [params.reduceOnly] *contract only* Indicates if this order is to reduce the size of a position
441
+ * @param {bool} [params.close] *contract only* Set as true to close the position, with size set to 0
442
+ * @param {bool} [params.auto_size] *contract only* Set side to close dual-mode position, close_long closes the long side, while close_short the short one, size also needs to be set to 0
443
+ * @param {int} [params.price_type] *contract only* 0 latest deal price, 1 mark price, 2 index price
444
+ * @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
445
+ * @param {bool} [params.unifiedAccount] set to true for creating an order in the unified account
446
+ * @returns {object|undefined} [An order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
447
+ */
127
448
  createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
128
449
  createOrdersRequest(orders: OrderRequest[], params?: {}): any[];
450
+ /**
451
+ * @method
452
+ * @name gate#createOrders
453
+ * @description create a list of trade orders
454
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
455
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-orders
456
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-futures-orders
457
+ * @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
458
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
459
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
460
+ */
129
461
  createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
130
462
  createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
463
+ /**
464
+ * @method
465
+ * @name gate#createMarketBuyOrderWithCost
466
+ * @description create a market buy order by providing the symbol and cost
467
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-an-order
468
+ * @param {string} symbol unified symbol of the market to create an order in
469
+ * @param {float} cost how much you want to trade in units of the quote currency
470
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
471
+ * @param {bool} [params.unifiedAccount] set to true for creating a unified account order
472
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
473
+ */
131
474
  createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
132
475
  editOrderRequest(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): any;
476
+ /**
477
+ * @method
478
+ * @name gate#editOrder
479
+ * @description edit a trade order, gate currently only supports the modification of the price or amount fields
480
+ * @see https://www.gate.io/docs/developers/apiv4/en/#amend-an-order
481
+ * @see https://www.gate.io/docs/developers/apiv4/en/#amend-an-order-2
482
+ * @param {string} id order id
483
+ * @param {string} symbol unified symbol of the market to create an order in
484
+ * @param {string} type 'market' or 'limit'
485
+ * @param {string} side 'buy' or 'sell'
486
+ * @param {float} amount how much of the currency you want to trade in units of the base currency
487
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
488
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
489
+ * @param {bool} [params.unifiedAccount] set to true for editing an order in a unified account
490
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
491
+ */
133
492
  editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
134
493
  parseOrderStatus(status: Str): string;
135
494
  parseOrder(order: Dict, market?: Market): Order;
136
495
  fetchOrderRequest(id: string, symbol?: Str, params?: {}): any[];
496
+ /**
497
+ * @method
498
+ * @name gate#fetchOrder
499
+ * @description Retrieves information on an order
500
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order
501
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
502
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-3
503
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-4
504
+ * @param {string} id Order id
505
+ * @param {string} symbol Unified market symbol, *required for spot and margin*
506
+ * @param {object} [params] Parameters specified by the exchange api
507
+ * @param {bool} [params.trigger] True if the order being fetched is a trigger order
508
+ * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used
509
+ * @param {string} [params.type] 'spot', 'swap', or 'future', if not provided this.options['defaultMarginMode'] is used
510
+ * @param {string} [params.settle] 'btc' or 'usdt' - settle currency for perpetual swap and future - market settle currency is used if symbol !== undefined, default="usdt" for swap and "btc" for future
511
+ * @param {bool} [params.unifiedAccount] set to true for fetching a unified account order
512
+ * @returns An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
513
+ */
137
514
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
515
+ /**
516
+ * @method
517
+ * @name gate#fetchOpenOrders
518
+ * @description fetch all unfilled currently open orders
519
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-open-orders
520
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
521
+ * @param {string} symbol unified market symbol
522
+ * @param {int} [since] the earliest time in ms to fetch open orders for
523
+ * @param {int} [limit] the maximum number of open orders structures to retrieve
524
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
525
+ * @param {bool} [params.stop] true for fetching stop orders
526
+ * @param {string} [params.type] spot, margin, swap or future, if not provided this.options['defaultType'] is used
527
+ * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for type='margin', if not provided this.options['defaultMarginMode'] is used
528
+ * @param {bool} [params.unifiedAccount] set to true for fetching unified account orders
529
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
530
+ */
138
531
  fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
532
+ /**
533
+ * @method
534
+ * @name gate#fetchClosedOrders
535
+ * @description fetches information on multiple closed orders made by the user
536
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-orders
537
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-running-auto-order-list
538
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders
539
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders
540
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-2
541
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-auto-orders-2
542
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-options-orders
543
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-futures-orders-by-time-range
544
+ * @param {string} symbol unified market symbol of the market orders were made in
545
+ * @param {int} [since] the earliest time in ms to fetch orders for
546
+ * @param {int} [limit] the maximum number of order structures to retrieve
547
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
548
+ * @param {bool} [params.stop] true for fetching stop orders
549
+ * @param {string} [params.type] spot, swap or future, if not provided this.options['defaultType'] is used
550
+ * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used
551
+ * @param {boolean} [params.historical] *swap only* true for using historical endpoint
552
+ * @param {bool} [params.unifiedAccount] set to true for fetching unified account orders
553
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
554
+ */
139
555
  fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
140
556
  prepareOrdersByStatusRequest(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): object[];
141
557
  fetchOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
558
+ /**
559
+ * @method
560
+ * @name gate#cancelOrder
561
+ * @description Cancels an open order
562
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order
563
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-2
564
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-3
565
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order-4
566
+ * @param {string} id Order id
567
+ * @param {string} symbol Unified market symbol
568
+ * @param {object} [params] Parameters specified by the exchange api
569
+ * @param {bool} [params.stop] True if the order to be cancelled is a trigger order
570
+ * @param {bool} [params.unifiedAccount] set to true for canceling unified account orders
571
+ * @returns An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
572
+ */
142
573
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
574
+ /**
575
+ * @method
576
+ * @name gate#cancelOrders
577
+ * @description cancel multiple orders
578
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
579
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list-2
580
+ * @param {string[]} ids order ids
581
+ * @param {string} symbol unified symbol of the market the order was made in
582
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
583
+ * @param {bool} [params.unifiedAccount] set to true for canceling unified account orders
584
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
585
+ */
143
586
  cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
587
+ /**
588
+ * @method
589
+ * @name gate#cancelOrdersForSymbols
590
+ * @description cancel multiple orders for multiple symbols
591
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
592
+ * @param {CancellationRequest[]} orders list of order ids with symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}]
593
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
594
+ * @param {string[]} [params.clientOrderIds] client order ids
595
+ * @param {bool} [params.unifiedAccount] set to true for canceling unified account orders
596
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
597
+ */
144
598
  cancelOrdersForSymbols(orders: CancellationRequest[], params?: {}): Promise<Order[]>;
599
+ /**
600
+ * @method
601
+ * @name gate#cancelAllOrders
602
+ * @description cancel all open orders
603
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-in-specified-currency-pair
604
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched
605
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-2
606
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-3
607
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
608
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
609
+ * @param {bool} [params.unifiedAccount] set to true for canceling unified account orders
610
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
611
+ */
145
612
  cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
613
+ /**
614
+ * @method
615
+ * @name gate#transfer
616
+ * @description transfer currency internally between wallets on the same account
617
+ * @see https://www.gate.io/docs/developers/apiv4/en/#transfer-between-trading-accounts
618
+ * @param {string} code unified currency code for currency being transferred
619
+ * @param {float} amount the amount of currency to transfer
620
+ * @param {string} fromAccount the account to transfer currency from
621
+ * @param {string} toAccount the account to transfer currency to
622
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
623
+ * @param {string} [params.symbol] Unified market symbol *required for type == margin*
624
+ * @returns A [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
625
+ */
146
626
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
147
627
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
628
+ /**
629
+ * @method
630
+ * @name gate#setLeverage
631
+ * @description set the level of leverage for a market
632
+ * @see https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage
633
+ * @see https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage-2
634
+ * @param {float} leverage the rate of leverage
635
+ * @param {string} symbol unified market symbol
636
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
637
+ * @returns {object} response from the exchange
638
+ */
148
639
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
149
640
  parsePosition(position: Dict, market?: Market): Position;
641
+ /**
642
+ * @method
643
+ * @name gate#fetchPosition
644
+ * @description fetch data on an open contract position
645
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-single-position
646
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-single-position-2
647
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-specified-contract-position
648
+ * @param {string} symbol unified market symbol of the market the position is held in
649
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
650
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
651
+ */
150
652
  fetchPosition(symbol: string, params?: {}): Promise<Position>;
653
+ /**
654
+ * @method
655
+ * @name gate#fetchPositions
656
+ * @description fetch all open positions
657
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user
658
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-positions-of-a-user-2
659
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-user-s-positions-of-specified-underlying
660
+ * @param {string[]|undefined} symbols Not used by gate, but parsed internally by CCXT
661
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
662
+ * @param {string} [params.settle] 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future
663
+ * @param {string} [params.type] swap, future or option, if not provided this.options['defaultType'] is used
664
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
665
+ */
151
666
  fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
667
+ /**
668
+ * @method
669
+ * @name gate#fetchLeverageTiers
670
+ * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
671
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
672
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2
673
+ * @param {string[]} [symbols] list of unified market symbols
674
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
675
+ * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
676
+ */
152
677
  fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<LeverageTiers>;
678
+ /**
679
+ * @method
680
+ * @name gate#fetchMarketLeverageTiers
681
+ * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
682
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-risk-limit-tiers
683
+ * @param {string} symbol unified market symbol
684
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
685
+ * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
686
+ */
153
687
  fetchMarketLeverageTiers(symbol: string, params?: {}): Promise<LeverageTier[]>;
154
- parseEmulatedLeverageTiers(info: any, market?: any): any[];
688
+ parseEmulatedLeverageTiers(info: any, market?: any): LeverageTier[];
155
689
  parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[];
690
+ /**
691
+ * @method
692
+ * @name gate#repayMargin
693
+ * @description repay borrowed margin and interest
694
+ * @see https://www.gate.io/docs/apiv4/en/#repay-a-loan
695
+ * @param {string} symbol unified market symbol
696
+ * @param {string} code unified currency code of the currency to repay
697
+ * @param {float} amount the amount to repay
698
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
699
+ * @param {string} [params.mode] 'all' or 'partial' payment mode, extra parameter required for isolated margin
700
+ * @param {string} [params.id] '34267567' loan id, extra parameter required for isolated margin
701
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
702
+ */
156
703
  repayIsolatedMargin(symbol: string, code: string, amount: any, params?: {}): Promise<{
157
704
  id: number;
158
705
  currency: string;
@@ -162,6 +709,20 @@ export default class gate extends Exchange {
162
709
  datetime: string;
163
710
  info: any;
164
711
  }>;
712
+ /**
713
+ * @method
714
+ * @name gate#repayCrossMargin
715
+ * @description repay cross margin borrowed margin and interest
716
+ * @see https://www.gate.io/docs/developers/apiv4/en/#cross-margin-repayments
717
+ * @see https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
718
+ * @param {string} code unified currency code of the currency to repay
719
+ * @param {float} amount the amount to repay
720
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
721
+ * @param {string} [params.mode] 'all' or 'partial' payment mode, extra parameter required for isolated margin
722
+ * @param {string} [params.id] '34267567' loan id, extra parameter required for isolated margin
723
+ * @param {boolean} [params.unifiedAccount] set to true for repaying in the unified account
724
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
725
+ */
165
726
  repayCrossMargin(code: string, amount: any, params?: {}): Promise<{
166
727
  id: number;
167
728
  currency: string;
@@ -171,6 +732,18 @@ export default class gate extends Exchange {
171
732
  datetime: string;
172
733
  info: any;
173
734
  }>;
735
+ /**
736
+ * @method
737
+ * @name gate#borrowMargin
738
+ * @description create a loan to borrow margin
739
+ * @see https://www.gate.io/docs/developers/apiv4/en/#marginuni
740
+ * @param {string} symbol unified market symbol, required for isolated margin
741
+ * @param {string} code unified currency code of the currency to borrow
742
+ * @param {float} amount the amount to borrow
743
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
744
+ * @param {string} [params.rate] '0.0002' or '0.002' extra parameter required for isolated margin
745
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
746
+ */
174
747
  borrowIsolatedMargin(symbol: string, code: string, amount: number, params?: {}): Promise<{
175
748
  id: number;
176
749
  currency: string;
@@ -180,6 +753,19 @@ export default class gate extends Exchange {
180
753
  datetime: string;
181
754
  info: any;
182
755
  }>;
756
+ /**
757
+ * @method
758
+ * @name gate#borrowMargin
759
+ * @description create a loan to borrow margin
760
+ * @see https://www.gate.io/docs/apiv4/en/#create-a-cross-margin-borrow-loan
761
+ * @see https://www.gate.io/docs/developers/apiv4/en/#borrow-or-repay
762
+ * @param {string} code unified currency code of the currency to borrow
763
+ * @param {float} amount the amount to borrow
764
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
765
+ * @param {string} [params.rate] '0.0002' or '0.002' extra parameter required for isolated margin
766
+ * @param {boolean} [params.unifiedAccount] set to true for borrowing in the unified account
767
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
768
+ */
183
769
  borrowCrossMargin(code: string, amount: number, params?: {}): Promise<{
184
770
  id: number;
185
771
  currency: string;
@@ -198,6 +784,21 @@ export default class gate extends Exchange {
198
784
  datetime: string;
199
785
  info: any;
200
786
  };
787
+ /**
788
+ * @method
789
+ * @name gate#fetchBorrowInterest
790
+ * @description fetch the interest owed by the user for borrowing currency for margin trading
791
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-interest-records
792
+ * @see https://www.gate.io/docs/developers/apiv4/en/#interest-records-for-the-cross-margin-account
793
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-interest-records-2
794
+ * @param {string} [code] unified currency code
795
+ * @param {string} [symbol] unified market symbol when fetching interest in isolated markets
796
+ * @param {int} [since] the earliest time in ms to fetch borrow interest for
797
+ * @param {int} [limit] the maximum number of structures to retrieve
798
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
799
+ * @param {boolean} [params.unifiedAccount] set to true for fetching borrow interest in the unified account
800
+ * @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
801
+ */
201
802
  fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<BorrowInterest[]>;
202
803
  parseBorrowInterest(info: Dict, market?: Market): BorrowInterest;
203
804
  sign(path: any, api?: any[], method?: string, params?: {}, headers?: any, body?: any): {
@@ -208,8 +809,43 @@ export default class gate extends Exchange {
208
809
  };
209
810
  modifyMarginHelper(symbol: string, amount: any, params?: {}): Promise<MarginModification>;
210
811
  parseMarginModification(data: Dict, market?: Market): MarginModification;
812
+ /**
813
+ * @method
814
+ * @name gate#reduceMargin
815
+ * @description remove margin from a position
816
+ * @see https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
817
+ * @see https://www.gate.io/docs/developers/apiv4/en/#update-position-margin-2
818
+ * @param {string} symbol unified market symbol
819
+ * @param {float} amount the amount of margin to remove
820
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
821
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
822
+ */
211
823
  reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
824
+ /**
825
+ * @method
826
+ * @name gate#addMargin
827
+ * @description add margin
828
+ * @see https://www.gate.io/docs/developers/apiv4/en/#update-position-margin
829
+ * @see https://www.gate.io/docs/developers/apiv4/en/#update-position-margin-2
830
+ * @param {string} symbol unified market symbol
831
+ * @param {float} amount amount of margin to add
832
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
833
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
834
+ */
212
835
  addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
836
+ /**
837
+ * @method
838
+ * @name gate#fetchOpenInterest
839
+ * @description Retrieves the open interest of a currency
840
+ * @see https://www.gate.io/docs/developers/apiv4/en/#futures-stats
841
+ * @param {string} symbol Unified CCXT market symbol
842
+ * @param {string} timeframe "5m", "15m", "30m", "1h", "4h", "1d"
843
+ * @param {int} [since] the time(ms) of the earliest record to retrieve as a unix timestamp
844
+ * @param {int} [limit] default 30
845
+ * @param {object} [params] exchange specific parameters
846
+ * @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)
847
+ * @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
848
+ */
213
849
  fetchOpenInterestHistory(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OpenInterest[]>;
214
850
  parseOpenInterest(interest: any, market?: Market): {
215
851
  symbol: string;
@@ -219,7 +855,29 @@ export default class gate extends Exchange {
219
855
  datetime: string;
220
856
  info: any;
221
857
  };
858
+ /**
859
+ * @method
860
+ * @name gate#fetchSettlementHistory
861
+ * @description fetches historical settlement records
862
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-settlement-history-2
863
+ * @param {string} symbol unified market symbol of the settlement history, required on gate
864
+ * @param {int} [since] timestamp in ms
865
+ * @param {int} [limit] number of records
866
+ * @param {object} [params] exchange specific params
867
+ * @returns {object[]} a list of [settlement history objects]{@link https://docs.ccxt.com/#/?id=settlement-history-structure}
868
+ */
222
869
  fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
870
+ /**
871
+ * @method
872
+ * @name gate#fetchMySettlementHistory
873
+ * @description fetches historical settlement records of the user
874
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-my-options-settlements
875
+ * @param {string} symbol unified market symbol of the settlement history
876
+ * @param {int} [since] timestamp in ms
877
+ * @param {int} [limit] number of records
878
+ * @param {object} [params] exchange specific params
879
+ * @returns {object[]} a list of [settlement history objects]
880
+ */
223
881
  fetchMySettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
224
882
  parseSettlement(settlement: any, market: any): {
225
883
  info: any;
@@ -229,23 +887,167 @@ export default class gate extends Exchange {
229
887
  datetime: string;
230
888
  };
231
889
  parseSettlements(settlements: any, market: any): any[];
890
+ /**
891
+ * @method
892
+ * @name gate#fetchLedger
893
+ * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
894
+ * @see https://www.gate.io/docs/developers/apiv4/en/#query-account-book
895
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-margin-account-balance-change-history
896
+ * @see https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
897
+ * @see https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
898
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-account-changing-history
899
+ * @param {string} [code] unified currency code
900
+ * @param {int} [since] timestamp in ms of the earliest ledger entry
901
+ * @param {int} [limit] max number of ledger entries to return
902
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
903
+ * @param {int} [params.until] end time in ms
904
+ * @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)
905
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
906
+ */
232
907
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
233
908
  parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
234
909
  parseLedgerEntryType(type: any): string;
910
+ /**
911
+ * @method
912
+ * @name gate#setPositionMode
913
+ * @description set dual/hedged mode to true or false for a swap market, make sure all positions are closed and no orders are open before setting dual mode
914
+ * @see https://www.gate.io/docs/developers/apiv4/en/#enable-or-disable-dual-mode
915
+ * @param {bool} hedged set to true to enable dual mode
916
+ * @param {string|undefined} symbol if passed, dual mode is set for all markets with the same settle currency
917
+ * @param {object} params extra parameters specific to the exchange API endpoint
918
+ * @param {string} params.settle settle currency
919
+ * @returns {object} response from the exchange
920
+ */
235
921
  setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
922
+ /**
923
+ * @method
924
+ * @name gate#fetchUnderlyingAssets
925
+ * @description fetches the market ids of underlying assets for a specific contract market type
926
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-underlyings
927
+ * @param {object} [params] exchange specific params
928
+ * @param {string} [params.type] the contract market type, 'option', 'swap' or 'future', the default is 'option'
929
+ * @returns {object[]} a list of [underlying assets]{@link https://docs.ccxt.com/#/?id=underlying-assets-structure}
930
+ */
236
931
  fetchUnderlyingAssets(params?: {}): Promise<any[]>;
932
+ /**
933
+ * @method
934
+ * @name gate#fetchLiquidations
935
+ * @description retrieves the public liquidations of a trading pair
936
+ * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-liquidation-history
937
+ * @param {string} symbol unified CCXT market symbol
938
+ * @param {int} [since] the earliest time in ms to fetch liquidations for
939
+ * @param {int} [limit] the maximum number of liquidation structures to retrieve
940
+ * @param {object} [params] exchange specific parameters for the exchange API endpoint
941
+ * @param {int} [params.until] timestamp in ms of the latest liquidation
942
+ * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
943
+ */
237
944
  fetchLiquidations(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").Liquidation[]>;
945
+ /**
946
+ * @method
947
+ * @name gate#fetchMyLiquidations
948
+ * @description retrieves the users liquidated positions
949
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history
950
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history-2
951
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-user-s-liquidation-history-of-specified-underlying
952
+ * @param {string} symbol unified CCXT market symbol
953
+ * @param {int} [since] the earliest time in ms to fetch liquidations for
954
+ * @param {int} [limit] the maximum number of liquidation structures to retrieve
955
+ * @param {object} [params] exchange specific parameters for the exchange API endpoint
956
+ * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
957
+ */
238
958
  fetchMyLiquidations(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").Liquidation[]>;
239
959
  parseLiquidation(liquidation: any, market?: Market): import("./base/types.js").Liquidation;
960
+ /**
961
+ * @method
962
+ * @name gate#fetchGreeks
963
+ * @description fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
964
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
965
+ * @param {string} symbol unified symbol of the market to fetch greeks for
966
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
967
+ * @returns {object} a [greeks structure]{@link https://docs.ccxt.com/#/?id=greeks-structure}
968
+ */
240
969
  fetchGreeks(symbol: string, params?: {}): Promise<Greeks>;
241
970
  parseGreeks(greeks: Dict, market?: Market): Greeks;
971
+ /**
972
+ * @method
973
+ * @name gate#closePosition
974
+ * @description closes open positions for a market
975
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order
976
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-a-futures-order-2
977
+ * @see https://www.gate.io/docs/developers/apiv4/en/#create-an-options-order
978
+ * @param {string} symbol Unified CCXT market symbol
979
+ * @param {string} side 'buy' or 'sell'
980
+ * @param {object} [params] extra parameters specific to the okx api endpoint
981
+ * @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
982
+ */
242
983
  closePosition(symbol: string, side?: OrderSide, params?: {}): Promise<Order>;
984
+ /**
985
+ * @method
986
+ * @name gate#fetchLeverage
987
+ * @description fetch the set leverage for a market
988
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-unified-account-information
989
+ * @see https://www.gate.io/docs/developers/apiv4/en/#get-detail-of-lending-market
990
+ * @see https://www.gate.io/docs/developers/apiv4/en/#query-one-single-margin-currency-pair-deprecated
991
+ * @param {string} symbol unified market symbol
992
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
993
+ * @param {boolean} [params.unified] default false, set to true for fetching the unified accounts leverage
994
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
995
+ */
243
996
  fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
997
+ /**
998
+ * @method
999
+ * @name gate#fetchLeverages
1000
+ * @description fetch the set leverage for all leverage markets, only spot margin is supported on gate
1001
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-lending-markets
1002
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading-deprecated
1003
+ * @param {string[]} symbols a list of unified market symbols
1004
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1005
+ * @param {boolean} [params.unified] default false, set to true for fetching unified account leverages
1006
+ * @returns {object} a list of [leverage structures]{@link https://docs.ccxt.com/#/?id=leverage-structure}
1007
+ */
244
1008
  fetchLeverages(symbols?: Strings, params?: {}): Promise<Leverages>;
245
1009
  parseLeverage(leverage: Dict, market?: Market): Leverage;
1010
+ /**
1011
+ * @method
1012
+ * @name gate#fetchOption
1013
+ * @description fetches option data that is commonly found in an option chain
1014
+ * @see https://www.gate.io/docs/developers/apiv4/en/#query-specified-contract-detail
1015
+ * @param {string} symbol unified market symbol
1016
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1017
+ * @returns {object} an [option chain structure]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
1018
+ */
246
1019
  fetchOption(symbol: string, params?: {}): Promise<Option>;
1020
+ /**
1021
+ * @method
1022
+ * @name gate#fetchOptionChain
1023
+ * @description fetches data for an underlying asset that is commonly found in an option chain
1024
+ * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time
1025
+ * @param {string} code base currency to fetch an option chain for
1026
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1027
+ * @param {string} [params.underlying] the underlying asset, can be obtained from fetchUnderlyingAssets ()
1028
+ * @param {int} [params.expiration] unix timestamp of the expiration time
1029
+ * @returns {object} a list of [option chain structures]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
1030
+ */
247
1031
  fetchOptionChain(code: string, params?: {}): Promise<OptionChain>;
248
1032
  parseOption(chain: Dict, currency?: Currency, market?: Market): Option;
1033
+ /**
1034
+ * @method
1035
+ * @name gate#fetchPositionsHistory
1036
+ * @description fetches historical positions
1037
+ * @see https://www.gate.io/docs/developers/apiv4/#list-position-close-history
1038
+ * @see https://www.gate.io/docs/developers/apiv4/#list-position-close-history-2
1039
+ * @param {string[]} symbols unified conract symbols, must all have the same settle currency and the same market type
1040
+ * @param {int} [since] the earliest time in ms to fetch positions for
1041
+ * @param {int} [limit] the maximum amount of records to fetch, default=1000
1042
+ * @param {object} params extra parameters specific to the exchange api endpoint
1043
+ * @param {int} [params.until] the latest time in ms to fetch positions for
1044
+ *
1045
+ * EXCHANGE SPECIFIC PARAMETERS
1046
+ * @param {int} [params.offset] list offset, starting from 0
1047
+ * @param {string} [params.side] long or short
1048
+ * @param {string} [params.pnl] query profit or loss
1049
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
1050
+ */
249
1051
  fetchPositionsHistory(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
250
1052
  handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
251
1053
  }