ccxt 4.0.75 → 4.0.76

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 (290) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.js +594 -457
  3. package/dist/ccxt.browser.min.js +2 -2
  4. package/dist/cjs/ccxt.js +1 -1
  5. package/dist/cjs/src/ace.js +2 -2
  6. package/dist/cjs/src/alpaca.js +1 -1
  7. package/dist/cjs/src/ascendex.js +3 -3
  8. package/dist/cjs/src/base/Exchange.js +2 -2
  9. package/dist/cjs/src/bigone.js +2 -2
  10. package/dist/cjs/src/binance.js +5 -5
  11. package/dist/cjs/src/bingx.js +64 -19
  12. package/dist/cjs/src/bit2c.js +2 -2
  13. package/dist/cjs/src/bitbank.js +2 -2
  14. package/dist/cjs/src/bitbns.js +2 -2
  15. package/dist/cjs/src/bitfinex.js +2 -2
  16. package/dist/cjs/src/bitfinex2.js +4 -4
  17. package/dist/cjs/src/bitflyer.js +2 -2
  18. package/dist/cjs/src/bitforex.js +2 -2
  19. package/dist/cjs/src/bitget.js +5 -5
  20. package/dist/cjs/src/bithumb.js +2 -2
  21. package/dist/cjs/src/bitmart.js +2 -2
  22. package/dist/cjs/src/bitmex.js +5 -5
  23. package/dist/cjs/src/bitopro.js +3 -3
  24. package/dist/cjs/src/bitpanda.js +2 -2
  25. package/dist/cjs/src/bitrue.js +3 -3
  26. package/dist/cjs/src/bitso.js +2 -2
  27. package/dist/cjs/src/bitstamp.js +2 -2
  28. package/dist/cjs/src/bitstamp1.js +2 -2
  29. package/dist/cjs/src/bittrex.js +3 -3
  30. package/dist/cjs/src/bitvavo.js +3 -3
  31. package/dist/cjs/src/bkex.js +4 -4
  32. package/dist/cjs/src/bl3p.js +2 -2
  33. package/dist/cjs/src/blockchaincom.js +1 -1
  34. package/dist/cjs/src/btcalpha.js +2 -2
  35. package/dist/cjs/src/btcbox.js +2 -2
  36. package/dist/cjs/src/btcmarkets.js +2 -2
  37. package/dist/cjs/src/btctradeua.js +2 -2
  38. package/dist/cjs/src/btcturk.js +2 -2
  39. package/dist/cjs/src/bybit.js +5 -5
  40. package/dist/cjs/src/cex.js +2 -2
  41. package/dist/cjs/src/coinbase.js +3 -3
  42. package/dist/cjs/src/coinbasepro.js +2 -2
  43. package/dist/cjs/src/coincheck.js +2 -2
  44. package/dist/cjs/src/coinex.js +6 -6
  45. package/dist/cjs/src/coinfalcon.js +2 -2
  46. package/dist/cjs/src/coinmate.js +2 -2
  47. package/dist/cjs/src/coinone.js +2 -2
  48. package/dist/cjs/src/coinsph.js +7 -2
  49. package/dist/cjs/src/coinspot.js +2 -2
  50. package/dist/cjs/src/cryptocom.js +5 -5
  51. package/dist/cjs/src/currencycom.js +2 -2
  52. package/dist/cjs/src/delta.js +2 -2
  53. package/dist/cjs/src/deribit.js +3 -3
  54. package/dist/cjs/src/digifinex.js +4 -4
  55. package/dist/cjs/src/exmo.js +2 -2
  56. package/dist/cjs/src/gate.js +4 -4
  57. package/dist/cjs/src/gemini.js +3 -3
  58. package/dist/cjs/src/hitbtc.js +4 -4
  59. package/dist/cjs/src/hollaex.js +3 -3
  60. package/dist/cjs/src/huobi.js +5 -5
  61. package/dist/cjs/src/huobijp.js +2 -2
  62. package/dist/cjs/src/idex.js +2 -2
  63. package/dist/cjs/src/independentreserve.js +2 -2
  64. package/dist/cjs/src/indodax.js +2 -2
  65. package/dist/cjs/src/kraken.js +2 -2
  66. package/dist/cjs/src/kucoin.js +4 -4
  67. package/dist/cjs/src/kucoinfutures.js +5 -5
  68. package/dist/cjs/src/kuna.js +2 -2
  69. package/dist/cjs/src/latoken.js +2 -2
  70. package/dist/cjs/src/lbank.js +2 -2
  71. package/dist/cjs/src/lbank2.js +2 -2
  72. package/dist/cjs/src/luno.js +2 -2
  73. package/dist/cjs/src/lykke.js +2 -2
  74. package/dist/cjs/src/mercado.js +2 -2
  75. package/dist/cjs/src/mexc.js +6 -4
  76. package/dist/cjs/src/ndax.js +2 -2
  77. package/dist/cjs/src/novadax.js +2 -2
  78. package/dist/cjs/src/oceanex.js +2 -2
  79. package/dist/cjs/src/okcoin.js +2 -2
  80. package/dist/cjs/src/okx.js +4 -4
  81. package/dist/cjs/src/paymium.js +2 -2
  82. package/dist/cjs/src/phemex.js +2 -2
  83. package/dist/cjs/src/poloniex.js +165 -81
  84. package/dist/cjs/src/poloniexfutures.js +2 -2
  85. package/dist/cjs/src/pro/ascendex.js +2 -2
  86. package/dist/cjs/src/pro/binance.js +6 -6
  87. package/dist/cjs/src/pro/bitfinex.js +1 -1
  88. package/dist/cjs/src/pro/bitfinex2.js +2 -2
  89. package/dist/cjs/src/pro/bitget.js +2 -2
  90. package/dist/cjs/src/pro/bitmart.js +1 -1
  91. package/dist/cjs/src/pro/bitmex.js +2 -2
  92. package/dist/cjs/src/pro/bitopro.js +2 -2
  93. package/dist/cjs/src/pro/bitpanda.js +6 -6
  94. package/dist/cjs/src/pro/bitrue.js +1 -1
  95. package/dist/cjs/src/pro/bitstamp.js +1 -1
  96. package/dist/cjs/src/pro/bittrex.js +2 -2
  97. package/dist/cjs/src/pro/bitvavo.js +1 -1
  98. package/dist/cjs/src/pro/blockchaincom.js +5 -5
  99. package/dist/cjs/src/pro/bybit.js +1 -1
  100. package/dist/cjs/src/pro/cex.js +4 -4
  101. package/dist/cjs/src/pro/coinbase.js +5 -5
  102. package/dist/cjs/src/pro/coinbasepro.js +1 -1
  103. package/dist/cjs/src/pro/coinex.js +2 -2
  104. package/dist/cjs/src/pro/cryptocom.js +3 -3
  105. package/dist/cjs/src/pro/currencycom.js +2 -2
  106. package/dist/cjs/src/pro/deribit.js +3 -3
  107. package/dist/cjs/src/pro/exmo.js +3 -3
  108. package/dist/cjs/src/pro/gate.js +2 -2
  109. package/dist/cjs/src/pro/gemini.js +1 -1
  110. package/dist/cjs/src/pro/hitbtc.js +1 -1
  111. package/dist/cjs/src/pro/hollaex.js +2 -2
  112. package/dist/cjs/src/pro/huobi.js +2 -2
  113. package/dist/cjs/src/pro/huobijp.js +1 -1
  114. package/dist/cjs/src/pro/idex.js +1 -1
  115. package/dist/cjs/src/pro/independentreserve.js +1 -1
  116. package/dist/cjs/src/pro/kraken.js +6 -6
  117. package/dist/cjs/src/pro/krakenfutures.js +5 -5
  118. package/dist/cjs/src/pro/kucoin.js +2 -2
  119. package/dist/cjs/src/pro/kucoinfutures.js +3 -2
  120. package/dist/cjs/src/pro/luno.js +1 -1
  121. package/dist/cjs/src/pro/mexc.js +6 -6
  122. package/dist/cjs/src/pro/ndax.js +1 -1
  123. package/dist/cjs/src/pro/okcoin.js +2 -2
  124. package/dist/cjs/src/pro/okx.js +7 -7
  125. package/dist/cjs/src/pro/phemex.js +2 -2
  126. package/dist/cjs/src/pro/poloniex.js +6 -6
  127. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  128. package/dist/cjs/src/pro/probit.js +6 -6
  129. package/dist/cjs/src/pro/upbit.js +1 -1
  130. package/dist/cjs/src/pro/wazirx.js +3 -3
  131. package/dist/cjs/src/pro/whitebit.js +2 -2
  132. package/dist/cjs/src/probit.js +2 -2
  133. package/dist/cjs/src/tidex.js +2 -2
  134. package/dist/cjs/src/timex.js +2 -2
  135. package/dist/cjs/src/tokocrypto.js +2 -2
  136. package/dist/cjs/src/upbit.js +2 -2
  137. package/dist/cjs/src/wavesexchange.js +3 -3
  138. package/dist/cjs/src/wazirx.js +2 -2
  139. package/dist/cjs/src/whitebit.js +3 -3
  140. package/dist/cjs/src/woo.js +2 -2
  141. package/dist/cjs/src/yobit.js +2 -2
  142. package/dist/cjs/src/zaif.js +2 -2
  143. package/dist/cjs/src/zonda.js +2 -2
  144. package/js/ccxt.d.ts +1 -1
  145. package/js/ccxt.js +1 -1
  146. package/js/src/abstract/bingx.d.ts +2 -0
  147. package/js/src/abstract/coinsph.d.ts +5 -0
  148. package/js/src/ace.js +2 -2
  149. package/js/src/alpaca.js +1 -1
  150. package/js/src/ascendex.js +3 -3
  151. package/js/src/base/Exchange.js +2 -2
  152. package/js/src/bigone.js +2 -2
  153. package/js/src/binance.js +5 -5
  154. package/js/src/bingx.d.ts +1 -0
  155. package/js/src/bingx.js +64 -19
  156. package/js/src/bit2c.js +2 -2
  157. package/js/src/bitbank.js +2 -2
  158. package/js/src/bitbns.js +2 -2
  159. package/js/src/bitfinex.js +2 -2
  160. package/js/src/bitfinex2.js +4 -4
  161. package/js/src/bitflyer.js +2 -2
  162. package/js/src/bitforex.js +2 -2
  163. package/js/src/bitget.js +5 -5
  164. package/js/src/bithumb.js +2 -2
  165. package/js/src/bitmart.js +2 -2
  166. package/js/src/bitmex.js +5 -5
  167. package/js/src/bitopro.js +3 -3
  168. package/js/src/bitpanda.js +2 -2
  169. package/js/src/bitrue.js +3 -3
  170. package/js/src/bitso.js +2 -2
  171. package/js/src/bitstamp.js +2 -2
  172. package/js/src/bitstamp1.js +2 -2
  173. package/js/src/bittrex.js +3 -3
  174. package/js/src/bitvavo.js +3 -3
  175. package/js/src/bkex.js +4 -4
  176. package/js/src/bl3p.js +2 -2
  177. package/js/src/blockchaincom.js +1 -1
  178. package/js/src/btcalpha.js +2 -2
  179. package/js/src/btcbox.js +2 -2
  180. package/js/src/btcmarkets.js +2 -2
  181. package/js/src/btctradeua.js +2 -2
  182. package/js/src/btcturk.js +2 -2
  183. package/js/src/bybit.js +5 -5
  184. package/js/src/cex.js +2 -2
  185. package/js/src/coinbase.js +3 -3
  186. package/js/src/coinbasepro.js +2 -2
  187. package/js/src/coincheck.js +2 -2
  188. package/js/src/coinex.js +6 -6
  189. package/js/src/coinfalcon.js +2 -2
  190. package/js/src/coinmate.js +2 -2
  191. package/js/src/coinone.js +2 -2
  192. package/js/src/coinsph.js +7 -2
  193. package/js/src/coinspot.js +2 -2
  194. package/js/src/cryptocom.js +5 -5
  195. package/js/src/currencycom.js +2 -2
  196. package/js/src/delta.js +2 -2
  197. package/js/src/deribit.js +3 -3
  198. package/js/src/digifinex.js +4 -4
  199. package/js/src/exmo.js +2 -2
  200. package/js/src/gate.js +4 -4
  201. package/js/src/gemini.js +3 -3
  202. package/js/src/hitbtc.js +4 -4
  203. package/js/src/hollaex.js +3 -3
  204. package/js/src/huobi.js +5 -5
  205. package/js/src/huobijp.js +2 -2
  206. package/js/src/idex.js +2 -2
  207. package/js/src/independentreserve.js +2 -2
  208. package/js/src/indodax.js +2 -2
  209. package/js/src/kraken.js +2 -2
  210. package/js/src/kucoin.js +4 -4
  211. package/js/src/kucoinfutures.js +5 -5
  212. package/js/src/kuna.js +2 -2
  213. package/js/src/latoken.js +2 -2
  214. package/js/src/lbank.js +2 -2
  215. package/js/src/lbank2.js +2 -2
  216. package/js/src/luno.js +2 -2
  217. package/js/src/lykke.js +2 -2
  218. package/js/src/mercado.js +2 -2
  219. package/js/src/mexc.js +7 -5
  220. package/js/src/ndax.js +2 -2
  221. package/js/src/novadax.js +2 -2
  222. package/js/src/oceanex.js +2 -2
  223. package/js/src/okcoin.js +2 -2
  224. package/js/src/okx.js +4 -4
  225. package/js/src/paymium.js +2 -2
  226. package/js/src/phemex.js +2 -2
  227. package/js/src/poloniex.d.ts +1 -1
  228. package/js/src/poloniex.js +165 -81
  229. package/js/src/poloniexfutures.js +2 -2
  230. package/js/src/pro/ascendex.js +2 -2
  231. package/js/src/pro/binance.js +6 -6
  232. package/js/src/pro/bitfinex.js +1 -1
  233. package/js/src/pro/bitfinex2.js +2 -2
  234. package/js/src/pro/bitget.js +2 -2
  235. package/js/src/pro/bitmart.js +1 -1
  236. package/js/src/pro/bitmex.js +2 -2
  237. package/js/src/pro/bitopro.js +2 -2
  238. package/js/src/pro/bitpanda.js +6 -6
  239. package/js/src/pro/bitrue.js +1 -1
  240. package/js/src/pro/bitstamp.js +1 -1
  241. package/js/src/pro/bittrex.js +2 -2
  242. package/js/src/pro/bitvavo.js +1 -1
  243. package/js/src/pro/blockchaincom.js +5 -5
  244. package/js/src/pro/bybit.js +1 -1
  245. package/js/src/pro/cex.js +4 -4
  246. package/js/src/pro/coinbase.js +5 -5
  247. package/js/src/pro/coinbasepro.js +1 -1
  248. package/js/src/pro/coinex.js +2 -2
  249. package/js/src/pro/cryptocom.js +3 -3
  250. package/js/src/pro/currencycom.js +2 -2
  251. package/js/src/pro/deribit.js +3 -3
  252. package/js/src/pro/exmo.js +3 -3
  253. package/js/src/pro/gate.js +2 -2
  254. package/js/src/pro/gemini.js +1 -1
  255. package/js/src/pro/hitbtc.js +1 -1
  256. package/js/src/pro/hollaex.js +2 -2
  257. package/js/src/pro/huobi.js +2 -2
  258. package/js/src/pro/huobijp.js +1 -1
  259. package/js/src/pro/idex.js +1 -1
  260. package/js/src/pro/independentreserve.js +1 -1
  261. package/js/src/pro/kraken.js +6 -6
  262. package/js/src/pro/krakenfutures.js +5 -5
  263. package/js/src/pro/kucoin.js +2 -2
  264. package/js/src/pro/kucoinfutures.js +3 -2
  265. package/js/src/pro/luno.js +1 -1
  266. package/js/src/pro/mexc.js +6 -6
  267. package/js/src/pro/ndax.js +1 -1
  268. package/js/src/pro/okcoin.js +2 -2
  269. package/js/src/pro/okx.js +7 -7
  270. package/js/src/pro/phemex.js +2 -2
  271. package/js/src/pro/poloniex.js +6 -6
  272. package/js/src/pro/poloniexfutures.js +5 -5
  273. package/js/src/pro/probit.js +6 -6
  274. package/js/src/pro/upbit.js +1 -1
  275. package/js/src/pro/wazirx.js +3 -3
  276. package/js/src/pro/whitebit.js +2 -2
  277. package/js/src/probit.js +2 -2
  278. package/js/src/tidex.js +2 -2
  279. package/js/src/timex.js +2 -2
  280. package/js/src/tokocrypto.js +2 -2
  281. package/js/src/upbit.js +2 -2
  282. package/js/src/wavesexchange.js +3 -3
  283. package/js/src/wazirx.js +2 -2
  284. package/js/src/whitebit.js +3 -3
  285. package/js/src/woo.js +2 -2
  286. package/js/src/yobit.js +2 -2
  287. package/js/src/zaif.js +2 -2
  288. package/js/src/zonda.js +2 -2
  289. package/package.json +1 -1
  290. package/skip-tests.json +2 -0
