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/dist/cjs/src/woo.js
CHANGED
|
@@ -985,17 +985,17 @@ class woo extends woo$1 {
|
|
|
985
985
|
const isTrailingAmountOrder = trailingAmount !== undefined;
|
|
986
986
|
const isTrailingPercentOrder = trailingPercent !== undefined;
|
|
987
987
|
const isTrailing = isTrailingAmountOrder || isTrailingPercentOrder;
|
|
988
|
-
const
|
|
988
|
+
const isConditional = isTrailing || stopPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(params, 'childOrders') !== undefined);
|
|
989
989
|
const isMarket = orderType === 'MARKET';
|
|
990
990
|
const timeInForce = this.safeStringLower(params, 'timeInForce');
|
|
991
991
|
const postOnly = this.isPostOnly(isMarket, undefined, params);
|
|
992
|
-
const reduceOnlyKey =
|
|
993
|
-
const clientOrderIdKey =
|
|
994
|
-
const orderQtyKey =
|
|
995
|
-
const priceKey =
|
|
996
|
-
const typeKey =
|
|
992
|
+
const reduceOnlyKey = isConditional ? 'reduceOnly' : 'reduce_only';
|
|
993
|
+
const clientOrderIdKey = isConditional ? 'clientOrderId' : 'client_order_id';
|
|
994
|
+
const orderQtyKey = isConditional ? 'quantity' : 'order_quantity';
|
|
995
|
+
const priceKey = isConditional ? 'price' : 'order_price';
|
|
996
|
+
const typeKey = isConditional ? 'type' : 'order_type';
|
|
997
997
|
request[typeKey] = orderType; // LIMIT/MARKET/IOC/FOK/POST_ONLY/ASK/BID
|
|
998
|
-
if (!
|
|
998
|
+
if (!isConditional) {
|
|
999
999
|
if (postOnly) {
|
|
1000
1000
|
request['order_type'] = 'POST_ONLY';
|
|
1001
1001
|
}
|
|
@@ -1012,7 +1012,7 @@ class woo extends woo$1 {
|
|
|
1012
1012
|
if (!isMarket && price !== undefined) {
|
|
1013
1013
|
request[priceKey] = this.priceToPrecision(symbol, price);
|
|
1014
1014
|
}
|
|
1015
|
-
if (isMarket && !
|
|
1015
|
+
if (isMarket && !isConditional) {
|
|
1016
1016
|
// for market buy it requires the amount of quote currency to spend
|
|
1017
1017
|
const cost = this.safeString2(params, 'cost', 'order_amount');
|
|
1018
1018
|
params = this.omit(params, ['cost', 'order_amount']);
|
|
@@ -1096,7 +1096,7 @@ class woo extends woo$1 {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
params = this.omit(params, ['clOrdID', 'clientOrderId', 'client_order_id', 'postOnly', 'timeInForce', 'stopPrice', 'triggerPrice', 'stopLoss', 'takeProfit', 'trailingPercent', 'trailingAmount', 'trailingTriggerPrice']);
|
|
1098
1098
|
let response = undefined;
|
|
1099
|
-
if (
|
|
1099
|
+
if (isConditional) {
|
|
1100
1100
|
response = await this.v3PrivatePostAlgoOrder(this.extend(request, params));
|
|
1101
1101
|
}
|
|
1102
1102
|
else {
|
|
@@ -1205,11 +1205,11 @@ class woo extends woo$1 {
|
|
|
1205
1205
|
}
|
|
1206
1206
|
}
|
|
1207
1207
|
params = this.omit(params, ['clOrdID', 'clientOrderId', 'client_order_id', 'stopPrice', 'triggerPrice', 'takeProfitPrice', 'stopLossPrice', 'trailingTriggerPrice', 'trailingAmount', 'trailingPercent']);
|
|
1208
|
-
const
|
|
1208
|
+
const isConditional = isTrailing || (stopPrice !== undefined) || (this.safeValue(params, 'childOrders') !== undefined);
|
|
1209
1209
|
let response = undefined;
|
|
1210
1210
|
if (isByClientOrder) {
|
|
1211
1211
|
request['client_order_id'] = clientOrderIdExchangeSpecific;
|
|
1212
|
-
if (
|
|
1212
|
+
if (isConditional) {
|
|
1213
1213
|
response = await this.v3PrivatePutAlgoOrderClientClientOrderId(this.extend(request, params));
|
|
1214
1214
|
}
|
|
1215
1215
|
else {
|
|
@@ -1218,7 +1218,7 @@ class woo extends woo$1 {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
else {
|
|
1220
1220
|
request['oid'] = id;
|
|
1221
|
-
if (
|
|
1221
|
+
if (isConditional) {
|
|
1222
1222
|
response = await this.v3PrivatePutAlgoOrderOid(this.extend(request, params));
|
|
1223
1223
|
}
|
|
1224
1224
|
else {
|
|
@@ -1250,13 +1250,13 @@ class woo extends woo$1 {
|
|
|
1250
1250
|
* @param {string} id order id
|
|
1251
1251
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1252
1252
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1253
|
-
* @param {boolean} [params.
|
|
1253
|
+
* @param {boolean} [params.trigger] whether the order is a trigger/algo order
|
|
1254
1254
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1255
1255
|
*/
|
|
1256
1256
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1257
|
-
const
|
|
1258
|
-
params = this.omit(params, 'stop');
|
|
1259
|
-
if (!
|
|
1257
|
+
const isTrigger = this.safeBool2(params, 'trigger', 'stop', false);
|
|
1258
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
1259
|
+
if (!isTrigger && (symbol === undefined)) {
|
|
1260
1260
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
1261
1261
|
}
|
|
1262
1262
|
await this.loadMarkets();
|
|
@@ -1269,7 +1269,7 @@ class woo extends woo$1 {
|
|
|
1269
1269
|
const clientOrderIdExchangeSpecific = this.safeString(params, 'client_order_id', clientOrderIdUnified);
|
|
1270
1270
|
const isByClientOrder = clientOrderIdExchangeSpecific !== undefined;
|
|
1271
1271
|
let response = undefined;
|
|
1272
|
-
if (
|
|
1272
|
+
if (isTrigger) {
|
|
1273
1273
|
request['order_id'] = id;
|
|
1274
1274
|
response = await this.v3PrivateDeleteAlgoOrderOrderId(this.extend(request, params));
|
|
1275
1275
|
}
|
|
@@ -1306,14 +1306,14 @@ class woo extends woo$1 {
|
|
|
1306
1306
|
* @description cancel all open orders in a market
|
|
1307
1307
|
* @param {string} symbol unified market symbol
|
|
1308
1308
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1309
|
-
* @param {boolean} [params.
|
|
1309
|
+
* @param {boolean} [params.trigger] whether the order is a trigger/algo order
|
|
1310
1310
|
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1311
1311
|
*/
|
|
1312
1312
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1313
1313
|
await this.loadMarkets();
|
|
1314
|
-
const
|
|
1314
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
1315
1315
|
params = this.omit(params, ['stop', 'trigger']);
|
|
1316
|
-
if (
|
|
1316
|
+
if (trigger) {
|
|
1317
1317
|
return await this.v3PrivateDeleteAlgoOrdersPending(params);
|
|
1318
1318
|
}
|
|
1319
1319
|
if (symbol === undefined) {
|
|
@@ -1371,18 +1371,18 @@ class woo extends woo$1 {
|
|
|
1371
1371
|
* @param {string} id the order id
|
|
1372
1372
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1373
1373
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1374
|
-
* @param {boolean} [params.
|
|
1374
|
+
* @param {boolean} [params.trigger] whether the order is a trigger/algo order
|
|
1375
1375
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1376
1376
|
*/
|
|
1377
1377
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1378
1378
|
await this.loadMarkets();
|
|
1379
1379
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
1380
|
-
const
|
|
1380
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
1381
1381
|
params = this.omit(params, ['stop', 'trigger']);
|
|
1382
1382
|
const request = {};
|
|
1383
1383
|
const clientOrderId = this.safeString2(params, 'clOrdID', 'clientOrderId');
|
|
1384
1384
|
let response = undefined;
|
|
1385
|
-
if (
|
|
1385
|
+
if (trigger) {
|
|
1386
1386
|
request['oid'] = id;
|
|
1387
1387
|
response = await this.v3PrivateGetAlgoOrderOid(this.extend(request, params));
|
|
1388
1388
|
}
|
|
@@ -1442,7 +1442,7 @@ class woo extends woo$1 {
|
|
|
1442
1442
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1443
1443
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1444
1444
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1445
|
-
* @param {boolean} [params.
|
|
1445
|
+
* @param {boolean} [params.trigger] whether the order is a trigger/algo order
|
|
1446
1446
|
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1447
1447
|
* @param {string} [params.side] 'buy' or 'sell'
|
|
1448
1448
|
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
@@ -1458,7 +1458,7 @@ class woo extends woo$1 {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
const request = {};
|
|
1460
1460
|
let market = undefined;
|
|
1461
|
-
const
|
|
1461
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
1462
1462
|
const trailing = this.safeBool(params, 'trailing', false);
|
|
1463
1463
|
params = this.omit(params, ['stop', 'trailing', 'trigger']);
|
|
1464
1464
|
if (symbol !== undefined) {
|
|
@@ -1466,7 +1466,7 @@ class woo extends woo$1 {
|
|
|
1466
1466
|
request['symbol'] = market['id'];
|
|
1467
1467
|
}
|
|
1468
1468
|
if (since !== undefined) {
|
|
1469
|
-
if (
|
|
1469
|
+
if (trigger || trailing) {
|
|
1470
1470
|
request['createdTimeStart'] = since;
|
|
1471
1471
|
}
|
|
1472
1472
|
else {
|
|
@@ -1479,14 +1479,14 @@ class woo extends woo$1 {
|
|
|
1479
1479
|
else {
|
|
1480
1480
|
request['size'] = 500;
|
|
1481
1481
|
}
|
|
1482
|
-
if (
|
|
1482
|
+
if (trigger) {
|
|
1483
1483
|
request['algoType'] = 'stop';
|
|
1484
1484
|
}
|
|
1485
1485
|
else if (trailing) {
|
|
1486
1486
|
request['algoType'] = 'TRAILING_STOP';
|
|
1487
1487
|
}
|
|
1488
1488
|
let response = undefined;
|
|
1489
|
-
if (
|
|
1489
|
+
if (trigger || trailing) {
|
|
1490
1490
|
response = await this.v3PrivateGetAlgoOrders(this.extend(request, params));
|
|
1491
1491
|
}
|
|
1492
1492
|
else {
|
|
@@ -1537,7 +1537,7 @@ class woo extends woo$1 {
|
|
|
1537
1537
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1538
1538
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1539
1539
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1540
|
-
* @param {boolean} [params.
|
|
1540
|
+
* @param {boolean} [params.trigger] whether the order is a trigger/algo order
|
|
1541
1541
|
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1542
1542
|
* @param {string} [params.side] 'buy' or 'sell'
|
|
1543
1543
|
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
@@ -1559,7 +1559,7 @@ class woo extends woo$1 {
|
|
|
1559
1559
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1560
1560
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1561
1561
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1562
|
-
* @param {boolean} [params.
|
|
1562
|
+
* @param {boolean} [params.trigger] whether the order is a trigger/algo order
|
|
1563
1563
|
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1564
1564
|
* @param {string} [params.side] 'buy' or 'sell'
|
|
1565
1565
|
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
@@ -2147,7 +2147,7 @@ class woo extends woo$1 {
|
|
|
2147
2147
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2148
2148
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2149
2149
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2150
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
2150
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
2151
2151
|
*/
|
|
2152
2152
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2153
2153
|
const [currency, rows] = await this.getAssetHistoryRows(code, since, limit, params);
|
|
@@ -2581,8 +2581,8 @@ class woo extends woo$1 {
|
|
|
2581
2581
|
if (!isSandboxMode) {
|
|
2582
2582
|
const applicationId = 'bc830de7-50f3-460b-9ee0-f430f83f9dad';
|
|
2583
2583
|
const brokerId = this.safeString(this.options, 'brokerId', applicationId);
|
|
2584
|
-
const
|
|
2585
|
-
if (
|
|
2584
|
+
const isTrigger = path.indexOf('algo') > -1;
|
|
2585
|
+
if (isTrigger) {
|
|
2586
2586
|
params['brokerId'] = brokerId;
|
|
2587
2587
|
}
|
|
2588
2588
|
else {
|
package/dist/cjs/src/woofipro.js
CHANGED
|
@@ -1279,15 +1279,15 @@ class woofipro extends woofipro$1 {
|
|
|
1279
1279
|
const stopLoss = this.safeValue(params, 'stopLoss');
|
|
1280
1280
|
const takeProfit = this.safeValue(params, 'takeProfit');
|
|
1281
1281
|
const algoType = this.safeString(params, 'algoType');
|
|
1282
|
-
const
|
|
1282
|
+
const isConditional = stopPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(params, 'childOrders') !== undefined);
|
|
1283
1283
|
const isMarket = orderType === 'MARKET';
|
|
1284
1284
|
const timeInForce = this.safeStringLower(params, 'timeInForce');
|
|
1285
1285
|
const postOnly = this.isPostOnly(isMarket, undefined, params);
|
|
1286
|
-
const orderQtyKey =
|
|
1287
|
-
const priceKey =
|
|
1288
|
-
const typeKey =
|
|
1286
|
+
const orderQtyKey = isConditional ? 'quantity' : 'order_quantity';
|
|
1287
|
+
const priceKey = isConditional ? 'price' : 'order_price';
|
|
1288
|
+
const typeKey = isConditional ? 'type' : 'order_type';
|
|
1289
1289
|
request[typeKey] = orderType; // LIMIT/MARKET/IOC/FOK/POST_ONLY/ASK/BID
|
|
1290
|
-
if (!
|
|
1290
|
+
if (!isConditional) {
|
|
1291
1291
|
if (postOnly) {
|
|
1292
1292
|
request['order_type'] = 'POST_ONLY';
|
|
1293
1293
|
}
|
|
@@ -1304,7 +1304,7 @@ class woofipro extends woofipro$1 {
|
|
|
1304
1304
|
if (price !== undefined) {
|
|
1305
1305
|
request[priceKey] = this.priceToPrecision(symbol, price);
|
|
1306
1306
|
}
|
|
1307
|
-
if (isMarket && !
|
|
1307
|
+
if (isMarket && !isConditional) {
|
|
1308
1308
|
request[orderQtyKey] = this.amountToPrecision(symbol, amount);
|
|
1309
1309
|
}
|
|
1310
1310
|
else if (algoType !== 'POSITIONAL_TP_SL') {
|
|
@@ -1383,9 +1383,9 @@ class woofipro extends woofipro$1 {
|
|
|
1383
1383
|
const stopPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
|
|
1384
1384
|
const stopLoss = this.safeValue(params, 'stopLoss');
|
|
1385
1385
|
const takeProfit = this.safeValue(params, 'takeProfit');
|
|
1386
|
-
const
|
|
1386
|
+
const isConditional = stopPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(params, 'childOrders') !== undefined);
|
|
1387
1387
|
let response = undefined;
|
|
1388
|
-
if (
|
|
1388
|
+
if (isConditional) {
|
|
1389
1389
|
response = await this.v1PrivatePostAlgoOrder(request);
|
|
1390
1390
|
//
|
|
1391
1391
|
// {
|
|
@@ -1447,8 +1447,8 @@ class woofipro extends woofipro$1 {
|
|
|
1447
1447
|
const stopPrice = this.safeString2(orderParams, 'triggerPrice', 'stopPrice');
|
|
1448
1448
|
const stopLoss = this.safeValue(orderParams, 'stopLoss');
|
|
1449
1449
|
const takeProfit = this.safeValue(orderParams, 'takeProfit');
|
|
1450
|
-
const
|
|
1451
|
-
if (
|
|
1450
|
+
const isConditional = stopPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(orderParams, 'childOrders') !== undefined);
|
|
1451
|
+
if (isConditional) {
|
|
1452
1452
|
throw new errors.NotSupported(this.id + 'createOrders() only support non-stop order');
|
|
1453
1453
|
}
|
|
1454
1454
|
const orderRequest = this.createOrderRequest(marketId, type, side, amount, price, orderParams);
|
|
@@ -1507,9 +1507,9 @@ class woofipro extends woofipro$1 {
|
|
|
1507
1507
|
if (stopPrice !== undefined) {
|
|
1508
1508
|
request['triggerPrice'] = this.priceToPrecision(symbol, stopPrice);
|
|
1509
1509
|
}
|
|
1510
|
-
const
|
|
1511
|
-
const orderQtyKey =
|
|
1512
|
-
const priceKey =
|
|
1510
|
+
const isConditional = (stopPrice !== undefined) || (this.safeValue(params, 'childOrders') !== undefined);
|
|
1511
|
+
const orderQtyKey = isConditional ? 'quantity' : 'order_quantity';
|
|
1512
|
+
const priceKey = isConditional ? 'price' : 'order_price';
|
|
1513
1513
|
if (price !== undefined) {
|
|
1514
1514
|
request[priceKey] = this.priceToPrecision(symbol, price);
|
|
1515
1515
|
}
|
|
@@ -1518,7 +1518,7 @@ class woofipro extends woofipro$1 {
|
|
|
1518
1518
|
}
|
|
1519
1519
|
params = this.omit(params, ['stopPrice', 'triggerPrice', 'takeProfitPrice', 'stopLossPrice', 'trailingTriggerPrice', 'trailingAmount', 'trailingPercent']);
|
|
1520
1520
|
let response = undefined;
|
|
1521
|
-
if (
|
|
1521
|
+
if (isConditional) {
|
|
1522
1522
|
response = await this.v1PrivatePutAlgoOrder(this.extend(request, params));
|
|
1523
1523
|
}
|
|
1524
1524
|
else {
|
|
@@ -1578,9 +1578,9 @@ class woofipro extends woofipro$1 {
|
|
|
1578
1578
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1579
1579
|
*/
|
|
1580
1580
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1581
|
-
const
|
|
1581
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger', false);
|
|
1582
1582
|
params = this.omit(params, ['stop', 'trigger']);
|
|
1583
|
-
if (!
|
|
1583
|
+
if (!trigger && (symbol === undefined)) {
|
|
1584
1584
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
1585
1585
|
}
|
|
1586
1586
|
await this.loadMarkets();
|
|
@@ -1595,7 +1595,7 @@ class woofipro extends woofipro$1 {
|
|
|
1595
1595
|
const clientOrderIdExchangeSpecific = this.safeString(params, 'client_order_id', clientOrderIdUnified);
|
|
1596
1596
|
const isByClientOrder = clientOrderIdExchangeSpecific !== undefined;
|
|
1597
1597
|
let response = undefined;
|
|
1598
|
-
if (
|
|
1598
|
+
if (trigger) {
|
|
1599
1599
|
if (isByClientOrder) {
|
|
1600
1600
|
request['client_order_id'] = clientOrderIdExchangeSpecific;
|
|
1601
1601
|
params = this.omit(params, ['clOrdID', 'clientOrderId', 'client_order_id']);
|
|
@@ -1639,7 +1639,7 @@ class woofipro extends woofipro$1 {
|
|
|
1639
1639
|
else {
|
|
1640
1640
|
extendParams['id'] = id;
|
|
1641
1641
|
}
|
|
1642
|
-
if (
|
|
1642
|
+
if (trigger) {
|
|
1643
1643
|
return this.extend(this.parseOrder(response), extendParams);
|
|
1644
1644
|
}
|
|
1645
1645
|
const data = this.safeDict(response, 'data', {});
|
|
@@ -1697,7 +1697,7 @@ class woofipro extends woofipro$1 {
|
|
|
1697
1697
|
*/
|
|
1698
1698
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1699
1699
|
await this.loadMarkets();
|
|
1700
|
-
const
|
|
1700
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
1701
1701
|
params = this.omit(params, ['stop', 'trigger']);
|
|
1702
1702
|
const request = {};
|
|
1703
1703
|
if (symbol !== undefined) {
|
|
@@ -1705,13 +1705,13 @@ class woofipro extends woofipro$1 {
|
|
|
1705
1705
|
request['symbol'] = market['id'];
|
|
1706
1706
|
}
|
|
1707
1707
|
let response = undefined;
|
|
1708
|
-
if (
|
|
1708
|
+
if (trigger) {
|
|
1709
1709
|
response = await this.v1PrivateDeleteAlgoOrders(this.extend(request, params));
|
|
1710
1710
|
}
|
|
1711
1711
|
else {
|
|
1712
1712
|
response = await this.v1PrivateDeleteOrders(this.extend(request, params));
|
|
1713
1713
|
}
|
|
1714
|
-
//
|
|
1714
|
+
// trigger
|
|
1715
1715
|
// {
|
|
1716
1716
|
// "success": true,
|
|
1717
1717
|
// "timestamp": 1702989203989,
|
|
@@ -1750,12 +1750,12 @@ class woofipro extends woofipro$1 {
|
|
|
1750
1750
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1751
1751
|
await this.loadMarkets();
|
|
1752
1752
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
1753
|
-
const
|
|
1753
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger', false);
|
|
1754
1754
|
const request = {};
|
|
1755
1755
|
const clientOrderId = this.safeStringN(params, ['clOrdID', 'clientOrderId', 'client_order_id']);
|
|
1756
1756
|
params = this.omit(params, ['stop', 'trigger', 'clOrdID', 'clientOrderId', 'client_order_id']);
|
|
1757
1757
|
let response = undefined;
|
|
1758
|
-
if (
|
|
1758
|
+
if (trigger) {
|
|
1759
1759
|
if (clientOrderId) {
|
|
1760
1760
|
request['client_order_id'] = clientOrderId;
|
|
1761
1761
|
response = await this.v1PrivateGetAlgoClientOrderClientOrderId(this.extend(request, params));
|
|
@@ -2189,7 +2189,7 @@ class woofipro extends woofipro$1 {
|
|
|
2189
2189
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2190
2190
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2191
2191
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2192
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
2192
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
2193
2193
|
*/
|
|
2194
2194
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2195
2195
|
const [currency, rows] = await this.getAssetHistoryRows(code, since, limit, params);
|
package/dist/cjs/src/xt.js
CHANGED
|
@@ -2469,7 +2469,7 @@ class xt extends xt$1 {
|
|
|
2469
2469
|
* @param {string} id order id
|
|
2470
2470
|
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
2471
2471
|
* @param {object} params extra parameters specific to the xt api endpoint
|
|
2472
|
-
* @param {bool} [params.
|
|
2472
|
+
* @param {bool} [params.trigger] if the order is a trigger order or not
|
|
2473
2473
|
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
2474
2474
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
2475
2475
|
*/
|
|
@@ -2485,9 +2485,9 @@ class xt extends xt$1 {
|
|
|
2485
2485
|
let response = undefined;
|
|
2486
2486
|
[type, params] = this.handleMarketTypeAndParams('fetchOrder', market, params);
|
|
2487
2487
|
[subType, params] = this.handleSubTypeAndParams('fetchOrder', market, params);
|
|
2488
|
-
const
|
|
2488
|
+
const trigger = this.safeValue(params, 'stop');
|
|
2489
2489
|
const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
|
|
2490
|
-
if (
|
|
2490
|
+
if (trigger) {
|
|
2491
2491
|
request['entrustId'] = id;
|
|
2492
2492
|
}
|
|
2493
2493
|
else if (stopLossTakeProfit) {
|
|
@@ -2496,7 +2496,7 @@ class xt extends xt$1 {
|
|
|
2496
2496
|
else {
|
|
2497
2497
|
request['orderId'] = id;
|
|
2498
2498
|
}
|
|
2499
|
-
if (
|
|
2499
|
+
if (trigger) {
|
|
2500
2500
|
params = this.omit(params, 'stop');
|
|
2501
2501
|
if (subType === 'inverse') {
|
|
2502
2502
|
response = await this.privateInverseGetFutureTradeV1EntrustPlanDetail(this.extend(request, params));
|
|
@@ -2654,7 +2654,7 @@ class xt extends xt$1 {
|
|
|
2654
2654
|
* @param {int} [since] timestamp in ms of the earliest order
|
|
2655
2655
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2656
2656
|
* @param {object} params extra parameters specific to the xt api endpoint
|
|
2657
|
-
* @param {bool} [params.
|
|
2657
|
+
* @param {bool} [params.trigger] if the order is a trigger order or not
|
|
2658
2658
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
2659
2659
|
*/
|
|
2660
2660
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -2676,9 +2676,9 @@ class xt extends xt$1 {
|
|
|
2676
2676
|
let response = undefined;
|
|
2677
2677
|
[type, params] = this.handleMarketTypeAndParams('fetchOrders', market, params);
|
|
2678
2678
|
[subType, params] = this.handleSubTypeAndParams('fetchOrders', market, params);
|
|
2679
|
-
const
|
|
2680
|
-
if (
|
|
2681
|
-
params = this.omit(params, 'stop');
|
|
2679
|
+
const trigger = this.safeValue2(params, 'trigger', 'stop');
|
|
2680
|
+
if (trigger) {
|
|
2681
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
2682
2682
|
if (subType === 'inverse') {
|
|
2683
2683
|
response = await this.privateInverseGetFutureTradeV1EntrustPlanListHistory(this.extend(request, params));
|
|
2684
2684
|
}
|
|
@@ -2826,10 +2826,10 @@ class xt extends xt$1 {
|
|
|
2826
2826
|
let response = undefined;
|
|
2827
2827
|
[type, params] = this.handleMarketTypeAndParams('fetchOrdersByStatus', market, params);
|
|
2828
2828
|
[subType, params] = this.handleSubTypeAndParams('fetchOrdersByStatus', market, params);
|
|
2829
|
-
const
|
|
2829
|
+
const trigger = this.safeValue(params, 'stop');
|
|
2830
2830
|
const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
|
|
2831
2831
|
if (status === 'open') {
|
|
2832
|
-
if (
|
|
2832
|
+
if (trigger || stopLossTakeProfit) {
|
|
2833
2833
|
request['state'] = 'NOT_TRIGGERED';
|
|
2834
2834
|
}
|
|
2835
2835
|
else if (subType !== undefined) {
|
|
@@ -2837,7 +2837,7 @@ class xt extends xt$1 {
|
|
|
2837
2837
|
}
|
|
2838
2838
|
}
|
|
2839
2839
|
else if (status === 'closed') {
|
|
2840
|
-
if (
|
|
2840
|
+
if (trigger || stopLossTakeProfit) {
|
|
2841
2841
|
request['state'] = 'TRIGGERED';
|
|
2842
2842
|
}
|
|
2843
2843
|
else {
|
|
@@ -2845,7 +2845,7 @@ class xt extends xt$1 {
|
|
|
2845
2845
|
}
|
|
2846
2846
|
}
|
|
2847
2847
|
else if (status === 'canceled') {
|
|
2848
|
-
if (
|
|
2848
|
+
if (trigger || stopLossTakeProfit) {
|
|
2849
2849
|
request['state'] = 'USER_REVOCATION';
|
|
2850
2850
|
}
|
|
2851
2851
|
else {
|
|
@@ -2855,7 +2855,7 @@ class xt extends xt$1 {
|
|
|
2855
2855
|
else {
|
|
2856
2856
|
request['state'] = status;
|
|
2857
2857
|
}
|
|
2858
|
-
if (
|
|
2858
|
+
if (trigger || stopLossTakeProfit || (subType !== undefined) || (type === 'swap') || (type === 'future')) {
|
|
2859
2859
|
if (since !== undefined) {
|
|
2860
2860
|
request['startTime'] = since;
|
|
2861
2861
|
}
|
|
@@ -2863,7 +2863,7 @@ class xt extends xt$1 {
|
|
|
2863
2863
|
request['size'] = limit;
|
|
2864
2864
|
}
|
|
2865
2865
|
}
|
|
2866
|
-
if (
|
|
2866
|
+
if (trigger) {
|
|
2867
2867
|
params = this.omit(params, 'stop');
|
|
2868
2868
|
if (subType === 'inverse') {
|
|
2869
2869
|
response = await this.privateInverseGetFutureTradeV1EntrustPlanList(this.extend(request, params));
|
|
@@ -3102,7 +3102,7 @@ class xt extends xt$1 {
|
|
|
3102
3102
|
* @param {int} [since] timestamp in ms of the earliest order
|
|
3103
3103
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3104
3104
|
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3105
|
-
* @param {bool} [params.
|
|
3105
|
+
* @param {bool} [params.trigger] if the order is a trigger order or not
|
|
3106
3106
|
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3107
3107
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3108
3108
|
*/
|
|
@@ -3121,7 +3121,7 @@ class xt extends xt$1 {
|
|
|
3121
3121
|
* @param {int} [since] timestamp in ms of the earliest order
|
|
3122
3122
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3123
3123
|
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3124
|
-
* @param {bool} [params.
|
|
3124
|
+
* @param {bool} [params.trigger] if the order is a trigger order or not
|
|
3125
3125
|
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3126
3126
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3127
3127
|
*/
|
|
@@ -3140,7 +3140,7 @@ class xt extends xt$1 {
|
|
|
3140
3140
|
* @param {int} [since] timestamp in ms of the earliest order
|
|
3141
3141
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3142
3142
|
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3143
|
-
* @param {bool} [params.
|
|
3143
|
+
* @param {bool} [params.trigger] if the order is a trigger order or not
|
|
3144
3144
|
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3145
3145
|
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3146
3146
|
*/
|
|
@@ -3158,7 +3158,7 @@ class xt extends xt$1 {
|
|
|
3158
3158
|
* @param {string} id order id
|
|
3159
3159
|
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
3160
3160
|
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3161
|
-
* @param {bool} [params.
|
|
3161
|
+
* @param {bool} [params.trigger] if the order is a trigger order or not
|
|
3162
3162
|
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3163
3163
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3164
3164
|
*/
|
|
@@ -3174,9 +3174,9 @@ class xt extends xt$1 {
|
|
|
3174
3174
|
let response = undefined;
|
|
3175
3175
|
[type, params] = this.handleMarketTypeAndParams('cancelOrder', market, params);
|
|
3176
3176
|
[subType, params] = this.handleSubTypeAndParams('cancelOrder', market, params);
|
|
3177
|
-
const
|
|
3177
|
+
const trigger = this.safeValue2(params, 'trigger', 'stop');
|
|
3178
3178
|
const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
|
|
3179
|
-
if (
|
|
3179
|
+
if (trigger) {
|
|
3180
3180
|
request['entrustId'] = id;
|
|
3181
3181
|
}
|
|
3182
3182
|
else if (stopLossTakeProfit) {
|
|
@@ -3185,8 +3185,8 @@ class xt extends xt$1 {
|
|
|
3185
3185
|
else {
|
|
3186
3186
|
request['orderId'] = id;
|
|
3187
3187
|
}
|
|
3188
|
-
if (
|
|
3189
|
-
params = this.omit(params, 'stop');
|
|
3188
|
+
if (trigger) {
|
|
3189
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
3190
3190
|
if (subType === 'inverse') {
|
|
3191
3191
|
response = await this.privateInversePostFutureTradeV1EntrustCancelPlan(this.extend(request, params));
|
|
3192
3192
|
}
|
|
@@ -3247,7 +3247,7 @@ class xt extends xt$1 {
|
|
|
3247
3247
|
* @see https://doc.xt.com/#futures_entrustcancelProfitBatch
|
|
3248
3248
|
* @param {string} [symbol] unified market symbol of the market to cancel orders in
|
|
3249
3249
|
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3250
|
-
* @param {bool} [params.
|
|
3250
|
+
* @param {bool} [params.trigger] if the order is a trigger order or not
|
|
3251
3251
|
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3252
3252
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3253
3253
|
*/
|
|
@@ -3264,10 +3264,10 @@ class xt extends xt$1 {
|
|
|
3264
3264
|
let response = undefined;
|
|
3265
3265
|
[type, params] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
|
|
3266
3266
|
[subType, params] = this.handleSubTypeAndParams('cancelAllOrders', market, params);
|
|
3267
|
-
const
|
|
3267
|
+
const trigger = this.safeValue2(params, 'trigger', 'stop');
|
|
3268
3268
|
const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
|
|
3269
|
-
if (
|
|
3270
|
-
params = this.omit(params, 'stop');
|
|
3269
|
+
if (trigger) {
|
|
3270
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
3271
3271
|
if (subType === 'inverse') {
|
|
3272
3272
|
response = await this.privateInversePostFutureTradeV1EntrustCancelAllPlan(this.extend(request, params));
|
|
3273
3273
|
}
|
package/dist/cjs/src/zonda.js
CHANGED
|
@@ -849,7 +849,7 @@ class zonda extends zonda$1 {
|
|
|
849
849
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
850
850
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
851
851
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
852
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
852
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
853
853
|
*/
|
|
854
854
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
855
855
|
const balanceCurrencies = [];
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.4.
|
|
7
|
+
declare const version = "4.4.39";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.4.
|
|
41
|
+
const version = '4.4.40';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
package/js/src/ascendex.d.ts
CHANGED
|
@@ -137,7 +137,7 @@ export default class ascendex extends Exchange {
|
|
|
137
137
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
138
138
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
139
139
|
* @param {bool} [params.postOnly] true or false
|
|
140
|
-
* @param {float} [params.
|
|
140
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
141
141
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered (perpetual swap markets only)
|
|
142
142
|
* @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
|
|
143
143
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered (perpetual swap markets only)
|
|
@@ -155,7 +155,7 @@ export default class ascendex extends Exchange {
|
|
|
155
155
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
156
156
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
157
157
|
* @param {bool} [params.postOnly] true or false
|
|
158
|
-
* @param {float} [params.
|
|
158
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
159
159
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
160
160
|
*/
|
|
161
161
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|