ccxt 4.4.39 → 4.4.40
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.
- package/README.md +3 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ascendex.js +9 -9
- package/dist/cjs/src/base/Exchange.js +12 -18
- package/dist/cjs/src/binance.js +13 -19
- package/dist/cjs/src/bingx.js +1 -2
- package/dist/cjs/src/bit2c.js +0 -1
- package/dist/cjs/src/bitbank.js +0 -1
- package/dist/cjs/src/bitbns.js +0 -1
- package/dist/cjs/src/bitfinex.js +17 -18
- package/dist/cjs/src/bitfinex1.js +0 -1
- package/dist/cjs/src/bitflyer.js +0 -1
- package/dist/cjs/src/bitget.js +1 -2
- package/dist/cjs/src/bithumb.js +0 -1
- package/dist/cjs/src/bitmart.js +3 -4
- package/dist/cjs/src/bitmex.js +5 -6
- package/dist/cjs/src/bitopro.js +4 -5
- package/dist/cjs/src/bitrue.js +5 -7
- package/dist/cjs/src/bitso.js +1 -2
- package/dist/cjs/src/bitstamp.js +1 -2
- package/dist/cjs/src/bitteam.js +1 -3
- package/dist/cjs/src/bitvavo.js +2 -4
- package/dist/cjs/src/blockchaincom.js +5 -5
- package/dist/cjs/src/blofin.js +10 -10
- package/dist/cjs/src/btcalpha.js +0 -1
- package/dist/cjs/src/btcbox.js +0 -1
- package/dist/cjs/src/btcmarkets.js +1 -3
- package/dist/cjs/src/bybit.js +2 -3
- package/dist/cjs/src/cex.js +1 -1
- package/dist/cjs/src/coinbase.js +77 -1
- package/dist/cjs/src/coinbaseexchange.js +1 -1
- package/dist/cjs/src/coinbaseinternational.js +62 -0
- package/dist/cjs/src/coincatch.js +1 -1
- package/dist/cjs/src/coinex.js +9 -9
- package/dist/cjs/src/coinlist.js +1 -1
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/cryptocom.js +91 -2
- package/dist/cjs/src/currencycom.js +1 -1
- package/dist/cjs/src/defx.js +1 -2
- package/dist/cjs/src/delta.js +1 -1
- package/dist/cjs/src/digifinex.js +1 -1
- package/dist/cjs/src/exmo.js +2 -2
- package/dist/cjs/src/gate.js +1 -1
- package/dist/cjs/src/hashkey.js +3 -5
- package/dist/cjs/src/htx.js +1 -1
- package/dist/cjs/src/hyperliquid.js +1 -1
- package/dist/cjs/src/kraken.js +1 -1
- package/dist/cjs/src/kucoin.js +24 -24
- package/dist/cjs/src/luno.js +1 -1
- package/dist/cjs/src/mexc.js +138 -2
- package/dist/cjs/src/ndax.js +1 -1
- package/dist/cjs/src/okcoin.js +18 -18
- package/dist/cjs/src/okx.js +21 -21
- package/dist/cjs/src/phemex.js +12 -8
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/poloniexfutures.js +6 -6
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bybit.js +13 -1
- package/dist/cjs/src/pro/coinex.js +2 -2
- package/dist/cjs/src/pro/gate.js +6 -6
- package/dist/cjs/src/pro/kucoin.js +3 -3
- package/dist/cjs/src/pro/okx.js +11 -11
- package/dist/cjs/src/pro/upbit.js +3 -3
- package/dist/cjs/src/vertex.js +11 -11
- package/dist/cjs/src/woo.js +33 -33
- package/dist/cjs/src/woofipro.js +24 -24
- package/dist/cjs/src/xt.js +26 -26
- package/dist/cjs/src/zonda.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ascendex.d.ts +2 -2
- package/js/src/ascendex.js +9 -9
- package/js/src/base/Exchange.js +12 -18
- package/js/src/binance.d.ts +9 -9
- package/js/src/binance.js +13 -19
- package/js/src/bingx.d.ts +1 -1
- package/js/src/bingx.js +1 -2
- package/js/src/bit2c.js +0 -1
- package/js/src/bitbank.js +0 -1
- package/js/src/bitbns.js +0 -1
- package/js/src/bitfinex.d.ts +3 -3
- package/js/src/bitfinex.js +17 -18
- package/js/src/bitfinex1.js +0 -1
- package/js/src/bitflyer.js +0 -1
- package/js/src/bitget.d.ts +1 -1
- package/js/src/bitget.js +1 -2
- package/js/src/bithumb.js +0 -1
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmart.js +3 -4
- package/js/src/bitmex.d.ts +1 -1
- package/js/src/bitmex.js +5 -6
- package/js/src/bitopro.js +4 -5
- package/js/src/bitrue.js +5 -7
- package/js/src/bitso.d.ts +1 -1
- package/js/src/bitso.js +1 -2
- package/js/src/bitstamp.d.ts +1 -1
- package/js/src/bitstamp.js +1 -2
- package/js/src/bitteam.js +1 -3
- package/js/src/bitvavo.d.ts +1 -1
- package/js/src/bitvavo.js +2 -4
- package/js/src/blockchaincom.js +5 -5
- package/js/src/blofin.d.ts +3 -3
- package/js/src/blofin.js +10 -10
- package/js/src/btcalpha.js +0 -1
- package/js/src/btcbox.js +0 -1
- package/js/src/btcmarkets.js +1 -3
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +2 -3
- package/js/src/cex.d.ts +1 -1
- package/js/src/cex.js +1 -1
- package/js/src/coinbase.d.ts +1 -1
- package/js/src/coinbase.js +77 -1
- package/js/src/coinbaseexchange.d.ts +1 -1
- package/js/src/coinbaseexchange.js +1 -1
- package/js/src/coinbaseinternational.js +62 -0
- package/js/src/coincatch.d.ts +1 -1
- package/js/src/coincatch.js +1 -1
- package/js/src/coinex.js +9 -9
- package/js/src/coinlist.d.ts +1 -1
- package/js/src/coinlist.js +1 -1
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/cryptocom.d.ts +2 -2
- package/js/src/cryptocom.js +91 -2
- package/js/src/currencycom.d.ts +1 -1
- package/js/src/currencycom.js +1 -1
- package/js/src/defx.d.ts +1 -2
- package/js/src/defx.js +1 -2
- package/js/src/delta.d.ts +1 -1
- package/js/src/delta.js +1 -1
- package/js/src/digifinex.d.ts +1 -1
- package/js/src/digifinex.js +1 -1
- package/js/src/exmo.js +2 -2
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +1 -1
- package/js/src/hashkey.d.ts +1 -1
- package/js/src/hashkey.js +3 -5
- package/js/src/htx.d.ts +1 -1
- package/js/src/htx.js +1 -1
- package/js/src/hyperliquid.d.ts +1 -1
- package/js/src/hyperliquid.js +1 -1
- package/js/src/kraken.d.ts +1 -1
- package/js/src/kraken.js +1 -1
- package/js/src/kucoin.d.ts +13 -13
- package/js/src/kucoin.js +24 -24
- package/js/src/luno.d.ts +1 -1
- package/js/src/luno.js +1 -1
- package/js/src/mexc.d.ts +1 -2
- package/js/src/mexc.js +138 -2
- package/js/src/ndax.d.ts +1 -1
- package/js/src/ndax.js +1 -1
- package/js/src/okcoin.d.ts +4 -4
- package/js/src/okcoin.js +18 -18
- package/js/src/okx.d.ts +3 -3
- package/js/src/okx.js +21 -21
- package/js/src/phemex.js +12 -8
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/poloniex.js +1 -1
- package/js/src/poloniexfutures.d.ts +1 -1
- package/js/src/poloniexfutures.js +6 -6
- package/js/src/pro/bitget.d.ts +1 -1
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bybit.d.ts +1 -1
- package/js/src/pro/bybit.js +13 -1
- package/js/src/pro/coinex.js +2 -2
- package/js/src/pro/gate.d.ts +2 -2
- package/js/src/pro/gate.js +6 -6
- package/js/src/pro/kucoin.d.ts +1 -1
- package/js/src/pro/kucoin.js +3 -3
- package/js/src/pro/okx.d.ts +2 -2
- package/js/src/pro/okx.js +11 -11
- package/js/src/pro/upbit.d.ts +3 -3
- package/js/src/pro/upbit.js +3 -3
- package/js/src/vertex.d.ts +3 -3
- package/js/src/vertex.js +11 -11
- package/js/src/woo.d.ts +7 -7
- package/js/src/woo.js +33 -33
- package/js/src/woofipro.d.ts +1 -1
- package/js/src/woofipro.js +24 -24
- package/js/src/xt.d.ts +7 -7
- package/js/src/xt.js +26 -26
- package/js/src/zonda.d.ts +1 -1
- package/js/src/zonda.js +1 -1
- package/package.json +1 -1
package/js/src/kucoin.d.ts
CHANGED
|
@@ -231,7 +231,7 @@ export default class kucoin extends Exchange {
|
|
|
231
231
|
* market orders --------------------------------------------------
|
|
232
232
|
* @param {string} [params.funds] // Amount of quote currency to use
|
|
233
233
|
* stop orders ----------------------------------------------------
|
|
234
|
-
* @param {string} [params.stop] Either loss or entry, the default is loss. Requires
|
|
234
|
+
* @param {string} [params.stop] Either loss or entry, the default is loss. Requires triggerPrice to be defined
|
|
235
235
|
* margin orders --------------------------------------------------
|
|
236
236
|
* @param {float} [params.leverage] Leverage size of the order
|
|
237
237
|
* @param {string} [params.stp] '', // self trade prevention, CN, CO, CB or DC
|
|
@@ -323,7 +323,7 @@ export default class kucoin extends Exchange {
|
|
|
323
323
|
* @param {string} id order id
|
|
324
324
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
325
325
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
326
|
-
* @param {bool} [params.
|
|
326
|
+
* @param {bool} [params.trigger] True if cancelling a stop order
|
|
327
327
|
* @param {bool} [params.hf] false, // true for hf order
|
|
328
328
|
* @param {bool} [params.sync] false, // true to use the hf sync call
|
|
329
329
|
* @returns Response from the exchange
|
|
@@ -338,7 +338,7 @@ export default class kucoin extends Exchange {
|
|
|
338
338
|
* @see https://docs.kucoin.com/spot-hf/#cancel-all-hf-orders-by-symbol
|
|
339
339
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
340
340
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
341
|
-
* @param {bool} [params.
|
|
341
|
+
* @param {bool} [params.trigger] *invalid for isolated margin* true if cancelling all stop orders
|
|
342
342
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
343
343
|
* @param {string} [params.orderIds] *stop orders only* Comma seperated order IDs
|
|
344
344
|
* @param {bool} [params.hf] false, // true for hf order
|
|
@@ -362,9 +362,9 @@ export default class kucoin extends Exchange {
|
|
|
362
362
|
* @param {string} [params.side] buy or sell
|
|
363
363
|
* @param {string} [params.type] limit, market, limit_stop or market_stop
|
|
364
364
|
* @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
|
365
|
-
* @param {int} [params.currentPage] *
|
|
366
|
-
* @param {string} [params.orderIds] *
|
|
367
|
-
* @param {bool} [params.
|
|
365
|
+
* @param {int} [params.currentPage] *trigger orders only* current page
|
|
366
|
+
* @param {string} [params.orderIds] *trigger orders only* comma seperated order ID list
|
|
367
|
+
* @param {bool} [params.trigger] True if fetching a trigger order
|
|
368
368
|
* @param {bool} [params.hf] false, // true for hf order
|
|
369
369
|
* @returns An [array of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
370
370
|
*/
|
|
@@ -385,7 +385,7 @@ export default class kucoin extends Exchange {
|
|
|
385
385
|
* @param {string} [params.side] buy or sell
|
|
386
386
|
* @param {string} [params.type] limit, market, limit_stop or market_stop
|
|
387
387
|
* @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
|
388
|
-
* @param {bool} [params.
|
|
388
|
+
* @param {bool} [params.trigger] True if fetching a trigger order
|
|
389
389
|
* @param {bool} [params.hf] false, // true for hf order
|
|
390
390
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
391
391
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -404,12 +404,12 @@ export default class kucoin extends Exchange {
|
|
|
404
404
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
405
405
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
406
406
|
* @param {int} [params.until] end time in ms
|
|
407
|
-
* @param {bool} [params.
|
|
407
|
+
* @param {bool} [params.trigger] true if fetching trigger orders
|
|
408
408
|
* @param {string} [params.side] buy or sell
|
|
409
409
|
* @param {string} [params.type] limit, market, limit_stop or market_stop
|
|
410
410
|
* @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
|
411
|
-
* @param {int} [params.currentPage] *
|
|
412
|
-
* @param {string} [params.orderIds] *
|
|
411
|
+
* @param {int} [params.currentPage] *trigger orders only* current page
|
|
412
|
+
* @param {string} [params.orderIds] *trigger orders only* comma seperated order ID list
|
|
413
413
|
* @param {bool} [params.hf] false, // true for hf order
|
|
414
414
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
415
415
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -426,9 +426,9 @@ export default class kucoin extends Exchange {
|
|
|
426
426
|
* @see https://docs.kucoin.com/spot-hf/#details-of-a-single-hf-order
|
|
427
427
|
* @see https://docs.kucoin.com/spot-hf/#obtain-details-of-a-single-hf-order-using-clientoid
|
|
428
428
|
* @param {string} id Order id
|
|
429
|
-
* @param {string} symbol not sent to exchange except for
|
|
429
|
+
* @param {string} symbol not sent to exchange except for trigger orders with clientOid, but used internally by CCXT to filter
|
|
430
430
|
* @param {object} [params] exchange specific parameters
|
|
431
|
-
* @param {bool} [params.
|
|
431
|
+
* @param {bool} [params.trigger] true if fetching a trigger order
|
|
432
432
|
* @param {bool} [params.hf] false, // true for hf order
|
|
433
433
|
* @param {bool} [params.clientOid] unique order id created by users to identify their orders
|
|
434
434
|
* @returns An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -581,7 +581,7 @@ export default class kucoin extends Exchange {
|
|
|
581
581
|
* @param {boolean} [params.hf] default false, when true will fetch ledger entries for the high frequency trading account
|
|
582
582
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
583
583
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
584
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
584
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
585
585
|
*/
|
|
586
586
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
587
587
|
calculateRateLimiterCost(api: any, method: any, path: any, params: any, config?: {}): any;
|
package/js/src/kucoin.js
CHANGED
|
@@ -2235,7 +2235,7 @@ export default class kucoin extends Exchange {
|
|
|
2235
2235
|
* market orders --------------------------------------------------
|
|
2236
2236
|
* @param {string} [params.funds] // Amount of quote currency to use
|
|
2237
2237
|
* stop orders ----------------------------------------------------
|
|
2238
|
-
* @param {string} [params.stop] Either loss or entry, the default is loss. Requires
|
|
2238
|
+
* @param {string} [params.stop] Either loss or entry, the default is loss. Requires triggerPrice to be defined
|
|
2239
2239
|
* margin orders --------------------------------------------------
|
|
2240
2240
|
* @param {float} [params.leverage] Leverage size of the order
|
|
2241
2241
|
* @param {string} [params.stp] '', // self trade prevention, CN, CO, CB or DC
|
|
@@ -2576,7 +2576,7 @@ export default class kucoin extends Exchange {
|
|
|
2576
2576
|
* @param {string} id order id
|
|
2577
2577
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2578
2578
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2579
|
-
* @param {bool} [params.
|
|
2579
|
+
* @param {bool} [params.trigger] True if cancelling a stop order
|
|
2580
2580
|
* @param {bool} [params.hf] false, // true for hf order
|
|
2581
2581
|
* @param {bool} [params.sync] false, // true to use the hf sync call
|
|
2582
2582
|
* @returns Response from the exchange
|
|
@@ -2585,7 +2585,7 @@ export default class kucoin extends Exchange {
|
|
|
2585
2585
|
await this.loadMarkets();
|
|
2586
2586
|
const request = {};
|
|
2587
2587
|
const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
|
|
2588
|
-
const
|
|
2588
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger', false);
|
|
2589
2589
|
let hf = undefined;
|
|
2590
2590
|
[hf, params] = this.handleHfAndParams(params);
|
|
2591
2591
|
let useSync = false;
|
|
@@ -2601,7 +2601,7 @@ export default class kucoin extends Exchange {
|
|
|
2601
2601
|
params = this.omit(params, ['clientOid', 'clientOrderId', 'stop', 'trigger']);
|
|
2602
2602
|
if (clientOrderId !== undefined) {
|
|
2603
2603
|
request['clientOid'] = clientOrderId;
|
|
2604
|
-
if (
|
|
2604
|
+
if (trigger) {
|
|
2605
2605
|
response = await this.privateDeleteStopOrderCancelOrderByClientOid(this.extend(request, params));
|
|
2606
2606
|
//
|
|
2607
2607
|
// {
|
|
@@ -2645,7 +2645,7 @@ export default class kucoin extends Exchange {
|
|
|
2645
2645
|
}
|
|
2646
2646
|
else {
|
|
2647
2647
|
request['orderId'] = id;
|
|
2648
|
-
if (
|
|
2648
|
+
if (trigger) {
|
|
2649
2649
|
response = await this.privateDeleteStopOrderOrderId(this.extend(request, params));
|
|
2650
2650
|
//
|
|
2651
2651
|
// {
|
|
@@ -2697,7 +2697,7 @@ export default class kucoin extends Exchange {
|
|
|
2697
2697
|
* @see https://docs.kucoin.com/spot-hf/#cancel-all-hf-orders-by-symbol
|
|
2698
2698
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2699
2699
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2700
|
-
* @param {bool} [params.
|
|
2700
|
+
* @param {bool} [params.trigger] *invalid for isolated margin* true if cancelling all stop orders
|
|
2701
2701
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2702
2702
|
* @param {string} [params.orderIds] *stop orders only* Comma seperated order IDs
|
|
2703
2703
|
* @param {bool} [params.hf] false, // true for hf order
|
|
@@ -2706,7 +2706,7 @@ export default class kucoin extends Exchange {
|
|
|
2706
2706
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
2707
2707
|
await this.loadMarkets();
|
|
2708
2708
|
const request = {};
|
|
2709
|
-
const
|
|
2709
|
+
const trigger = this.safeBool(params, 'stop', false);
|
|
2710
2710
|
let hf = undefined;
|
|
2711
2711
|
[hf, params] = this.handleHfAndParams(params);
|
|
2712
2712
|
params = this.omit(params, 'stop');
|
|
@@ -2716,12 +2716,12 @@ export default class kucoin extends Exchange {
|
|
|
2716
2716
|
}
|
|
2717
2717
|
if (marginMode !== undefined) {
|
|
2718
2718
|
request['tradeType'] = this.options['marginModes'][marginMode];
|
|
2719
|
-
if (marginMode === 'isolated' &&
|
|
2719
|
+
if (marginMode === 'isolated' && trigger) {
|
|
2720
2720
|
throw new BadRequest(this.id + ' cancelAllOrders does not support isolated margin for stop orders');
|
|
2721
2721
|
}
|
|
2722
2722
|
}
|
|
2723
2723
|
let response = undefined;
|
|
2724
|
-
if (
|
|
2724
|
+
if (trigger) {
|
|
2725
2725
|
response = await this.privateDeleteStopOrderCancel(this.extend(request, query));
|
|
2726
2726
|
}
|
|
2727
2727
|
else if (hf) {
|
|
@@ -2754,9 +2754,9 @@ export default class kucoin extends Exchange {
|
|
|
2754
2754
|
* @param {string} [params.side] buy or sell
|
|
2755
2755
|
* @param {string} [params.type] limit, market, limit_stop or market_stop
|
|
2756
2756
|
* @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
|
2757
|
-
* @param {int} [params.currentPage] *
|
|
2758
|
-
* @param {string} [params.orderIds] *
|
|
2759
|
-
* @param {bool} [params.
|
|
2757
|
+
* @param {int} [params.currentPage] *trigger orders only* current page
|
|
2758
|
+
* @param {string} [params.orderIds] *trigger orders only* comma seperated order ID list
|
|
2759
|
+
* @param {bool} [params.trigger] True if fetching a trigger order
|
|
2760
2760
|
* @param {bool} [params.hf] false, // true for hf order
|
|
2761
2761
|
* @returns An [array of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2762
2762
|
*/
|
|
@@ -2878,7 +2878,7 @@ export default class kucoin extends Exchange {
|
|
|
2878
2878
|
* @param {string} [params.side] buy or sell
|
|
2879
2879
|
* @param {string} [params.type] limit, market, limit_stop or market_stop
|
|
2880
2880
|
* @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
|
2881
|
-
* @param {bool} [params.
|
|
2881
|
+
* @param {bool} [params.trigger] True if fetching a trigger order
|
|
2882
2882
|
* @param {bool} [params.hf] false, // true for hf order
|
|
2883
2883
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2884
2884
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -2905,12 +2905,12 @@ export default class kucoin extends Exchange {
|
|
|
2905
2905
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2906
2906
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2907
2907
|
* @param {int} [params.until] end time in ms
|
|
2908
|
-
* @param {bool} [params.
|
|
2908
|
+
* @param {bool} [params.trigger] true if fetching trigger orders
|
|
2909
2909
|
* @param {string} [params.side] buy or sell
|
|
2910
2910
|
* @param {string} [params.type] limit, market, limit_stop or market_stop
|
|
2911
2911
|
* @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
|
2912
|
-
* @param {int} [params.currentPage] *
|
|
2913
|
-
* @param {string} [params.orderIds] *
|
|
2912
|
+
* @param {int} [params.currentPage] *trigger orders only* current page
|
|
2913
|
+
* @param {string} [params.orderIds] *trigger orders only* comma seperated order ID list
|
|
2914
2914
|
* @param {bool} [params.hf] false, // true for hf order
|
|
2915
2915
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2916
2916
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -2935,9 +2935,9 @@ export default class kucoin extends Exchange {
|
|
|
2935
2935
|
* @see https://docs.kucoin.com/spot-hf/#details-of-a-single-hf-order
|
|
2936
2936
|
* @see https://docs.kucoin.com/spot-hf/#obtain-details-of-a-single-hf-order-using-clientoid
|
|
2937
2937
|
* @param {string} id Order id
|
|
2938
|
-
* @param {string} symbol not sent to exchange except for
|
|
2938
|
+
* @param {string} symbol not sent to exchange except for trigger orders with clientOid, but used internally by CCXT to filter
|
|
2939
2939
|
* @param {object} [params] exchange specific parameters
|
|
2940
|
-
* @param {bool} [params.
|
|
2940
|
+
* @param {bool} [params.trigger] true if fetching a trigger order
|
|
2941
2941
|
* @param {bool} [params.hf] false, // true for hf order
|
|
2942
2942
|
* @param {bool} [params.clientOid] unique order id created by users to identify their orders
|
|
2943
2943
|
* @returns An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -2946,7 +2946,7 @@ export default class kucoin extends Exchange {
|
|
|
2946
2946
|
await this.loadMarkets();
|
|
2947
2947
|
const request = {};
|
|
2948
2948
|
const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
|
|
2949
|
-
const
|
|
2949
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger', false);
|
|
2950
2950
|
let hf = undefined;
|
|
2951
2951
|
[hf, params] = this.handleHfAndParams(params);
|
|
2952
2952
|
let market = undefined;
|
|
@@ -2963,7 +2963,7 @@ export default class kucoin extends Exchange {
|
|
|
2963
2963
|
let response = undefined;
|
|
2964
2964
|
if (clientOrderId !== undefined) {
|
|
2965
2965
|
request['clientOid'] = clientOrderId;
|
|
2966
|
-
if (
|
|
2966
|
+
if (trigger) {
|
|
2967
2967
|
if (symbol !== undefined) {
|
|
2968
2968
|
request['symbol'] = market['id'];
|
|
2969
2969
|
}
|
|
@@ -2984,7 +2984,7 @@ export default class kucoin extends Exchange {
|
|
|
2984
2984
|
throw new InvalidOrder(this.id + ' fetchOrder() requires an order id');
|
|
2985
2985
|
}
|
|
2986
2986
|
request['orderId'] = id;
|
|
2987
|
-
if (
|
|
2987
|
+
if (trigger) {
|
|
2988
2988
|
response = await this.privateGetStopOrderOrderId(this.extend(request, params));
|
|
2989
2989
|
}
|
|
2990
2990
|
else if (hf) {
|
|
@@ -3127,7 +3127,7 @@ export default class kucoin extends Exchange {
|
|
|
3127
3127
|
const feeCurrencyId = this.safeString(order, 'feeCurrency');
|
|
3128
3128
|
const cancelExist = this.safeBool(order, 'cancelExist', false);
|
|
3129
3129
|
const responseStop = this.safeString(order, 'stop');
|
|
3130
|
-
const
|
|
3130
|
+
const trigger = responseStop !== undefined;
|
|
3131
3131
|
const stopTriggered = this.safeBool(order, 'stopTriggered', false);
|
|
3132
3132
|
const isActive = this.safeBool2(order, 'isActive', 'active');
|
|
3133
3133
|
const responseStatus = this.safeString(order, 'status');
|
|
@@ -3140,7 +3140,7 @@ export default class kucoin extends Exchange {
|
|
|
3140
3140
|
status = 'closed';
|
|
3141
3141
|
}
|
|
3142
3142
|
}
|
|
3143
|
-
if (
|
|
3143
|
+
if (trigger) {
|
|
3144
3144
|
if (responseStatus === 'NEW') {
|
|
3145
3145
|
status = 'open';
|
|
3146
3146
|
}
|
|
@@ -4367,7 +4367,7 @@ export default class kucoin extends Exchange {
|
|
|
4367
4367
|
* @param {boolean} [params.hf] default false, when true will fetch ledger entries for the high frequency trading account
|
|
4368
4368
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
4369
4369
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
4370
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
4370
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
4371
4371
|
*/
|
|
4372
4372
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4373
4373
|
await this.loadMarkets();
|
package/js/src/luno.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ export default class luno extends Exchange {
|
|
|
202
202
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
203
203
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
204
204
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
205
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
205
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
206
206
|
*/
|
|
207
207
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
208
208
|
parseLedgerComment(comment: any): {
|
package/js/src/luno.js
CHANGED
|
@@ -999,7 +999,7 @@ export default class luno extends Exchange {
|
|
|
999
999
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1000
1000
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1001
1001
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1002
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
1002
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
1003
1003
|
*/
|
|
1004
1004
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1005
1005
|
await this.loadMarkets();
|
package/js/src/mexc.d.ts
CHANGED
|
@@ -215,7 +215,6 @@ export default class mexc extends Exchange {
|
|
|
215
215
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
216
216
|
* @param {string} [marginMode] only 'isolated' is supported for spot-margin trading
|
|
217
217
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
218
|
-
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
219
218
|
* @param {bool} [params.postOnly] if true, the order will only be posted if it will be a maker order
|
|
220
219
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
221
220
|
*/
|
|
@@ -223,7 +222,7 @@ export default class mexc extends Exchange {
|
|
|
223
222
|
/**
|
|
224
223
|
* @ignore
|
|
225
224
|
* @method
|
|
226
|
-
* @name mexc#
|
|
225
|
+
* @name mexc#createSwapOrder
|
|
227
226
|
* @description create a trade order
|
|
228
227
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
|
|
229
228
|
* @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#order-under-maintenance
|
package/js/src/mexc.js
CHANGED
|
@@ -677,6 +677,143 @@ export default class mexc extends Exchange {
|
|
|
677
677
|
'maxTimeTillEnd': 90 * 86400 * 1000 - 1,
|
|
678
678
|
'broker': 'CCXT',
|
|
679
679
|
},
|
|
680
|
+
'features': {
|
|
681
|
+
'def': {
|
|
682
|
+
'sandbox': false,
|
|
683
|
+
'createOrder': {
|
|
684
|
+
'marginMode': true,
|
|
685
|
+
'triggerPrice': false,
|
|
686
|
+
'triggerDirection': false,
|
|
687
|
+
'triggerPriceType': {
|
|
688
|
+
'last': false,
|
|
689
|
+
'mark': false,
|
|
690
|
+
'index': false,
|
|
691
|
+
},
|
|
692
|
+
'stopLossPrice': false,
|
|
693
|
+
'takeProfitPrice': false,
|
|
694
|
+
'attachedStopLossTakeProfit': undefined,
|
|
695
|
+
'timeInForce': {
|
|
696
|
+
'IOC': true,
|
|
697
|
+
'FOK': true,
|
|
698
|
+
'PO': true,
|
|
699
|
+
'GTD': false,
|
|
700
|
+
},
|
|
701
|
+
'hedged': false,
|
|
702
|
+
// exchange-supported features
|
|
703
|
+
'selfTradePrevention': false,
|
|
704
|
+
'trailing': false,
|
|
705
|
+
'iceberg': false,
|
|
706
|
+
},
|
|
707
|
+
'createOrders': {
|
|
708
|
+
'max': 20,
|
|
709
|
+
},
|
|
710
|
+
'fetchMyTrades': {
|
|
711
|
+
'marginMode': false,
|
|
712
|
+
'limit': 100,
|
|
713
|
+
'daysBack': 30,
|
|
714
|
+
'untilDays': undefined,
|
|
715
|
+
},
|
|
716
|
+
'fetchOrder': {
|
|
717
|
+
'marginMode': false,
|
|
718
|
+
'trigger': false,
|
|
719
|
+
'trailing': false,
|
|
720
|
+
},
|
|
721
|
+
'fetchOpenOrders': {
|
|
722
|
+
'marginMode': true,
|
|
723
|
+
'limit': undefined,
|
|
724
|
+
'trigger': false,
|
|
725
|
+
'trailing': false,
|
|
726
|
+
},
|
|
727
|
+
'fetchOrders': {
|
|
728
|
+
'marginMode': true,
|
|
729
|
+
'limit': 1000,
|
|
730
|
+
'daysBack': 7,
|
|
731
|
+
'untilDays': 7,
|
|
732
|
+
'trigger': false,
|
|
733
|
+
'trailing': false,
|
|
734
|
+
},
|
|
735
|
+
'fetchClosedOrders': {
|
|
736
|
+
'marginMode': true,
|
|
737
|
+
'limit': 1000,
|
|
738
|
+
'daysBackClosed': 7,
|
|
739
|
+
'daysBackCanceled': 7,
|
|
740
|
+
'untilDays': 7,
|
|
741
|
+
'trigger': false,
|
|
742
|
+
'trailing': false,
|
|
743
|
+
},
|
|
744
|
+
'fetchOHLCV': {
|
|
745
|
+
'limit': 1000,
|
|
746
|
+
},
|
|
747
|
+
},
|
|
748
|
+
'spot': {
|
|
749
|
+
'extends': 'def',
|
|
750
|
+
},
|
|
751
|
+
'forDerivs': {
|
|
752
|
+
'extends': 'def',
|
|
753
|
+
'createOrder': {
|
|
754
|
+
'triggerPrice': true,
|
|
755
|
+
'triggerPriceType': {
|
|
756
|
+
'last': true,
|
|
757
|
+
'mark': true,
|
|
758
|
+
'index': true,
|
|
759
|
+
},
|
|
760
|
+
'triggerDirection': true,
|
|
761
|
+
'stopLossPrice': false,
|
|
762
|
+
'takeProfitPrice': false,
|
|
763
|
+
'hedged': true,
|
|
764
|
+
},
|
|
765
|
+
'createOrders': {
|
|
766
|
+
'max': 50,
|
|
767
|
+
},
|
|
768
|
+
'fetchMyTrades': {
|
|
769
|
+
'marginMode': false,
|
|
770
|
+
'limit': 100,
|
|
771
|
+
'daysBack': 90,
|
|
772
|
+
'untilDays': 90,
|
|
773
|
+
},
|
|
774
|
+
'fetchOrder': {
|
|
775
|
+
'marginMode': false,
|
|
776
|
+
},
|
|
777
|
+
'fetchOpenOrders': {
|
|
778
|
+
'marginMode': false,
|
|
779
|
+
'limit': 100,
|
|
780
|
+
'trigger': true,
|
|
781
|
+
'trailing': false,
|
|
782
|
+
},
|
|
783
|
+
'fetchOrders': {
|
|
784
|
+
'marginMode': false,
|
|
785
|
+
'limit': 100,
|
|
786
|
+
'daysBack': 90,
|
|
787
|
+
'untilDays': 90,
|
|
788
|
+
'trigger': true,
|
|
789
|
+
'trailing': false,
|
|
790
|
+
},
|
|
791
|
+
'fetchClosedOrders': {
|
|
792
|
+
'marginMode': false,
|
|
793
|
+
'limit': 100,
|
|
794
|
+
'daysBackClosed': 90,
|
|
795
|
+
'daysBackCanceled': undefined,
|
|
796
|
+
'untilDays': 90,
|
|
797
|
+
'trigger': true,
|
|
798
|
+
'trailing': false,
|
|
799
|
+
},
|
|
800
|
+
'fetchOHLCV': {
|
|
801
|
+
'limit': 2000,
|
|
802
|
+
},
|
|
803
|
+
},
|
|
804
|
+
'swap': {
|
|
805
|
+
'linear': {
|
|
806
|
+
'extends': 'forDerivs',
|
|
807
|
+
},
|
|
808
|
+
'inverse': {
|
|
809
|
+
'extends': 'forDerivs',
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
'future': {
|
|
813
|
+
'linear': undefined,
|
|
814
|
+
'inverse': undefined,
|
|
815
|
+
},
|
|
816
|
+
},
|
|
680
817
|
'commonCurrencies': {
|
|
681
818
|
'BEYONDPROTOCOL': 'BEYOND',
|
|
682
819
|
'BIFI': 'BIFIF',
|
|
@@ -2238,7 +2375,6 @@ export default class mexc extends Exchange {
|
|
|
2238
2375
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2239
2376
|
* @param {string} [marginMode] only 'isolated' is supported for spot-margin trading
|
|
2240
2377
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2241
|
-
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
2242
2378
|
* @param {bool} [params.postOnly] if true, the order will only be posted if it will be a maker order
|
|
2243
2379
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2244
2380
|
*/
|
|
@@ -2287,7 +2423,7 @@ export default class mexc extends Exchange {
|
|
|
2287
2423
|
/**
|
|
2288
2424
|
* @ignore
|
|
2289
2425
|
* @method
|
|
2290
|
-
* @name mexc#
|
|
2426
|
+
* @name mexc#createSwapOrder
|
|
2291
2427
|
* @description create a trade order
|
|
2292
2428
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
|
|
2293
2429
|
* @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#order-under-maintenance
|
package/js/src/ndax.d.ts
CHANGED
|
@@ -113,7 +113,7 @@ export default class ndax extends Exchange {
|
|
|
113
113
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
114
114
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
115
115
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
116
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
116
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
117
117
|
*/
|
|
118
118
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
119
119
|
parseOrderStatus(status: Str): string;
|
package/js/src/ndax.js
CHANGED
|
@@ -1221,7 +1221,7 @@ export default class ndax extends Exchange {
|
|
|
1221
1221
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1222
1222
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1223
1223
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1224
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
1224
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
1225
1225
|
*/
|
|
1226
1226
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1227
1227
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
package/js/src/okcoin.d.ts
CHANGED
|
@@ -155,7 +155,7 @@ export default class okcoin extends Exchange {
|
|
|
155
155
|
* @param {string} id order id
|
|
156
156
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
157
157
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
158
|
-
* @param {bool} [params.
|
|
158
|
+
* @param {bool} [params.trigger] True if cancel trigger or conditional orders
|
|
159
159
|
* @param {bool} [params.advanced] True if canceling advanced orders only
|
|
160
160
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
161
161
|
*/
|
|
@@ -198,7 +198,7 @@ export default class okcoin extends Exchange {
|
|
|
198
198
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
199
199
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
200
200
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
201
|
-
* @param {bool} [params.
|
|
201
|
+
* @param {bool} [params.trigger] True if fetching trigger or conditional orders
|
|
202
202
|
* @param {string} [params.ordType] "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
|
|
203
203
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
204
204
|
*/
|
|
@@ -214,7 +214,7 @@ export default class okcoin extends Exchange {
|
|
|
214
214
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
215
215
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
216
216
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
217
|
-
* @param {bool} [params.
|
|
217
|
+
* @param {bool} [params.trigger] True if fetching trigger or conditional orders
|
|
218
218
|
* @param {string} [params.ordType] "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
|
|
219
219
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
220
220
|
*/
|
|
@@ -330,7 +330,7 @@ export default class okcoin extends Exchange {
|
|
|
330
330
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
331
331
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
332
332
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
333
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
333
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
334
334
|
*/
|
|
335
335
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
336
336
|
parseLedgerEntryType(type: any): string;
|