ccxt 4.4.41 → 4.4.43
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 +36 -34
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +6 -1
- package/dist/cjs/src/ace.js +1 -1
- package/dist/cjs/src/alpaca.js +0 -1
- package/dist/cjs/src/ascendex.js +0 -1
- package/dist/cjs/src/base/Exchange.js +21 -16
- package/dist/cjs/src/bigone.js +0 -1
- package/dist/cjs/src/binance.js +3 -0
- package/dist/cjs/src/bingx.js +35 -12
- package/dist/cjs/src/bitfinex.js +123 -0
- package/dist/cjs/src/bitstamp.js +54 -0
- package/dist/cjs/src/blofin.js +16 -7
- package/dist/cjs/src/cex.js +1 -1
- package/dist/cjs/src/coinbase.js +8 -9
- package/dist/cjs/src/coinbaseexchange.js +5 -6
- package/dist/cjs/src/coinbaseinternational.js +7 -8
- package/dist/cjs/src/coincatch.js +0 -1
- package/dist/cjs/src/coincheck.js +0 -1
- package/dist/cjs/src/coinex.js +91 -6
- package/dist/cjs/src/coinlist.js +3 -4
- package/dist/cjs/src/coinmate.js +1 -3
- package/dist/cjs/src/coinmetro.js +4 -5
- package/dist/cjs/src/coinone.js +0 -1
- package/dist/cjs/src/coinsph.js +7 -8
- package/dist/cjs/src/cryptocom.js +3 -0
- package/dist/cjs/src/currencycom.js +3 -4
- package/dist/cjs/src/defx.js +6 -7
- package/dist/cjs/src/deribit.js +1 -3
- package/dist/cjs/src/digifinex.js +0 -1
- package/dist/cjs/src/ellipx.js +0 -2
- package/dist/cjs/src/exmo.js +1 -2
- package/dist/cjs/src/gate.js +1 -2
- package/dist/cjs/src/gemini.js +63 -6
- package/dist/cjs/src/hashkey.js +79 -83
- package/dist/cjs/src/hitbtc.js +49 -5
- package/dist/cjs/src/hollaex.js +4 -6
- package/dist/cjs/src/htx.js +1 -3
- package/dist/cjs/src/huobijp.js +0 -1
- package/dist/cjs/src/hyperliquid.js +1 -1
- package/dist/cjs/src/idex.js +8 -8
- package/dist/cjs/src/independentreserve.js +0 -1
- package/dist/cjs/src/indodax.js +0 -1
- package/dist/cjs/src/kraken.js +63 -3
- package/dist/cjs/src/krakenfutures.js +75 -3
- package/dist/cjs/src/kucoin.js +1 -3
- package/dist/cjs/src/kucoinfutures.js +10 -9
- package/dist/cjs/src/kuna.js +1 -3
- package/dist/cjs/src/latoken.js +1 -3
- package/dist/cjs/src/lbank.js +0 -1
- package/dist/cjs/src/luno.js +0 -1
- package/dist/cjs/src/lykke.js +0 -1
- package/dist/cjs/src/mercado.js +0 -1
- package/dist/cjs/src/mexc.js +3 -4
- package/dist/cjs/src/myokx.js +35 -0
- package/dist/cjs/src/ndax.js +1 -1
- package/dist/cjs/src/novadax.js +4 -6
- package/dist/cjs/src/oceanex.js +0 -1
- package/dist/cjs/src/okcoin.js +1 -3
- package/dist/cjs/src/okx.js +1 -3
- package/dist/cjs/src/onetrading.js +1 -3
- package/dist/cjs/src/p2b.js +1 -1
- package/dist/cjs/src/paradex.js +5 -7
- package/dist/cjs/src/phemex.js +15 -15
- package/dist/cjs/src/poloniex.js +1 -3
- package/dist/cjs/src/poloniexfutures.js +6 -6
- package/dist/cjs/src/pro/myokx.js +24 -0
- package/dist/cjs/src/probit.js +0 -1
- package/dist/cjs/src/timex.js +0 -1
- package/dist/cjs/src/tokocrypto.js +11 -14
- package/dist/cjs/src/tradeogre.js +1 -1
- package/dist/cjs/src/upbit.js +0 -1
- package/dist/cjs/src/vertex.js +69 -4
- package/dist/cjs/src/wavesexchange.js +4 -5
- package/dist/cjs/src/whitebit.js +8 -9
- package/dist/cjs/src/woo.js +101 -15
- package/dist/cjs/src/woofipro.js +96 -15
- package/dist/cjs/src/xt.js +3 -2
- package/dist/cjs/src/yobit.js +0 -1
- package/dist/cjs/src/zaif.js +0 -1
- package/dist/cjs/src/zonda.js +1 -2
- package/js/ccxt.d.ts +8 -2
- package/js/ccxt.js +6 -2
- package/js/src/abstract/binance.d.ts +3 -0
- package/js/src/abstract/binancecoinm.d.ts +3 -0
- package/js/src/abstract/binanceus.d.ts +3 -0
- package/js/src/abstract/binanceusdm.d.ts +3 -0
- package/js/src/abstract/bingx.d.ts +4 -0
- package/js/src/abstract/bitstamp.d.ts +1 -0
- package/js/src/abstract/myokx.d.ts +343 -0
- package/js/src/abstract/myokx.js +11 -0
- package/js/src/ace.js +1 -1
- package/js/src/alpaca.js +0 -1
- package/js/src/ascendex.js +0 -1
- package/js/src/base/Exchange.d.ts +6 -6
- package/js/src/base/Exchange.js +21 -16
- package/js/src/bigone.js +0 -1
- package/js/src/binance.js +3 -0
- package/js/src/bingx.js +35 -12
- package/js/src/bitfinex.d.ts +11 -1
- package/js/src/bitfinex.js +123 -0
- package/js/src/bitstamp.js +54 -0
- package/js/src/blofin.d.ts +1 -1
- package/js/src/blofin.js +16 -7
- package/js/src/cex.js +1 -1
- package/js/src/coinbase.js +8 -9
- package/js/src/coinbaseexchange.js +5 -6
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/coinbaseinternational.js +7 -8
- package/js/src/coincatch.js +0 -1
- package/js/src/coincheck.js +0 -1
- package/js/src/coinex.js +91 -6
- package/js/src/coinlist.js +3 -4
- package/js/src/coinmate.js +1 -3
- package/js/src/coinmetro.js +4 -5
- package/js/src/coinone.js +0 -1
- package/js/src/coinsph.js +7 -8
- package/js/src/cryptocom.js +3 -0
- package/js/src/currencycom.js +3 -4
- package/js/src/defx.js +6 -7
- package/js/src/deribit.js +1 -3
- package/js/src/digifinex.js +0 -1
- package/js/src/ellipx.js +0 -2
- package/js/src/exmo.d.ts +1 -1
- package/js/src/exmo.js +1 -2
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +1 -2
- package/js/src/gemini.js +63 -6
- package/js/src/hashkey.js +79 -83
- package/js/src/hitbtc.d.ts +11 -1
- package/js/src/hitbtc.js +49 -5
- package/js/src/hollaex.js +4 -6
- package/js/src/htx.js +1 -3
- package/js/src/huobijp.js +0 -1
- package/js/src/hyperliquid.js +1 -1
- package/js/src/idex.js +8 -8
- package/js/src/independentreserve.js +0 -1
- package/js/src/indodax.js +0 -1
- package/js/src/kraken.d.ts +2 -2
- package/js/src/kraken.js +63 -3
- package/js/src/krakenfutures.d.ts +2 -2
- package/js/src/krakenfutures.js +75 -3
- package/js/src/kucoin.js +1 -3
- package/js/src/kucoinfutures.d.ts +5 -4
- package/js/src/kucoinfutures.js +10 -9
- package/js/src/kuna.js +1 -3
- package/js/src/latoken.js +1 -3
- package/js/src/lbank.js +0 -1
- package/js/src/luno.js +0 -1
- package/js/src/lykke.js +0 -1
- package/js/src/mercado.js +0 -1
- package/js/src/mexc.js +3 -4
- package/js/src/myokx.d.ts +4 -0
- package/js/src/myokx.js +36 -0
- package/js/src/ndax.js +1 -1
- package/js/src/novadax.js +4 -6
- package/js/src/oceanex.js +0 -1
- package/js/src/okcoin.js +1 -3
- package/js/src/okx.js +1 -3
- package/js/src/onetrading.js +1 -3
- package/js/src/p2b.js +1 -1
- package/js/src/paradex.d.ts +1 -1
- package/js/src/paradex.js +5 -7
- package/js/src/phemex.d.ts +1 -0
- package/js/src/phemex.js +15 -15
- package/js/src/poloniex.js +1 -3
- package/js/src/poloniexfutures.js +6 -6
- package/js/src/pro/myokx.d.ts +4 -0
- package/js/src/pro/myokx.js +25 -0
- package/js/src/probit.js +0 -1
- package/js/src/timex.js +0 -1
- package/js/src/tokocrypto.js +11 -14
- package/js/src/tradeogre.js +1 -1
- package/js/src/upbit.js +0 -1
- package/js/src/vertex.d.ts +11 -1
- package/js/src/vertex.js +69 -4
- package/js/src/wavesexchange.d.ts +1 -1
- package/js/src/wavesexchange.js +4 -5
- package/js/src/whitebit.js +8 -9
- package/js/src/woo.d.ts +1 -1
- package/js/src/woo.js +101 -15
- package/js/src/woofipro.js +96 -15
- package/js/src/xt.d.ts +2 -1
- package/js/src/xt.js +3 -2
- package/js/src/yobit.js +0 -1
- package/js/src/zaif.js +0 -1
- package/js/src/zonda.js +1 -2
- package/package.json +15 -8
package/js/src/hitbtc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/hitbtc.js';
|
|
2
|
-
import type { TransferEntry, Int, OrderSide, OrderType, FundingRateHistory, OHLCV, Ticker, Order, OrderBook, Dict, Position, Str, Trade, Balances, Transaction, MarginMode, Tickers, Strings, Market, Currency, MarginModes, Leverage, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Dictionary, int, FundingRate, FundingRates, DepositAddress } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Int, OrderSide, OrderType, FundingRateHistory, OHLCV, Ticker, Order, OrderBook, Dict, Position, Str, Trade, Balances, Transaction, MarginMode, Tickers, Strings, Market, Currency, MarginModes, Leverage, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Dictionary, int, FundingRate, FundingRates, DepositAddress, OpenInterests } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class hitbtc
|
|
5
5
|
* @augments Exchange
|
|
@@ -443,6 +443,16 @@ export default class hitbtc extends Exchange {
|
|
|
443
443
|
fetchPosition(symbol: string, params?: {}): Promise<Position>;
|
|
444
444
|
parsePosition(position: Dict, market?: Market): Position;
|
|
445
445
|
parseOpenInterest(interest: any, market?: Market): import("./base/types.js").OpenInterest;
|
|
446
|
+
/**
|
|
447
|
+
* @method
|
|
448
|
+
* @name hitbtc#fetchOpenInterests
|
|
449
|
+
* @description Retrieves the open interest for a list of symbols
|
|
450
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
451
|
+
* @param {string[]} [symbols] a list of unified CCXT market symbols
|
|
452
|
+
* @param {object} [params] exchange specific parameters
|
|
453
|
+
* @returns {object[]} a list of [open interest structures]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
454
|
+
*/
|
|
455
|
+
fetchOpenInterests(symbols?: Strings, params?: {}): Promise<OpenInterests>;
|
|
446
456
|
/**
|
|
447
457
|
* @method
|
|
448
458
|
* @name hitbtc#fetchOpenInterest
|
package/js/src/hitbtc.js
CHANGED
|
@@ -78,6 +78,7 @@ export default class hitbtc extends Exchange {
|
|
|
78
78
|
'fetchOHLCV': true,
|
|
79
79
|
'fetchOpenInterest': true,
|
|
80
80
|
'fetchOpenInterestHistory': false,
|
|
81
|
+
'fetchOpenInterests': true,
|
|
81
82
|
'fetchOpenOrder': true,
|
|
82
83
|
'fetchOpenOrders': true,
|
|
83
84
|
'fetchOrder': true,
|
|
@@ -2377,7 +2378,7 @@ export default class hitbtc extends Exchange {
|
|
|
2377
2378
|
}
|
|
2378
2379
|
}
|
|
2379
2380
|
else if ((type === 'stopLimit') || (type === 'stopMarket') || (type === 'takeProfitLimit') || (type === 'takeProfitMarket')) {
|
|
2380
|
-
throw new ExchangeError(this.id + ' createOrder() requires a
|
|
2381
|
+
throw new ExchangeError(this.id + ' createOrder() requires a triggerPrice parameter for stop-loss and take-profit orders');
|
|
2381
2382
|
}
|
|
2382
2383
|
params = this.omit(params, ['triggerPrice', 'timeInForce', 'stopPrice', 'stop_price', 'reduceOnly', 'postOnly']);
|
|
2383
2384
|
if (marketType === 'swap') {
|
|
@@ -2490,7 +2491,6 @@ export default class hitbtc extends Exchange {
|
|
|
2490
2491
|
const postOnly = this.safeValue(order, 'post_only');
|
|
2491
2492
|
const timeInForce = this.safeString(order, 'time_in_force');
|
|
2492
2493
|
const rawTrades = this.safeValue(order, 'trades');
|
|
2493
|
-
const stopPrice = this.safeString(order, 'stop_price');
|
|
2494
2494
|
return this.safeOrder({
|
|
2495
2495
|
'info': order,
|
|
2496
2496
|
'id': id,
|
|
@@ -2514,8 +2514,7 @@ export default class hitbtc extends Exchange {
|
|
|
2514
2514
|
'average': average,
|
|
2515
2515
|
'trades': rawTrades,
|
|
2516
2516
|
'fee': undefined,
|
|
2517
|
-
'
|
|
2518
|
-
'triggerPrice': stopPrice,
|
|
2517
|
+
'triggerPrice': this.safeString(order, 'stop_price'),
|
|
2519
2518
|
'takeProfitPrice': undefined,
|
|
2520
2519
|
'stopLossPrice': undefined,
|
|
2521
2520
|
}, market);
|
|
@@ -3116,7 +3115,7 @@ export default class hitbtc extends Exchange {
|
|
|
3116
3115
|
const datetime = this.safeString(interest, 'timestamp');
|
|
3117
3116
|
const value = this.safeNumber(interest, 'open_interest');
|
|
3118
3117
|
return this.safeOpenInterest({
|
|
3119
|
-
'symbol': market
|
|
3118
|
+
'symbol': this.safeSymbol(undefined, market),
|
|
3120
3119
|
'openInterestAmount': undefined,
|
|
3121
3120
|
'openInterestValue': value,
|
|
3122
3121
|
'timestamp': this.parse8601(datetime),
|
|
@@ -3124,6 +3123,51 @@ export default class hitbtc extends Exchange {
|
|
|
3124
3123
|
'info': interest,
|
|
3125
3124
|
}, market);
|
|
3126
3125
|
}
|
|
3126
|
+
/**
|
|
3127
|
+
* @method
|
|
3128
|
+
* @name hitbtc#fetchOpenInterests
|
|
3129
|
+
* @description Retrieves the open interest for a list of symbols
|
|
3130
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
3131
|
+
* @param {string[]} [symbols] a list of unified CCXT market symbols
|
|
3132
|
+
* @param {object} [params] exchange specific parameters
|
|
3133
|
+
* @returns {object[]} a list of [open interest structures]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
3134
|
+
*/
|
|
3135
|
+
async fetchOpenInterests(symbols = undefined, params = {}) {
|
|
3136
|
+
await this.loadMarkets();
|
|
3137
|
+
const request = {};
|
|
3138
|
+
symbols = this.marketSymbols(symbols);
|
|
3139
|
+
let marketIds = undefined;
|
|
3140
|
+
if (symbols !== undefined) {
|
|
3141
|
+
marketIds = this.marketIds(symbols);
|
|
3142
|
+
request['symbols'] = marketIds.join(',');
|
|
3143
|
+
}
|
|
3144
|
+
const response = await this.publicGetPublicFuturesInfo(this.extend(request, params));
|
|
3145
|
+
//
|
|
3146
|
+
// {
|
|
3147
|
+
// "BTCUSDT_PERP": {
|
|
3148
|
+
// "contract_type": "perpetual",
|
|
3149
|
+
// "mark_price": "97291.83",
|
|
3150
|
+
// "index_price": "97298.61",
|
|
3151
|
+
// "funding_rate": "-0.000183473092423284",
|
|
3152
|
+
// "open_interest": "94.1503",
|
|
3153
|
+
// "next_funding_time": "2024-12-20T08:00:00.000Z",
|
|
3154
|
+
// "indicative_funding_rate": "-0.00027495203277752",
|
|
3155
|
+
// "premium_index": "-0.000789474900583786",
|
|
3156
|
+
// "avg_premium_index": "-0.000683473092423284",
|
|
3157
|
+
// "interest_rate": "0.0001",
|
|
3158
|
+
// "timestamp": "2024-12-20T04:57:33.693Z"
|
|
3159
|
+
// }
|
|
3160
|
+
// }
|
|
3161
|
+
//
|
|
3162
|
+
const results = [];
|
|
3163
|
+
const markets = Object.keys(response);
|
|
3164
|
+
for (let i = 0; i < markets.length; i++) {
|
|
3165
|
+
const marketId = markets[i];
|
|
3166
|
+
const marketInner = this.safeMarket(marketId);
|
|
3167
|
+
results.push(this.parseOpenInterest(response[marketId], marketInner));
|
|
3168
|
+
}
|
|
3169
|
+
return this.filterByArray(results, 'symbol', symbols);
|
|
3170
|
+
}
|
|
3127
3171
|
/**
|
|
3128
3172
|
* @method
|
|
3129
3173
|
* @name hitbtc#fetchOpenInterest
|
package/js/src/hollaex.js
CHANGED
|
@@ -1109,7 +1109,6 @@ export default class hollaex extends Exchange {
|
|
|
1109
1109
|
const type = this.safeString(order, 'type');
|
|
1110
1110
|
const side = this.safeString(order, 'side');
|
|
1111
1111
|
const price = this.safeString(order, 'price');
|
|
1112
|
-
const stopPrice = this.safeString(order, 'stop');
|
|
1113
1112
|
const amount = this.safeString(order, 'size');
|
|
1114
1113
|
const filled = this.safeString(order, 'filled');
|
|
1115
1114
|
const status = this.parseOrderStatus(this.safeString(order, 'status'));
|
|
@@ -1128,8 +1127,7 @@ export default class hollaex extends Exchange {
|
|
|
1128
1127
|
'postOnly': postOnly,
|
|
1129
1128
|
'side': side,
|
|
1130
1129
|
'price': price,
|
|
1131
|
-
'
|
|
1132
|
-
'triggerPrice': stopPrice,
|
|
1130
|
+
'triggerPrice': this.safeString(order, 'stop'),
|
|
1133
1131
|
'amount': amount,
|
|
1134
1132
|
'filled': filled,
|
|
1135
1133
|
'remaining': undefined,
|
|
@@ -1167,7 +1165,7 @@ export default class hollaex extends Exchange {
|
|
|
1167
1165
|
// 'stop': parseFloat (this.priceToPrecision (symbol, stopPrice)),
|
|
1168
1166
|
// 'meta': {}, // other options such as post_only
|
|
1169
1167
|
};
|
|
1170
|
-
const
|
|
1168
|
+
const triggerPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'stop']);
|
|
1171
1169
|
const meta = this.safeValue(params, 'meta', {});
|
|
1172
1170
|
const exchangeSpecificParam = this.safeBool(meta, 'post_only', false);
|
|
1173
1171
|
const isMarketOrder = type === 'market';
|
|
@@ -1176,8 +1174,8 @@ export default class hollaex extends Exchange {
|
|
|
1176
1174
|
const convertedPrice = parseFloat(this.priceToPrecision(symbol, price));
|
|
1177
1175
|
request['price'] = this.normalizeNumberIfNeeded(convertedPrice);
|
|
1178
1176
|
}
|
|
1179
|
-
if (
|
|
1180
|
-
request['stop'] = this.normalizeNumberIfNeeded(parseFloat(this.priceToPrecision(symbol,
|
|
1177
|
+
if (triggerPrice !== undefined) {
|
|
1178
|
+
request['stop'] = this.normalizeNumberIfNeeded(parseFloat(this.priceToPrecision(symbol, triggerPrice)));
|
|
1181
1179
|
}
|
|
1182
1180
|
if (postOnly) {
|
|
1183
1181
|
request['meta'] = { 'post_only': true };
|
package/js/src/htx.js
CHANGED
|
@@ -5265,7 +5265,6 @@ export default class htx extends Exchange {
|
|
|
5265
5265
|
'currency': feeCurrency,
|
|
5266
5266
|
};
|
|
5267
5267
|
}
|
|
5268
|
-
const stopPrice = this.safeString2(order, 'stop-price', 'trigger_price');
|
|
5269
5268
|
const average = this.safeString(order, 'trade_avg_price');
|
|
5270
5269
|
const trades = this.safeValue(order, 'trades');
|
|
5271
5270
|
const reduceOnlyInteger = this.safeInteger(order, 'reduce_only');
|
|
@@ -5286,8 +5285,7 @@ export default class htx extends Exchange {
|
|
|
5286
5285
|
'postOnly': undefined,
|
|
5287
5286
|
'side': side,
|
|
5288
5287
|
'price': price,
|
|
5289
|
-
'
|
|
5290
|
-
'triggerPrice': stopPrice,
|
|
5288
|
+
'triggerPrice': this.safeString2(order, 'stop-price', 'trigger_price'),
|
|
5291
5289
|
'average': average,
|
|
5292
5290
|
'cost': cost,
|
|
5293
5291
|
'amount': amount,
|
package/js/src/huobijp.js
CHANGED
package/js/src/hyperliquid.js
CHANGED
package/js/src/idex.js
CHANGED
|
@@ -1123,7 +1123,6 @@ export default class idex extends Exchange {
|
|
|
1123
1123
|
'postOnly': undefined,
|
|
1124
1124
|
'side': side,
|
|
1125
1125
|
'price': price,
|
|
1126
|
-
'stopPrice': undefined,
|
|
1127
1126
|
'triggerPrice': undefined,
|
|
1128
1127
|
'amount': amount,
|
|
1129
1128
|
'cost': undefined,
|
|
@@ -1188,12 +1187,13 @@ export default class idex extends Exchange {
|
|
|
1188
1187
|
'takeProfit': 5,
|
|
1189
1188
|
'takeProfitLimit': 6,
|
|
1190
1189
|
};
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1190
|
+
const triggerPrice = this.safeString(params, 'triggerPrice', 'stopPrice');
|
|
1191
|
+
let triggerPriceString = undefined;
|
|
1192
|
+
if ((type === 'stopLossLimit') || (type === 'takeProfitLimit')) {
|
|
1193
|
+
if (triggerPrice === undefined) {
|
|
1194
|
+
throw new BadRequest(this.id + ' createOrder() triggerPrice is a required parameter for ' + type + 'orders');
|
|
1195
1195
|
}
|
|
1196
|
-
|
|
1196
|
+
triggerPriceString = this.priceToPrecision(symbol, triggerPrice);
|
|
1197
1197
|
}
|
|
1198
1198
|
const limitTypeEnums = {
|
|
1199
1199
|
'limit': 1,
|
|
@@ -1283,7 +1283,7 @@ export default class idex extends Exchange {
|
|
|
1283
1283
|
byteArray.push(encodedPrice);
|
|
1284
1284
|
}
|
|
1285
1285
|
if (type in stopLossTypeEnums) {
|
|
1286
|
-
const encodedPrice = this.encode(
|
|
1286
|
+
const encodedPrice = this.encode(triggerPriceString || priceString);
|
|
1287
1287
|
byteArray.push(encodedPrice);
|
|
1288
1288
|
}
|
|
1289
1289
|
const clientOrderId = this.safeString(params, 'clientOrderId');
|
|
@@ -1317,7 +1317,7 @@ export default class idex extends Exchange {
|
|
|
1317
1317
|
request['parameters']['price'] = priceString;
|
|
1318
1318
|
}
|
|
1319
1319
|
if (type in stopLossTypeEnums) {
|
|
1320
|
-
request['parameters']['stopPrice'] =
|
|
1320
|
+
request['parameters']['stopPrice'] = triggerPriceString || priceString;
|
|
1321
1321
|
}
|
|
1322
1322
|
if (amountEnum === 0) {
|
|
1323
1323
|
request['parameters']['quantity'] = amountString;
|
|
@@ -457,7 +457,6 @@ export default class independentreserve extends Exchange {
|
|
|
457
457
|
'postOnly': undefined,
|
|
458
458
|
'side': side,
|
|
459
459
|
'price': this.safeString(order, 'Price'),
|
|
460
|
-
'stopPrice': undefined,
|
|
461
460
|
'triggerPrice': undefined,
|
|
462
461
|
'cost': this.safeString(order, 'Value'),
|
|
463
462
|
'average': this.safeString(order, 'AvgPrice'),
|
package/js/src/indodax.js
CHANGED
package/js/src/kraken.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ export default class kraken extends Exchange {
|
|
|
99
99
|
* @method
|
|
100
100
|
* @name kraken#fetchOHLCV
|
|
101
101
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
102
|
-
* @see https://docs.kraken.com/rest
|
|
102
|
+
* @see https://docs.kraken.com/api/docs/rest-api/get-ohlc-data
|
|
103
103
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
104
104
|
* @param {string} timeframe the length of time each candle represents
|
|
105
105
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -266,7 +266,7 @@ export default class kraken extends Exchange {
|
|
|
266
266
|
* @method
|
|
267
267
|
* @name kraken#fetchMyTrades
|
|
268
268
|
* @description fetch all trades made by the user
|
|
269
|
-
* @see https://docs.kraken.com/rest
|
|
269
|
+
* @see https://docs.kraken.com/api/docs/rest-api/get-trade-history
|
|
270
270
|
* @param {string} symbol unified market symbol
|
|
271
271
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
272
272
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
package/js/src/kraken.js
CHANGED
|
@@ -430,6 +430,67 @@ export default class kraken extends Exchange {
|
|
|
430
430
|
'Celestia': 'TIA',
|
|
431
431
|
},
|
|
432
432
|
},
|
|
433
|
+
'features': {
|
|
434
|
+
'spot': {
|
|
435
|
+
'sandbox': false,
|
|
436
|
+
'createOrder': {
|
|
437
|
+
'marginMode': false,
|
|
438
|
+
'triggerPrice': false,
|
|
439
|
+
'triggerPriceType': undefined,
|
|
440
|
+
'triggerDirection': false,
|
|
441
|
+
'stopLossPrice': true,
|
|
442
|
+
'takeProfitPrice': true,
|
|
443
|
+
'attachedStopLossTakeProfit': undefined,
|
|
444
|
+
'timeInForce': {
|
|
445
|
+
'IOC': true,
|
|
446
|
+
'FOK': true,
|
|
447
|
+
'PO': true,
|
|
448
|
+
'GTD': false,
|
|
449
|
+
},
|
|
450
|
+
'hedged': false,
|
|
451
|
+
'trailing': true,
|
|
452
|
+
},
|
|
453
|
+
'createOrders': undefined,
|
|
454
|
+
'fetchMyTrades': {
|
|
455
|
+
'marginMode': false,
|
|
456
|
+
'limit': undefined,
|
|
457
|
+
'daysBack': undefined,
|
|
458
|
+
'untilDays': undefined,
|
|
459
|
+
},
|
|
460
|
+
'fetchOrder': {
|
|
461
|
+
'marginMode': false,
|
|
462
|
+
'trigger': false,
|
|
463
|
+
'trailing': false,
|
|
464
|
+
},
|
|
465
|
+
'fetchOpenOrders': {
|
|
466
|
+
'marginMode': false,
|
|
467
|
+
'limit': undefined,
|
|
468
|
+
'trigger': false,
|
|
469
|
+
'trailing': false,
|
|
470
|
+
},
|
|
471
|
+
'fetchOrders': undefined,
|
|
472
|
+
'fetchClosedOrders': {
|
|
473
|
+
'marginMode': false,
|
|
474
|
+
'limit': undefined,
|
|
475
|
+
'daysBackClosed': undefined,
|
|
476
|
+
'daysBackCanceled': undefined,
|
|
477
|
+
'untilDays': 100000,
|
|
478
|
+
'trigger': false,
|
|
479
|
+
'trailing': false,
|
|
480
|
+
},
|
|
481
|
+
'fetchOHLCV': {
|
|
482
|
+
'limit': 720,
|
|
483
|
+
},
|
|
484
|
+
},
|
|
485
|
+
'swap': {
|
|
486
|
+
'linear': undefined,
|
|
487
|
+
'inverse': undefined,
|
|
488
|
+
},
|
|
489
|
+
'future': {
|
|
490
|
+
'linear': undefined,
|
|
491
|
+
'inverse': undefined,
|
|
492
|
+
},
|
|
493
|
+
},
|
|
433
494
|
'precisionMode': TICK_SIZE,
|
|
434
495
|
'exceptions': {
|
|
435
496
|
'exact': {
|
|
@@ -1011,7 +1072,7 @@ export default class kraken extends Exchange {
|
|
|
1011
1072
|
* @method
|
|
1012
1073
|
* @name kraken#fetchOHLCV
|
|
1013
1074
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1014
|
-
* @see https://docs.kraken.com/rest
|
|
1075
|
+
* @see https://docs.kraken.com/api/docs/rest-api/get-ohlc-data
|
|
1015
1076
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1016
1077
|
* @param {string} timeframe the length of time each candle represents
|
|
1017
1078
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -1836,7 +1897,6 @@ export default class kraken extends Exchange {
|
|
|
1836
1897
|
'postOnly': isPostOnly,
|
|
1837
1898
|
'side': side,
|
|
1838
1899
|
'price': price,
|
|
1839
|
-
'stopPrice': triggerPrice,
|
|
1840
1900
|
'triggerPrice': triggerPrice,
|
|
1841
1901
|
'takeProfitPrice': takeProfitPrice,
|
|
1842
1902
|
'stopLossPrice': stopLossPrice,
|
|
@@ -2235,7 +2295,7 @@ export default class kraken extends Exchange {
|
|
|
2235
2295
|
* @method
|
|
2236
2296
|
* @name kraken#fetchMyTrades
|
|
2237
2297
|
* @description fetch all trades made by the user
|
|
2238
|
-
* @see https://docs.kraken.com/rest
|
|
2298
|
+
* @see https://docs.kraken.com/api/docs/rest-api/get-trade-history
|
|
2239
2299
|
* @param {string} symbol unified market symbol
|
|
2240
2300
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2241
2301
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -74,7 +74,7 @@ export default class krakenfutures extends Exchange {
|
|
|
74
74
|
* @method
|
|
75
75
|
* @name krakenfutures#createOrder
|
|
76
76
|
* @description Create an order on the exchange
|
|
77
|
-
* @see https://docs.
|
|
77
|
+
* @see https://docs.kraken.com/api/docs/futures-api/trading/send-order
|
|
78
78
|
* @param {string} symbol unified market symbol
|
|
79
79
|
* @param {string} type 'limit' or 'market'
|
|
80
80
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -95,7 +95,7 @@ export default class krakenfutures extends Exchange {
|
|
|
95
95
|
* @method
|
|
96
96
|
* @name krakenfutures#createOrders
|
|
97
97
|
* @description create a list of trade orders
|
|
98
|
-
* @see https://docs.
|
|
98
|
+
* @see https://docs.kraken.com/api/docs/futures-api/trading/send-batch-order
|
|
99
99
|
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
100
100
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
101
101
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/js/src/krakenfutures.js
CHANGED
|
@@ -264,6 +264,78 @@ export default class krakenfutures extends Exchange {
|
|
|
264
264
|
'method': 'historyGetMarketSymbolExecutions', // historyGetMarketSymbolExecutions, publicGetHistory
|
|
265
265
|
},
|
|
266
266
|
},
|
|
267
|
+
'features': {
|
|
268
|
+
'default': {
|
|
269
|
+
'sandbox': true,
|
|
270
|
+
'createOrder': {
|
|
271
|
+
'marginMode': false,
|
|
272
|
+
'triggerPrice': true,
|
|
273
|
+
'triggerPriceType': {
|
|
274
|
+
'last': true,
|
|
275
|
+
'mark': true,
|
|
276
|
+
'index': true,
|
|
277
|
+
},
|
|
278
|
+
'triggerDirection': false,
|
|
279
|
+
'stopLossPrice': true,
|
|
280
|
+
'takeProfitPrice': true,
|
|
281
|
+
'attachedStopLossTakeProfit': undefined,
|
|
282
|
+
'timeInForce': {
|
|
283
|
+
'IOC': true,
|
|
284
|
+
'FOK': true,
|
|
285
|
+
'PO': true,
|
|
286
|
+
'GTD': false,
|
|
287
|
+
},
|
|
288
|
+
'hedged': false,
|
|
289
|
+
'trailing': false,
|
|
290
|
+
},
|
|
291
|
+
'createOrders': {
|
|
292
|
+
'max': 100,
|
|
293
|
+
},
|
|
294
|
+
'fetchMyTrades': {
|
|
295
|
+
'marginMode': false,
|
|
296
|
+
'limit': undefined,
|
|
297
|
+
'daysBack': undefined,
|
|
298
|
+
'untilDays': 100000,
|
|
299
|
+
},
|
|
300
|
+
'fetchOrder': undefined,
|
|
301
|
+
'fetchOpenOrders': {
|
|
302
|
+
'marginMode': false,
|
|
303
|
+
'limit': undefined,
|
|
304
|
+
'trigger': false,
|
|
305
|
+
'trailing': false,
|
|
306
|
+
},
|
|
307
|
+
'fetchOrders': undefined,
|
|
308
|
+
'fetchClosedOrders': {
|
|
309
|
+
'marginMode': false,
|
|
310
|
+
'limit': undefined,
|
|
311
|
+
'daysBackClosed': undefined,
|
|
312
|
+
'daysBackCanceled': undefined,
|
|
313
|
+
'untilDays': undefined,
|
|
314
|
+
'trigger': false,
|
|
315
|
+
'trailing': false,
|
|
316
|
+
},
|
|
317
|
+
'fetchOHLCV': {
|
|
318
|
+
'limit': 5000,
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
'spot': undefined,
|
|
322
|
+
'swap': {
|
|
323
|
+
'linear': {
|
|
324
|
+
'extends': 'default',
|
|
325
|
+
},
|
|
326
|
+
'inverse': {
|
|
327
|
+
'extends': 'default',
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
'future': {
|
|
331
|
+
'linear': {
|
|
332
|
+
'extends': 'default',
|
|
333
|
+
},
|
|
334
|
+
'inverse': {
|
|
335
|
+
'extends': 'default',
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
},
|
|
267
339
|
'timeframes': {
|
|
268
340
|
'1m': '1m',
|
|
269
341
|
'5m': '5m',
|
|
@@ -1044,7 +1116,7 @@ export default class krakenfutures extends Exchange {
|
|
|
1044
1116
|
* @method
|
|
1045
1117
|
* @name krakenfutures#createOrder
|
|
1046
1118
|
* @description Create an order on the exchange
|
|
1047
|
-
* @see https://docs.
|
|
1119
|
+
* @see https://docs.kraken.com/api/docs/futures-api/trading/send-order
|
|
1048
1120
|
* @param {string} symbol unified market symbol
|
|
1049
1121
|
* @param {string} type 'limit' or 'market'
|
|
1050
1122
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -1104,7 +1176,7 @@ export default class krakenfutures extends Exchange {
|
|
|
1104
1176
|
* @method
|
|
1105
1177
|
* @name krakenfutures#createOrders
|
|
1106
1178
|
* @description create a list of trade orders
|
|
1107
|
-
* @see https://docs.
|
|
1179
|
+
* @see https://docs.kraken.com/api/docs/futures-api/trading/send-batch-order
|
|
1108
1180
|
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
1109
1181
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1110
1182
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -1891,7 +1963,6 @@ export default class krakenfutures extends Exchange {
|
|
|
1891
1963
|
'reduceOnly': this.safeBool2(details, 'reduceOnly', 'reduce_only'),
|
|
1892
1964
|
'side': this.safeString(details, 'side'),
|
|
1893
1965
|
'price': price,
|
|
1894
|
-
'stopPrice': this.safeString(details, 'triggerPrice'),
|
|
1895
1966
|
'triggerPrice': this.safeString(details, 'triggerPrice'),
|
|
1896
1967
|
'amount': amount,
|
|
1897
1968
|
'cost': cost,
|
|
@@ -1922,6 +1993,7 @@ export default class krakenfutures extends Exchange {
|
|
|
1922
1993
|
if (symbol !== undefined) {
|
|
1923
1994
|
market = this.market(symbol);
|
|
1924
1995
|
}
|
|
1996
|
+
// todo: lastFillTime: this.iso8601(end)
|
|
1925
1997
|
const response = await this.privateGetFills(params);
|
|
1926
1998
|
//
|
|
1927
1999
|
// {
|
package/js/src/kucoin.js
CHANGED
|
@@ -3159,7 +3159,6 @@ export default class kucoin extends Exchange {
|
|
|
3159
3159
|
if (responseStatus === 'fail') {
|
|
3160
3160
|
status = 'rejected';
|
|
3161
3161
|
}
|
|
3162
|
-
const stopPrice = this.safeNumber(order, 'stopPrice');
|
|
3163
3162
|
return this.safeOrder({
|
|
3164
3163
|
'info': order,
|
|
3165
3164
|
'id': this.safeStringN(order, ['id', 'orderId', 'newOrderId', 'cancelledOrderId']),
|
|
@@ -3171,8 +3170,7 @@ export default class kucoin extends Exchange {
|
|
|
3171
3170
|
'side': this.safeString(order, 'side'),
|
|
3172
3171
|
'amount': this.safeString(order, 'size'),
|
|
3173
3172
|
'price': this.safeString(order, 'price'),
|
|
3174
|
-
'
|
|
3175
|
-
'triggerPrice': stopPrice,
|
|
3173
|
+
'triggerPrice': this.safeNumber(order, 'stopPrice'),
|
|
3176
3174
|
'cost': this.safeString(order, 'dealFunds'),
|
|
3177
3175
|
'filled': this.safeString(order, 'dealSize'),
|
|
3178
3176
|
'remaining': undefined,
|
|
@@ -175,8 +175,8 @@ export default class kucoinfutures extends kucoin {
|
|
|
175
175
|
* @param {float} amount the amount of currency to trade
|
|
176
176
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
177
177
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
178
|
-
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
|
179
|
-
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
|
178
|
+
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType
|
|
179
|
+
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType
|
|
180
180
|
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
181
181
|
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
182
182
|
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
@@ -188,8 +188,9 @@ export default class kucoinfutures extends kucoin {
|
|
|
188
188
|
* @param {float} [params.leverage] Leverage size of the order (mandatory param in request, default is 1)
|
|
189
189
|
* @param {string} [params.clientOid] client order id, defaults to uuid if not passed
|
|
190
190
|
* @param {string} [params.remark] remark for the order, length cannot exceed 100 utf8 characters
|
|
191
|
-
* @param {string} [params.stop] 'up' or 'down', the direction the
|
|
192
|
-
* @param {string} [params.
|
|
191
|
+
* @param {string} [params.stop] 'up' or 'down', the direction the triggerPrice is triggered from, requires triggerPrice. down: Triggers when the price reaches or goes below the triggerPrice. up: Triggers when the price reaches or goes above the triggerPrice.
|
|
192
|
+
* @param {string} [params.triggerPriceType] "last", "mark", "index" - defaults to "mark"
|
|
193
|
+
* @param {string} [params.stopPriceType] exchange-specific alternative for triggerPriceType: TP, IP or MP
|
|
193
194
|
* @param {bool} [params.closeOrder] set to true to close position
|
|
194
195
|
* @param {bool} [params.test] set to true to use the test order endpoint (does not submit order, use to validate params)
|
|
195
196
|
* @param {bool} [params.forceHold] A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default.
|
package/js/src/kucoinfutures.js
CHANGED
|
@@ -1522,8 +1522,8 @@ export default class kucoinfutures extends kucoin {
|
|
|
1522
1522
|
* @param {float} amount the amount of currency to trade
|
|
1523
1523
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1524
1524
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1525
|
-
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
|
1526
|
-
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
|
1525
|
+
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType
|
|
1526
|
+
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType
|
|
1527
1527
|
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
1528
1528
|
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
1529
1529
|
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
@@ -1535,8 +1535,9 @@ export default class kucoinfutures extends kucoin {
|
|
|
1535
1535
|
* @param {float} [params.leverage] Leverage size of the order (mandatory param in request, default is 1)
|
|
1536
1536
|
* @param {string} [params.clientOid] client order id, defaults to uuid if not passed
|
|
1537
1537
|
* @param {string} [params.remark] remark for the order, length cannot exceed 100 utf8 characters
|
|
1538
|
-
* @param {string} [params.stop] 'up' or 'down', the direction the
|
|
1539
|
-
* @param {string} [params.
|
|
1538
|
+
* @param {string} [params.stop] 'up' or 'down', the direction the triggerPrice is triggered from, requires triggerPrice. down: Triggers when the price reaches or goes below the triggerPrice. up: Triggers when the price reaches or goes above the triggerPrice.
|
|
1539
|
+
* @param {string} [params.triggerPriceType] "last", "mark", "index" - defaults to "mark"
|
|
1540
|
+
* @param {string} [params.stopPriceType] exchange-specific alternative for triggerPriceType: TP, IP or MP
|
|
1540
1541
|
* @param {bool} [params.closeOrder] set to true to close position
|
|
1541
1542
|
* @param {bool} [params.test] set to true to use the test order endpoint (does not submit order, use to validate params)
|
|
1542
1543
|
* @param {bool} [params.forceHold] A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default.
|
|
@@ -1666,12 +1667,14 @@ export default class kucoinfutures extends kucoin {
|
|
|
1666
1667
|
if (stopLoss !== undefined) {
|
|
1667
1668
|
const slPrice = this.safeString2(stopLoss, 'triggerPrice', 'stopPrice');
|
|
1668
1669
|
request['triggerStopDownPrice'] = this.priceToPrecision(symbol, slPrice);
|
|
1669
|
-
priceType = this.safeString(stopLoss, 'triggerPriceType',
|
|
1670
|
+
priceType = this.safeString(stopLoss, 'triggerPriceType', 'mark');
|
|
1671
|
+
priceType = this.safeString(triggerPriceTypes, priceType, priceType);
|
|
1670
1672
|
}
|
|
1671
1673
|
if (takeProfit !== undefined) {
|
|
1672
1674
|
const tpPrice = this.safeString2(takeProfit, 'triggerPrice', 'takeProfitPrice');
|
|
1673
1675
|
request['triggerStopUpPrice'] = this.priceToPrecision(symbol, tpPrice);
|
|
1674
|
-
priceType = this.safeString(
|
|
1676
|
+
priceType = this.safeString(takeProfit, 'triggerPriceType', 'mark');
|
|
1677
|
+
priceType = this.safeString(triggerPriceTypes, priceType, priceType);
|
|
1675
1678
|
}
|
|
1676
1679
|
request['stopPriceType'] = priceType;
|
|
1677
1680
|
}
|
|
@@ -2344,7 +2347,6 @@ export default class kucoinfutures extends kucoin {
|
|
|
2344
2347
|
}
|
|
2345
2348
|
const clientOrderId = this.safeString(order, 'clientOid');
|
|
2346
2349
|
const timeInForce = this.safeString(order, 'timeInForce');
|
|
2347
|
-
const stopPrice = this.safeNumber(order, 'stopPrice');
|
|
2348
2350
|
const postOnly = this.safeValue(order, 'postOnly');
|
|
2349
2351
|
const reduceOnly = this.safeValue(order, 'reduceOnly');
|
|
2350
2352
|
const lastUpdateTimestamp = this.safeInteger(order, 'updatedAt');
|
|
@@ -2359,8 +2361,7 @@ export default class kucoinfutures extends kucoin {
|
|
|
2359
2361
|
'side': side,
|
|
2360
2362
|
'amount': amount,
|
|
2361
2363
|
'price': price,
|
|
2362
|
-
'
|
|
2363
|
-
'triggerPrice': stopPrice,
|
|
2364
|
+
'triggerPrice': this.safeNumber(order, 'stopPrice'),
|
|
2364
2365
|
'cost': cost,
|
|
2365
2366
|
'filled': filled,
|
|
2366
2367
|
'remaining': undefined,
|
package/js/src/kuna.js
CHANGED
|
@@ -1106,7 +1106,6 @@ export default class kuna extends Exchange {
|
|
|
1106
1106
|
//
|
|
1107
1107
|
const marketId = this.safeString(order, 'pair');
|
|
1108
1108
|
const datetime = this.safeString(order, 'createdAt');
|
|
1109
|
-
const triggerPrice = this.safeString(order, 'stopPrice');
|
|
1110
1109
|
let side = this.safeString(order, 'side');
|
|
1111
1110
|
if (side === 'Bid') {
|
|
1112
1111
|
side = 'buy';
|
|
@@ -1129,8 +1128,7 @@ export default class kuna extends Exchange {
|
|
|
1129
1128
|
'postOnly': undefined,
|
|
1130
1129
|
'side': side,
|
|
1131
1130
|
'price': this.safeString(order, 'price'),
|
|
1132
|
-
'
|
|
1133
|
-
'triggerPrice': triggerPrice,
|
|
1131
|
+
'triggerPrice': this.safeString(order, 'stopPrice'),
|
|
1134
1132
|
'amount': this.safeString(order, 'quantity'),
|
|
1135
1133
|
'filled': this.safeString(order, 'executedQuantity'),
|
|
1136
1134
|
'remaining': undefined,
|