@@ -29,9 +29,9 @@ export default class poloniex extends Exchange {
29
29
  'CORS': undefined,
30
30
  'spot': true,
31
31
  'margin': undefined,
32
- 'swap': undefined,
33
- 'future': undefined,
34
- 'option': undefined,
32
+ 'swap': false,
33
+ 'future': false,
34
+ 'option': false,
35
35
  'cancelAllOrders': true,
36
36
  'cancelOrder': true,
37
37
  'createDepositAddress': true,
@@ -918,7 +918,7 @@ export default class poloniex extends Exchange {
918
918
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
919
919
  * @param {int} [limit] the maximum amount of trades to fetch
920
920
  * @param {object} [params] extra parameters specific to the poloniex api endpoint
921
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
921
+ * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
922
922
  */
923
923
  await this.loadMarkets();
924
924
  const market = this.market(symbol);
@@ -1099,6 +1099,7 @@ export default class poloniex extends Exchange {
1099
1099
  };
1100
1100
  }
1101
1101
  const clientOrderId = this.safeString(order, 'clientOrderId');
1102
+ const triggerPrice = this.safeString2(order, 'triggerPrice', 'stopPrice');
1102
1103
  return this.safeOrder({
1103
1104
  'info': order,
1104
1105
  'id': id,
@@ -1113,8 +1114,8 @@ export default class poloniex extends Exchange {
1113
1114
  'postOnly': undefined,
1114
1115
  'side': side,
1115
1116
  'price': price,
1116
- 'stopPrice': undefined,
1117
- 'triggerPrice': undefined,
1117
+ 'stopPrice': triggerPrice,
1118
+ 'triggerPrice': triggerPrice,
1118
1119
  'cost': undefined,
1119
1120
  'average': this.safeString(order, 'avgPrice'),
1120
1121
  'amount': amount,
@@ -1152,10 +1153,12 @@ export default class poloniex extends Exchange {
1152
1153
  * @name poloniex#fetchOpenOrders
1153
1154
  * @description fetch all unfilled currently open orders
1154
1155
  * @see https://docs.poloniex.com/#authenticated-endpoints-orders-open-orders
1156
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
1155
1157
  * @param {string} symbol unified market symbol
1156
1158
  * @param {int} [since] the earliest time in ms to fetch open orders for
1157
1159
  * @param {int} [limit] the maximum number of open orders structures to retrieve
1158
1160
  * @param {object} [params] extra parameters specific to the poloniex api endpoint
1161
+ * @param {boolean} [params.stop] set true to fetch trigger orders instead of regular orders
1159
1162
  * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1160
1163
  */
1161
1164
  await this.loadMarkets();
@@ -1168,7 +1171,15 @@ export default class poloniex extends Exchange {
1168
1171
  if (limit !== undefined) {
1169
1172
  request['limit'] = limit;
1170
1173
  }
1171
- const response = await this.privateGetOrders(this.extend(request, params));
1174
+ const isTrigger = this.safeValue2(params, 'trigger', 'stop');
1175
+ params = this.omit(params, ['trigger', 'stop']);
1176
+ let response = undefined;
1177
+ if (isTrigger) {
1178
+ response = await this.privateGetSmartorders(this.extend(request, params));
1179
+ }
1180
+ else {
1181
+ response = await this.privateGetOrders(this.extend(request, params));
1182
+ }
1172
1183
  //
1173
1184
  // [
1174
1185
  // {
@@ -1186,6 +1197,7 @@ export default class poloniex extends Exchange {
1186
1197
  // "amount" : "0",
1187
1198
  // "filledQuantity" : "0",
1188
1199
  // "filledAmount" : "0",
1200
+ // "stopPrice": "3750.00", // for trigger orders
1189
1201
  // "createTime" : 16xxxxxxxxx26,
1190
1202
  // "updateTime" : 16xxxxxxxxx36
1191
1203
  // }
@@ -1195,36 +1207,46 @@ export default class poloniex extends Exchange {
1195
1207
  return this.parseOrders(response, market, since, limit, extension);
1196
1208
  }
1197
1209
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
1198
- /**
1199
- * @method
1200
- * @name poloniex#createOrder
1201
- * @description create a trade order
1202
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
1203
- * @param {string} symbol unified symbol of the market to create an order in
1204
- * @param {string} type 'market' or 'limit'
1205
- * @param {string} side 'buy' or 'sell'
1206
- * @param {float} amount how much of currency you want to trade in units of base currency
1207
- * @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1208
- * @param {object} [params] extra parameters specific to the poloniex api endpoint
1209
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1210
- */
1211
- // if (type === 'market') {
1212
- // throw new ExchangeError (this.id + ' createOrder() does not accept market orders');
1213
- // }
1210
+ //
1211
+ // @method
1212
+ // @name poloniex#createOrder
1213
+ // @description create a trade order
1214
+ // @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
1215
+ // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
1216
+ // @param {string} symbol unified symbol of the market to create an order in
1217
+ // @param {string} type 'market' or 'limit'
1218
+ // @param {string} side 'buy' or 'sell'
1219
+ // @param {float} amount how much of currency you want to trade in units of base currency
1220
+ // @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1221
+ // @param {object} [params] extra parameters specific to the poloniex api endpoint
1222
+ // <<<<<<< HEAD
1223
+ // @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
1224
+ // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1225
+ // =======
1226
+ // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1227
+ // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
1228
+ //
1214
1229
  await this.loadMarkets();
1215
1230
  const market = this.market(symbol);
1216
1231
  if (!market['spot']) {
1217
1232
  throw new NotSupported(this.id + ' createOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted');
1218
1233
  }
1219
- const request = {
1234
+ let request = {
1220
1235
  'symbol': market['id'],
1221
1236
  'side': side,
1222
1237
  // 'timeInForce': timeInForce,
1223
1238
  // 'accountType': 'SPOT',
1224
1239
  // 'amount': amount,
1225
1240
  };
1226
- const orderRequest = this.orderRequest(symbol, type, side, amount, request, price, params);
1227
- let response = await this.privatePostOrders(this.extend(orderRequest[0], orderRequest[1]));
1241
+ const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
1242
+ [request, params] = this.orderRequest(symbol, type, side, amount, request, price, params);
1243
+ let response = undefined;
1244
+ if (triggerPrice !== undefined) {
1245
+ response = await this.privatePostSmartorders(this.extend(request, params));
1246
+ }
1247
+ else {
1248
+ response = await this.privatePostOrders(this.extend(request, params));
1249
+ }
1228
1250
  //
1229
1251
  // {
1230
1252
  // "id" : "78923648051920896",
@@ -1241,9 +1263,14 @@ export default class poloniex extends Exchange {
1241
1263
  let upperCaseType = type.toUpperCase();
1242
1264
  const isMarket = upperCaseType === 'MARKET';
1243
1265
  const isPostOnly = this.isPostOnly(isMarket, upperCaseType === 'LIMIT_MAKER', params);
1244
- if (isPostOnly) {
1266
+ const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
1267
+ params = this.omit(params, ['postOnly', 'triggerPrice', 'stopPrice']);
1268
+ if (triggerPrice !== undefined) {
1269
+ upperCaseType = (price === undefined) ? 'STOP' : 'STOP_LIMIT';
1270
+ request['stopPrice'] = triggerPrice;
1271
+ }
1272
+ else if (isPostOnly) {
1245
1273
  upperCaseType = 'LIMIT_MAKER';
1246
- params = this.omit(params, 'postOnly');
1247
1274
  }
1248
1275
  request['type'] = upperCaseType;
1249
1276
  if (isMarket) {
@@ -1267,31 +1294,44 @@ export default class poloniex extends Exchange {
1267
1294
  return [request, params];
1268
1295
  }
1269
1296
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
1270
- /**
1271
- * @method
1272
- * @name poloniex#editOrder
1273
- * @description edit a trade order
1274
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
1275
- * @param {string} id order id
1276
- * @param {string} symbol unified symbol of the market to create an order in
1277
- * @param {string} type 'market' or 'limit'
1278
- * @param {string} side 'buy' or 'sell'
1279
- * @param {float} amount how much of the currency you want to trade in units of the base currency
1280
- * @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1281
- * @param {object} [params] extra parameters specific to the poloniex api endpoint
1282
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1283
- */
1297
+ //
1298
+ // @method
1299
+ // @name poloniex#editOrder
1300
+ // @description edit a trade order
1301
+ // @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
1302
+ // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
1303
+ // @param {string} id order id
1304
+ // @param {string} symbol unified symbol of the market to create an order in
1305
+ // @param {string} type 'market' or 'limit'
1306
+ // @param {string} side 'buy' or 'sell'
1307
+ // @param {float} [amount] how much of the currency you want to trade in units of the base currency
1308
+ // @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1309
+ // @param {object} [params] extra parameters specific to the poloniex api endpoint
1310
+ // <<<<<<< HEAD
1311
+ // @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
1312
+ // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1313
+ // =======
1314
+ // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1315
+ // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
1316
+ //
1284
1317
  await this.loadMarkets();
1285
1318
  const market = this.market(symbol);
1286
1319
  if (!market['spot']) {
1287
1320
  throw new NotSupported(this.id + ' editOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted');
1288
1321
  }
1289
- const request = {
1322
+ let request = {
1290
1323
  'id': id,
1291
1324
  // 'timeInForce': timeInForce,
1292
1325
  };
1293
- const orderRequest = this.orderRequest(symbol, type, side, amount, request, price, params);
1294
- let response = await this.privatePutOrdersId(this.extend(orderRequest[0], orderRequest[1]));
1326
+ const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
1327
+ [request, params] = this.orderRequest(symbol, type, side, amount, request, price, params);
1328
+ let response = undefined;
1329
+ if (triggerPrice !== undefined) {
1330
+ response = await this.privatePutSmartordersId(this.extend(request, params));
1331
+ }
1332
+ else {
1333
+ response = await this.privatePutOrdersId(this.extend(request, params));
1334
+ }
1295
1335
  //
1296
1336
  // {
1297
1337
  // "id" : "78923648051920896",
@@ -1304,16 +1344,22 @@ export default class poloniex extends Exchange {
1304
1344
  return this.parseOrder(response, market);
1305
1345
  }
1306
1346
  async cancelOrder(id, symbol = undefined, params = {}) {
1307
- /**
1308
- * @method
1309
- * @name poloniex#cancelOrder
1310
- * @description cancels an open order
1311
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-order-by-id
1312
- * @param {string} id order id
1313
- * @param {string} symbol unified symbol of the market the order was made in
1314
- * @param {object} [params] extra parameters specific to the poloniex api endpoint
1315
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1316
- */
1347
+ //
1348
+ // @method
1349
+ // @name poloniex#cancelOrder
1350
+ // @description cancels an open order
1351
+ // @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-order-by-id
1352
+ // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-order-by-id // trigger orders
1353
+ // @param {string} id order id
1354
+ // @param {string} symbol unified symbol of the market the order was made in
1355
+ // @param {object} [params] extra parameters specific to the poloniex api endpoint
1356
+ // <<<<<<< HEAD
1357
+ // @param {boolean} [params.trigger] true if canceling a trigger order
1358
+ // @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1359
+ // =======
1360
+ // @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1361
+ // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
1362
+ //
1317
1363
  await this.loadMarkets();
1318
1364
  const request = {};
1319
1365
  const clientOrderId = this.safeValue(params, 'clientOrderId');
@@ -1321,8 +1367,15 @@ export default class poloniex extends Exchange {
1321
1367
  id = clientOrderId;
1322
1368
  }
1323
1369
  request['id'] = id;
1324
- params = this.omit(params, 'clientOrderId');
1325
- const response = await this.privateDeleteOrdersId(this.extend(request, params));
1370
+ const isTrigger = this.safeValue2(params, 'trigger', 'stop');
1371
+ params = this.omit(params, ['clientOrderId', 'trigger', 'stop']);
1372
+ let response = undefined;
1373
+ if (isTrigger) {
1374
+ response = await this.privateDeleteSmartordersId(this.extend(request, params));
1375
+ }
1376
+ else {
1377
+ response = await this.privateDeleteOrdersId(this.extend(request, params));
1378
+ }
1326
1379
  //
1327
1380
  // {
1328
1381
  // "orderId":"210832697138888704",
@@ -1335,18 +1388,25 @@ export default class poloniex extends Exchange {
1335
1388
  return this.parseOrder(response);
1336
1389
  }
1337
1390
  async cancelAllOrders(symbol = undefined, params = {}) {
1338
- /**
1339
- * @method
1340
- * @name poloniex#cancelAllOrders
1341
- * @description cancel all open orders
1342
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
1343
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1344
- * @param {object} [params] extra parameters specific to the poloniex api endpoint
1345
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1346
- */
1391
+ //
1392
+ // @method
1393
+ // @name poloniex#cancelAllOrders
1394
+ // @description cancel all open orders
1395
+ // @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
1396
+ // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
1397
+ // @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1398
+ // @param {object} [params] extra parameters specific to the poloniex api endpoint
1399
+ // <<<<<<< HEAD
1400
+ // @param {boolean} [params.trigger] true if canceling trigger orders
1401
+ // @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1402
+ // =======
1403
+ // @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1404
+ // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
1405
+ //
1347
1406
  await this.loadMarkets();
1348
1407
  const request = {
1349
- // 'accountTypes': 'SPOT',
1408
+ // 'accountTypes': 'SPOT',
1409
+ 'symbols': [],
1350
1410
  };
1351
1411
  let market = undefined;
1352
1412
  if (symbol !== undefined) {
@@ -1355,7 +1415,15 @@ export default class poloniex extends Exchange {
1355
1415
  market['id'],
1356
1416
  ];
1357
1417
  }
1358
- const response = await this.privateDeleteOrders(this.extend(request, params));
1418
+ const isTrigger = this.safeValue2(params, 'trigger', 'stop');
1419
+ params = this.omit(params, ['trigger', 'stop']);
1420
+ let response = undefined;
1421
+ if (isTrigger) {
1422
+ response = await this.privateDeleteSmartorders(this.extend(request, params));
1423
+ }
1424
+ else {
1425
+ response = await this.privateDeleteOrders(this.extend(request, params));
1426
+ }
1359
1427
  //
1360
1428
  // [
1361
1429
  // {
@@ -1373,25 +1441,40 @@ export default class poloniex extends Exchange {
1373
1441
  // }
1374
1442
  // ]
1375
1443
  //
1376
- return response;
1444
+ return this.parseOrders(response, market);
1377
1445
  }
1378
1446
  async fetchOrder(id, symbol = undefined, params = {}) {
1379
- /**
1380
- * @method
1381
- * @name poloniex#fetchOrder
1382
- * @description fetch an order by it's id
1383
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
1384
- * @param {string} id order id
1385
- * @param {string} symbol unified market symbol, default is undefined
1386
- * @param {object} [params] extra parameters specific to the poloniex api endpoint
1387
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1388
- */
1447
+ //
1448
+ // @method
1449
+ // @name poloniex#fetchOrder
1450
+ // @description fetch an order by it's id
1451
+ // @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
1452
+ // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
1453
+ // @param {string} id order id
1454
+ // @param {string} symbol unified market symbol, default is undefined
1455
+ // @param {object} [params] extra parameters specific to the poloniex api endpoint
1456
+ // <<<<<<< HEAD
1457
+ // @param {boolean} [params.trigger] true if fetching a trigger order
1458
+ // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1459
+ // =======
1460
+ // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1461
+ // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
1462
+ //
1389
1463
  await this.loadMarkets();
1390
1464
  id = id.toString();
1391
1465
  const request = {
1392
1466
  'id': id,
1393
1467
  };
1394
- const response = await this.privateGetOrdersId(this.extend(request, params));
1468
+ const isTrigger = this.safeValue2(params, 'trigger', 'stop');
1469
+ params = this.omit(params, ['trigger', 'stop']);
1470
+ let response = undefined;
1471
+ if (isTrigger) {
1472
+ response = await this.privateGetSmartordersId(this.extend(request, params));
1473
+ response = this.safeValue(response, 0);
1474
+ }
1475
+ else {
1476
+ response = await this.privateGetOrdersId(this.extend(request, params));
1477
+ }
1395
1478
  //
1396
1479
  // {
1397
1480
  // "id": "21934611974062080",
@@ -1408,6 +1491,7 @@ export default class poloniex extends Exchange {
1408
1491
  // "amount": "0.00",
1409
1492
  // "filledQuantity": "0.00",
1410
1493
  // "filledAmount": "0.00",
1494
+ // "stopPrice": "3750.00", // for trigger orders
1411
1495
  // "createTime": 1646196019020,
1412
1496
  // "updateTime": 1646196019020
1413
1497
  // }
@@ -1491,7 +1575,7 @@ export default class poloniex extends Exchange {
1491
1575
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
1492
1576
  * @see https://docs.poloniex.com/#authenticated-endpoints-accounts-all-account-balances
1493
1577
  * @param {object} [params] extra parameters specific to the poloniex api endpoint
1494
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
1578
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1495
1579
  */
1496
1580
  await this.loadMarkets();
1497
1581
  const request = {
@@ -648,7 +648,7 @@ export default class poloniexfutures extends Exchange {
648
648
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
649
649
  * @param {int} [limit] the maximum amount of trades to fetch
650
650
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
651
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
651
+ * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
652
652
  */
653
653
  await this.loadMarkets();
654
654
  const market = this.market(symbol);
@@ -770,7 +770,7 @@ export default class poloniexfutures extends Exchange {
770
770
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
771
771
  * @see https://futures-docs.poloniex.com/#get-account-overview
772
772
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
773
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
773
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
774
774
  */
775
775
  await this.loadMarkets();
776
776
  const currencyId = this.safeString(params, 'currency');
@@ -147,7 +147,7 @@ export default class ascendex extends ascendexRest {
147
147
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
148
148
  * @param {int} [limit] the maximum amount of trades to fetch
149
149
  * @param {object} [params] extra parameters specific to the ascendex api endpoint
150
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
150
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
151
151
  */
152
152
  await this.loadMarkets();
153
153
  const market = this.market(symbol);
@@ -352,7 +352,7 @@ export default class ascendex extends ascendexRest {
352
352
  * @name ascendex#watchBalance
353
353
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
354
354
  * @param {object} [params] extra parameters specific to the ascendex api endpoint
355
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
355
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
356
356
  */
357
357
  await this.loadMarkets();
358
358
  const [type, query] = this.handleMarketTypeAndParams('watchBalance', undefined, params);
@@ -422,7 +422,7 @@ export default class binance extends binanceRest {
422
422
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
423
423
  * @param {int} [limit] the maximum amount of trades to fetch
424
424
  * @param {object} [params] extra parameters specific to the binance api endpoint
425
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
425
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
426
426
  */
427
427
  await this.loadMarkets();
428
428
  const market = this.market(symbol);
@@ -1186,7 +1186,7 @@ export default class binance extends binanceRest {
1186
1186
  * @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
1187
1187
  * @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
1188
1188
  * @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
1189
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
1189
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1190
1190
  */
1191
1191
  await this.loadMarkets();
1192
1192
  const url = this.urls['api']['ws']['ws'];
@@ -1263,7 +1263,7 @@ export default class binance extends binanceRest {
1263
1263
  * @name binance#watchBalance
1264
1264
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
1265
1265
  * @param {object} [params] extra parameters specific to the binance api endpoint
1266
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
1266
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1267
1267
  */
1268
1268
  await this.loadMarkets();
1269
1269
  await this.authenticate(params);
@@ -1427,7 +1427,7 @@ export default class binance extends binanceRest {
1427
1427
  * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1428
1428
  * @param {object} [params] extra parameters specific to the binance api endpoint
1429
1429
  * @param {boolean} params.test test order, default false
1430
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
1430
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1431
1431
  */
1432
1432
  await this.loadMarkets();
1433
1433
  this.checkIsSpot('createOrderWs', symbol, params);
@@ -1561,7 +1561,7 @@ export default class binance extends binanceRest {
1561
1561
  * @param {float} amount how much of the currency you want to trade in units of the base currency
1562
1562
  * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1563
1563
  * @param {object} [params] extra parameters specific to the binance api endpoint
1564
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
1564
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1565
1565
  */
1566
1566
  await this.loadMarkets();
1567
1567
  this.checkIsSpot('editOrderWs', symbol, params);
@@ -1665,7 +1665,7 @@ export default class binance extends binanceRest {
1665
1665
  * @param {string} symbol unified market symbol, default is undefined
1666
1666
  * @param {object} [params] extra parameters specific to the binance api endpoint
1667
1667
  * @param {string|undefined} [params.cancelRestrictions] Supported values: ONLY_NEW - Cancel will succeed if the order status is NEW. ONLY_PARTIALLY_FILLED - Cancel will succeed if order status is PARTIALLY_FILLED.
1668
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
1668
+ * @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1669
1669
  */
1670
1670
  await this.loadMarkets();
1671
1671
  if (symbol === undefined) {
@@ -64,7 +64,7 @@ export default class bitfinex extends bitfinexRest {
64
64
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
65
65
  * @param {int} [limit] the maximum amount of trades to fetch
66
66
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
67
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
67
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
68
68
  */
69
69
  await this.loadMarkets();
70
70
  symbol = this.symbol(symbol);
@@ -196,7 +196,7 @@ export default class bitfinex2 extends bitfinex2Rest {
196
196
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
197
197
  * @param {int} [limit] the maximum amount of trades to fetch
198
198
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
199
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
199
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
200
200
  */
201
201
  const trades = await this.subscribe('trades', symbol, params);
202
202
  if (this.newUpdates) {
@@ -686,7 +686,7 @@ export default class bitfinex2 extends bitfinex2Rest {
686
686
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
687
687
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
688
688
  * @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
689
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
689
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
690
690
  */
691
691
  await this.loadMarkets();
692
692
  const balanceType = this.safeString(params, 'wallet', 'exchange'); // exchange, margin
@@ -481,7 +481,7 @@ export default class bitget extends bitgetRest {
481
481
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
482
482
  * @param {int} [limit] the maximum amount of trades to fetch
483
483
  * @param {object} [params] extra parameters specific to the bitget api endpoint
484
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
484
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
485
485
  */
486
486
  await this.loadMarkets();
487
487
  const market = this.market(symbol);
@@ -1011,7 +1011,7 @@ export default class bitget extends bitgetRest {
1011
1011
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
1012
1012
  * @param {object} [params] extra parameters specific to the bitget api endpoint
1013
1013
  * @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
1014
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
1014
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1015
1015
  */
1016
1016
  let type = undefined;
1017
1017
  [type, params] = this.handleMarketTypeAndParams('watchOrders', undefined, params);
@@ -90,7 +90,7 @@ export default class bitmart extends bitmartRest {
90
90
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
91
91
  * @param {int} [limit] the maximum amount of trades to fetch
92
92
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
93
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
93
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
94
94
  */
95
95
  await this.loadMarkets();
96
96
  symbol = this.symbol(symbol);
@@ -321,7 +321,7 @@ export default class bitmex extends bitmexRest {
321
321
  * @name bitmex#watchBalance
322
322
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
323
323
  * @param {object} [params] extra parameters specific to the bitmex api endpoint
324
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
324
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
325
325
  */
326
326
  await this.loadMarkets();
327
327
  await this.authenticate();
@@ -531,7 +531,7 @@ export default class bitmex extends bitmexRest {
531
531
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
532
532
  * @param {int} [limit] the maximum amount of trades to fetch
533
533
  * @param {object} [params] extra parameters specific to the bitmex api endpoint
534
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
534
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
535
535
  */
536
536
  await this.loadMarkets();
537
537
  const market = this.market(symbol);
@@ -125,7 +125,7 @@ export default class bitopro extends bitoproRest {
125
125
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
126
126
  * @param {int} [limit] the maximum amount of trades to fetch
127
127
  * @param {object} [params] extra parameters specific to the bitopro api endpoint
128
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
128
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
129
129
  */
130
130
  await this.loadMarkets();
131
131
  const market = this.market(symbol);
@@ -260,7 +260,7 @@ export default class bitopro extends bitoproRest {
260
260
  * @name bitopro#watchBalance
261
261
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
262
262
  * @param {object} [params] extra parameters specific to the bitopro api endpoint
263
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
263
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
264
264
  */
265
265
  this.checkRequiredCredentials();
266
266
  await this.loadMarkets();