ccxt 4.4.37 → 4.4.39
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/alpaca.js +73 -2
- package/dist/cjs/src/base/Exchange.js +31 -10
- package/dist/cjs/src/binance.js +0 -2
- package/dist/cjs/src/bingx.js +93 -8
- package/dist/cjs/src/bitget.js +0 -2
- package/dist/cjs/src/bithumb.js +1 -1
- package/dist/cjs/src/bitmart.js +163 -15
- package/dist/cjs/src/bybit.js +3 -2
- package/dist/cjs/src/digifinex.js +58 -18
- package/dist/cjs/src/htx.js +154 -32
- package/dist/cjs/src/kucoin.js +77 -2
- package/dist/cjs/src/kucoinfutures.js +93 -5
- package/dist/cjs/src/mexc.js +36 -25
- package/dist/cjs/src/ndax.js +7 -2
- package/dist/cjs/src/okx.js +1 -1
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/probit.js +3 -1
- package/dist/cjs/src/woo.js +4 -4
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +0 -1
- package/js/src/abstract/digifinex.d.ts +1 -0
- package/js/src/abstract/mexc.d.ts +1 -0
- package/js/src/alpaca.d.ts +11 -1
- package/js/src/alpaca.js +73 -2
- package/js/src/base/Exchange.js +31 -10
- package/js/src/binance.js +0 -2
- package/js/src/bingx.d.ts +14 -1
- package/js/src/bingx.js +93 -8
- package/js/src/bitget.js +0 -2
- package/js/src/bithumb.js +1 -1
- package/js/src/bitmart.js +163 -15
- package/js/src/bybit.js +3 -2
- package/js/src/digifinex.d.ts +4 -2
- package/js/src/digifinex.js +58 -18
- package/js/src/htx.d.ts +5 -5
- package/js/src/htx.js +154 -32
- package/js/src/kucoin.js +77 -2
- package/js/src/kucoinfutures.js +93 -5
- package/js/src/mexc.d.ts +7 -7
- package/js/src/mexc.js +36 -25
- package/js/src/ndax.d.ts +2 -0
- package/js/src/ndax.js +7 -2
- package/js/src/okx.d.ts +1 -0
- package/js/src/okx.js +1 -1
- package/js/src/pro/woo.js +1 -1
- package/js/src/probit.js +3 -1
- package/js/src/woo.js +4 -4
- package/package.json +1 -1
package/js/src/kucoin.js
CHANGED
|
@@ -560,6 +560,7 @@ export default class kucoin extends Exchange {
|
|
|
560
560
|
'400008': NotSupported,
|
|
561
561
|
'400100': InsufficientFunds,
|
|
562
562
|
'400200': InvalidOrder,
|
|
563
|
+
'400330': InvalidOrder,
|
|
563
564
|
'400350': InvalidOrder,
|
|
564
565
|
'400370': InvalidOrder,
|
|
565
566
|
'400400': BadRequest,
|
|
@@ -911,6 +912,7 @@ export default class kucoin extends Exchange {
|
|
|
911
912
|
'TRUE': 'true',
|
|
912
913
|
'CS': 'cs',
|
|
913
914
|
'ORAI': 'orai',
|
|
915
|
+
'BASE': 'base',
|
|
914
916
|
// below will be uncommented after consensus
|
|
915
917
|
// 'BITCOINDIAMON': 'bcd',
|
|
916
918
|
// 'BITCOINGOLD': 'btg',
|
|
@@ -986,6 +988,74 @@ export default class kucoin extends Exchange {
|
|
|
986
988
|
'spot': 'TRADE',
|
|
987
989
|
},
|
|
988
990
|
},
|
|
991
|
+
'features': {
|
|
992
|
+
'spot': {
|
|
993
|
+
'sandbox': false,
|
|
994
|
+
'createOrder': {
|
|
995
|
+
'marginMode': true,
|
|
996
|
+
'triggerPrice': true,
|
|
997
|
+
'triggerPriceType': undefined,
|
|
998
|
+
'triggerDirection': false,
|
|
999
|
+
'stopLossPrice': true,
|
|
1000
|
+
'takeProfitPrice': true,
|
|
1001
|
+
'attachedStopLossTakeProfit': undefined,
|
|
1002
|
+
'timeInForce': {
|
|
1003
|
+
'IOC': true,
|
|
1004
|
+
'FOK': true,
|
|
1005
|
+
'PO': true,
|
|
1006
|
+
'GTD': true,
|
|
1007
|
+
},
|
|
1008
|
+
'hedged': false,
|
|
1009
|
+
'trailing': false,
|
|
1010
|
+
// exchange-supported features
|
|
1011
|
+
// 'iceberg': true,
|
|
1012
|
+
// 'selfTradePrevention': true,
|
|
1013
|
+
// 'twap': false,
|
|
1014
|
+
// 'oco': false,
|
|
1015
|
+
},
|
|
1016
|
+
'createOrders': {
|
|
1017
|
+
'max': 5,
|
|
1018
|
+
},
|
|
1019
|
+
'fetchMyTrades': {
|
|
1020
|
+
'marginMode': true,
|
|
1021
|
+
'limit': undefined,
|
|
1022
|
+
'daysBack': undefined,
|
|
1023
|
+
'untilDays': 7, // per implementation comments
|
|
1024
|
+
},
|
|
1025
|
+
'fetchOrder': {
|
|
1026
|
+
'marginMode': false,
|
|
1027
|
+
'trigger': true,
|
|
1028
|
+
'trailing': false,
|
|
1029
|
+
},
|
|
1030
|
+
'fetchOpenOrders': {
|
|
1031
|
+
'marginMode': true,
|
|
1032
|
+
'limit': 500,
|
|
1033
|
+
'trigger': true,
|
|
1034
|
+
'trailing': false,
|
|
1035
|
+
},
|
|
1036
|
+
'fetchOrders': undefined,
|
|
1037
|
+
'fetchClosedOrders': {
|
|
1038
|
+
'marginMode': true,
|
|
1039
|
+
'limit': 500,
|
|
1040
|
+
'daysBackClosed': undefined,
|
|
1041
|
+
'daysBackCanceled': undefined,
|
|
1042
|
+
'untilDays': 7,
|
|
1043
|
+
'trigger': true,
|
|
1044
|
+
'trailing': false,
|
|
1045
|
+
},
|
|
1046
|
+
'fetchOHLCV': {
|
|
1047
|
+
'limit': 1500,
|
|
1048
|
+
},
|
|
1049
|
+
},
|
|
1050
|
+
'swap': {
|
|
1051
|
+
'linear': undefined,
|
|
1052
|
+
'inverse': undefined,
|
|
1053
|
+
},
|
|
1054
|
+
'future': {
|
|
1055
|
+
'linear': undefined,
|
|
1056
|
+
'inverse': undefined,
|
|
1057
|
+
},
|
|
1058
|
+
},
|
|
989
1059
|
});
|
|
990
1060
|
}
|
|
991
1061
|
nonce() {
|
|
@@ -2694,7 +2764,7 @@ export default class kucoin extends Exchange {
|
|
|
2694
2764
|
await this.loadMarkets();
|
|
2695
2765
|
let lowercaseStatus = status.toLowerCase();
|
|
2696
2766
|
const until = this.safeInteger(params, 'until');
|
|
2697
|
-
const
|
|
2767
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger', false);
|
|
2698
2768
|
let hf = undefined;
|
|
2699
2769
|
[hf, params] = this.handleHfAndParams(params);
|
|
2700
2770
|
if (hf && (symbol === undefined)) {
|
|
@@ -2727,7 +2797,7 @@ export default class kucoin extends Exchange {
|
|
|
2727
2797
|
}
|
|
2728
2798
|
request['tradeType'] = this.safeString(this.options['marginModes'], marginMode, 'TRADE');
|
|
2729
2799
|
let response = undefined;
|
|
2730
|
-
if (
|
|
2800
|
+
if (trigger) {
|
|
2731
2801
|
response = await this.privateGetStopOrder(this.extend(request, query));
|
|
2732
2802
|
}
|
|
2733
2803
|
else if (hf) {
|
|
@@ -3173,6 +3243,11 @@ export default class kucoin extends Exchange {
|
|
|
3173
3243
|
let response = undefined;
|
|
3174
3244
|
[request, params] = this.handleUntilOption('endAt', request, params);
|
|
3175
3245
|
if (hf) {
|
|
3246
|
+
// does not return trades earlier than 2019-02-18T00:00:00Z
|
|
3247
|
+
if (since !== undefined) {
|
|
3248
|
+
// only returns trades up to one week after the since param
|
|
3249
|
+
request['startAt'] = since;
|
|
3250
|
+
}
|
|
3176
3251
|
response = await this.privateGetHfFills(this.extend(request, params));
|
|
3177
3252
|
}
|
|
3178
3253
|
else if (method === 'private_get_fills') {
|
package/js/src/kucoinfutures.js
CHANGED
|
@@ -360,6 +360,91 @@ export default class kucoinfutures extends kucoin {
|
|
|
360
360
|
// 'code': 'BTC',
|
|
361
361
|
// },
|
|
362
362
|
},
|
|
363
|
+
'features': {
|
|
364
|
+
'spot': undefined,
|
|
365
|
+
'forDerivs': {
|
|
366
|
+
'sandbox': false,
|
|
367
|
+
'createOrder': {
|
|
368
|
+
'marginMode': true,
|
|
369
|
+
'triggerPrice': true,
|
|
370
|
+
'triggerPriceType': {
|
|
371
|
+
'last': true,
|
|
372
|
+
'mark': true,
|
|
373
|
+
'index': true,
|
|
374
|
+
},
|
|
375
|
+
'triggerDirection': true,
|
|
376
|
+
'stopLossPrice': true,
|
|
377
|
+
'takeProfitPrice': true,
|
|
378
|
+
'attachedStopLossTakeProfit': {
|
|
379
|
+
'triggerPrice': undefined,
|
|
380
|
+
'triggerPriceType': undefined,
|
|
381
|
+
'limitPrice': true,
|
|
382
|
+
},
|
|
383
|
+
'timeInForce': {
|
|
384
|
+
'IOC': true,
|
|
385
|
+
'FOK': false,
|
|
386
|
+
'PO': true,
|
|
387
|
+
'GTD': false,
|
|
388
|
+
},
|
|
389
|
+
'hedged': false,
|
|
390
|
+
'trailing': false,
|
|
391
|
+
// exchange-supported features
|
|
392
|
+
// 'iceberg': true,
|
|
393
|
+
// 'selfTradePrevention': true,
|
|
394
|
+
// 'twap': false,
|
|
395
|
+
// 'oco': false,
|
|
396
|
+
},
|
|
397
|
+
'createOrders': {
|
|
398
|
+
'max': 20,
|
|
399
|
+
},
|
|
400
|
+
'fetchMyTrades': {
|
|
401
|
+
'marginMode': true,
|
|
402
|
+
'limit': 1000,
|
|
403
|
+
'daysBack': undefined,
|
|
404
|
+
'untilDays': 7,
|
|
405
|
+
},
|
|
406
|
+
'fetchOrder': {
|
|
407
|
+
'marginMode': false,
|
|
408
|
+
'trigger': false,
|
|
409
|
+
'trailing': false,
|
|
410
|
+
},
|
|
411
|
+
'fetchOpenOrders': {
|
|
412
|
+
'marginMode': false,
|
|
413
|
+
'limit': 1000,
|
|
414
|
+
'trigger': true,
|
|
415
|
+
'trailing': false,
|
|
416
|
+
},
|
|
417
|
+
'fetchOrders': undefined,
|
|
418
|
+
'fetchClosedOrders': {
|
|
419
|
+
'marginMode': false,
|
|
420
|
+
'limit': 1000,
|
|
421
|
+
'daysBackClosed': undefined,
|
|
422
|
+
'daysBackCanceled': undefined,
|
|
423
|
+
'untilDays': undefined,
|
|
424
|
+
'trigger': true,
|
|
425
|
+
'trailing': false,
|
|
426
|
+
},
|
|
427
|
+
'fetchOHLCV': {
|
|
428
|
+
'limit': 500,
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
'swap': {
|
|
432
|
+
'linear': {
|
|
433
|
+
'extends': 'forDerivs',
|
|
434
|
+
},
|
|
435
|
+
'inverse': {
|
|
436
|
+
'extends': 'forDerivs',
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
'future': {
|
|
440
|
+
'linear': {
|
|
441
|
+
'extends': 'forDerivs',
|
|
442
|
+
},
|
|
443
|
+
'inverse': {
|
|
444
|
+
'extends': 'forDerivs',
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
},
|
|
363
448
|
});
|
|
364
449
|
}
|
|
365
450
|
/**
|
|
@@ -1754,10 +1839,10 @@ export default class kucoinfutures extends kucoin {
|
|
|
1754
1839
|
if (symbol !== undefined) {
|
|
1755
1840
|
request['symbol'] = this.marketId(symbol);
|
|
1756
1841
|
}
|
|
1757
|
-
const
|
|
1842
|
+
const trigger = this.safeValue2(params, 'stop', 'trigger');
|
|
1758
1843
|
params = this.omit(params, ['stop', 'trigger']);
|
|
1759
1844
|
let response = undefined;
|
|
1760
|
-
if (
|
|
1845
|
+
if (trigger) {
|
|
1761
1846
|
response = await this.futuresPrivateDeleteStopOrders(this.extend(request, params));
|
|
1762
1847
|
}
|
|
1763
1848
|
else {
|
|
@@ -1941,7 +2026,7 @@ export default class kucoinfutures extends kucoin {
|
|
|
1941
2026
|
if (paginate) {
|
|
1942
2027
|
return await this.fetchPaginatedCallDynamic('fetchOrdersByStatus', symbol, since, limit, params);
|
|
1943
2028
|
}
|
|
1944
|
-
const
|
|
2029
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
1945
2030
|
const until = this.safeInteger(params, 'until');
|
|
1946
2031
|
params = this.omit(params, ['stop', 'until', 'trigger']);
|
|
1947
2032
|
if (status === 'closed') {
|
|
@@ -1951,7 +2036,7 @@ export default class kucoinfutures extends kucoin {
|
|
|
1951
2036
|
status = 'active';
|
|
1952
2037
|
}
|
|
1953
2038
|
const request = {};
|
|
1954
|
-
if (!
|
|
2039
|
+
if (!trigger) {
|
|
1955
2040
|
request['status'] = status;
|
|
1956
2041
|
}
|
|
1957
2042
|
else if (status !== 'active') {
|
|
@@ -1969,7 +2054,7 @@ export default class kucoinfutures extends kucoin {
|
|
|
1969
2054
|
request['endAt'] = until;
|
|
1970
2055
|
}
|
|
1971
2056
|
let response = undefined;
|
|
1972
|
-
if (
|
|
2057
|
+
if (trigger) {
|
|
1973
2058
|
response = await this.futuresPrivateGetStopOrders(this.extend(request, params));
|
|
1974
2059
|
}
|
|
1975
2060
|
else {
|
|
@@ -2594,6 +2679,9 @@ export default class kucoinfutures extends kucoin {
|
|
|
2594
2679
|
if (since !== undefined) {
|
|
2595
2680
|
request['startAt'] = since;
|
|
2596
2681
|
}
|
|
2682
|
+
if (limit !== undefined) {
|
|
2683
|
+
request['pageSize'] = Math.min(1000, limit);
|
|
2684
|
+
}
|
|
2597
2685
|
[request, params] = this.handleUntilOption('endAt', request, params);
|
|
2598
2686
|
const response = await this.futuresPrivateGetFills(this.extend(request, params));
|
|
2599
2687
|
//
|
package/js/src/mexc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/mexc.js';
|
|
2
|
-
import type { TransferEntry, IndexType, Int, OrderSide, Balances, OrderType, OHLCV, FundingRateHistory, Position, OrderBook, OrderRequest, FundingHistory, Order, Str, Trade, Transaction, Ticker, Tickers, Strings, Market, Currency, Leverage, Num, Account, MarginModification, Currencies,
|
|
2
|
+
import type { TransferEntry, IndexType, Int, OrderSide, Balances, OrderType, OHLCV, FundingRateHistory, Position, OrderBook, OrderRequest, FundingHistory, Order, Str, Trade, Transaction, Ticker, Tickers, Strings, Market, Currency, Leverage, Num, Account, MarginModification, Currencies, Dict, LeverageTier, LeverageTiers, int, FundingRate, DepositAddress, TradingFeeInterface } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class mexc
|
|
5
5
|
* @augments Exchange
|
|
@@ -388,14 +388,14 @@ export default class mexc extends Exchange {
|
|
|
388
388
|
fetchAccounts(params?: {}): Promise<Account[]>;
|
|
389
389
|
/**
|
|
390
390
|
* @method
|
|
391
|
-
* @name mexc#
|
|
392
|
-
* @description fetch the trading fees for
|
|
393
|
-
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#
|
|
394
|
-
* @
|
|
391
|
+
* @name mexc#fetchTradingFee
|
|
392
|
+
* @description fetch the trading fees for a market
|
|
393
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-mx-deduct-status
|
|
394
|
+
* @param {string} symbol unified market symbol
|
|
395
395
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
396
|
-
* @returns {object} a
|
|
396
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
397
397
|
*/
|
|
398
|
-
|
|
398
|
+
fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
|
|
399
399
|
customParseBalance(response: any, marketType: any): Balances;
|
|
400
400
|
parseBalanceHelper(entry: any): import("./base/types.js").BalanceAccount;
|
|
401
401
|
/**
|
package/js/src/mexc.js
CHANGED
|
@@ -121,8 +121,8 @@ export default class mexc extends Exchange {
|
|
|
121
121
|
'fetchTickers': true,
|
|
122
122
|
'fetchTime': true,
|
|
123
123
|
'fetchTrades': true,
|
|
124
|
-
'fetchTradingFee':
|
|
125
|
-
'fetchTradingFees':
|
|
124
|
+
'fetchTradingFee': true,
|
|
125
|
+
'fetchTradingFees': false,
|
|
126
126
|
'fetchTradingLimits': undefined,
|
|
127
127
|
'fetchTransactionFee': 'emulated',
|
|
128
128
|
'fetchTransactionFees': true,
|
|
@@ -195,6 +195,7 @@ export default class mexc extends Exchange {
|
|
|
195
195
|
'allOrders': 10,
|
|
196
196
|
'account': 10,
|
|
197
197
|
'myTrades': 10,
|
|
198
|
+
'tradeFee': 10,
|
|
198
199
|
'sub-account/list': 1,
|
|
199
200
|
'sub-account/apiKey': 1,
|
|
200
201
|
'capital/config/getall': 10,
|
|
@@ -3607,33 +3608,43 @@ export default class mexc extends Exchange {
|
|
|
3607
3608
|
}
|
|
3608
3609
|
/**
|
|
3609
3610
|
* @method
|
|
3610
|
-
* @name mexc#
|
|
3611
|
-
* @description fetch the trading fees for
|
|
3612
|
-
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#
|
|
3613
|
-
* @
|
|
3611
|
+
* @name mexc#fetchTradingFee
|
|
3612
|
+
* @description fetch the trading fees for a market
|
|
3613
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-mx-deduct-status
|
|
3614
|
+
* @param {string} symbol unified market symbol
|
|
3614
3615
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3615
|
-
* @returns {object} a
|
|
3616
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3616
3617
|
*/
|
|
3617
|
-
async
|
|
3618
|
+
async fetchTradingFee(symbol, params = {}) {
|
|
3618
3619
|
await this.loadMarkets();
|
|
3619
|
-
const
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
makerFee = Precise.stringDiv(makerFee, '1000');
|
|
3623
|
-
takerFee = Precise.stringDiv(takerFee, '1000');
|
|
3624
|
-
const result = {};
|
|
3625
|
-
for (let i = 0; i < this.symbols.length; i++) {
|
|
3626
|
-
const symbol = this.symbols[i];
|
|
3627
|
-
result[symbol] = {
|
|
3628
|
-
'symbol': symbol,
|
|
3629
|
-
'maker': this.parseNumber(makerFee),
|
|
3630
|
-
'taker': this.parseNumber(takerFee),
|
|
3631
|
-
'percentage': true,
|
|
3632
|
-
'tierBased': false,
|
|
3633
|
-
'info': response,
|
|
3634
|
-
};
|
|
3620
|
+
const market = this.market(symbol);
|
|
3621
|
+
if (!market['spot']) {
|
|
3622
|
+
throw new BadRequest(this.id + ' fetchTradingFee() supports spot markets only');
|
|
3635
3623
|
}
|
|
3636
|
-
|
|
3624
|
+
const request = {
|
|
3625
|
+
'symbol': market['id'],
|
|
3626
|
+
};
|
|
3627
|
+
const response = await this.spotPrivateGetTradeFee(this.extend(request, params));
|
|
3628
|
+
//
|
|
3629
|
+
// {
|
|
3630
|
+
// "data":{
|
|
3631
|
+
// "makerCommission":0.003000000000000000,
|
|
3632
|
+
// "takerCommission":0.003000000000000000
|
|
3633
|
+
// },
|
|
3634
|
+
// "code":0,
|
|
3635
|
+
// "msg":"success",
|
|
3636
|
+
// "timestamp":1669109672717
|
|
3637
|
+
// }
|
|
3638
|
+
//
|
|
3639
|
+
const data = this.safeDict(response, 'data', {});
|
|
3640
|
+
return {
|
|
3641
|
+
'info': data,
|
|
3642
|
+
'symbol': symbol,
|
|
3643
|
+
'maker': this.safeNumber(data, 'makerCommission'),
|
|
3644
|
+
'taker': this.safeNumber(data, 'takerCommission'),
|
|
3645
|
+
'percentage': undefined,
|
|
3646
|
+
'tierBased': undefined,
|
|
3647
|
+
};
|
|
3637
3648
|
}
|
|
3638
3649
|
customParseBalance(response, marketType) {
|
|
3639
3650
|
//
|
package/js/src/ndax.d.ts
CHANGED
|
@@ -130,6 +130,7 @@ export default class ndax extends Exchange {
|
|
|
130
130
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
131
131
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
132
132
|
* @param {float} [params.triggerPrice] the price at which a trigger order would be triggered
|
|
133
|
+
* @param {string} [params.clientOrderId] a unique id for the order
|
|
133
134
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
134
135
|
*/
|
|
135
136
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
@@ -164,6 +165,7 @@ export default class ndax extends Exchange {
|
|
|
164
165
|
* @param {string} id order id
|
|
165
166
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
166
167
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
168
|
+
* @param {string} [params.clientOrderId] a unique id for the order
|
|
167
169
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
168
170
|
*/
|
|
169
171
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
|
package/js/src/ndax.js
CHANGED
|
@@ -1092,8 +1092,11 @@ export default class ndax extends Exchange {
|
|
|
1092
1092
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1093
1093
|
await this.loadMarkets();
|
|
1094
1094
|
await this.loadAccounts();
|
|
1095
|
-
const defaultAccountId = this.safeInteger2(this.options, 'accountId', 'AccountId'
|
|
1096
|
-
|
|
1095
|
+
const defaultAccountId = this.safeInteger2(this.options, 'accountId', 'AccountId');
|
|
1096
|
+
let accountId = this.safeInteger2(params, 'accountId', 'AccountId', defaultAccountId);
|
|
1097
|
+
if (accountId === undefined) {
|
|
1098
|
+
accountId = parseInt(this.accounts[0]['id']);
|
|
1099
|
+
}
|
|
1097
1100
|
params = this.omit(params, ['accountId', 'AccountId']);
|
|
1098
1101
|
const request = {
|
|
1099
1102
|
'omsId': omsId,
|
|
@@ -1376,6 +1379,7 @@ export default class ndax extends Exchange {
|
|
|
1376
1379
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1377
1380
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1378
1381
|
* @param {float} [params.triggerPrice] the price at which a trigger order would be triggered
|
|
1382
|
+
* @param {string} [params.clientOrderId] a unique id for the order
|
|
1379
1383
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1380
1384
|
*/
|
|
1381
1385
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
@@ -1618,6 +1622,7 @@ export default class ndax extends Exchange {
|
|
|
1618
1622
|
* @param {string} id order id
|
|
1619
1623
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1620
1624
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1625
|
+
* @param {string} [params.clientOrderId] a unique id for the order
|
|
1621
1626
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1622
1627
|
*/
|
|
1623
1628
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
package/js/src/okx.d.ts
CHANGED
|
@@ -121,6 +121,7 @@ export default class okx extends Exchange {
|
|
|
121
121
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
122
122
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
123
123
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
124
|
+
* @param {string} [params.method] 'publicGetMarketTrades' or 'publicGetMarketHistoryTrades' default is 'publicGetMarketTrades'
|
|
124
125
|
* @param {boolean} [params.paginate] *only applies to publicGetMarketHistoryTrades* default false, when true will automatically paginate by calling this endpoint multiple times
|
|
125
126
|
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
126
127
|
*/
|
package/js/src/okx.js
CHANGED
|
@@ -1201,7 +1201,6 @@ export default class okx extends Exchange {
|
|
|
1201
1201
|
'limitPrice': true,
|
|
1202
1202
|
},
|
|
1203
1203
|
'timeInForce': {
|
|
1204
|
-
'GTC': true,
|
|
1205
1204
|
'IOC': true,
|
|
1206
1205
|
'FOK': true,
|
|
1207
1206
|
'PO': true,
|
|
@@ -2258,6 +2257,7 @@ export default class okx extends Exchange {
|
|
|
2258
2257
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
2259
2258
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
2260
2259
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2260
|
+
* @param {string} [params.method] 'publicGetMarketTrades' or 'publicGetMarketHistoryTrades' default is 'publicGetMarketTrades'
|
|
2261
2261
|
* @param {boolean} [params.paginate] *only applies to publicGetMarketHistoryTrades* default false, when true will automatically paginate by calling this endpoint multiple times
|
|
2262
2262
|
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
2263
2263
|
*/
|
package/js/src/pro/woo.js
CHANGED
package/js/src/probit.js
CHANGED
|
@@ -274,6 +274,8 @@ export default class probit extends Exchange {
|
|
|
274
274
|
const base = this.safeCurrencyCode(baseId);
|
|
275
275
|
const quote = this.safeCurrencyCode(quoteId);
|
|
276
276
|
const closed = this.safeBool(market, 'closed', false);
|
|
277
|
+
const showInUI = this.safeBool(market, 'show_in_ui', true);
|
|
278
|
+
const active = !closed && showInUI;
|
|
277
279
|
const takerFeeRate = this.safeString(market, 'taker_fee_rate');
|
|
278
280
|
const taker = Precise.stringDiv(takerFeeRate, '100');
|
|
279
281
|
const makerFeeRate = this.safeString(market, 'maker_fee_rate');
|
|
@@ -293,7 +295,7 @@ export default class probit extends Exchange {
|
|
|
293
295
|
'swap': false,
|
|
294
296
|
'future': false,
|
|
295
297
|
'option': false,
|
|
296
|
-
'active':
|
|
298
|
+
'active': active,
|
|
297
299
|
'contract': false,
|
|
298
300
|
'linear': undefined,
|
|
299
301
|
'inverse': undefined,
|
package/js/src/woo.js
CHANGED
|
@@ -116,7 +116,7 @@ export default class woo extends Exchange {
|
|
|
116
116
|
'setMargin': false,
|
|
117
117
|
'setPositionMode': true,
|
|
118
118
|
'transfer': true,
|
|
119
|
-
'withdraw': true, // exchange have that endpoint disabled atm, but was once implemented in ccxt per old docs: https://
|
|
119
|
+
'withdraw': true, // exchange have that endpoint disabled atm, but was once implemented in ccxt per old docs: https://docx.woo.io/wootrade-documents/#token-withdraw
|
|
120
120
|
},
|
|
121
121
|
'timeframes': {
|
|
122
122
|
'1m': '1m',
|
|
@@ -160,7 +160,7 @@ export default class woo extends Exchange {
|
|
|
160
160
|
'pub': {
|
|
161
161
|
'get': {
|
|
162
162
|
'hist/kline': 10,
|
|
163
|
-
'hist/trades':
|
|
163
|
+
'hist/trades': 10,
|
|
164
164
|
},
|
|
165
165
|
},
|
|
166
166
|
'public': {
|
|
@@ -210,7 +210,7 @@ export default class woo extends Exchange {
|
|
|
210
210
|
'client/futures_leverage': 60,
|
|
211
211
|
},
|
|
212
212
|
'post': {
|
|
213
|
-
'order':
|
|
213
|
+
'order': 1,
|
|
214
214
|
'order/cancel_all_after': 1,
|
|
215
215
|
'asset/main_sub_transfer': 30,
|
|
216
216
|
'asset/ltv': 30,
|
|
@@ -227,7 +227,7 @@ export default class woo extends Exchange {
|
|
|
227
227
|
'order': 1,
|
|
228
228
|
'client/order': 1,
|
|
229
229
|
'orders': 1,
|
|
230
|
-
'asset/withdraw': 120, // implemented in ccxt, disabled on the exchange side https://
|
|
230
|
+
'asset/withdraw': 120, // implemented in ccxt, disabled on the exchange side https://docx.woo.io/wootrade-documents/#cancel-withdraw-request
|
|
231
231
|
},
|
|
232
232
|
},
|
|
233
233
|
},
|
package/package.json
CHANGED