ccxt 4.1.85 → 4.1.87

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 (355) hide show
  1. package/README.md +5 -8
  2. package/dist/ccxt.browser.js +17662 -23869
  3. package/dist/ccxt.browser.min.js +3 -3
  4. package/dist/cjs/ccxt.js +1 -16
  5. package/dist/cjs/src/ace.js +1 -1
  6. package/dist/cjs/src/alpaca.js +2 -2
  7. package/dist/cjs/src/ascendex.js +2 -2
  8. package/dist/cjs/src/base/Exchange.js +50 -20
  9. package/dist/cjs/src/bigone.js +1 -1
  10. package/dist/cjs/src/binance.js +2 -2
  11. package/dist/cjs/src/binanceus.js +0 -2
  12. package/dist/cjs/src/bingx.js +1 -1
  13. package/dist/cjs/src/bit2c.js +1 -1
  14. package/dist/cjs/src/bitbank.js +1 -1
  15. package/dist/cjs/src/bitbns.js +1 -1
  16. package/dist/cjs/src/bitfinex.js +1 -1
  17. package/dist/cjs/src/bitfinex2.js +1 -1
  18. package/dist/cjs/src/bitflyer.js +1 -1
  19. package/dist/cjs/src/bitforex.js +1 -3
  20. package/dist/cjs/src/bitget.js +2 -3
  21. package/dist/cjs/src/bithumb.js +1 -1
  22. package/dist/cjs/src/bitmart.js +1 -1
  23. package/dist/cjs/src/bitmex.js +2 -2
  24. package/dist/cjs/src/bitopro.js +1 -1
  25. package/dist/cjs/src/bitpanda.js +1 -1
  26. package/dist/cjs/src/bitrue.js +1 -1
  27. package/dist/cjs/src/bitso.js +1 -1
  28. package/dist/cjs/src/bitstamp.js +1 -1
  29. package/dist/cjs/src/bittrex.js +1 -1
  30. package/dist/cjs/src/bitvavo.js +1 -1
  31. package/dist/cjs/src/bl3p.js +1 -1
  32. package/dist/cjs/src/blockchaincom.js +1 -1
  33. package/dist/cjs/src/btcalpha.js +1 -1
  34. package/dist/cjs/src/btcbox.js +1 -1
  35. package/dist/cjs/src/btcmarkets.js +1 -1
  36. package/dist/cjs/src/btcturk.js +1 -1
  37. package/dist/cjs/src/bybit.js +3 -5
  38. package/dist/cjs/src/cex.js +1 -1
  39. package/dist/cjs/src/coinbase.js +1 -1
  40. package/dist/cjs/src/coinbasepro.js +1 -1
  41. package/dist/cjs/src/coincheck.js +1 -1
  42. package/dist/cjs/src/coinex.js +2 -2
  43. package/dist/cjs/src/coinlist.js +1 -3
  44. package/dist/cjs/src/coinmate.js +1 -1
  45. package/dist/cjs/src/coinone.js +1 -1
  46. package/dist/cjs/src/coinsph.js +1 -3
  47. package/dist/cjs/src/coinspot.js +1 -1
  48. package/dist/cjs/src/cryptocom.js +3 -5
  49. package/dist/cjs/src/currencycom.js +1 -1
  50. package/dist/cjs/src/delta.js +1 -1
  51. package/dist/cjs/src/deribit.js +1 -1
  52. package/dist/cjs/src/digifinex.js +160 -112
  53. package/dist/cjs/src/exmo.js +1 -1
  54. package/dist/cjs/src/gate.js +1 -211
  55. package/dist/cjs/src/gemini.js +1 -1
  56. package/dist/cjs/src/hitbtc.js +2 -2
  57. package/dist/cjs/src/hitbtc3.js +1 -1
  58. package/dist/cjs/src/hollaex.js +1 -1
  59. package/dist/cjs/src/htx.js +2 -2
  60. package/dist/cjs/src/huobijp.js +1 -1
  61. package/dist/cjs/src/idex.js +1 -1
  62. package/dist/cjs/src/independentreserve.js +1 -1
  63. package/dist/cjs/src/indodax.js +1 -1
  64. package/dist/cjs/src/kraken.js +2 -2
  65. package/dist/cjs/src/krakenfutures.js +3 -3
  66. package/dist/cjs/src/kucoin.js +2 -6
  67. package/dist/cjs/src/kuna.js +1 -3
  68. package/dist/cjs/src/latoken.js +2 -2
  69. package/dist/cjs/src/lbank.js +1 -1
  70. package/dist/cjs/src/luno.js +1 -1
  71. package/dist/cjs/src/lykke.js +1 -1
  72. package/dist/cjs/src/mercado.js +1 -1
  73. package/dist/cjs/src/mexc.js +102 -55
  74. package/dist/cjs/src/ndax.js +1 -1
  75. package/dist/cjs/src/novadax.js +1 -1
  76. package/dist/cjs/src/oceanex.js +1 -1
  77. package/dist/cjs/src/okcoin.js +1 -1
  78. package/dist/cjs/src/okx.js +4 -5
  79. package/dist/cjs/src/p2b.js +1 -3
  80. package/dist/cjs/src/paymium.js +1 -1
  81. package/dist/cjs/src/phemex.js +1 -1
  82. package/dist/cjs/src/poloniex.js +51 -51
  83. package/dist/cjs/src/poloniexfutures.js +1 -1
  84. package/dist/cjs/src/pro/bitget.js +1 -1
  85. package/dist/cjs/src/pro/bitmex.js +206 -0
  86. package/dist/cjs/src/pro/coinex.js +2 -1
  87. package/dist/cjs/src/pro/krakenfutures.js +6 -6
  88. package/dist/cjs/src/pro/mexc.js +1 -1
  89. package/dist/cjs/src/pro/poloniex.js +1 -1
  90. package/dist/cjs/src/pro/poloniexfutures.js +3 -3
  91. package/dist/cjs/src/probit.js +27 -19
  92. package/dist/cjs/src/static_dependencies/jsencrypt/JSEncrypt.js +1 -1
  93. package/dist/cjs/src/static_dependencies/jsencrypt/JSEncryptRSAKey.js +3 -3
  94. package/dist/cjs/src/timex.js +1 -1
  95. package/dist/cjs/src/tokocrypto.js +8 -5
  96. package/dist/cjs/src/upbit.js +37 -27
  97. package/dist/cjs/src/wavesexchange.js +1 -1
  98. package/dist/cjs/src/wazirx.js +1 -3
  99. package/dist/cjs/src/whitebit.js +1 -3
  100. package/dist/cjs/src/woo.js +1 -3
  101. package/dist/cjs/src/yobit.js +1 -1
  102. package/dist/cjs/src/zaif.js +1 -1
  103. package/dist/cjs/src/zonda.js +1 -1
  104. package/js/ccxt.d.ts +3 -21
  105. package/js/ccxt.js +2 -14
  106. package/js/src/ace.d.ts +2 -2
  107. package/js/src/ace.js +1 -1
  108. package/js/src/alpaca.d.ts +2 -2
  109. package/js/src/alpaca.js +2 -2
  110. package/js/src/ascendex.d.ts +2 -2
  111. package/js/src/ascendex.js +2 -2
  112. package/js/src/base/Exchange.d.ts +7 -3
  113. package/js/src/base/Exchange.js +50 -20
  114. package/js/src/base/types.d.ts +1 -0
  115. package/js/src/bigone.d.ts +2 -2
  116. package/js/src/bigone.js +1 -1
  117. package/js/src/binance.d.ts +2 -2
  118. package/js/src/binance.js +2 -2
  119. package/js/src/binanceus.js +0 -2
  120. package/js/src/bingx.d.ts +1 -1
  121. package/js/src/bingx.js +1 -1
  122. package/js/src/bit2c.d.ts +2 -2
  123. package/js/src/bit2c.js +1 -1
  124. package/js/src/bitbank.d.ts +2 -2
  125. package/js/src/bitbank.js +1 -1
  126. package/js/src/bitbns.d.ts +2 -2
  127. package/js/src/bitbns.js +1 -1
  128. package/js/src/bitfinex.d.ts +2 -2
  129. package/js/src/bitfinex.js +1 -1
  130. package/js/src/bitfinex2.d.ts +2 -2
  131. package/js/src/bitfinex2.js +1 -1
  132. package/js/src/bitflyer.d.ts +2 -2
  133. package/js/src/bitflyer.js +1 -1
  134. package/js/src/bitforex.d.ts +2 -2
  135. package/js/src/bitforex.js +1 -3
  136. package/js/src/bitget.d.ts +2 -2
  137. package/js/src/bitget.js +2 -3
  138. package/js/src/bithumb.d.ts +2 -2
  139. package/js/src/bithumb.js +1 -1
  140. package/js/src/bitmart.d.ts +2 -2
  141. package/js/src/bitmart.js +1 -1
  142. package/js/src/bitmex.d.ts +2 -2
  143. package/js/src/bitmex.js +2 -2
  144. package/js/src/bitopro.d.ts +2 -2
  145. package/js/src/bitopro.js +1 -1
  146. package/js/src/bitpanda.d.ts +2 -2
  147. package/js/src/bitpanda.js +1 -1
  148. package/js/src/bitrue.d.ts +2 -2
  149. package/js/src/bitrue.js +1 -1
  150. package/js/src/bitso.d.ts +2 -2
  151. package/js/src/bitso.js +1 -1
  152. package/js/src/bitstamp.d.ts +2 -2
  153. package/js/src/bitstamp.js +1 -1
  154. package/js/src/bittrex.d.ts +1 -1
  155. package/js/src/bittrex.js +1 -1
  156. package/js/src/bitvavo.d.ts +2 -2
  157. package/js/src/bitvavo.js +1 -1
  158. package/js/src/bl3p.d.ts +2 -2
  159. package/js/src/bl3p.js +1 -1
  160. package/js/src/blockchaincom.d.ts +2 -2
  161. package/js/src/blockchaincom.js +1 -1
  162. package/js/src/btcalpha.d.ts +2 -2
  163. package/js/src/btcalpha.js +1 -1
  164. package/js/src/btcbox.d.ts +2 -2
  165. package/js/src/btcbox.js +1 -1
  166. package/js/src/btcmarkets.d.ts +2 -2
  167. package/js/src/btcmarkets.js +1 -1
  168. package/js/src/btcturk.d.ts +2 -2
  169. package/js/src/btcturk.js +1 -1
  170. package/js/src/bybit.d.ts +2 -2
  171. package/js/src/bybit.js +3 -5
  172. package/js/src/cex.d.ts +2 -2
  173. package/js/src/cex.js +1 -1
  174. package/js/src/coinbase.d.ts +2 -2
  175. package/js/src/coinbase.js +1 -1
  176. package/js/src/coinbasepro.d.ts +2 -2
  177. package/js/src/coinbasepro.js +1 -1
  178. package/js/src/coincheck.d.ts +2 -2
  179. package/js/src/coincheck.js +1 -1
  180. package/js/src/coinex.d.ts +2 -2
  181. package/js/src/coinex.js +2 -2
  182. package/js/src/coinlist.d.ts +2 -2
  183. package/js/src/coinlist.js +1 -3
  184. package/js/src/coinmate.d.ts +2 -2
  185. package/js/src/coinmate.js +1 -1
  186. package/js/src/coinone.d.ts +2 -2
  187. package/js/src/coinone.js +1 -1
  188. package/js/src/coinsph.d.ts +2 -2
  189. package/js/src/coinsph.js +1 -3
  190. package/js/src/coinspot.d.ts +2 -2
  191. package/js/src/coinspot.js +1 -1
  192. package/js/src/cryptocom.d.ts +2 -2
  193. package/js/src/cryptocom.js +3 -5
  194. package/js/src/currencycom.d.ts +2 -2
  195. package/js/src/currencycom.js +1 -1
  196. package/js/src/delta.d.ts +2 -2
  197. package/js/src/delta.js +1 -1
  198. package/js/src/deribit.d.ts +2 -2
  199. package/js/src/deribit.js +1 -1
  200. package/js/src/digifinex.d.ts +2 -2
  201. package/js/src/digifinex.js +160 -112
  202. package/js/src/exmo.d.ts +2 -2
  203. package/js/src/exmo.js +1 -1
  204. package/js/src/gate.d.ts +2 -29
  205. package/js/src/gate.js +1 -211
  206. package/js/src/gemini.d.ts +2 -2
  207. package/js/src/gemini.js +1 -1
  208. package/js/src/hitbtc.d.ts +2 -2
  209. package/js/src/hitbtc.js +2 -2
  210. package/js/src/hitbtc3.d.ts +1 -1
  211. package/js/src/hitbtc3.js +1 -1
  212. package/js/src/hollaex.d.ts +2 -2
  213. package/js/src/hollaex.js +1 -1
  214. package/js/src/htx.d.ts +2 -2
  215. package/js/src/htx.js +2 -2
  216. package/js/src/huobijp.d.ts +2 -2
  217. package/js/src/huobijp.js +1 -1
  218. package/js/src/idex.d.ts +2 -2
  219. package/js/src/idex.js +1 -1
  220. package/js/src/independentreserve.d.ts +2 -2
  221. package/js/src/independentreserve.js +1 -1
  222. package/js/src/indodax.d.ts +2 -2
  223. package/js/src/indodax.js +1 -1
  224. package/js/src/kraken.d.ts +2 -2
  225. package/js/src/kraken.js +2 -2
  226. package/js/src/krakenfutures.d.ts +2 -2
  227. package/js/src/krakenfutures.js +3 -3
  228. package/js/src/kucoin.d.ts +2 -2
  229. package/js/src/kucoin.js +2 -6
  230. package/js/src/kucoinfutures.d.ts +1 -1
  231. package/js/src/kuna.d.ts +2 -2
  232. package/js/src/kuna.js +1 -3
  233. package/js/src/latoken.d.ts +2 -2
  234. package/js/src/latoken.js +2 -2
  235. package/js/src/lbank.d.ts +2 -2
  236. package/js/src/lbank.js +1 -1
  237. package/js/src/luno.d.ts +2 -2
  238. package/js/src/luno.js +1 -1
  239. package/js/src/lykke.d.ts +2 -2
  240. package/js/src/lykke.js +1 -1
  241. package/js/src/mercado.d.ts +2 -2
  242. package/js/src/mercado.js +1 -1
  243. package/js/src/mexc.d.ts +2 -2
  244. package/js/src/mexc.js +102 -55
  245. package/js/src/ndax.d.ts +2 -2
  246. package/js/src/ndax.js +1 -1
  247. package/js/src/novadax.d.ts +2 -2
  248. package/js/src/novadax.js +1 -1
  249. package/js/src/oceanex.d.ts +2 -2
  250. package/js/src/oceanex.js +1 -1
  251. package/js/src/okcoin.d.ts +2 -2
  252. package/js/src/okcoin.js +1 -1
  253. package/js/src/okx.d.ts +2 -2
  254. package/js/src/okx.js +4 -5
  255. package/js/src/p2b.d.ts +2 -2
  256. package/js/src/p2b.js +1 -3
  257. package/js/src/paymium.d.ts +2 -2
  258. package/js/src/paymium.js +1 -1
  259. package/js/src/phemex.d.ts +2 -2
  260. package/js/src/phemex.js +1 -1
  261. package/js/src/poloniex.d.ts +2 -2
  262. package/js/src/poloniex.js +51 -51
  263. package/js/src/poloniexfutures.d.ts +2 -2
  264. package/js/src/poloniexfutures.js +1 -1
  265. package/js/src/pro/alpaca.d.ts +8 -8
  266. package/js/src/pro/ascendex.d.ts +7 -7
  267. package/js/src/pro/binance.d.ts +24 -24
  268. package/js/src/pro/bingx.d.ts +7 -7
  269. package/js/src/pro/bitfinex.d.ts +6 -6
  270. package/js/src/pro/bitfinex2.d.ts +11 -11
  271. package/js/src/pro/bitget.d.ts +18 -18
  272. package/js/src/pro/bitget.js +1 -1
  273. package/js/src/pro/bitmart.d.ts +13 -13
  274. package/js/src/pro/bitmex.d.ts +11 -9
  275. package/js/src/pro/bitmex.js +207 -1
  276. package/js/src/pro/bitopro.d.ts +5 -5
  277. package/js/src/pro/bitpanda.d.ts +10 -10
  278. package/js/src/pro/bitrue.d.ts +5 -5
  279. package/js/src/pro/bitstamp.d.ts +6 -6
  280. package/js/src/pro/bitvavo.d.ts +7 -7
  281. package/js/src/pro/blockchaincom.d.ts +10 -10
  282. package/js/src/pro/bybit.d.ts +14 -14
  283. package/js/src/pro/cex.d.ts +20 -20
  284. package/js/src/pro/coinbase.d.ts +7 -6
  285. package/js/src/pro/coinbasepro.d.ts +12 -12
  286. package/js/src/pro/coinex.d.ts +12 -12
  287. package/js/src/pro/coinex.js +2 -1
  288. package/js/src/pro/cryptocom.d.ts +13 -13
  289. package/js/src/pro/currencycom.d.ts +6 -6
  290. package/js/src/pro/deribit.d.ts +8 -8
  291. package/js/src/pro/exmo.d.ts +6 -6
  292. package/js/src/pro/gate.d.ts +11 -11
  293. package/js/src/pro/gemini.d.ts +7 -7
  294. package/js/src/pro/hitbtc.d.ts +13 -13
  295. package/js/src/pro/hollaex.d.ts +6 -6
  296. package/js/src/pro/htx.d.ts +12 -12
  297. package/js/src/pro/huobijp.d.ts +5 -5
  298. package/js/src/pro/idex.d.ts +7 -7
  299. package/js/src/pro/independentreserve.d.ts +4 -4
  300. package/js/src/pro/kraken.d.ts +11 -11
  301. package/js/src/pro/krakenfutures.d.ts +15 -15
  302. package/js/src/pro/krakenfutures.js +6 -6
  303. package/js/src/pro/kucoin.d.ts +13 -13
  304. package/js/src/pro/kucoinfutures.d.ts +10 -10
  305. package/js/src/pro/luno.d.ts +3 -3
  306. package/js/src/pro/mexc.d.ts +11 -11
  307. package/js/src/pro/mexc.js +1 -1
  308. package/js/src/pro/ndax.d.ts +5 -5
  309. package/js/src/pro/okcoin.d.ts +7 -7
  310. package/js/src/pro/okx.d.ts +16 -16
  311. package/js/src/pro/phemex.d.ts +9 -9
  312. package/js/src/pro/poloniex.d.ts +13 -13
  313. package/js/src/pro/poloniex.js +1 -1
  314. package/js/src/pro/poloniexfutures.d.ts +10 -10
  315. package/js/src/pro/poloniexfutures.js +3 -3
  316. package/js/src/pro/probit.d.ts +7 -7
  317. package/js/src/pro/upbit.d.ts +4 -4
  318. package/js/src/pro/wazirx.d.ts +12 -12
  319. package/js/src/pro/whitebit.d.ts +10 -10
  320. package/js/src/pro/woo.d.ts +11 -11
  321. package/js/src/probit.d.ts +2 -2
  322. package/js/src/probit.js +27 -19
  323. package/js/src/static_dependencies/jsencrypt/JSEncrypt.d.ts +1 -1
  324. package/js/src/static_dependencies/jsencrypt/JSEncrypt.js +1 -1
  325. package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.d.ts +3 -3
  326. package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.js +3 -3
  327. package/js/src/timex.d.ts +2 -2
  328. package/js/src/timex.js +1 -1
  329. package/js/src/tokocrypto.d.ts +2 -2
  330. package/js/src/tokocrypto.js +8 -5
  331. package/js/src/upbit.d.ts +2 -2
  332. package/js/src/upbit.js +37 -27
  333. package/js/src/wavesexchange.d.ts +2 -2
  334. package/js/src/wavesexchange.js +1 -1
  335. package/js/src/wazirx.d.ts +2 -2
  336. package/js/src/wazirx.js +1 -3
  337. package/js/src/whitebit.d.ts +2 -2
  338. package/js/src/whitebit.js +1 -3
  339. package/js/src/woo.d.ts +2 -2
  340. package/js/src/woo.js +1 -3
  341. package/js/src/yobit.d.ts +2 -2
  342. package/js/src/yobit.js +1 -1
  343. package/js/src/zaif.d.ts +2 -2
  344. package/js/src/zaif.js +1 -1
  345. package/js/src/zonda.d.ts +2 -2
  346. package/js/src/zonda.js +1 -1
  347. package/jsdoc2md.js +0 -2
  348. package/package.json +4 -3
  349. package/skip-tests.json +4 -0
  350. package/js/src/abstract/bittrex.d.ts +0 -79
  351. package/js/src/abstract/bittrex.js +0 -11
  352. package/js/src/abstract/coinbaseprime.d.ts +0 -69
  353. package/js/src/abstract/coinbaseprime.js +0 -11
  354. package/js/src/abstract/coinbasepro.d.ts +0 -69
  355. package/js/src/abstract/coinbasepro.js +0 -11
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class mexc
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class mexc extends mexc$1 {
16
16
  describe() {
@@ -30,7 +30,6 @@ class mexc extends mexc$1 {
30
30
  'future': false,
31
31
  'option': false,
32
32
  'addMargin': true,
33
- 'borrowMargin': false,
34
33
  'cancelAllOrders': true,
35
34
  'cancelOrder': true,
36
35
  'cancelOrders': undefined,
@@ -107,7 +106,6 @@ class mexc extends mexc$1 {
107
106
  'fetchWithdrawal': undefined,
108
107
  'fetchWithdrawals': true,
109
108
  'reduceMargin': true,
110
- 'repayMargin': false,
111
109
  'setLeverage': true,
112
110
  'setMarginMode': undefined,
113
111
  'setPositionMode': true,
@@ -1404,7 +1402,19 @@ class mexc extends mexc$1 {
1404
1402
  }
1405
1403
  let method = this.safeString(this.options, 'fetchTradesMethod', 'spotPublicGetAggTrades');
1406
1404
  method = this.safeString(params, 'method', method); // AggTrades, HistoricalTrades, Trades
1407
- trades = await this[method](this.extend(request, params));
1405
+ params = this.omit(params, ['method']);
1406
+ if (method === 'spotPublicGetAggTrades') {
1407
+ trades = await this.spotPublicGetAggTrades(this.extend(request, params));
1408
+ }
1409
+ else if (method === 'spotPublicGetHistoricalTrades') {
1410
+ trades = await this.spotPublicGetHistoricalTrades(this.extend(request, params));
1411
+ }
1412
+ else if (method === 'spotPublicGetTrades') {
1413
+ trades = await this.spotPublicGetTrades(this.extend(request, params));
1414
+ }
1415
+ else {
1416
+ throw new errors.NotSupported(this.id + ' fetchTrades() not support this method');
1417
+ }
1408
1418
  //
1409
1419
  // /trades, /historicalTrades
1410
1420
  //
@@ -1707,12 +1717,19 @@ class mexc extends mexc$1 {
1707
1717
  }
1708
1718
  const priceType = this.safeString(params, 'price', 'default');
1709
1719
  params = this.omit(params, 'price');
1710
- const method = this.getSupportedMapping(priceType, {
1711
- 'default': 'contractPublicGetKlineSymbol',
1712
- 'index': 'contractPublicGetKlineIndexPriceSymbol',
1713
- 'mark': 'contractPublicGetKlineFairPriceSymbol',
1714
- });
1715
- const response = await this[method](this.extend(request, params));
1720
+ let response = undefined;
1721
+ if (priceType === 'default') {
1722
+ response = await this.contractPublicGetKlineSymbol(this.extend(request, params));
1723
+ }
1724
+ else if (priceType === 'index') {
1725
+ response = await this.contractPublicGetKlineIndexPriceSymbol(this.extend(request, params));
1726
+ }
1727
+ else if (priceType === 'mark') {
1728
+ response = await this.contractPublicGetKlineFairPriceSymbol(this.extend(request, params));
1729
+ }
1730
+ else {
1731
+ throw new errors.NotSupported(this.id + ' fetchOHLCV() not support this price type, [default, index, mark]');
1732
+ }
1716
1733
  //
1717
1734
  // {
1718
1735
  // "success":true,
@@ -2097,6 +2114,7 @@ class mexc extends mexc$1 {
2097
2114
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2098
2115
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2099
2116
  * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
2117
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
2100
2118
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2101
2119
  */
2102
2120
  await this.loadMarkets();
@@ -2254,17 +2272,6 @@ class mexc extends mexc$1 {
2254
2272
  // 'trend': 1, // Required for trigger order 1: latest price, 2: fair price, 3: index price
2255
2273
  // 'orderType': 1, // Required for trigger order 1: limit order,2:Post Only Maker,3: close or cancel instantly ,4: close or cancel completely,5: Market order
2256
2274
  };
2257
- let method = 'contractPrivatePostOrderSubmit';
2258
- const stopPrice = this.safeNumber2(params, 'triggerPrice', 'stopPrice');
2259
- params = this.omit(params, ['stopPrice', 'triggerPrice']);
2260
- if (stopPrice) {
2261
- method = 'contractPrivatePostPlanorderPlace';
2262
- request['triggerPrice'] = this.priceToPrecision(symbol, stopPrice);
2263
- request['triggerType'] = this.safeInteger(params, 'triggerType', 1);
2264
- request['executeCycle'] = this.safeInteger(params, 'executeCycle', 1);
2265
- request['trend'] = this.safeInteger(params, 'trend', 1);
2266
- request['orderType'] = this.safeInteger(params, 'orderType', 1);
2267
- }
2268
2275
  if ((type !== 5) && (type !== 6) && (type !== 'market')) {
2269
2276
  request['price'] = parseFloat(this.priceToPrecision(symbol, price));
2270
2277
  }
@@ -2285,8 +2292,20 @@ class mexc extends mexc$1 {
2285
2292
  if (clientOrderId !== undefined) {
2286
2293
  request['externalOid'] = clientOrderId;
2287
2294
  }
2288
- params = this.omit(params, ['clientOrderId', 'externalOid', 'postOnly']);
2289
- const response = await this[method](this.extend(request, params));
2295
+ const stopPrice = this.safeNumber2(params, 'triggerPrice', 'stopPrice');
2296
+ params = this.omit(params, ['clientOrderId', 'externalOid', 'postOnly', 'stopPrice', 'triggerPrice']);
2297
+ let response = undefined;
2298
+ if (stopPrice) {
2299
+ request['triggerPrice'] = this.priceToPrecision(symbol, stopPrice);
2300
+ request['triggerType'] = this.safeInteger(params, 'triggerType', 1);
2301
+ request['executeCycle'] = this.safeInteger(params, 'executeCycle', 1);
2302
+ request['trend'] = this.safeInteger(params, 'trend', 1);
2303
+ request['orderType'] = this.safeInteger(params, 'orderType', 1);
2304
+ response = await this.contractPrivatePostPlanorderPlace(this.extend(request, params));
2305
+ }
2306
+ else {
2307
+ response = await this.contractPrivatePostOrderSubmit(this.extend(request, params));
2308
+ }
2290
2309
  //
2291
2310
  // Swap
2292
2311
  // {"code":200,"data":"2ff3163e8617443cb9c6fc19d42b1ca4"}
@@ -2303,7 +2322,7 @@ class mexc extends mexc$1 {
2303
2322
  * @name mexc#createOrders
2304
2323
  * @description *spot only* *all orders must have the same symbol* create a list of trade orders
2305
2324
  * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#batch-orders
2306
- * @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
2325
+ * @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
2307
2326
  * @param {object} [params] extra parameters specific to api endpoint
2308
2327
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2309
2328
  */
@@ -2390,14 +2409,15 @@ class mexc extends mexc$1 {
2390
2409
  request['orderId'] = id;
2391
2410
  }
2392
2411
  const [marginMode, query] = this.handleMarginModeAndParams('fetchOrder', params);
2393
- let method = 'spotPrivateGetOrder';
2394
2412
  if (marginMode !== undefined) {
2395
2413
  if (marginMode !== 'isolated') {
2396
2414
  throw new errors.BadRequest(this.id + ' fetchOrder() does not support marginMode ' + marginMode + ' for spot-margin trading');
2397
2415
  }
2398
- method = 'spotPrivateGetMarginOrder';
2416
+ data = await this.spotPrivateGetMarginOrder(this.extend(request, query));
2417
+ }
2418
+ else {
2419
+ data = await this.spotPrivateGetOrder(this.extend(request, query));
2399
2420
  }
2400
- data = await this[method](this.extend(request, query));
2401
2421
  //
2402
2422
  // spot
2403
2423
  //
@@ -2507,20 +2527,22 @@ class mexc extends mexc$1 {
2507
2527
  throw new errors.ArgumentsRequired(this.id + ' fetchOrders() requires a symbol argument for spot market');
2508
2528
  }
2509
2529
  const [marginMode, queryInner] = this.handleMarginModeAndParams('fetchOrders', params);
2510
- let method = 'spotPrivateGetAllOrders';
2511
- if (marginMode !== undefined) {
2512
- if (marginMode !== 'isolated') {
2513
- throw new errors.BadRequest(this.id + ' fetchOrders() does not support marginMode ' + marginMode + ' for spot-margin trading');
2514
- }
2515
- method = 'spotPrivateGetMarginAllOrders';
2516
- }
2517
2530
  if (since !== undefined) {
2518
2531
  request['startTime'] = since;
2519
2532
  }
2520
2533
  if (limit !== undefined) {
2521
2534
  request['limit'] = limit;
2522
2535
  }
2523
- const response = await this[method](this.extend(request, queryInner));
2536
+ let response = undefined;
2537
+ if (marginMode !== undefined) {
2538
+ if (marginMode !== 'isolated') {
2539
+ throw new errors.BadRequest(this.id + ' fetchOrders() does not support marginMode ' + marginMode + ' for spot-margin trading');
2540
+ }
2541
+ response = await this.spotPrivateGetMarginAllOrders(this.extend(request, queryInner));
2542
+ }
2543
+ else {
2544
+ response = await this.spotPrivateGetAllOrders(this.extend(request, queryInner));
2545
+ }
2524
2546
  //
2525
2547
  // spot
2526
2548
  //
@@ -2737,15 +2759,17 @@ class mexc extends mexc$1 {
2737
2759
  throw new errors.ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument for spot market');
2738
2760
  }
2739
2761
  request['symbol'] = market['id'];
2740
- let method = 'spotPrivateGetOpenOrders';
2741
2762
  const [marginMode, query] = this.handleMarginModeAndParams('fetchOpenOrders', params);
2763
+ let response = undefined;
2742
2764
  if (marginMode !== undefined) {
2743
2765
  if (marginMode !== 'isolated') {
2744
2766
  throw new errors.BadRequest(this.id + ' fetchOpenOrders() does not support marginMode ' + marginMode + ' for spot-margin trading');
2745
2767
  }
2746
- method = 'spotPrivateGetMarginOpenOrders';
2768
+ response = await this.spotPrivateGetMarginOpenOrders(this.extend(request, query));
2769
+ }
2770
+ else {
2771
+ response = await this.spotPrivateGetOpenOrders(this.extend(request, query));
2747
2772
  }
2748
- const response = await this[method](this.extend(request, query));
2749
2773
  //
2750
2774
  // spot
2751
2775
  //
@@ -2879,14 +2903,15 @@ class mexc extends mexc$1 {
2879
2903
  else {
2880
2904
  requestInner['orderId'] = id;
2881
2905
  }
2882
- let method = 'spotPrivateDeleteOrder';
2883
2906
  if (marginMode !== undefined) {
2884
2907
  if (marginMode !== 'isolated') {
2885
2908
  throw new errors.BadRequest(this.id + ' cancelOrder() does not support marginMode ' + marginMode + ' for spot-margin trading');
2886
2909
  }
2887
- method = 'spotPrivateDeleteMarginOrder';
2910
+ data = await this.spotPrivateDeleteMarginOrder(this.extend(requestInner, query));
2911
+ }
2912
+ else {
2913
+ data = await this.spotPrivateDeleteOrder(this.extend(requestInner, query));
2888
2914
  }
2889
- data = await this[method](this.extend(requestInner, query));
2890
2915
  //
2891
2916
  // spot
2892
2917
  //
@@ -2926,7 +2951,16 @@ class mexc extends mexc$1 {
2926
2951
  // TODO: PlanorderCancel endpoint has bug atm. waiting for fix.
2927
2952
  let method = this.safeString(this.options, 'cancelOrder', 'contractPrivatePostOrderCancel'); // contractPrivatePostOrderCancel, contractPrivatePostPlanorderCancel
2928
2953
  method = this.safeString(query, 'method', method);
2929
- const response = await this[method]([id]); // the request cannot be changed or extended. This is the only way to send.
2954
+ let response = undefined;
2955
+ if (method === 'contractPrivatePostOrderCancel') {
2956
+ response = await this.contractPrivatePostOrderCancel([id]); // the request cannot be changed or extended. This is the only way to send.
2957
+ }
2958
+ else if (method === 'contractPrivatePostPlanorderCancel') {
2959
+ response = await this.contractPrivatePostPlanorderCancel([id]); // the request cannot be changed or extended. This is the only way to send.
2960
+ }
2961
+ else {
2962
+ throw new errors.NotSupported(this.id + ' cancelOrder() not support this method');
2963
+ }
2930
2964
  //
2931
2965
  // {
2932
2966
  // "success": true,
@@ -3005,14 +3039,16 @@ class mexc extends mexc$1 {
3005
3039
  throw new errors.ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument on spot');
3006
3040
  }
3007
3041
  request['symbol'] = market['id'];
3008
- let method = 'spotPrivateDeleteOpenOrders';
3042
+ let response = undefined;
3009
3043
  if (marginMode !== undefined) {
3010
3044
  if (marginMode !== 'isolated') {
3011
3045
  throw new errors.BadRequest(this.id + ' cancelAllOrders() does not support marginMode ' + marginMode + ' for spot-margin trading');
3012
3046
  }
3013
- method = 'spotPrivateDeleteMarginOpenOrders';
3047
+ response = await this.spotPrivateDeleteMarginOpenOrders(this.extend(request, query));
3048
+ }
3049
+ else {
3050
+ response = await this.spotPrivateDeleteOpenOrders(this.extend(request, query));
3014
3051
  }
3015
- const response = await this[method](this.extend(request, query));
3016
3052
  //
3017
3053
  // spot
3018
3054
  //
@@ -3059,7 +3095,13 @@ class mexc extends mexc$1 {
3059
3095
  // the Planorder endpoints work not only for stop-market orders but also for stop-limit orders that are supposed to have separate endpoint
3060
3096
  let method = this.safeString(this.options, 'cancelAllOrders', 'contractPrivatePostOrderCancelAll');
3061
3097
  method = this.safeString(query, 'method', method);
3062
- const response = await this[method](this.extend(request, query));
3098
+ let response = undefined;
3099
+ if (method === 'contractPrivatePostOrderCancelAll') {
3100
+ response = await this.contractPrivatePostOrderCancelAll(this.extend(request, query));
3101
+ }
3102
+ else if (method === 'contractPrivatePostPlanorderCancelAll') {
3103
+ response = await this.contractPrivatePostPlanorderCancelAll(this.extend(request, query));
3104
+ }
3063
3105
  //
3064
3106
  // {
3065
3107
  // "success": true,
@@ -3573,13 +3615,10 @@ class mexc extends mexc$1 {
3573
3615
  let marketType = undefined;
3574
3616
  const request = {};
3575
3617
  [marketType, params] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
3576
- let method = this.getSupportedMapping(marketType, {
3577
- 'spot': 'spotPrivateGetAccount',
3578
- 'swap': 'contractPrivateGetAccountAssets',
3579
- 'margin': 'spotPrivateGetMarginIsolatedAccount',
3580
- });
3581
3618
  const marginMode = this.safeString(params, 'marginMode');
3582
3619
  const isMargin = this.safeValue(params, 'margin', false);
3620
+ params = this.omit(params, ['margin', 'marginMode']);
3621
+ let response = undefined;
3583
3622
  if ((marginMode !== undefined) || (isMargin) || (marketType === 'margin')) {
3584
3623
  let parsedSymbols = undefined;
3585
3624
  const symbol = this.safeString(params, 'symbol');
@@ -3594,12 +3633,20 @@ class mexc extends mexc$1 {
3594
3633
  parsedSymbols = market['id'];
3595
3634
  }
3596
3635
  this.checkRequiredArgument('fetchBalance', parsedSymbols, 'symbol or symbols');
3597
- method = 'spotPrivateGetMarginIsolatedAccount';
3598
3636
  marketType = 'margin';
3599
3637
  request['symbols'] = parsedSymbols;
3638
+ params = this.omit(params, ['symbol', 'symbols']);
3639
+ response = await this.spotPrivateGetMarginIsolatedAccount(this.extend(request, params));
3640
+ }
3641
+ else if (marketType === 'spot') {
3642
+ response = await this.spotPrivateGetAccount(this.extend(request, params));
3643
+ }
3644
+ else if (marketType === 'swap') {
3645
+ response = await this.contractPrivateGetAccountAssets(this.extend(request, params));
3646
+ }
3647
+ else {
3648
+ throw new errors.NotSupported(this.id + ' fetchBalance() not support this method');
3600
3649
  }
3601
- params = this.omit(params, ['margin', 'marginMode', 'symbol', 'symbols']);
3602
- const response = await this[method](this.extend(request, params));
3603
3650
  //
3604
3651
  // spot
3605
3652
  //
@@ -5244,7 +5291,7 @@ class mexc extends mexc$1 {
5244
5291
  * @description marginMode specified by params["marginMode"], this.options["marginMode"], this.options["defaultMarginMode"], params["margin"] = true or this.options["defaultType"] = 'margin'
5245
5292
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5246
5293
  * @param {bool} [params.margin] true for trading spot-margin
5247
- * @returns {array} the marginMode in lowercase
5294
+ * @returns {Array} the marginMode in lowercase
5248
5295
  */
5249
5296
  const defaultType = this.safeString(this.options, 'defaultType');
5250
5297
  const isMargin = this.safeValue(params, 'margin', false);
@@ -11,7 +11,7 @@ var totp = require('./base/functions/totp.js');
11
11
  // ---------------------------------------------------------------------------
12
12
  /**
13
13
  * @class ndax
14
- * @extends Exchange
14
+ * @augments Exchange
15
15
  */
16
16
  class ndax extends ndax$1 {
17
17
  describe() {
@@ -10,7 +10,7 @@ var md5 = require('./static_dependencies/noble-hashes/md5.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class novadax
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class novadax extends novadax$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var rsa = require('./base/functions/rsa.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class oceanex
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class oceanex extends oceanex$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class okcoin
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class okcoin extends okcoin$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class okx
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class okx extends okx$1 {
16
16
  describe() {
@@ -30,7 +30,6 @@ class okx extends okx$1 {
30
30
  'future': true,
31
31
  'option': true,
32
32
  'addMargin': true,
33
- 'borrowMargin': true,
34
33
  'cancelAllOrders': false,
35
34
  'cancelOrder': true,
36
35
  'cancelOrders': true,
@@ -2863,7 +2862,7 @@ class okx extends okx$1 {
2863
2862
  * @name okx#createOrders
2864
2863
  * @description create a list of trade orders
2865
2864
  * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
2866
- * @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
2865
+ * @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
2867
2866
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2868
2867
  */
2869
2868
  await this.loadMarkets();
@@ -3406,7 +3405,7 @@ class okx extends okx$1 {
3406
3405
  * @param {string} symbol unified market symbol
3407
3406
  * @param {object} [params] extra and exchange specific parameters
3408
3407
  * @returns [an order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3409
- */
3408
+ */
3410
3409
  if (symbol === undefined) {
3411
3410
  throw new errors.ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
3412
3411
  }
@@ -7182,7 +7181,7 @@ class okx extends okx$1 {
7182
7181
  * EXCHANGE SPECIFIC PARAMETERS
7183
7182
  * @param {boolean} [params.autoCxl] whether any pending orders for closing out needs to be automatically canceled when close position via a market order. false or true, the default is false
7184
7183
  * @param {string} [params.tag] order tag a combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters
7185
- * @returns {[object]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
7184
+ * @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
7186
7185
  */
7187
7186
  await this.loadMarkets();
7188
7187
  const market = this.market(symbol);
@@ -9,7 +9,7 @@ var sha512 = require('./static_dependencies/noble-hashes/sha512.js');
9
9
  // ---------------------------------------------------------------------------
10
10
  /**
11
11
  * @class p2b
12
- * @extends Exchange
12
+ * @augments Exchange
13
13
  */
14
14
  class p2b extends p2b$1 {
15
15
  describe() {
@@ -530,7 +530,6 @@ class p2b extends p2b$1 {
530
530
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
531
531
  * @param {int} [limit] 1-100, default=50
532
532
  * @param {object} [params] extra parameters specific to the exchange API endpoint
533
- *
534
533
  * @param {int} params.lastId order id
535
534
  * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
536
535
  */
@@ -649,7 +648,6 @@ class p2b extends p2b$1 {
649
648
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
650
649
  * @param {int} [limit] 1-500, default=50
651
650
  * @param {object} [params] extra parameters specific to the exchange API endpoint
652
- *
653
651
  * @param {int} [params.offset] default=0, with this value the last candles are returned
654
652
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
655
653
  */
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class paymium
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class paymium extends paymium$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ----------------------------------------------------------------------------
11
11
  /**
12
12
  * @class phemex
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class phemex extends phemex$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class poloniex
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class poloniex extends poloniex$1 {
16
16
  describe() {
@@ -1236,20 +1236,20 @@ class poloniex extends poloniex$1 {
1236
1236
  }
1237
1237
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
1238
1238
  /**
1239
- * @method
1240
- * @name poloniex#createOrder
1241
- * @description create a trade order
1242
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
1243
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
1244
- * @param {string} symbol unified symbol of the market to create an order in
1245
- * @param {string} type 'market' or 'limit'
1246
- * @param {string} side 'buy' or 'sell'
1247
- * @param {float} amount how much of currency you want to trade in units of base currency
1248
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1249
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1250
- * @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
1251
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1252
- */
1239
+ * @method
1240
+ * @name poloniex#createOrder
1241
+ * @description create a trade order
1242
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
1243
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
1244
+ * @param {string} symbol unified symbol of the market to create an order in
1245
+ * @param {string} type 'market' or 'limit'
1246
+ * @param {string} side 'buy' or 'sell'
1247
+ * @param {float} amount how much of currency you want to trade in units of base currency
1248
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1249
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1250
+ * @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
1251
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1252
+ */
1253
1253
  await this.loadMarkets();
1254
1254
  const market = this.market(symbol);
1255
1255
  if (!market['spot']) {
@@ -1319,21 +1319,21 @@ class poloniex extends poloniex$1 {
1319
1319
  }
1320
1320
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
1321
1321
  /**
1322
- * @method
1323
- * @name poloniex#editOrder
1324
- * @description edit a trade order
1325
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
1326
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
1327
- * @param {string} id order id
1328
- * @param {string} symbol unified symbol of the market to create an order in
1329
- * @param {string} type 'market' or 'limit'
1330
- * @param {string} side 'buy' or 'sell'
1331
- * @param {float} [amount] how much of the currency you want to trade in units of the base currency
1332
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1333
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1334
- * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
1335
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1336
- */
1322
+ * @method
1323
+ * @name poloniex#editOrder
1324
+ * @description edit a trade order
1325
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
1326
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
1327
+ * @param {string} id order id
1328
+ * @param {string} symbol unified symbol of the market to create an order in
1329
+ * @param {string} type 'market' or 'limit'
1330
+ * @param {string} side 'buy' or 'sell'
1331
+ * @param {float} [amount] how much of the currency you want to trade in units of the base currency
1332
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1333
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1334
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
1335
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1336
+ */
1337
1337
  await this.loadMarkets();
1338
1338
  const market = this.market(symbol);
1339
1339
  if (!market['spot']) {
@@ -1405,16 +1405,16 @@ class poloniex extends poloniex$1 {
1405
1405
  }
1406
1406
  async cancelAllOrders(symbol = undefined, params = {}) {
1407
1407
  /**
1408
- * @method
1409
- * @name poloniex#cancelAllOrders
1410
- * @description cancel all open orders
1411
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
1412
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
1413
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1414
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1415
- * @param {boolean} [params.trigger] true if canceling trigger orders
1416
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1417
- */
1408
+ * @method
1409
+ * @name poloniex#cancelAllOrders
1410
+ * @description cancel all open orders
1411
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
1412
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
1413
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1414
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1415
+ * @param {boolean} [params.trigger] true if canceling trigger orders
1416
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1417
+ */
1418
1418
  await this.loadMarkets();
1419
1419
  const request = {
1420
1420
  // 'accountTypes': 'SPOT',
@@ -1457,17 +1457,17 @@ class poloniex extends poloniex$1 {
1457
1457
  }
1458
1458
  async fetchOrder(id, symbol = undefined, params = {}) {
1459
1459
  /**
1460
- * @method
1461
- * @name poloniex#fetchOrder
1462
- * @description fetch an order by it's id
1463
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
1464
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
1465
- * @param {string} id order id
1466
- * @param {string} symbol unified market symbol, default is undefined
1467
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1468
- * @param {boolean} [params.trigger] true if fetching a trigger order
1469
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1470
- */
1460
+ * @method
1461
+ * @name poloniex#fetchOrder
1462
+ * @description fetch an order by it's id
1463
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
1464
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
1465
+ * @param {string} id order id
1466
+ * @param {string} symbol unified market symbol, default is undefined
1467
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1468
+ * @param {boolean} [params.trigger] true if fetching a trigger order
1469
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1470
+ */
1471
1471
  await this.loadMarkets();
1472
1472
  id = id.toString();
1473
1473
  const request = {
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class poloniexfutures
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class poloniexfutures extends poloniexfutures$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var sha256 = require('../static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class bitget
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  * @description watching delivery future markets is not yet implemented (perpertual future / swap is implemented)
15
15
  */
16
16
  class bitget extends bitget$1 {