ccxt 4.3.7 → 4.3.9

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.
Files changed (44) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/ccxt.js +1 -1
  3. package/dist/cjs/src/base/Exchange.js +13 -3
  4. package/dist/cjs/src/binance.js +1 -1
  5. package/dist/cjs/src/bingx.js +22 -12
  6. package/dist/cjs/src/bitget.js +1 -1
  7. package/dist/cjs/src/coinex.js +629 -433
  8. package/dist/cjs/src/coinmetro.js +31 -31
  9. package/dist/cjs/src/okx.js +59 -2
  10. package/dist/cjs/src/woo.js +1 -1
  11. package/js/ccxt.d.ts +1 -1
  12. package/js/ccxt.js +1 -1
  13. package/js/src/abstract/bingx.d.ts +1 -1
  14. package/js/src/abstract/coinmetro.d.ts +1 -0
  15. package/js/src/base/Exchange.d.ts +19 -19
  16. package/js/src/base/Exchange.js +13 -3
  17. package/js/src/base/functions/generic.d.ts +20 -19
  18. package/js/src/binance.js +1 -1
  19. package/js/src/bingx.d.ts +2 -2
  20. package/js/src/bingx.js +22 -12
  21. package/js/src/bitget.js +1 -1
  22. package/js/src/bybit.d.ts +1 -1
  23. package/js/src/coinbase.d.ts +1 -1
  24. package/js/src/coinbaseinternational.d.ts +1 -1
  25. package/js/src/coinex.js +629 -433
  26. package/js/src/coinmetro.d.ts +1 -1
  27. package/js/src/coinmetro.js +31 -31
  28. package/js/src/gemini.d.ts +1 -1
  29. package/js/src/hollaex.d.ts +1 -1
  30. package/js/src/htx.d.ts +2 -2
  31. package/js/src/idex.d.ts +1 -1
  32. package/js/src/kucoin.d.ts +1 -1
  33. package/js/src/mexc.d.ts +1 -1
  34. package/js/src/okcoin.d.ts +1 -1
  35. package/js/src/okx.d.ts +5 -1
  36. package/js/src/okx.js +59 -2
  37. package/js/src/paymium.d.ts +1 -1
  38. package/js/src/pro/luno.d.ts +2 -2
  39. package/js/src/probit.d.ts +1 -1
  40. package/js/src/upbit.d.ts +1 -1
  41. package/js/src/whitebit.d.ts +1 -1
  42. package/js/src/woo.js +1 -1
  43. package/js/src/zonda.d.ts +1 -1
  44. package/package.json +7 -7
