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/ccxt.js
CHANGED
|
@@ -200,7 +200,7 @@ var xt$1 = require('./src/pro/xt.js');
|
|
|
200
200
|
|
|
201
201
|
//-----------------------------------------------------------------------------
|
|
202
202
|
// this is updated by vss.js when building
|
|
203
|
-
const version = '4.4.
|
|
203
|
+
const version = '4.4.40';
|
|
204
204
|
Exchange["default"].ccxtVersion = version;
|
|
205
205
|
const exchanges = {
|
|
206
206
|
'ace': ace,
|
package/dist/cjs/src/ascendex.js
CHANGED
|
@@ -1394,7 +1394,7 @@ class ascendex extends ascendex$1 {
|
|
|
1394
1394
|
'currency': feeCurrencyCode,
|
|
1395
1395
|
};
|
|
1396
1396
|
}
|
|
1397
|
-
const
|
|
1397
|
+
const triggerPrice = this.omitZero(this.safeString(order, 'stopPrice'));
|
|
1398
1398
|
let reduceOnly = undefined;
|
|
1399
1399
|
const execInst = this.safeString(order, 'execInst');
|
|
1400
1400
|
if (execInst === 'reduceOnly') {
|
|
@@ -1418,8 +1418,8 @@ class ascendex extends ascendex$1 {
|
|
|
1418
1418
|
'reduceOnly': reduceOnly,
|
|
1419
1419
|
'side': side,
|
|
1420
1420
|
'price': price,
|
|
1421
|
-
'stopPrice':
|
|
1422
|
-
'triggerPrice':
|
|
1421
|
+
'stopPrice': triggerPrice,
|
|
1422
|
+
'triggerPrice': triggerPrice,
|
|
1423
1423
|
'amount': amount,
|
|
1424
1424
|
'cost': undefined,
|
|
1425
1425
|
'average': average,
|
|
@@ -1495,7 +1495,7 @@ class ascendex extends ascendex$1 {
|
|
|
1495
1495
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1496
1496
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1497
1497
|
* @param {bool} [params.postOnly] true or false
|
|
1498
|
-
* @param {float} [params.
|
|
1498
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
1499
1499
|
* @returns {object} request to be sent to the exchange
|
|
1500
1500
|
*/
|
|
1501
1501
|
const market = this.market(symbol);
|
|
@@ -1527,7 +1527,7 @@ class ascendex extends ascendex$1 {
|
|
|
1527
1527
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
1528
1528
|
const postOnly = this.isPostOnly(isMarketOrder, false, params);
|
|
1529
1529
|
const reduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
1530
|
-
const
|
|
1530
|
+
const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
|
|
1531
1531
|
if (isLimitOrder) {
|
|
1532
1532
|
request['orderPrice'] = this.priceToPrecision(symbol, price);
|
|
1533
1533
|
}
|
|
@@ -1540,8 +1540,8 @@ class ascendex extends ascendex$1 {
|
|
|
1540
1540
|
if (postOnly) {
|
|
1541
1541
|
request['postOnly'] = true;
|
|
1542
1542
|
}
|
|
1543
|
-
if (
|
|
1544
|
-
request['stopPrice'] = this.priceToPrecision(symbol,
|
|
1543
|
+
if (triggerPrice !== undefined) {
|
|
1544
|
+
request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
1545
1545
|
if (isLimitOrder) {
|
|
1546
1546
|
request['orderType'] = 'stop_limit';
|
|
1547
1547
|
}
|
|
@@ -1583,7 +1583,7 @@ class ascendex extends ascendex$1 {
|
|
|
1583
1583
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1584
1584
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1585
1585
|
* @param {bool} [params.postOnly] true or false
|
|
1586
|
-
* @param {float} [params.
|
|
1586
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
1587
1587
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered (perpetual swap markets only)
|
|
1588
1588
|
* @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
|
|
1589
1589
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered (perpetual swap markets only)
|
|
@@ -1679,7 +1679,7 @@ class ascendex extends ascendex$1 {
|
|
|
1679
1679
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1680
1680
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1681
1681
|
* @param {bool} [params.postOnly] true or false
|
|
1682
|
-
* @param {float} [params.
|
|
1682
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
1683
1683
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1684
1684
|
*/
|
|
1685
1685
|
async createOrders(orders, params = {}) {
|
|
@@ -1839,31 +1839,25 @@ class Exchange {
|
|
|
1839
1839
|
let wssProxy = undefined;
|
|
1840
1840
|
let wsSocksProxy = undefined;
|
|
1841
1841
|
// ws proxy
|
|
1842
|
-
|
|
1842
|
+
const isWsProxyDefined = this.valueIsDefined(this.wsProxy);
|
|
1843
|
+
const is_ws_proxy_defined = this.valueIsDefined(this.ws_proxy);
|
|
1844
|
+
if (isWsProxyDefined || is_ws_proxy_defined) {
|
|
1843
1845
|
usedProxies.push('wsProxy');
|
|
1844
|
-
wsProxy = this.wsProxy;
|
|
1845
|
-
}
|
|
1846
|
-
if (this.valueIsDefined(this.ws_proxy)) {
|
|
1847
|
-
usedProxies.push('ws_proxy');
|
|
1848
|
-
wsProxy = this.ws_proxy;
|
|
1846
|
+
wsProxy = (isWsProxyDefined) ? this.wsProxy : this.ws_proxy;
|
|
1849
1847
|
}
|
|
1850
1848
|
// wss proxy
|
|
1851
|
-
|
|
1849
|
+
const isWssProxyDefined = this.valueIsDefined(this.wssProxy);
|
|
1850
|
+
const is_wss_proxy_defined = this.valueIsDefined(this.wss_proxy);
|
|
1851
|
+
if (isWssProxyDefined || is_wss_proxy_defined) {
|
|
1852
1852
|
usedProxies.push('wssProxy');
|
|
1853
|
-
wssProxy = this.wssProxy;
|
|
1854
|
-
}
|
|
1855
|
-
if (this.valueIsDefined(this.wss_proxy)) {
|
|
1856
|
-
usedProxies.push('wss_proxy');
|
|
1857
|
-
wssProxy = this.wss_proxy;
|
|
1853
|
+
wssProxy = (isWssProxyDefined) ? this.wssProxy : this.wss_proxy;
|
|
1858
1854
|
}
|
|
1859
1855
|
// ws socks proxy
|
|
1860
|
-
|
|
1856
|
+
const isWsSocksProxyDefined = this.valueIsDefined(this.wsSocksProxy);
|
|
1857
|
+
const is_ws_socks_proxy_defined = this.valueIsDefined(this.ws_socks_proxy);
|
|
1858
|
+
if (isWsSocksProxyDefined || is_ws_socks_proxy_defined) {
|
|
1861
1859
|
usedProxies.push('wsSocksProxy');
|
|
1862
|
-
wsSocksProxy = this.wsSocksProxy;
|
|
1863
|
-
}
|
|
1864
|
-
if (this.valueIsDefined(this.ws_socks_proxy)) {
|
|
1865
|
-
usedProxies.push('ws_socks_proxy');
|
|
1866
|
-
wsSocksProxy = this.ws_socks_proxy;
|
|
1860
|
+
wsSocksProxy = (isWsSocksProxyDefined) ? this.wsSocksProxy : this.ws_socks_proxy;
|
|
1867
1861
|
}
|
|
1868
1862
|
// check
|
|
1869
1863
|
const length = usedProxies.length;
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -6249,16 +6249,10 @@ class binance extends binance$1 {
|
|
|
6249
6249
|
let marginMode = undefined;
|
|
6250
6250
|
[marginMode, params] = this.handleMarginModeAndParams('createOrder', params);
|
|
6251
6251
|
const reduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
6252
|
-
if (
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
request['reduceOnly'] = reduceOnly;
|
|
6257
|
-
}
|
|
6258
|
-
else {
|
|
6259
|
-
if (reduceOnly) {
|
|
6260
|
-
request['sideEffectType'] = 'AUTO_REPAY';
|
|
6261
|
-
}
|
|
6252
|
+
if (reduceOnly) {
|
|
6253
|
+
if (marketType === 'margin' || (!market['contract'] && (marginMode !== undefined))) {
|
|
6254
|
+
params = this.omit(params, 'reduceOnly');
|
|
6255
|
+
request['sideEffectType'] = 'AUTO_REPAY';
|
|
6262
6256
|
}
|
|
6263
6257
|
}
|
|
6264
6258
|
const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
|
|
@@ -6708,7 +6702,7 @@ class binance extends binance$1 {
|
|
|
6708
6702
|
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
6709
6703
|
* @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)
|
|
6710
6704
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
6711
|
-
* @param {boolean} [params.
|
|
6705
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
6712
6706
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
6713
6707
|
*/
|
|
6714
6708
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -6985,7 +6979,7 @@ class binance extends binance$1 {
|
|
|
6985
6979
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6986
6980
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
6987
6981
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch open orders in the portfolio margin account
|
|
6988
|
-
* @param {boolean} [params.
|
|
6982
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account conditional orders
|
|
6989
6983
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
6990
6984
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
6991
6985
|
*/
|
|
@@ -7307,7 +7301,7 @@ class binance extends binance$1 {
|
|
|
7307
7301
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7308
7302
|
* @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)
|
|
7309
7303
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
7310
|
-
* @param {boolean} [params.
|
|
7304
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
7311
7305
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
7312
7306
|
*/
|
|
7313
7307
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -7337,7 +7331,7 @@ class binance extends binance$1 {
|
|
|
7337
7331
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7338
7332
|
* @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)
|
|
7339
7333
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
7340
|
-
* @param {boolean} [params.
|
|
7334
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
7341
7335
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
7342
7336
|
*/
|
|
7343
7337
|
async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -7367,7 +7361,7 @@ class binance extends binance$1 {
|
|
|
7367
7361
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7368
7362
|
* @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)
|
|
7369
7363
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
7370
|
-
* @param {boolean} [params.
|
|
7364
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
7371
7365
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
7372
7366
|
*/
|
|
7373
7367
|
async fetchCanceledAndClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -7399,7 +7393,7 @@ class binance extends binance$1 {
|
|
|
7399
7393
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
7400
7394
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7401
7395
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to cancel an order in a portfolio margin account
|
|
7402
|
-
* @param {boolean} [params.
|
|
7396
|
+
* @param {boolean} [params.trigger] set to true if you would like to cancel a portfolio margin account conditional order
|
|
7403
7397
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
7404
7398
|
*/
|
|
7405
7399
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
@@ -7504,7 +7498,7 @@ class binance extends binance$1 {
|
|
|
7504
7498
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7505
7499
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
7506
7500
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to cancel orders in a portfolio margin account
|
|
7507
|
-
* @param {boolean} [params.
|
|
7501
|
+
* @param {boolean} [params.trigger] set to true if you would like to cancel portfolio margin account conditional orders
|
|
7508
7502
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
7509
7503
|
*/
|
|
7510
7504
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
@@ -11589,7 +11583,7 @@ class binance extends binance$1 {
|
|
|
11589
11583
|
* @param {string} id the identification number of the ledger entry
|
|
11590
11584
|
* @param {string} code unified currency code
|
|
11591
11585
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
11592
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
11586
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
11593
11587
|
*/
|
|
11594
11588
|
async fetchLedgerEntry(id, code = undefined, params = {}) {
|
|
11595
11589
|
await this.loadMarkets();
|
|
@@ -11636,7 +11630,7 @@ class binance extends binance$1 {
|
|
|
11636
11630
|
* @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)
|
|
11637
11631
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the ledger for a portfolio margin account
|
|
11638
11632
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
11639
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
11633
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
11640
11634
|
*/
|
|
11641
11635
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
11642
11636
|
await this.loadMarkets();
|
package/dist/cjs/src/bingx.js
CHANGED
|
@@ -3608,7 +3608,6 @@ class bingx extends bingx$1 {
|
|
|
3608
3608
|
'postOnly': undefined,
|
|
3609
3609
|
'side': this.parseOrderSide(side),
|
|
3610
3610
|
'price': this.safeString2(order, 'price', 'p'),
|
|
3611
|
-
'stopPrice': triggerPrice,
|
|
3612
3611
|
'triggerPrice': triggerPrice,
|
|
3613
3612
|
'stopLossPrice': stopLossPrice,
|
|
3614
3613
|
'takeProfitPrice': takeProfitPrice,
|
|
@@ -6154,7 +6153,7 @@ class bingx extends bingx$1 {
|
|
|
6154
6153
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
6155
6154
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
6156
6155
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6157
|
-
* @param {string} [params.
|
|
6156
|
+
* @param {string} [params.triggerPrice] Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types.
|
|
6158
6157
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
|
6159
6158
|
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
6160
6159
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
package/dist/cjs/src/bit2c.js
CHANGED
package/dist/cjs/src/bitbank.js
CHANGED
package/dist/cjs/src/bitbns.js
CHANGED
|
@@ -564,7 +564,6 @@ class bitbns extends bitbns$1 {
|
|
|
564
564
|
'postOnly': undefined,
|
|
565
565
|
'side': side,
|
|
566
566
|
'price': this.safeString(order, 'rate'),
|
|
567
|
-
'stopPrice': triggerPrice,
|
|
568
567
|
'triggerPrice': triggerPrice,
|
|
569
568
|
'amount': this.safeString(order, 'btc'),
|
|
570
569
|
'cost': undefined,
|
package/dist/cjs/src/bitfinex.js
CHANGED
|
@@ -1509,10 +1509,10 @@ class bitfinex extends bitfinex$1 {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
1511
|
let price = this.safeString(orderList, 16);
|
|
1512
|
-
let
|
|
1512
|
+
let triggerPrice = undefined;
|
|
1513
1513
|
if ((orderType === 'EXCHANGE STOP') || (orderType === 'EXCHANGE STOP LIMIT')) {
|
|
1514
1514
|
price = undefined;
|
|
1515
|
-
|
|
1515
|
+
triggerPrice = this.safeString(orderList, 16);
|
|
1516
1516
|
if (orderType === 'EXCHANGE STOP LIMIT') {
|
|
1517
1517
|
price = this.safeString(orderList, 19);
|
|
1518
1518
|
}
|
|
@@ -1538,8 +1538,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1538
1538
|
'postOnly': postOnly,
|
|
1539
1539
|
'side': side,
|
|
1540
1540
|
'price': price,
|
|
1541
|
-
'
|
|
1542
|
-
'triggerPrice': stopPrice,
|
|
1541
|
+
'triggerPrice': triggerPrice,
|
|
1543
1542
|
'amount': amount,
|
|
1544
1543
|
'cost': undefined,
|
|
1545
1544
|
'average': average,
|
|
@@ -1562,7 +1561,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1562
1561
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
1563
1562
|
* @param {float} [price] the price of the order, in units of the quote currency, ignored in market orders
|
|
1564
1563
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1565
|
-
* @param {float} [params.
|
|
1564
|
+
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1566
1565
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1567
1566
|
* @param {bool} [params.postOnly]
|
|
1568
1567
|
* @param {bool} [params.reduceOnly] Ensures that the executed order does not flip the opened position.
|
|
@@ -1580,7 +1579,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1580
1579
|
'symbol': market['id'],
|
|
1581
1580
|
'amount': amountString,
|
|
1582
1581
|
};
|
|
1583
|
-
const
|
|
1582
|
+
const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
|
|
1584
1583
|
const trailingAmount = this.safeString(params, 'trailingAmount');
|
|
1585
1584
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
1586
1585
|
const postOnlyParam = this.safeBool(params, 'postOnly', false);
|
|
@@ -1591,9 +1590,9 @@ class bitfinex extends bitfinex$1 {
|
|
|
1591
1590
|
orderType = 'TRAILING STOP';
|
|
1592
1591
|
request['price_trailing'] = trailingAmount;
|
|
1593
1592
|
}
|
|
1594
|
-
else if (
|
|
1595
|
-
// request['price'] is taken as
|
|
1596
|
-
request['price'] = this.priceToPrecision(symbol,
|
|
1593
|
+
else if (triggerPrice !== undefined) {
|
|
1594
|
+
// request['price'] is taken as triggerPrice for stop orders
|
|
1595
|
+
request['price'] = this.priceToPrecision(symbol, triggerPrice);
|
|
1597
1596
|
if (type === 'limit') {
|
|
1598
1597
|
orderType = 'STOP LIMIT';
|
|
1599
1598
|
request['price_aux_limit'] = this.priceToPrecision(symbol, price);
|
|
@@ -1611,7 +1610,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1611
1610
|
if ((ioc || fok) && (type === 'market')) {
|
|
1612
1611
|
throw new errors.InvalidOrder(this.id + ' createOrder() does not allow market IOC and FOK orders');
|
|
1613
1612
|
}
|
|
1614
|
-
if ((type !== 'market') && (
|
|
1613
|
+
if ((type !== 'market') && (triggerPrice === undefined)) {
|
|
1615
1614
|
request['price'] = this.priceToPrecision(symbol, price);
|
|
1616
1615
|
}
|
|
1617
1616
|
if (ioc) {
|
|
@@ -1655,7 +1654,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1655
1654
|
* @param {float} amount the amount of currency to trade
|
|
1656
1655
|
* @param {float} [price] price of the order
|
|
1657
1656
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1658
|
-
* @param {float} [params.
|
|
1657
|
+
* @param {float} [params.triggerPrice] the price that triggers a trigger order
|
|
1659
1658
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1660
1659
|
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
1661
1660
|
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
@@ -2965,7 +2964,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
2965
2964
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2966
2965
|
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
2967
2966
|
* @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)
|
|
2968
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
2967
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
2969
2968
|
*/
|
|
2970
2969
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2971
2970
|
await this.loadMarkets();
|
|
@@ -3657,7 +3656,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
3657
3656
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
3658
3657
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
3659
3658
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3660
|
-
* @param {float} [params.
|
|
3659
|
+
* @param {float} [params.triggerPrice] the price that triggers a trigger order
|
|
3661
3660
|
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
3662
3661
|
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
3663
3662
|
* @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
|
|
@@ -3677,7 +3676,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
3677
3676
|
amountString = (side === 'buy') ? amountString : Precise["default"].stringNeg(amountString);
|
|
3678
3677
|
request['amount'] = amountString;
|
|
3679
3678
|
}
|
|
3680
|
-
const
|
|
3679
|
+
const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
|
|
3681
3680
|
const trailingAmount = this.safeString(params, 'trailingAmount');
|
|
3682
3681
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
3683
3682
|
const postOnlyParam = this.safeBool(params, 'postOnly', false);
|
|
@@ -3686,15 +3685,15 @@ class bitfinex extends bitfinex$1 {
|
|
|
3686
3685
|
if (trailingAmount !== undefined) {
|
|
3687
3686
|
request['price_trailing'] = trailingAmount;
|
|
3688
3687
|
}
|
|
3689
|
-
else if (
|
|
3690
|
-
// request['price'] is taken as
|
|
3691
|
-
request['price'] = this.priceToPrecision(symbol,
|
|
3688
|
+
else if (triggerPrice !== undefined) {
|
|
3689
|
+
// request['price'] is taken as triggerPrice for stop orders
|
|
3690
|
+
request['price'] = this.priceToPrecision(symbol, triggerPrice);
|
|
3692
3691
|
if (type === 'limit') {
|
|
3693
3692
|
request['price_aux_limit'] = this.priceToPrecision(symbol, price);
|
|
3694
3693
|
}
|
|
3695
3694
|
}
|
|
3696
3695
|
const postOnly = (postOnlyParam || (timeInForce === 'PO'));
|
|
3697
|
-
if ((type !== 'market') && (
|
|
3696
|
+
if ((type !== 'market') && (triggerPrice === undefined)) {
|
|
3698
3697
|
request['price'] = this.priceToPrecision(symbol, price);
|
|
3699
3698
|
}
|
|
3700
3699
|
// flag values may be summed to combine flags
|
|
@@ -1271,7 +1271,6 @@ class bitfinex1 extends bitfinex1$1 {
|
|
|
1271
1271
|
'postOnly': undefined,
|
|
1272
1272
|
'side': side,
|
|
1273
1273
|
'price': this.safeString(order, 'price'),
|
|
1274
|
-
'stopPrice': undefined,
|
|
1275
1274
|
'triggerPrice': undefined,
|
|
1276
1275
|
'average': this.safeString(order, 'avg_execution_price'),
|
|
1277
1276
|
'amount': this.safeString(order, 'original_amount'),
|
package/dist/cjs/src/bitflyer.js
CHANGED
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -4242,7 +4242,6 @@ class bitget extends bitget$1 {
|
|
|
4242
4242
|
'timeInForce': timeInForce,
|
|
4243
4243
|
'postOnly': postOnly,
|
|
4244
4244
|
'reduceOnly': reduceOnly,
|
|
4245
|
-
'stopPrice': this.safeNumber(order, 'triggerPrice'),
|
|
4246
4245
|
'triggerPrice': this.safeNumber(order, 'triggerPrice'),
|
|
4247
4246
|
'takeProfitPrice': this.safeNumber2(order, 'presetStopSurplusPrice', 'stopSurplusTriggerPrice'),
|
|
4248
4247
|
'stopLossPrice': this.safeNumber2(order, 'presetStopLossPrice', 'stopLossTriggerPrice'),
|
|
@@ -6065,7 +6064,7 @@ class bitget extends bitget$1 {
|
|
|
6065
6064
|
* @param {string} [params.symbol] *contract only* unified market symbol
|
|
6066
6065
|
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
6067
6066
|
* @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)
|
|
6068
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
6067
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
6069
6068
|
*/
|
|
6070
6069
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
6071
6070
|
await this.loadMarkets();
|
package/dist/cjs/src/bithumb.js
CHANGED
package/dist/cjs/src/bitmart.js
CHANGED
|
@@ -2556,7 +2556,6 @@ class bitmart extends bitmart$1 {
|
|
|
2556
2556
|
'postOnly': postOnly,
|
|
2557
2557
|
'side': this.parseOrderSide(this.safeString(order, 'side')),
|
|
2558
2558
|
'price': this.omitZero(priceString),
|
|
2559
|
-
'stopPrice': trailingActivationPrice,
|
|
2560
2559
|
'triggerPrice': trailingActivationPrice,
|
|
2561
2560
|
'amount': this.omitZero(this.safeString(order, 'size')),
|
|
2562
2561
|
'cost': this.safeString2(order, 'filled_notional', 'filledNotional'),
|
|
@@ -3022,7 +3021,7 @@ class bitmart extends bitmart$1 {
|
|
|
3022
3021
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
3023
3022
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3024
3023
|
* @param {string} [params.clientOrderId] *spot only* the client order id of the order to cancel
|
|
3025
|
-
* @param {boolean} [params.
|
|
3024
|
+
* @param {boolean} [params.trigger] *swap only* whether the order is a trigger order
|
|
3026
3025
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3027
3026
|
*/
|
|
3028
3027
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
@@ -3047,9 +3046,9 @@ class bitmart extends bitmart$1 {
|
|
|
3047
3046
|
response = await this.privatePostSpotV3CancelOrder(this.extend(request, params));
|
|
3048
3047
|
}
|
|
3049
3048
|
else {
|
|
3050
|
-
const
|
|
3049
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
3051
3050
|
params = this.omit(params, ['stop', 'trigger']);
|
|
3052
|
-
if (!
|
|
3051
|
+
if (!trigger) {
|
|
3053
3052
|
response = await this.privatePostContractPrivateCancelOrder(this.extend(request, params));
|
|
3054
3053
|
}
|
|
3055
3054
|
else {
|
package/dist/cjs/src/bitmex.js
CHANGED
|
@@ -1307,7 +1307,7 @@ class bitmex extends bitmex$1 {
|
|
|
1307
1307
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1308
1308
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1309
1309
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1310
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
1310
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
1311
1311
|
*/
|
|
1312
1312
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1313
1313
|
await this.loadMarkets();
|
|
@@ -1865,7 +1865,7 @@ class bitmex extends bitmex$1 {
|
|
|
1865
1865
|
postOnly = (execInst === 'ParticipateDoNotInitiate');
|
|
1866
1866
|
}
|
|
1867
1867
|
const timestamp = this.parse8601(this.safeString(order, 'timestamp'));
|
|
1868
|
-
const
|
|
1868
|
+
const triggerPrice = this.safeNumber(order, 'stopPx');
|
|
1869
1869
|
const remaining = this.safeString(order, 'leavesQty');
|
|
1870
1870
|
return this.safeOrder({
|
|
1871
1871
|
'info': order,
|
|
@@ -1880,8 +1880,7 @@ class bitmex extends bitmex$1 {
|
|
|
1880
1880
|
'postOnly': postOnly,
|
|
1881
1881
|
'side': this.safeStringLower(order, 'side'),
|
|
1882
1882
|
'price': this.safeString(order, 'price'),
|
|
1883
|
-
'
|
|
1884
|
-
'triggerPrice': stopPrice,
|
|
1883
|
+
'triggerPrice': triggerPrice,
|
|
1885
1884
|
'amount': amount,
|
|
1886
1885
|
'cost': cost,
|
|
1887
1886
|
'average': average,
|
|
@@ -2035,7 +2034,7 @@ class bitmex extends bitmex$1 {
|
|
|
2035
2034
|
else {
|
|
2036
2035
|
if (triggerPrice === undefined) {
|
|
2037
2036
|
// if exchange specific trigger types were provided
|
|
2038
|
-
throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice
|
|
2037
|
+
throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice parameter for the ' + orderType + ' order type');
|
|
2039
2038
|
}
|
|
2040
2039
|
request['stopPx'] = this.parseToNumeric(this.priceToPrecision(symbol, triggerPrice));
|
|
2041
2040
|
}
|
|
@@ -2629,7 +2628,7 @@ class bitmex extends bitmex$1 {
|
|
|
2629
2628
|
'timestamp': this.parse8601(datetime),
|
|
2630
2629
|
'datetime': datetime,
|
|
2631
2630
|
'fundingRate': this.safeNumber(contract, 'fundingRate'),
|
|
2632
|
-
'fundingTimestamp': this.
|
|
2631
|
+
'fundingTimestamp': this.parse8601(fundingDatetime),
|
|
2633
2632
|
'fundingDatetime': fundingDatetime,
|
|
2634
2633
|
'nextFundingRate': this.safeNumber(contract, 'indicativeFundingRate'),
|
|
2635
2634
|
'nextFundingTimestamp': undefined,
|
package/dist/cjs/src/bitopro.js
CHANGED
|
@@ -981,7 +981,6 @@ class bitopro extends bitopro$1 {
|
|
|
981
981
|
'postOnly': postOnly,
|
|
982
982
|
'side': side,
|
|
983
983
|
'price': price,
|
|
984
|
-
'stopPrice': undefined,
|
|
985
984
|
'triggerPrice': undefined,
|
|
986
985
|
'amount': amount,
|
|
987
986
|
'cost': undefined,
|
|
@@ -1024,13 +1023,13 @@ class bitopro extends bitopro$1 {
|
|
|
1024
1023
|
}
|
|
1025
1024
|
if (orderType === 'STOP_LIMIT') {
|
|
1026
1025
|
request['price'] = this.priceToPrecision(symbol, price);
|
|
1027
|
-
const
|
|
1026
|
+
const triggerPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
|
|
1028
1027
|
params = this.omit(params, ['triggerPrice', 'stopPrice']);
|
|
1029
|
-
if (
|
|
1030
|
-
throw new errors.InvalidOrder(this.id + ' createOrder() requires a
|
|
1028
|
+
if (triggerPrice === undefined) {
|
|
1029
|
+
throw new errors.InvalidOrder(this.id + ' createOrder() requires a triggerPrice parameter for ' + orderType + ' orders');
|
|
1031
1030
|
}
|
|
1032
1031
|
else {
|
|
1033
|
-
request['stopPrice'] = this.priceToPrecision(symbol,
|
|
1032
|
+
request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
1034
1033
|
}
|
|
1035
1034
|
const condition = this.safeString(params, 'condition');
|
|
1036
1035
|
if (condition === undefined) {
|
package/dist/cjs/src/bitrue.js
CHANGED
|
@@ -1834,8 +1834,7 @@ class bitrue extends bitrue$1 {
|
|
|
1834
1834
|
if (type === 'limit_maker') {
|
|
1835
1835
|
type = 'limit';
|
|
1836
1836
|
}
|
|
1837
|
-
const
|
|
1838
|
-
const stopPrice = this.parseNumber(this.omitZero(stopPriceString));
|
|
1837
|
+
const triggerPrice = this.parseNumber(this.omitZero(this.safeString(order, 'stopPrice')));
|
|
1839
1838
|
return this.safeOrder({
|
|
1840
1839
|
'info': order,
|
|
1841
1840
|
'id': id,
|
|
@@ -1849,8 +1848,7 @@ class bitrue extends bitrue$1 {
|
|
|
1849
1848
|
'postOnly': postOnly,
|
|
1850
1849
|
'side': side,
|
|
1851
1850
|
'price': price,
|
|
1852
|
-
'
|
|
1853
|
-
'triggerPrice': stopPrice,
|
|
1851
|
+
'triggerPrice': triggerPrice,
|
|
1854
1852
|
'amount': amount,
|
|
1855
1853
|
'cost': cost,
|
|
1856
1854
|
'average': average,
|
|
@@ -1988,10 +1986,10 @@ class bitrue extends bitrue$1 {
|
|
|
1988
1986
|
params = this.omit(params, ['newClientOrderId', 'clientOrderId']);
|
|
1989
1987
|
request['newClientOrderId'] = clientOrderId;
|
|
1990
1988
|
}
|
|
1991
|
-
const
|
|
1992
|
-
if (
|
|
1989
|
+
const triggerPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
|
|
1990
|
+
if (triggerPrice !== undefined) {
|
|
1993
1991
|
params = this.omit(params, ['triggerPrice', 'stopPrice']);
|
|
1994
|
-
request['stopPrice'] = this.priceToPrecision(symbol,
|
|
1992
|
+
request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
1995
1993
|
}
|
|
1996
1994
|
response = await this.spotV1PrivatePostOrder(this.extend(request, params));
|
|
1997
1995
|
data = response;
|
package/dist/cjs/src/bitso.js
CHANGED
|
@@ -202,7 +202,7 @@ class bitso extends bitso$1 {
|
|
|
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
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
208
208
|
const request = {};
|
|
@@ -1137,7 +1137,6 @@ class bitso extends bitso$1 {
|
|
|
1137
1137
|
'postOnly': undefined,
|
|
1138
1138
|
'side': side,
|
|
1139
1139
|
'price': price,
|
|
1140
|
-
'stopPrice': undefined,
|
|
1141
1140
|
'triggerPrice': undefined,
|
|
1142
1141
|
'amount': amount,
|
|
1143
1142
|
'cost': undefined,
|
package/dist/cjs/src/bitstamp.js
CHANGED
|
@@ -1915,7 +1915,6 @@ class bitstamp extends bitstamp$1 {
|
|
|
1915
1915
|
'postOnly': undefined,
|
|
1916
1916
|
'side': side,
|
|
1917
1917
|
'price': price,
|
|
1918
|
-
'stopPrice': undefined,
|
|
1919
1918
|
'triggerPrice': undefined,
|
|
1920
1919
|
'cost': undefined,
|
|
1921
1920
|
'amount': amount,
|
|
@@ -2039,7 +2038,7 @@ class bitstamp extends bitstamp$1 {
|
|
|
2039
2038
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2040
2039
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2041
2040
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2042
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
2041
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
2043
2042
|
*/
|
|
2044
2043
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2045
2044
|
await this.loadMarkets();
|
package/dist/cjs/src/bitteam.js
CHANGED
|
@@ -1193,7 +1193,6 @@ class bitteam extends bitteam$1 {
|
|
|
1193
1193
|
const side = this.safeString(order, 'side');
|
|
1194
1194
|
const feeRaw = this.safeValue(order, 'fee');
|
|
1195
1195
|
const price = this.safeString(order, 'price');
|
|
1196
|
-
const stopPrice = this.safeString(order, 'stopPrice');
|
|
1197
1196
|
const amount = this.safeString(order, 'quantity');
|
|
1198
1197
|
const filled = this.safeString(order, 'executed');
|
|
1199
1198
|
let fee = undefined;
|
|
@@ -1219,8 +1218,7 @@ class bitteam extends bitteam$1 {
|
|
|
1219
1218
|
'timeInForce': 'GTC',
|
|
1220
1219
|
'side': side,
|
|
1221
1220
|
'price': price,
|
|
1222
|
-
'
|
|
1223
|
-
'triggerPrice': stopPrice,
|
|
1221
|
+
'triggerPrice': this.safeString(order, 'stopPrice'),
|
|
1224
1222
|
'average': undefined,
|
|
1225
1223
|
'amount': amount,
|
|
1226
1224
|
'cost': undefined,
|