ccxt 4.4.39 → 4.4.41
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 +32 -21
- package/dist/cjs/src/binance.js +37 -43
- package/dist/cjs/src/bingx.js +4 -3
- 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 +18 -19
- package/dist/cjs/src/bitfinex1.js +0 -1
- package/dist/cjs/src/bitflyer.js +0 -1
- package/dist/cjs/src/bitget.js +2 -2
- package/dist/cjs/src/bithumb.js +0 -1
- package/dist/cjs/src/bitmart.js +257 -5
- 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 +10 -11
- 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 +64 -6
- package/dist/cjs/src/gate.js +2 -2
- package/dist/cjs/src/hashkey.js +3 -5
- package/dist/cjs/src/htx.js +2 -2
- package/dist/cjs/src/hyperliquid.js +66 -2
- package/dist/cjs/src/kraken.js +130 -27
- package/dist/cjs/src/kucoin.js +30 -25
- 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 +27 -22
- 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 +31 -28
- package/dist/cjs/src/zonda.js +1 -1
- package/js/ccxt.d.ts +3 -3
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitmart.d.ts +2 -0
- package/js/src/abstract/okx.d.ts +5 -0
- package/js/src/ascendex.d.ts +2 -2
- package/js/src/ascendex.js +9 -9
- package/js/src/base/Exchange.d.ts +6 -3
- package/js/src/base/Exchange.js +32 -21
- package/js/src/base/types.d.ts +2 -0
- package/js/src/binance.d.ts +9 -9
- package/js/src/binance.js +37 -43
- package/js/src/bingx.d.ts +1 -1
- package/js/src/bingx.js +4 -3
- 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 +18 -19
- 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 +2 -2
- package/js/src/bithumb.js +0 -1
- package/js/src/bitmart.d.ts +53 -2
- package/js/src/bitmart.js +257 -5
- 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 +10 -11
- 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.d.ts +35 -0
- package/js/src/exmo.js +64 -6
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +2 -2
- 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 +2 -2
- package/js/src/hyperliquid.d.ts +21 -2
- package/js/src/hyperliquid.js +66 -2
- package/js/src/kraken.d.ts +14 -8
- package/js/src/kraken.js +130 -27
- package/js/src/kucoin.d.ts +13 -13
- package/js/src/kucoin.js +30 -25
- 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 +27 -22
- 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 +31 -28
- package/js/src/zonda.d.ts +1 -1
- package/js/src/zonda.js +1 -1
- package/package.json +2 -2
package/js/src/binance.js
CHANGED
|
@@ -5232,8 +5232,8 @@ export default class binance extends Exchange {
|
|
|
5232
5232
|
uppercaseType = 'LIMIT_MAKER';
|
|
5233
5233
|
}
|
|
5234
5234
|
request['type'] = uppercaseType;
|
|
5235
|
-
const
|
|
5236
|
-
if (
|
|
5235
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
5236
|
+
if (triggerPrice !== undefined) {
|
|
5237
5237
|
if (uppercaseType === 'MARKET') {
|
|
5238
5238
|
uppercaseType = 'STOP_LOSS';
|
|
5239
5239
|
}
|
|
@@ -5244,7 +5244,7 @@ export default class binance extends Exchange {
|
|
|
5244
5244
|
const validOrderTypes = this.safeList(market['info'], 'orderTypes');
|
|
5245
5245
|
if (!this.inArray(uppercaseType, validOrderTypes)) {
|
|
5246
5246
|
if (initialUppercaseType !== uppercaseType) {
|
|
5247
|
-
throw new InvalidOrder(this.id + '
|
|
5247
|
+
throw new InvalidOrder(this.id + ' triggerPrice parameter is not allowed for ' + symbol + ' ' + type + ' orders');
|
|
5248
5248
|
}
|
|
5249
5249
|
else {
|
|
5250
5250
|
throw new InvalidOrder(this.id + ' ' + type + ' is not a valid order type for the ' + symbol + ' market');
|
|
@@ -5265,7 +5265,7 @@ export default class binance extends Exchange {
|
|
|
5265
5265
|
request['newOrderRespType'] = this.safeValue(this.options['newOrderRespType'], type, 'RESULT'); // 'ACK' for order id, 'RESULT' for full order or 'FULL' for order with fills
|
|
5266
5266
|
let timeInForceIsRequired = false;
|
|
5267
5267
|
let priceIsRequired = false;
|
|
5268
|
-
let
|
|
5268
|
+
let triggerPriceIsRequired = false;
|
|
5269
5269
|
let quantityIsRequired = false;
|
|
5270
5270
|
if (uppercaseType === 'MARKET') {
|
|
5271
5271
|
const quoteOrderQty = this.safeBool(this.options, 'quoteOrderQty', true);
|
|
@@ -5295,12 +5295,12 @@ export default class binance extends Exchange {
|
|
|
5295
5295
|
quantityIsRequired = true;
|
|
5296
5296
|
}
|
|
5297
5297
|
else if ((uppercaseType === 'STOP_LOSS') || (uppercaseType === 'TAKE_PROFIT')) {
|
|
5298
|
-
|
|
5298
|
+
triggerPriceIsRequired = true;
|
|
5299
5299
|
quantityIsRequired = true;
|
|
5300
5300
|
}
|
|
5301
5301
|
else if ((uppercaseType === 'STOP_LOSS_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) {
|
|
5302
5302
|
quantityIsRequired = true;
|
|
5303
|
-
|
|
5303
|
+
triggerPriceIsRequired = true;
|
|
5304
5304
|
priceIsRequired = true;
|
|
5305
5305
|
timeInForceIsRequired = true;
|
|
5306
5306
|
}
|
|
@@ -5320,12 +5320,12 @@ export default class binance extends Exchange {
|
|
|
5320
5320
|
if (timeInForceIsRequired && (this.safeString(params, 'timeInForce') === undefined)) {
|
|
5321
5321
|
request['timeInForce'] = this.options['defaultTimeInForce']; // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel
|
|
5322
5322
|
}
|
|
5323
|
-
if (
|
|
5324
|
-
if (
|
|
5325
|
-
throw new InvalidOrder(this.id + ' editOrder() requires a
|
|
5323
|
+
if (triggerPriceIsRequired) {
|
|
5324
|
+
if (triggerPrice === undefined) {
|
|
5325
|
+
throw new InvalidOrder(this.id + ' editOrder() requires a triggerPrice extra param for a ' + type + ' order');
|
|
5326
5326
|
}
|
|
5327
5327
|
else {
|
|
5328
|
-
request['stopPrice'] = this.priceToPrecision(symbol,
|
|
5328
|
+
request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
5329
5329
|
}
|
|
5330
5330
|
}
|
|
5331
5331
|
request['cancelReplaceMode'] = 'STOP_ON_FAILURE'; // If the cancel request fails, the new order placement will not be attempted.
|
|
@@ -5989,7 +5989,7 @@ export default class binance extends Exchange {
|
|
|
5989
5989
|
type = 'limit';
|
|
5990
5990
|
}
|
|
5991
5991
|
const stopPriceString = this.safeString(order, 'stopPrice');
|
|
5992
|
-
const
|
|
5992
|
+
const triggerPrice = this.parseNumber(this.omitZero(stopPriceString));
|
|
5993
5993
|
const feeCost = this.safeNumber(order, 'fee');
|
|
5994
5994
|
let fee = undefined;
|
|
5995
5995
|
if (feeCost !== undefined) {
|
|
@@ -6014,7 +6014,7 @@ export default class binance extends Exchange {
|
|
|
6014
6014
|
'reduceOnly': this.safeBool(order, 'reduceOnly'),
|
|
6015
6015
|
'side': side,
|
|
6016
6016
|
'price': price,
|
|
6017
|
-
'triggerPrice':
|
|
6017
|
+
'triggerPrice': triggerPrice,
|
|
6018
6018
|
'amount': amount,
|
|
6019
6019
|
'cost': cost,
|
|
6020
6020
|
'average': average,
|
|
@@ -6252,16 +6252,10 @@ export default class binance extends Exchange {
|
|
|
6252
6252
|
let marginMode = undefined;
|
|
6253
6253
|
[marginMode, params] = this.handleMarginModeAndParams('createOrder', params);
|
|
6254
6254
|
const reduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
6255
|
-
if (
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
request['reduceOnly'] = reduceOnly;
|
|
6260
|
-
}
|
|
6261
|
-
else {
|
|
6262
|
-
if (reduceOnly) {
|
|
6263
|
-
request['sideEffectType'] = 'AUTO_REPAY';
|
|
6264
|
-
}
|
|
6255
|
+
if (reduceOnly) {
|
|
6256
|
+
if (marketType === 'margin' || (!market['contract'] && (marginMode !== undefined))) {
|
|
6257
|
+
params = this.omit(params, 'reduceOnly');
|
|
6258
|
+
request['sideEffectType'] = 'AUTO_REPAY';
|
|
6265
6259
|
}
|
|
6266
6260
|
}
|
|
6267
6261
|
const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
|
|
@@ -6339,7 +6333,7 @@ export default class binance extends Exchange {
|
|
|
6339
6333
|
const validOrderTypes = this.safeList(market['info'], 'orderTypes');
|
|
6340
6334
|
if (!this.inArray(uppercaseType, validOrderTypes)) {
|
|
6341
6335
|
if (initialUppercaseType !== uppercaseType) {
|
|
6342
|
-
throw new InvalidOrder(this.id + '
|
|
6336
|
+
throw new InvalidOrder(this.id + ' triggerPrice parameter is not allowed for ' + symbol + ' ' + type + ' orders');
|
|
6343
6337
|
}
|
|
6344
6338
|
else {
|
|
6345
6339
|
throw new InvalidOrder(this.id + ' ' + type + ' is not a valid order type for the ' + symbol + ' market');
|
|
@@ -6394,7 +6388,7 @@ export default class binance extends Exchange {
|
|
|
6394
6388
|
const closePosition = this.safeBool(params, 'closePosition', false);
|
|
6395
6389
|
let timeInForceIsRequired = false;
|
|
6396
6390
|
let priceIsRequired = false;
|
|
6397
|
-
let
|
|
6391
|
+
let triggerPriceIsRequired = false;
|
|
6398
6392
|
let quantityIsRequired = false;
|
|
6399
6393
|
//
|
|
6400
6394
|
// spot/margin
|
|
@@ -6449,7 +6443,7 @@ export default class binance extends Exchange {
|
|
|
6449
6443
|
quantityIsRequired = true;
|
|
6450
6444
|
}
|
|
6451
6445
|
else if ((uppercaseType === 'STOP_LOSS') || (uppercaseType === 'TAKE_PROFIT')) {
|
|
6452
|
-
|
|
6446
|
+
triggerPriceIsRequired = true;
|
|
6453
6447
|
quantityIsRequired = true;
|
|
6454
6448
|
if (market['linear'] || market['inverse']) {
|
|
6455
6449
|
priceIsRequired = true;
|
|
@@ -6457,7 +6451,7 @@ export default class binance extends Exchange {
|
|
|
6457
6451
|
}
|
|
6458
6452
|
else if ((uppercaseType === 'STOP_LOSS_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) {
|
|
6459
6453
|
quantityIsRequired = true;
|
|
6460
|
-
|
|
6454
|
+
triggerPriceIsRequired = true;
|
|
6461
6455
|
priceIsRequired = true;
|
|
6462
6456
|
timeInForceIsRequired = true;
|
|
6463
6457
|
}
|
|
@@ -6467,14 +6461,14 @@ export default class binance extends Exchange {
|
|
|
6467
6461
|
}
|
|
6468
6462
|
else if (uppercaseType === 'STOP') {
|
|
6469
6463
|
quantityIsRequired = true;
|
|
6470
|
-
|
|
6464
|
+
triggerPriceIsRequired = true;
|
|
6471
6465
|
priceIsRequired = true;
|
|
6472
6466
|
}
|
|
6473
6467
|
else if ((uppercaseType === 'STOP_MARKET') || (uppercaseType === 'TAKE_PROFIT_MARKET')) {
|
|
6474
6468
|
if (!closePosition) {
|
|
6475
6469
|
quantityIsRequired = true;
|
|
6476
6470
|
}
|
|
6477
|
-
|
|
6471
|
+
triggerPriceIsRequired = true;
|
|
6478
6472
|
}
|
|
6479
6473
|
else if (uppercaseType === 'TRAILING_STOP_MARKET') {
|
|
6480
6474
|
if (!closePosition) {
|
|
@@ -6513,16 +6507,16 @@ export default class binance extends Exchange {
|
|
|
6513
6507
|
request['price'] = this.parseToNumeric(price); // some options don't have the precision available
|
|
6514
6508
|
}
|
|
6515
6509
|
}
|
|
6516
|
-
if (
|
|
6510
|
+
if (triggerPriceIsRequired) {
|
|
6517
6511
|
if (market['contract']) {
|
|
6518
6512
|
if (stopPrice === undefined) {
|
|
6519
|
-
throw new InvalidOrder(this.id + ' createOrder() requires a
|
|
6513
|
+
throw new InvalidOrder(this.id + ' createOrder() requires a triggerPrice extra param for a ' + type + ' order');
|
|
6520
6514
|
}
|
|
6521
6515
|
}
|
|
6522
6516
|
else {
|
|
6523
6517
|
// check for delta price as well
|
|
6524
6518
|
if (trailingDelta === undefined && stopPrice === undefined && trailingPercent === undefined) {
|
|
6525
|
-
throw new InvalidOrder(this.id + ' createOrder() requires a
|
|
6519
|
+
throw new InvalidOrder(this.id + ' createOrder() requires a triggerPrice, trailingDelta or trailingPercent param for a ' + type + ' order');
|
|
6526
6520
|
}
|
|
6527
6521
|
}
|
|
6528
6522
|
if (stopPrice !== undefined) {
|
|
@@ -6711,7 +6705,7 @@ export default class binance extends Exchange {
|
|
|
6711
6705
|
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
6712
6706
|
* @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)
|
|
6713
6707
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
6714
|
-
* @param {boolean} [params.
|
|
6708
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
6715
6709
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
6716
6710
|
*/
|
|
6717
6711
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -6988,7 +6982,7 @@ export default class binance extends Exchange {
|
|
|
6988
6982
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6989
6983
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
6990
6984
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch open orders in the portfolio margin account
|
|
6991
|
-
* @param {boolean} [params.
|
|
6985
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account conditional orders
|
|
6992
6986
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
6993
6987
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
6994
6988
|
*/
|
|
@@ -7310,7 +7304,7 @@ export default class binance extends Exchange {
|
|
|
7310
7304
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7311
7305
|
* @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)
|
|
7312
7306
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
7313
|
-
* @param {boolean} [params.
|
|
7307
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
7314
7308
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
7315
7309
|
*/
|
|
7316
7310
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -7340,7 +7334,7 @@ export default class binance extends Exchange {
|
|
|
7340
7334
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7341
7335
|
* @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)
|
|
7342
7336
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
7343
|
-
* @param {boolean} [params.
|
|
7337
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
7344
7338
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
7345
7339
|
*/
|
|
7346
7340
|
async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -7370,7 +7364,7 @@ export default class binance extends Exchange {
|
|
|
7370
7364
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7371
7365
|
* @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)
|
|
7372
7366
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
7373
|
-
* @param {boolean} [params.
|
|
7367
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
7374
7368
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
7375
7369
|
*/
|
|
7376
7370
|
async fetchCanceledAndClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -7402,7 +7396,7 @@ export default class binance extends Exchange {
|
|
|
7402
7396
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
7403
7397
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7404
7398
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to cancel an order in a portfolio margin account
|
|
7405
|
-
* @param {boolean} [params.
|
|
7399
|
+
* @param {boolean} [params.trigger] set to true if you would like to cancel a portfolio margin account conditional order
|
|
7406
7400
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
7407
7401
|
*/
|
|
7408
7402
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
@@ -7507,7 +7501,7 @@ export default class binance extends Exchange {
|
|
|
7507
7501
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7508
7502
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
7509
7503
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to cancel orders in a portfolio margin account
|
|
7510
|
-
* @param {boolean} [params.
|
|
7504
|
+
* @param {boolean} [params.trigger] set to true if you would like to cancel portfolio margin account conditional orders
|
|
7511
7505
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
7512
7506
|
*/
|
|
7513
7507
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
@@ -11592,7 +11586,7 @@ export default class binance extends Exchange {
|
|
|
11592
11586
|
* @param {string} id the identification number of the ledger entry
|
|
11593
11587
|
* @param {string} code unified currency code
|
|
11594
11588
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
11595
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
11589
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
11596
11590
|
*/
|
|
11597
11591
|
async fetchLedgerEntry(id, code = undefined, params = {}) {
|
|
11598
11592
|
await this.loadMarkets();
|
|
@@ -11639,14 +11633,14 @@ export default class binance extends Exchange {
|
|
|
11639
11633
|
* @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)
|
|
11640
11634
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the ledger for a portfolio margin account
|
|
11641
11635
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
11642
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
11636
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
11643
11637
|
*/
|
|
11644
11638
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
11645
11639
|
await this.loadMarkets();
|
|
11646
11640
|
let paginate = false;
|
|
11647
11641
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
|
|
11648
11642
|
if (paginate) {
|
|
11649
|
-
return await this.fetchPaginatedCallDynamic('fetchLedger', code, since, limit, params);
|
|
11643
|
+
return await this.fetchPaginatedCallDynamic('fetchLedger', code, since, limit, params, undefined, false);
|
|
11650
11644
|
}
|
|
11651
11645
|
let type = undefined;
|
|
11652
11646
|
let subType = undefined;
|
|
@@ -12828,7 +12822,7 @@ export default class binance extends Exchange {
|
|
|
12828
12822
|
// ...
|
|
12829
12823
|
// ]
|
|
12830
12824
|
//
|
|
12831
|
-
return this.
|
|
12825
|
+
return this.parseOpenInterestsHistory(response, market, since, limit);
|
|
12832
12826
|
}
|
|
12833
12827
|
/**
|
|
12834
12828
|
* @method
|
|
@@ -12897,7 +12891,7 @@ export default class binance extends Exchange {
|
|
|
12897
12891
|
//
|
|
12898
12892
|
if (market['option']) {
|
|
12899
12893
|
symbol = market['symbol'];
|
|
12900
|
-
const result = this.
|
|
12894
|
+
const result = this.parseOpenInterestsHistory(response, market);
|
|
12901
12895
|
for (let i = 0; i < result.length; i++) {
|
|
12902
12896
|
const item = result[i];
|
|
12903
12897
|
if (item['symbol'] === symbol) {
|
package/js/src/bingx.d.ts
CHANGED
|
@@ -709,7 +709,7 @@ export default class bingx extends Exchange {
|
|
|
709
709
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
710
710
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
711
711
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
712
|
-
* @param {string} [params.
|
|
712
|
+
* @param {string} [params.triggerPrice] Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types.
|
|
713
713
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
|
714
714
|
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
715
715
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
package/js/src/bingx.js
CHANGED
|
@@ -51,6 +51,7 @@ export default class bingx extends Exchange {
|
|
|
51
51
|
'createTrailingAmountOrder': true,
|
|
52
52
|
'createTrailingPercentOrder': true,
|
|
53
53
|
'createTriggerOrder': true,
|
|
54
|
+
'editOrder': true,
|
|
54
55
|
'fetchBalance': true,
|
|
55
56
|
'fetchCanceledOrders': true,
|
|
56
57
|
'fetchClosedOrders': true,
|
|
@@ -73,6 +74,7 @@ export default class bingx extends Exchange {
|
|
|
73
74
|
'fetchMarkPrice': true,
|
|
74
75
|
'fetchMarkPrices': true,
|
|
75
76
|
'fetchMyLiquidations': true,
|
|
77
|
+
'fetchMyTrades': true,
|
|
76
78
|
'fetchOHLCV': true,
|
|
77
79
|
'fetchOpenInterest': true,
|
|
78
80
|
'fetchOpenOrders': true,
|
|
@@ -1040,7 +1042,7 @@ export default class bingx extends Exchange {
|
|
|
1040
1042
|
};
|
|
1041
1043
|
request['interval'] = this.safeString(this.timeframes, timeframe, timeframe);
|
|
1042
1044
|
if (since !== undefined) {
|
|
1043
|
-
request['startTime'] = since;
|
|
1045
|
+
request['startTime'] = Math.max(since - 1, 0);
|
|
1044
1046
|
}
|
|
1045
1047
|
if (limit !== undefined) {
|
|
1046
1048
|
request['limit'] = limit;
|
|
@@ -3611,7 +3613,6 @@ export default class bingx extends Exchange {
|
|
|
3611
3613
|
'postOnly': undefined,
|
|
3612
3614
|
'side': this.parseOrderSide(side),
|
|
3613
3615
|
'price': this.safeString2(order, 'price', 'p'),
|
|
3614
|
-
'stopPrice': triggerPrice,
|
|
3615
3616
|
'triggerPrice': triggerPrice,
|
|
3616
3617
|
'stopLossPrice': stopLossPrice,
|
|
3617
3618
|
'takeProfitPrice': takeProfitPrice,
|
|
@@ -6157,7 +6158,7 @@ export default class bingx extends Exchange {
|
|
|
6157
6158
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
6158
6159
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
6159
6160
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6160
|
-
* @param {string} [params.
|
|
6161
|
+
* @param {string} [params.triggerPrice] Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types.
|
|
6161
6162
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
|
6162
6163
|
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
6163
6164
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
package/js/src/bit2c.js
CHANGED
package/js/src/bitbank.js
CHANGED
package/js/src/bitbns.js
CHANGED
|
@@ -567,7 +567,6 @@ export default class bitbns extends Exchange {
|
|
|
567
567
|
'postOnly': undefined,
|
|
568
568
|
'side': side,
|
|
569
569
|
'price': this.safeString(order, 'rate'),
|
|
570
|
-
'stopPrice': triggerPrice,
|
|
571
570
|
'triggerPrice': triggerPrice,
|
|
572
571
|
'amount': this.safeString(order, 'btc'),
|
|
573
572
|
'cost': undefined,
|
package/js/src/bitfinex.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ export default class bitfinex extends Exchange {
|
|
|
148
148
|
* @param {float} amount the amount of currency to trade
|
|
149
149
|
* @param {float} [price] price of the order
|
|
150
150
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
151
|
-
* @param {float} [params.
|
|
151
|
+
* @param {float} [params.triggerPrice] the price that triggers a trigger order
|
|
152
152
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
153
153
|
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
154
154
|
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
@@ -369,7 +369,7 @@ export default class bitfinex extends Exchange {
|
|
|
369
369
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
370
370
|
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
371
371
|
* @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)
|
|
372
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
372
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
373
373
|
*/
|
|
374
374
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
375
375
|
/**
|
|
@@ -493,7 +493,7 @@ export default class bitfinex extends Exchange {
|
|
|
493
493
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
494
494
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
495
495
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
496
|
-
* @param {float} [params.
|
|
496
|
+
* @param {float} [params.triggerPrice] the price that triggers a trigger order
|
|
497
497
|
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
498
498
|
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
499
499
|
* @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
|
package/js/src/bitfinex.js
CHANGED
|
@@ -1512,10 +1512,10 @@ export default class bitfinex extends Exchange {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
let price = this.safeString(orderList, 16);
|
|
1515
|
-
let
|
|
1515
|
+
let triggerPrice = undefined;
|
|
1516
1516
|
if ((orderType === 'EXCHANGE STOP') || (orderType === 'EXCHANGE STOP LIMIT')) {
|
|
1517
1517
|
price = undefined;
|
|
1518
|
-
|
|
1518
|
+
triggerPrice = this.safeString(orderList, 16);
|
|
1519
1519
|
if (orderType === 'EXCHANGE STOP LIMIT') {
|
|
1520
1520
|
price = this.safeString(orderList, 19);
|
|
1521
1521
|
}
|
|
@@ -1541,8 +1541,7 @@ export default class bitfinex extends Exchange {
|
|
|
1541
1541
|
'postOnly': postOnly,
|
|
1542
1542
|
'side': side,
|
|
1543
1543
|
'price': price,
|
|
1544
|
-
'
|
|
1545
|
-
'triggerPrice': stopPrice,
|
|
1544
|
+
'triggerPrice': triggerPrice,
|
|
1546
1545
|
'amount': amount,
|
|
1547
1546
|
'cost': undefined,
|
|
1548
1547
|
'average': average,
|
|
@@ -1565,7 +1564,7 @@ export default class bitfinex extends Exchange {
|
|
|
1565
1564
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
1566
1565
|
* @param {float} [price] the price of the order, in units of the quote currency, ignored in market orders
|
|
1567
1566
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1568
|
-
* @param {float} [params.
|
|
1567
|
+
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1569
1568
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1570
1569
|
* @param {bool} [params.postOnly]
|
|
1571
1570
|
* @param {bool} [params.reduceOnly] Ensures that the executed order does not flip the opened position.
|
|
@@ -1583,7 +1582,7 @@ export default class bitfinex extends Exchange {
|
|
|
1583
1582
|
'symbol': market['id'],
|
|
1584
1583
|
'amount': amountString,
|
|
1585
1584
|
};
|
|
1586
|
-
const
|
|
1585
|
+
const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
|
|
1587
1586
|
const trailingAmount = this.safeString(params, 'trailingAmount');
|
|
1588
1587
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
1589
1588
|
const postOnlyParam = this.safeBool(params, 'postOnly', false);
|
|
@@ -1594,9 +1593,9 @@ export default class bitfinex extends Exchange {
|
|
|
1594
1593
|
orderType = 'TRAILING STOP';
|
|
1595
1594
|
request['price_trailing'] = trailingAmount;
|
|
1596
1595
|
}
|
|
1597
|
-
else if (
|
|
1598
|
-
// request['price'] is taken as
|
|
1599
|
-
request['price'] = this.priceToPrecision(symbol,
|
|
1596
|
+
else if (triggerPrice !== undefined) {
|
|
1597
|
+
// request['price'] is taken as triggerPrice for stop orders
|
|
1598
|
+
request['price'] = this.priceToPrecision(symbol, triggerPrice);
|
|
1600
1599
|
if (type === 'limit') {
|
|
1601
1600
|
orderType = 'STOP LIMIT';
|
|
1602
1601
|
request['price_aux_limit'] = this.priceToPrecision(symbol, price);
|
|
@@ -1614,7 +1613,7 @@ export default class bitfinex extends Exchange {
|
|
|
1614
1613
|
if ((ioc || fok) && (type === 'market')) {
|
|
1615
1614
|
throw new InvalidOrder(this.id + ' createOrder() does not allow market IOC and FOK orders');
|
|
1616
1615
|
}
|
|
1617
|
-
if ((type !== 'market') && (
|
|
1616
|
+
if ((type !== 'market') && (triggerPrice === undefined)) {
|
|
1618
1617
|
request['price'] = this.priceToPrecision(symbol, price);
|
|
1619
1618
|
}
|
|
1620
1619
|
if (ioc) {
|
|
@@ -1658,7 +1657,7 @@ export default class bitfinex extends Exchange {
|
|
|
1658
1657
|
* @param {float} amount the amount of currency to trade
|
|
1659
1658
|
* @param {float} [price] price of the order
|
|
1660
1659
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1661
|
-
* @param {float} [params.
|
|
1660
|
+
* @param {float} [params.triggerPrice] the price that triggers a trigger order
|
|
1662
1661
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1663
1662
|
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
1664
1663
|
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
@@ -2968,7 +2967,7 @@ export default class bitfinex extends Exchange {
|
|
|
2968
2967
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2969
2968
|
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
2970
2969
|
* @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)
|
|
2971
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
2970
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
2972
2971
|
*/
|
|
2973
2972
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2974
2973
|
await this.loadMarkets();
|
|
@@ -3360,7 +3359,7 @@ export default class bitfinex extends Exchange {
|
|
|
3360
3359
|
// ],
|
|
3361
3360
|
// ]
|
|
3362
3361
|
//
|
|
3363
|
-
return this.
|
|
3362
|
+
return this.parseOpenInterestsHistory(response, market, since, limit);
|
|
3364
3363
|
}
|
|
3365
3364
|
parseOpenInterest(interest, market = undefined) {
|
|
3366
3365
|
//
|
|
@@ -3660,7 +3659,7 @@ export default class bitfinex extends Exchange {
|
|
|
3660
3659
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
3661
3660
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
3662
3661
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3663
|
-
* @param {float} [params.
|
|
3662
|
+
* @param {float} [params.triggerPrice] the price that triggers a trigger order
|
|
3664
3663
|
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
3665
3664
|
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
3666
3665
|
* @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
|
|
@@ -3680,7 +3679,7 @@ export default class bitfinex extends Exchange {
|
|
|
3680
3679
|
amountString = (side === 'buy') ? amountString : Precise.stringNeg(amountString);
|
|
3681
3680
|
request['amount'] = amountString;
|
|
3682
3681
|
}
|
|
3683
|
-
const
|
|
3682
|
+
const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
|
|
3684
3683
|
const trailingAmount = this.safeString(params, 'trailingAmount');
|
|
3685
3684
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
3686
3685
|
const postOnlyParam = this.safeBool(params, 'postOnly', false);
|
|
@@ -3689,15 +3688,15 @@ export default class bitfinex extends Exchange {
|
|
|
3689
3688
|
if (trailingAmount !== undefined) {
|
|
3690
3689
|
request['price_trailing'] = trailingAmount;
|
|
3691
3690
|
}
|
|
3692
|
-
else if (
|
|
3693
|
-
// request['price'] is taken as
|
|
3694
|
-
request['price'] = this.priceToPrecision(symbol,
|
|
3691
|
+
else if (triggerPrice !== undefined) {
|
|
3692
|
+
// request['price'] is taken as triggerPrice for stop orders
|
|
3693
|
+
request['price'] = this.priceToPrecision(symbol, triggerPrice);
|
|
3695
3694
|
if (type === 'limit') {
|
|
3696
3695
|
request['price_aux_limit'] = this.priceToPrecision(symbol, price);
|
|
3697
3696
|
}
|
|
3698
3697
|
}
|
|
3699
3698
|
const postOnly = (postOnlyParam || (timeInForce === 'PO'));
|
|
3700
|
-
if ((type !== 'market') && (
|
|
3699
|
+
if ((type !== 'market') && (triggerPrice === undefined)) {
|
|
3701
3700
|
request['price'] = this.priceToPrecision(symbol, price);
|
|
3702
3701
|
}
|
|
3703
3702
|
// flag values may be summed to combine flags
|
package/js/src/bitfinex1.js
CHANGED
|
@@ -1274,7 +1274,6 @@ export default class bitfinex1 extends Exchange {
|
|
|
1274
1274
|
'postOnly': undefined,
|
|
1275
1275
|
'side': side,
|
|
1276
1276
|
'price': this.safeString(order, 'price'),
|
|
1277
|
-
'stopPrice': undefined,
|
|
1278
1277
|
'triggerPrice': undefined,
|
|
1279
1278
|
'average': this.safeString(order, 'avg_execution_price'),
|
|
1280
1279
|
'amount': this.safeString(order, 'original_amount'),
|
package/js/src/bitflyer.js
CHANGED
package/js/src/bitget.d.ts
CHANGED
|
@@ -513,7 +513,7 @@ export default class bitget extends Exchange {
|
|
|
513
513
|
* @param {string} [params.symbol] *contract only* unified market symbol
|
|
514
514
|
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
515
515
|
* @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)
|
|
516
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
516
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
517
517
|
*/
|
|
518
518
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
519
519
|
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|
package/js/src/bitget.js
CHANGED
|
@@ -1246,6 +1246,7 @@ export default class bitget extends Exchange {
|
|
|
1246
1246
|
'41103': InvalidOrder,
|
|
1247
1247
|
'41114': OnMaintenance,
|
|
1248
1248
|
'43011': InvalidOrder,
|
|
1249
|
+
'43001': OrderNotFound,
|
|
1249
1250
|
'43012': InsufficientFunds,
|
|
1250
1251
|
'43025': InvalidOrder,
|
|
1251
1252
|
'43115': OnMaintenance,
|
|
@@ -4245,7 +4246,6 @@ export default class bitget extends Exchange {
|
|
|
4245
4246
|
'timeInForce': timeInForce,
|
|
4246
4247
|
'postOnly': postOnly,
|
|
4247
4248
|
'reduceOnly': reduceOnly,
|
|
4248
|
-
'stopPrice': this.safeNumber(order, 'triggerPrice'),
|
|
4249
4249
|
'triggerPrice': this.safeNumber(order, 'triggerPrice'),
|
|
4250
4250
|
'takeProfitPrice': this.safeNumber2(order, 'presetStopSurplusPrice', 'stopSurplusTriggerPrice'),
|
|
4251
4251
|
'stopLossPrice': this.safeNumber2(order, 'presetStopLossPrice', 'stopLossTriggerPrice'),
|
|
@@ -6068,7 +6068,7 @@ export default class bitget extends Exchange {
|
|
|
6068
6068
|
* @param {string} [params.symbol] *contract only* unified market symbol
|
|
6069
6069
|
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
6070
6070
|
* @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)
|
|
6071
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
6071
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
6072
6072
|
*/
|
|
6073
6073
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
6074
6074
|
await this.loadMarkets();
|