@@ -28,7 +28,7 @@ export default class coinmetro extends Exchange {
28
28
  fetchBidsAsks(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
29
29
  parseTicker(ticker: any, market?: Market): Ticker;
30
30
  fetchBalance(params?: {}): Promise<Balances>;
31
- parseBalance(response: any): Balances;
31
+ parseBalance(balances: any): Balances;
32
32
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
33
33
  parseLedgerEntry(item: any, currency?: Currency): {
34
34
  id: string;
@@ -164,6 +164,7 @@ export default class coinmetro extends Exchange {
164
164
  'private': {
165
165
  'get': {
166
166
  'users/balances': 1,
167
+ 'users/wallets': 1,
167
168
  'users/wallets/history/{since}': 1.67,
168
169
  'exchange/orders/status/{orderID}': 1,
169
170
  'exchange/orders/active': 1,
@@ -944,49 +945,48 @@ export default class coinmetro extends Exchange {
944
945
  * @method
945
946
  * @name coinmetro#fetchBalance
946
947
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
947
- * @see https://documenter.getpostman.com/view/3653795/SVfWN6KS#698ae067-43dd-4e19-a0ac-d9ba91381816
948
+ * @see https://documenter.getpostman.com/view/3653795/SVfWN6KS#741a1dcc-7307-40d0-acca-28d003d1506a
948
949
  * @param {object} [params] extra parameters specific to the exchange API endpoint
949
950
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
950
951
  */
951
952
  await this.loadMarkets();
952
- const response = await this.privateGetUsersBalances(params);
953
- return this.parseBalance(response);
953
+ const response = await this.privateGetUsersWallets(params);
954
+ const list = this.safeList(response, 'list', []);
955
+ return this.parseBalance(list);
954
956
  }
955
- parseBalance(response) {
957
+ parseBalance(balances) {
956
958
  //
957
- // {
958
- // "USDC": {
959
- // "USDC": 99,
960
- // "EUR": 91.16,
961
- // "BTC": 0.002334
962
- // },
963
- // "XCM": {
964
- // "XCM": 0,
965
- // "EUR": 0,
966
- // "BTC": 0
967
- // },
968
- // "TOTAL": {
969
- // "EUR": 91.16,
970
- // "BTC": 0.002334
959
+ // [
960
+ // {
961
+ // "xcmLocks": [],
962
+ // "xcmLockAmounts": [],
963
+ // "refList": [],
964
+ // "balanceHistory": [],
965
+ // "_id": "5fecd3c998e75c2e4d63f7c3",
966
+ // "currency": "BTC",
967
+ // "label": "BTC",
968
+ // "userId": "5fecd3c97fbfed1521db23bd",
969
+ // "__v": 0,
970
+ // "balance": 0.5,
971
+ // "createdAt": "2020-12-30T19:23:53.646Z",
972
+ // "disabled": false,
973
+ // "updatedAt": "2020-12-30T19:23:53.653Z",
974
+ // "reserved": 0,
975
+ // "id": "5fecd3c998e75c2e4d63f7c3"
971
976
  // },
972
- // "REF": {
973
- // "XCM": 0,
974
- // "EUR": 0,
975
- // "BTC": 0
976
- // }
977
- // }
977
+ // ...
978
+ // ]
978
979
  //
979
980
  const result = {
980
- 'info': response,
981
+ 'info': balances,
981
982
  };
982
- const balances = this.omit(response, ['TOTAL', 'REF']);
983
- const currencyIds = Object.keys(balances);
984
- for (let i = 0; i < currencyIds.length; i++) {
985
- const currencyId = currencyIds[i];
983
+ for (let i = 0; i < balances.length; i++) {
984
+ const balanceEntry = this.safeDict(balances, i, {});
985
+ const currencyId = this.safeString(balanceEntry, 'currency');
986
986
  const code = this.safeCurrencyCode(currencyId);
987
987
  const account = this.account();
988
- const currency = this.safeValue(balances, currencyId, {});
989
- account['total'] = this.safeString(currency, currencyId);
988
+ account['total'] = this.safeString(balanceEntry, 'balance');
989
+ account['used'] = this.safeString(balanceEntry, 'reserved');
990
990
  result[code] = account;
991
991
  }
992
992
  return this.safeBalance(result);
@@ -45,7 +45,7 @@ export default class gemini extends Exchange {
45
45
  info: any;
46
46
  };
47
47
  fetchDepositAddress(code: string, params?: {}): Promise<any>;
48
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
48
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
49
49
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
50
50
  url: string;
51
51
  method: string;
@@ -39,7 +39,7 @@ export default class hollaex extends Exchange {
39
39
  network: string;
40
40
  info: any;
41
41
  };
42
- fetchDepositAddresses(codes?: string[], params?: {}): Promise<{}>;
42
+ fetchDepositAddresses(codes?: string[], params?: {}): Promise<Dictionary<any>>;
43
43
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
44
44
  fetchWithdrawal(id: string, code?: Str, params?: {}): Promise<Transaction>;
45
45
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
package/js/src/htx.d.ts CHANGED
@@ -101,7 +101,7 @@ export default class htx extends Exchange {
101
101
  note: string;
102
102
  info: any;
103
103
  };
104
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
104
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
105
105
  fetchDepositAddress(code: string, params?: {}): Promise<any>;
106
106
  fetchWithdrawAddresses(code: string, note?: any, networkCode?: any, params?: {}): Promise<any[]>;
107
107
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
@@ -245,7 +245,7 @@ export default class htx extends Exchange {
245
245
  datetime: string;
246
246
  info: any;
247
247
  };
248
- fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
248
+ fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any[]>;
249
249
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
250
250
  parseDepositWithdrawFee(fee: any, currency?: Currency): any;
251
251
  parseSettlements(settlements: any, market: any): any[];
package/js/src/idex.d.ts CHANGED
@@ -17,7 +17,7 @@ export default class idex extends Exchange {
17
17
  parseTrade(trade: any, market?: Market): Trade;
18
18
  fetchTradingFees(params?: {}): Promise<TradingFees>;
19
19
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
20
- parseSide(book: any, side: any): any;
20
+ parseSide(book: any, side: any): any[];
21
21
  fetchCurrencies(params?: {}): Promise<Currencies>;
22
22
  parseBalance(response: any): Balances;
23
23
  fetchBalance(params?: {}): Promise<Balances>;
@@ -63,7 +63,7 @@ export default class kucoin extends Exchange {
63
63
  tag: string;
64
64
  network: string;
65
65
  };
66
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
66
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
67
67
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
68
68
  handleTriggerPrices(params: any): any[];
69
69
  createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
package/js/src/mexc.d.ts CHANGED
@@ -111,7 +111,7 @@ export default class mexc extends Exchange {
111
111
  network: string;
112
112
  info: any;
113
113
  };
114
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
114
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
115
115
  createDepositAddress(code: string, params?: {}): Promise<{
116
116
  currency: string;
117
117
  address: string;
@@ -42,7 +42,7 @@ export default class okcoin extends Exchange {
42
42
  info: any;
43
43
  };
44
44
  fetchDepositAddress(code: string, params?: {}): Promise<any>;
45
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
45
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
46
46
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
47
47
  parseTransfer(transfer: any, currency?: Currency): {
48
48
  info: any;
package/js/src/okx.d.ts CHANGED
@@ -85,7 +85,7 @@ export default class okx extends Exchange {
85
85
  network: string;
86
86
  info: any;
87
87
  };
88
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
88
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
89
89
  fetchDepositAddress(code: string, params?: {}): Promise<any>;
90
90
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
91
91
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
@@ -171,6 +171,10 @@ export default class okx extends Exchange {
171
171
  }>;
172
172
  fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingHistory[]>;
173
173
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
174
+ fetchPositionMode(symbol?: Str, params?: {}): Promise<{
175
+ info: any;
176
+ hedged: boolean;
177
+ }>;
174
178
  setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
175
179
  setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
176
180
  fetchCrossBorrowRates(params?: {}): Promise<any>;
package/js/src/okx.js CHANGED
@@ -2632,6 +2632,8 @@ export default class okx extends Exchange {
2632
2632
  const takeProfitDefined = (takeProfit !== undefined);
2633
2633
  const trailingPercent = this.safeString2(params, 'trailingPercent', 'callbackRatio');
2634
2634
  const isTrailingPercentOrder = trailingPercent !== undefined;
2635
+ const trigger = (triggerPrice !== undefined) || (type === 'trigger');
2636
+ const isReduceOnly = this.safeValue(params, 'reduceOnly', false);
2635
2637
  const defaultMarginMode = this.safeString2(this.options, 'defaultMarginMode', 'marginMode', 'cross');
2636
2638
  let marginMode = this.safeString2(params, 'marginMode', 'tdMode'); // cross or isolated, tdMode not ommited so as to be extended into the request
2637
2639
  let margin = false;
@@ -2658,6 +2660,25 @@ export default class okx extends Exchange {
2658
2660
  if (positionSide !== undefined) {
2659
2661
  request['posSide'] = positionSide;
2660
2662
  }
2663
+ else {
2664
+ let hedged = undefined;
2665
+ [hedged, params] = this.handleOptionAndParams(params, 'createOrder', 'hedged');
2666
+ if (hedged) {
2667
+ const isBuy = (side === 'buy');
2668
+ const isProtective = (takeProfitPrice !== undefined) || (stopLossPrice !== undefined) || isReduceOnly;
2669
+ if (isProtective) {
2670
+ // in case of protective orders, the posSide should be opposite of position side
2671
+ // reduceOnly is emulated and not natively supported by the exchange
2672
+ request['posSide'] = isBuy ? 'short' : 'long';
2673
+ if (isReduceOnly) {
2674
+ params = this.omit(params, 'reduceOnly');
2675
+ }
2676
+ }
2677
+ else {
2678
+ request['posSide'] = isBuy ? 'long' : 'short';
2679
+ }
2680
+ }
2681
+ }
2661
2682
  }
2662
2683
  request['tdMode'] = marginMode;
2663
2684
  }
@@ -2667,7 +2688,6 @@ export default class okx extends Exchange {
2667
2688
  params = this.omit(params, ['currency', 'ccy', 'marginMode', 'timeInForce', 'stopPrice', 'triggerPrice', 'clientOrderId', 'stopLossPrice', 'takeProfitPrice', 'slOrdPx', 'tpOrdPx', 'margin', 'stopLoss', 'takeProfit', 'trailingPercent']);
2668
2689
  const ioc = (timeInForce === 'IOC') || (type === 'ioc');
2669
2690
  const fok = (timeInForce === 'FOK') || (type === 'fok');
2670
- const trigger = (triggerPrice !== undefined) || (type === 'trigger');
2671
2691
  const conditional = (stopLossPrice !== undefined) || (takeProfitPrice !== undefined) || (type === 'conditional');
2672
2692
  const marketIOC = (isMarketOrder && ioc) || (type === 'optimal_limit_ioc');
2673
2693
  const defaultTgtCcy = this.safeString(this.options, 'tgtCcy', 'base_ccy');
@@ -2877,6 +2897,7 @@ export default class okx extends Exchange {
2877
2897
  * @param {string} [params.positionSide] if position mode is one-way: set to 'net', if position mode is hedge-mode: set to 'long' or 'short'
2878
2898
  * @param {string} [params.trailingPercent] the percent to trail away from the current market price
2879
2899
  * @param {string} [params.tpOrdKind] 'condition' or 'limit', the default is 'condition'
2900
+ * @param {string} [params.hedged] true/false, to automatically set exchange-specific params needed when trading in hedge mode
2880
2901
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2881
2902
  */
2882
2903
  await this.loadMarkets();
@@ -6264,6 +6285,42 @@ export default class okx extends Exchange {
6264
6285
  //
6265
6286
  return response;
6266
6287
  }
6288
+ async fetchPositionMode(symbol = undefined, params = {}) {
6289
+ /**
6290
+ * @method
6291
+ * @name okx#fetchPositionMode
6292
+ * @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
6293
+ * @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
6294
+ * @param {string} symbol unified symbol of the market to fetch the order book for
6295
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
6296
+ * @param {string} [param.accountId] if you have multiple accounts, you must specify the account id to fetch the position mode
6297
+ * @returns {object} an object detailing whether the market is in hedged or one-way mode
6298
+ */
6299
+ const accounts = await this.fetchAccounts();
6300
+ const length = accounts.length;
6301
+ let selectedAccount = undefined;
6302
+ if (length > 1) {
6303
+ const accountId = this.safeString(params, 'accountId');
6304
+ if (accountId === undefined) {
6305
+ const accountIds = this.getListFromObjectValues(accounts, 'id');
6306
+ throw new ExchangeError(this.id + ' fetchPositionMode() can not detect position mode, because you have multiple accounts. Set params["accountId"] to desired id from: ' + accountIds.join(', '));
6307
+ }
6308
+ else {
6309
+ const accountsById = this.indexBy(accounts, 'id');
6310
+ selectedAccount = this.safeDict(accountsById, accountId);
6311
+ }
6312
+ }
6313
+ else {
6314
+ selectedAccount = accounts[0];
6315
+ }
6316
+ const mainAccount = selectedAccount['info'];
6317
+ const posMode = this.safeString(mainAccount, 'posMode'); // long_short_mode, net_mode
6318
+ const isHedged = posMode === 'long_short_mode';
6319
+ return {
6320
+ 'info': mainAccount,
6321
+ 'hedged': isHedged,
6322
+ };
6323
+ }
6267
6324
  async setPositionMode(hedged, symbol = undefined, params = {}) {
6268
6325
  /**
6269
6326
  * @method
@@ -7928,7 +7985,7 @@ export default class okx extends Exchange {
7928
7985
  // }
7929
7986
  //
7930
7987
  const rows = this.safeList(response, 'data', []);
7931
- return this.parseConversions(rows, 'baseCcy', 'quoteCcy', since, limit);
7988
+ return this.parseConversions(rows, code, 'baseCcy', 'quoteCcy', since, limit);
7932
7989
  }
7933
7990
  parseConversion(conversion, fromCurrency = undefined, toCurrency = undefined) {
7934
7991
  //
@@ -27,7 +27,7 @@ export default class paymium extends Exchange {
27
27
  tag: any;
28
28
  network: any;
29
29
  }>;
30
- fetchDepositAddresses(codes?: string[], params?: {}): Promise<{}>;
30
+ fetchDepositAddresses(codes?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
31
31
  parseDepositAddress(depositAddress: any, currency?: Currency): {
32
32
  info: any;
33
33
  currency: string;
@@ -10,8 +10,8 @@ export default class luno extends lunoRest {
10
10
  handleOrderBook(client: Client, message: any, subscription: any): void;
11
11
  customParseOrderBook(orderbook: any, symbol: any, timestamp?: any, bidsKey?: string, asksKey?: IndexType, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): {
12
12
  symbol: any;
13
- bids: any;
14
- asks: any;
13
+ bids: any[];
14
+ asks: any[];
15
15
  timestamp: any;
16
16
  datetime: string;
17
17
  nonce: any;
@@ -44,7 +44,7 @@ export default class probit extends Exchange {
44
44
  network: string;
45
45
  info: any;
46
46
  }>;
47
- fetchDepositAddresses(codes?: string[], params?: {}): Promise<{}>;
47
+ fetchDepositAddresses(codes?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
48
48
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
49
49
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
50
50
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
package/js/src/upbit.d.ts CHANGED
@@ -67,7 +67,7 @@ export default class upbit extends Exchange {
67
67
  fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
68
68
  fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
69
69
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
70
- fetchDepositAddresses(codes?: string[], params?: {}): Promise<{}>;
70
+ fetchDepositAddresses(codes?: string[], params?: {}): Promise<Dictionary<any>>;
71
71
  parseDepositAddress(depositAddress: any, currency?: Currency): {
72
72
  currency: string;
73
73
  address: string;
@@ -103,7 +103,7 @@ export default class whitebit extends Exchange {
103
103
  previousFundingTimestamp: any;
104
104
  previousFundingDatetime: any;
105
105
  };
106
- isFiat(currency: any): any;
106
+ isFiat(currency: any): boolean;
107
107
  nonce(): number;
108
108
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
109
109
  url: string;
package/js/src/woo.js CHANGED
@@ -3185,7 +3185,7 @@ export default class woo extends Exchange {
3185
3185
  //
3186
3186
  const data = this.safeDict(response, 'data', {});
3187
3187
  const rows = this.safeList(data, 'tradeVos', []);
3188
- return this.parseConversions(rows, 'sellAsset', 'buyAsset', since, limit);
3188
+ return this.parseConversions(rows, code, 'sellAsset', 'buyAsset', since, limit);
3189
3189
  }
3190
3190
  parseConversion(conversion, fromCurrency = undefined, toCurrency = undefined) {
3191
3191
  //
package/js/src/zonda.d.ts CHANGED
@@ -57,7 +57,7 @@ export default class zonda extends Exchange {
57
57
  network: any;
58
58
  info: any;
59
59
  }>;
60
- fetchDepositAddresses(codes?: string[], params?: {}): Promise<{}>;
60
+ fetchDepositAddresses(codes?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
61
61
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
62
62
  parseTransfer(transfer: any, currency?: Currency): {
63
63
  info: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.7",
3
+ "version": "4.3.9",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.js",
6
6
  "type": "module",
@@ -30,8 +30,8 @@
30
30
  "coverage-js": "npm run instrument && npm run nyc-coverage && rm -rf jsInstrumented",
31
31
  "docker": "docker-compose run --rm ccxt",
32
32
  "fixTSBug": "node build/fixTSBug",
33
- "transpileCS": "node --no-warnings --loader ts-node/esm build/csharpTranspiler.ts --multi",
34
- "transpileCSWs": "node --no-warnings --loader ts-node/esm build/csharpTranspiler.ts --ws",
33
+ "transpileCS": "tsx build/csharpTranspiler.ts --multi",
34
+ "transpileCSWs": "tsx build/csharpTranspiler.ts --ws",
35
35
  "buildCS": "dotnet build cs/ccxt.sln",
36
36
  "buildCSRelease": "dotnet build cs --configuration Release",
37
37
  "csharp": "npm run transpileCS && npm run transpileCSWs && npm run buildCS",
@@ -74,7 +74,7 @@
74
74
  "cli.js": "node ./examples/js/cli.js",
75
75
  "cli.py": "python3 ./examples/py/cli.py",
76
76
  "cli.php": "php ./examples/php/cli.php",
77
- "cli.ts": "node --loader ts-node/esm examples/ts/cli.ts",
77
+ "cli.ts": "tsx examples/ts/cli.ts",
78
78
  "cli.cs": "dotnet run --project \"./cs/cli/cli.csproj\"",
79
79
  "export-exchanges": "node build/export-exchanges",
80
80
  "capabilities": "node ./examples/js/exchange-capabilities.js",
@@ -121,7 +121,7 @@
121
121
  "copy-python-keys": "node build/copy keys.json python/keys.json",
122
122
  "copy-python-readme": "node build/copy README.md python/README.md",
123
123
  "postinstall": "node postinstall.js",
124
- "validate-types": "node --loader ts-node/esm build/validate-types.ts",
124
+ "validate-types": "tsx build/validate-types.ts",
125
125
  "response-js": "node js/src/test/test.js --responseTests",
126
126
  "request-js": "node js/src/test/test.js --requestTests",
127
127
  "request-py": "python3 python/ccxt/test/test_async.py --requestTests",
@@ -138,7 +138,7 @@
138
138
  "id-tests-php": "php php/test/test_async.php --idTests",
139
139
  "id-tests-cs": "dotnet run --project cs/tests/tests.csproj --idTests",
140
140
  "id-tests": "npm run id-tests-js && npm run id-tests-py && npm run id-tests-php && npm run id-tests-cs",
141
- "benchmark": "node --loader ts-node/esm examples/ts/benchmark.ts"
141
+ "benchmark": "tsx examples/ts/benchmark.ts"
142
142
  },
143
143
  "types": "./js/ccxt.d.ts",
144
144
  "devDependencies": {
@@ -168,7 +168,7 @@
168
168
  "rollup-plugin-execute": "1.1.1",
169
169
  "terser-webpack-plugin": "^5.3.9",
170
170
  "ts-loader": "^9.4.2",
171
- "ts-node": "^10.9.1",
171
+ "tsx": "^4.7.2",
172
172
  "typescript": "4.7.4",
173
173
  "webpack": "^5.76.2",
174
174
  "webpack-cli": "^5.0.1"