ccxt 4.0.76 → 4.0.78

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/dist/cjs/ccxt.js CHANGED
@@ -180,7 +180,7 @@ var woo$1 = require('./src/pro/woo.js');
180
180
 
181
181
  //-----------------------------------------------------------------------------
182
182
  // this is updated by vss.js when building
183
- const version = '4.0.76';
183
+ const version = '4.0.78';
184
184
  Exchange["default"].ccxtVersion = version;
185
185
  const exchanges = {
186
186
  'ace': ace,
@@ -3366,12 +3366,18 @@ class Exchange {
3366
3366
  precision = this.safeValue(networkItem, 'precision', precision);
3367
3367
  }
3368
3368
  if (precision === undefined) {
3369
- return fee;
3369
+ return this.forceString(fee);
3370
3370
  }
3371
3371
  else {
3372
3372
  return this.decimalToPrecision(fee, ROUND, precision, this.precisionMode, this.paddingMode);
3373
3373
  }
3374
3374
  }
3375
+ forceString(value) {
3376
+ if (typeof value !== 'string') {
3377
+ return this.numberToString(value);
3378
+ }
3379
+ return value;
3380
+ }
3375
3381
  isTickPrecision() {
3376
3382
  return this.precisionMode === TICK_SIZE;
3377
3383
  }
@@ -90,6 +90,7 @@ class bingx extends bingx$1 {
90
90
  'market/trades': 3,
91
91
  'market/depth': 3,
92
92
  'market/kline': 3,
93
+ 'ticker/24hr': 1,
93
94
  },
94
95
  },
95
96
  'private': {
@@ -98,7 +99,6 @@ class bingx extends bingx$1 {
98
99
  'trade/openOrders': 3,
99
100
  'trade/historyOrders': 3,
100
101
  'account/balance': 3,
101
- 'ticker/24hr': 1,
102
102
  },
103
103
  'post': {
104
104
  'trade/order': 3,
@@ -255,6 +255,7 @@ class bingx extends bingx$1 {
255
255
  '500': errors.ExchangeError,
256
256
  '504': errors.ExchangeError,
257
257
  '100001': errors.AuthenticationError,
258
+ '100412': errors.AuthenticationError,
258
259
  '100202': errors.InsufficientFunds,
259
260
  '100400': errors.BadRequest,
260
261
  '100440': errors.ExchangeError,
@@ -1097,10 +1098,10 @@ class bingx extends bingx$1 {
1097
1098
  };
1098
1099
  let response = undefined;
1099
1100
  if (market['spot']) {
1100
- response = await this.swapV2PublicGetQuoteTicker(this.extend(request, params));
1101
+ response = await this.spotV1PublicGetTicker24hr(this.extend(request, params));
1101
1102
  }
1102
1103
  else {
1103
- response = await this.spotV1PublicGetCommonSymbols(this.extend(request, params));
1104
+ response = await this.swapV2PublicGetQuoteTicker(this.extend(request, params));
1104
1105
  }
1105
1106
  //
1106
1107
  // {
@@ -1123,7 +1124,8 @@ class bingx extends bingx$1 {
1123
1124
  // }
1124
1125
  //
1125
1126
  const data = this.safeValue(response, 'data');
1126
- return this.parseTicker(data, market);
1127
+ const ticker = this.safeValue(data, 0, data);
1128
+ return this.parseTicker(ticker, market);
1127
1129
  }
1128
1130
  async fetchTickers(symbols = undefined, params = {}) {
1129
1131
  /**
@@ -1136,15 +1138,21 @@ class bingx extends bingx$1 {
1136
1138
  * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1137
1139
  */
1138
1140
  await this.loadMarkets();
1141
+ let market = undefined;
1139
1142
  if (symbols !== undefined) {
1140
1143
  symbols = this.marketSymbols(symbols);
1141
1144
  const firstSymbol = this.safeString(symbols, 0);
1142
- const market = this.market(firstSymbol);
1143
- if (!market['swap']) {
1144
- throw new errors.BadRequest(this.id + ' fetchTicker is only supported for swap markets.');
1145
- }
1145
+ market = this.market(firstSymbol);
1146
+ }
1147
+ let type = undefined;
1148
+ [type, params] = this.handleMarketTypeAndParams('fetchTickers', market, params);
1149
+ let response = undefined;
1150
+ if (type === 'spot') {
1151
+ response = await this.spotV1PublicGetTicker24hr(params);
1152
+ }
1153
+ else {
1154
+ response = await this.swapV2PublicGetQuoteTicker(params);
1146
1155
  }
1147
- const response = await this.swapV2PublicGetQuoteTicker(params);
1148
1156
  //
1149
1157
  // {
1150
1158
  // "code": 0,
@@ -1171,6 +1179,20 @@ class bingx extends bingx$1 {
1171
1179
  return this.parseTickers(tickers, symbols);
1172
1180
  }
1173
1181
  parseTicker(ticker, market = undefined) {
1182
+ //
1183
+ // spot
1184
+ // {
1185
+ // symbol: 'BTC-USDT',
1186
+ // openPrice: '26032.08',
1187
+ // highPrice: '26178.86',
1188
+ // lowPrice: '25968.18',
1189
+ // lastPrice: '26113.60',
1190
+ // volume: '1161.79',
1191
+ // quoteVolume: '30288466.44',
1192
+ // openTime: '1693081020762',
1193
+ // closeTime: '1693167420762'
1194
+ // }
1195
+ // swap
1174
1196
  //
1175
1197
  // {
1176
1198
  // "symbol": "BTC-USDT",
@@ -1188,15 +1210,15 @@ class bingx extends bingx$1 {
1188
1210
  // }
1189
1211
  //
1190
1212
  const marketId = this.safeString(ticker, 'symbol');
1191
- const defaultType = this.safeString(this.options, 'defaultType', 'swap');
1192
- const symbol = this.safeSymbol(marketId, market, '-', defaultType);
1213
+ const change = this.safeString(ticker, 'priceChange');
1214
+ const type = (change === undefined) ? 'spot' : 'swap';
1215
+ const symbol = this.safeSymbol(marketId, market, undefined, type);
1193
1216
  const open = this.safeString(ticker, 'openPrice');
1194
1217
  const high = this.safeString(ticker, 'highPrice');
1195
1218
  const low = this.safeString(ticker, 'lowPrice');
1196
1219
  const close = this.safeString(ticker, 'lastPrice');
1197
1220
  const quoteVolume = this.safeString(ticker, 'quoteVolume');
1198
1221
  const baseVolume = this.safeString(ticker, 'volume');
1199
- const change = this.safeString(ticker, 'chapriceChangenge');
1200
1222
  const percentage = this.safeString(ticker, 'priceChangePercent');
1201
1223
  const ts = this.safeInteger(ticker, 'closeTime');
1202
1224
  const datetime = this.iso8601(ts);
@@ -2811,31 +2833,25 @@ class bingx extends bingx$1 {
2811
2833
  this.parseTransaction(data);
2812
2834
  }
2813
2835
  parseParams(params) {
2814
- let result = '';
2815
2836
  const sortedParams = this.keysort(params);
2816
2837
  const keys = Object.keys(sortedParams);
2817
2838
  for (let i = 0; i < keys.length; i++) {
2818
2839
  const key = keys[i];
2819
- if (i > 0) {
2820
- result += '&';
2821
- }
2822
2840
  const value = sortedParams[key];
2823
2841
  if (Array.isArray(value)) {
2824
- result += key + '=[';
2842
+ let arrStr = '[';
2825
2843
  for (let j = 0; j < value.length; j++) {
2826
2844
  const arrayElement = value[j];
2827
2845
  if (j > 0) {
2828
- result += ',';
2846
+ arrStr += ',';
2829
2847
  }
2830
- result += arrayElement.toString();
2848
+ arrStr += arrayElement.toString();
2831
2849
  }
2832
- result += ']';
2833
- }
2834
- else {
2835
- result += key + '=' + value.toString();
2850
+ arrStr += ']';
2851
+ sortedParams[key] = arrStr;
2836
2852
  }
2837
2853
  }
2838
- return result;
2854
+ return sortedParams;
2839
2855
  }
2840
2856
  sign(path, section = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
2841
2857
  const type = section[0];
@@ -2854,6 +2870,7 @@ class bingx extends bingx$1 {
2854
2870
  params = this.omit(params, this.extractParams(path));
2855
2871
  params = this.keysort(params);
2856
2872
  if (access === 'public') {
2873
+ params['timestamp'] = this.nonce();
2857
2874
  if (Object.keys(params).length) {
2858
2875
  url += '?' + this.urlencode(params);
2859
2876
  }
@@ -2861,8 +2878,9 @@ class bingx extends bingx$1 {
2861
2878
  else if (access === 'private') {
2862
2879
  this.checkRequiredCredentials();
2863
2880
  params['timestamp'] = this.nonce();
2864
- let query = this.parseParams(params);
2865
- const signature = this.hmac(this.encode(query), this.encode(this.secret), sha256.sha256);
2881
+ const parsedParams = this.parseParams(params);
2882
+ let query = this.urlencode(parsedParams);
2883
+ const signature = this.hmac(this.encode(this.rawencode(parsedParams)), this.encode(this.secret), sha256.sha256);
2866
2884
  if (Object.keys(params).length) {
2867
2885
  query = '?' + query + '&';
2868
2886
  }
@@ -277,6 +277,29 @@ class gate extends gate$1 {
277
277
  'sub_accounts/{user_id}/keys/{key}': 1,
278
278
  },
279
279
  },
280
+ 'portfolio': {
281
+ 'get': {
282
+ 'accounts': 1.5,
283
+ 'account_mode': 1.5,
284
+ 'borrowable': 1.5,
285
+ 'transferable': 1.5,
286
+ 'loans': 1.5,
287
+ 'loan_records': 1.5,
288
+ 'interest_records': 1.5,
289
+ 'spot/orders': 1.5,
290
+ 'spot/orders/{order_id}': 1.5,
291
+ },
292
+ 'post': {
293
+ 'loans': 1.5,
294
+ 'spot/orders': 1.5,
295
+ },
296
+ 'delete': {
297
+ 'spot/orders/{order_id}': 1.5,
298
+ },
299
+ 'patch': {
300
+ 'spot/orders/{order_id}': 1.5,
301
+ },
302
+ },
280
303
  'spot': {
281
304
  'get': {
282
305
  'fee': 1,
@@ -470,6 +493,22 @@ class gate extends gate$1 {
470
493
  'uni/lends': 1.5,
471
494
  },
472
495
  },
496
+ 'loan': {
497
+ 'get': {
498
+ 'collateral/orders': 1.5,
499
+ 'collateral/orders/{order_id}': 1.5,
500
+ 'collateral/repay_records': 1.5,
501
+ 'collateral/collaterals': 1.5,
502
+ 'collateral/total_amount': 1.5,
503
+ 'collateral/ltv': 1.5,
504
+ 'collateral/currencies': 1.5,
505
+ },
506
+ 'post': {
507
+ 'collateral/orders': 1.5,
508
+ 'collateral/repay': 1.5,
509
+ 'collateral/collaterals': 1.5,
510
+ },
511
+ },
473
512
  'account': {
474
513
  'get': {
475
514
  'detail': 1.5,
@@ -480,6 +519,9 @@ class gate extends gate$1 {
480
519
  'stp_groups': 1.5,
481
520
  'stp_groups/{stp_id}/users': 1.5,
482
521
  },
522
+ 'delete': {
523
+ 'stp_groups/{stp_id}/users': 1.5,
524
+ },
483
525
  },
484
526
  'rebate': {
485
527
  'get': {
@@ -221,6 +221,7 @@ class okx extends okx$1 {
221
221
  'tradingBot/grid/ai-param': 1,
222
222
  'tradingBot/grid/min-investment': 1,
223
223
  'tradingBot/public/rsi-back-testing': 1,
224
+ 'asset/exchange-list': 5 / 3,
224
225
  'finance/savings/lending-rate-summary': 5 / 3,
225
226
  'finance/savings/lending-rate-history': 5 / 3,
226
227
  // public broker
@@ -230,6 +230,9 @@ class okx extends okx$1 {
230
230
  * @param {string} [params.channel] the channel to subscribe to, tickers by default. Can be tickers, sprd-tickers, index-tickers, block-tickers
231
231
  * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
232
232
  */
233
+ if (this.isEmpty(symbols)) {
234
+ throw new errors.ArgumentsRequired(this.id + ' watchTickers requires a list of symbols');
235
+ }
233
236
  let channel = undefined;
234
237
  [channel, params] = this.handleOptionAndParams(params, 'watchTickers', 'channel', 'tickers');
235
238
  const newTickers = await this.subscribeMultiple('public', channel, symbols, params);
@@ -253,6 +253,7 @@ class whitebit extends whitebit$1 {
253
253
  '422': errors.OrderNotFound, // {"response":null,"status":422,"errors":{"orderId":["Finished order id 1295772653 not found on your account"]},"notification":null,"warning":"Finished order id 1295772653 not found on your account","_token":null}
254
254
  },
255
255
  'broad': {
256
+ 'This action is unauthorized': errors.PermissionDenied,
256
257
  'Given amount is less than min amount': errors.InvalidOrder,
257
258
  'Total is less than': errors.InvalidOrder,
258
259
  'fee must be no less than': errors.InvalidOrder,
package/js/ccxt.d.ts CHANGED
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
4
4
  import * as errors from './src/base/errors.js';
5
5
  import { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending } from './src/base/errors.js';
7
- declare const version = "4.0.75";
7
+ declare const version = "4.0.77";
8
8
  import ace from './src/ace.js';
9
9
  import alpaca from './src/alpaca.js';
10
10
  import ascendex from './src/ascendex.js';
package/js/ccxt.js CHANGED
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
38
38
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.0.76';
41
+ const version = '4.0.78';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -5,11 +5,11 @@ interface Exchange {
5
5
  spotV1PublicGetMarketTrades(params?: {}): Promise<implicitReturnType>;
6
6
  spotV1PublicGetMarketDepth(params?: {}): Promise<implicitReturnType>;
7
7
  spotV1PublicGetMarketKline(params?: {}): Promise<implicitReturnType>;
8
+ spotV1PublicGetTicker24hr(params?: {}): Promise<implicitReturnType>;
8
9
  spotV1PrivateGetTradeQuery(params?: {}): Promise<implicitReturnType>;
9
10
  spotV1PrivateGetTradeOpenOrders(params?: {}): Promise<implicitReturnType>;
10
11
  spotV1PrivateGetTradeHistoryOrders(params?: {}): Promise<implicitReturnType>;
11
12
  spotV1PrivateGetAccountBalance(params?: {}): Promise<implicitReturnType>;
12
- spotV1PrivateGetTicker24hr(params?: {}): Promise<implicitReturnType>;
13
13
  spotV1PrivatePostTradeOrder(params?: {}): Promise<implicitReturnType>;
14
14
  spotV1PrivatePostTradeCancel(params?: {}): Promise<implicitReturnType>;
15
15
  spotV1PrivatePostTradeBatchOrders(params?: {}): Promise<implicitReturnType>;
@@ -79,6 +79,19 @@ interface Exchange {
79
79
  privateSubAccountsPostSubAccountsUserIdUnlock(params?: {}): Promise<implicitReturnType>;
80
80
  privateSubAccountsPutSubAccountsUserIdKeysKey(params?: {}): Promise<implicitReturnType>;
81
81
  privateSubAccountsDeleteSubAccountsUserIdKeysKey(params?: {}): Promise<implicitReturnType>;
82
+ privatePortfolioGetAccounts(params?: {}): Promise<implicitReturnType>;
83
+ privatePortfolioGetAccountMode(params?: {}): Promise<implicitReturnType>;
84
+ privatePortfolioGetBorrowable(params?: {}): Promise<implicitReturnType>;
85
+ privatePortfolioGetTransferable(params?: {}): Promise<implicitReturnType>;
86
+ privatePortfolioGetLoans(params?: {}): Promise<implicitReturnType>;
87
+ privatePortfolioGetLoanRecords(params?: {}): Promise<implicitReturnType>;
88
+ privatePortfolioGetInterestRecords(params?: {}): Promise<implicitReturnType>;
89
+ privatePortfolioGetSpotOrders(params?: {}): Promise<implicitReturnType>;
90
+ privatePortfolioGetSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
91
+ privatePortfolioPostLoans(params?: {}): Promise<implicitReturnType>;
92
+ privatePortfolioPostSpotOrders(params?: {}): Promise<implicitReturnType>;
93
+ privatePortfolioDeleteSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
94
+ privatePortfolioPatchSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
82
95
  privateSpotGetFee(params?: {}): Promise<implicitReturnType>;
83
96
  privateSpotGetBatchFee(params?: {}): Promise<implicitReturnType>;
84
97
  privateSpotGetAccounts(params?: {}): Promise<implicitReturnType>;
@@ -212,11 +225,22 @@ interface Exchange {
212
225
  privateEarnGetUniInterestRecords(params?: {}): Promise<implicitReturnType>;
213
226
  privateEarnPostUniLends(params?: {}): Promise<implicitReturnType>;
214
227
  privateEarnPatchUniLends(params?: {}): Promise<implicitReturnType>;
228
+ privateLoanGetCollateralOrders(params?: {}): Promise<implicitReturnType>;
229
+ privateLoanGetCollateralOrdersOrderId(params?: {}): Promise<implicitReturnType>;
230
+ privateLoanGetCollateralRepayRecords(params?: {}): Promise<implicitReturnType>;
231
+ privateLoanGetCollateralCollaterals(params?: {}): Promise<implicitReturnType>;
232
+ privateLoanGetCollateralTotalAmount(params?: {}): Promise<implicitReturnType>;
233
+ privateLoanGetCollateralLtv(params?: {}): Promise<implicitReturnType>;
234
+ privateLoanGetCollateralCurrencies(params?: {}): Promise<implicitReturnType>;
235
+ privateLoanPostCollateralOrders(params?: {}): Promise<implicitReturnType>;
236
+ privateLoanPostCollateralRepay(params?: {}): Promise<implicitReturnType>;
237
+ privateLoanPostCollateralCollaterals(params?: {}): Promise<implicitReturnType>;
215
238
  privateAccountGetDetail(params?: {}): Promise<implicitReturnType>;
216
239
  privateAccountGetStpGroups(params?: {}): Promise<implicitReturnType>;
217
240
  privateAccountGetStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
218
241
  privateAccountPostStpGroups(params?: {}): Promise<implicitReturnType>;
219
242
  privateAccountPostStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
243
+ privateAccountDeleteStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
220
244
  privateRebateGetAgencyTransactionHistory(params?: {}): Promise<implicitReturnType>;
221
245
  privateRebateGetAgencyCommissionHistory(params?: {}): Promise<implicitReturnType>;
222
246
  }
@@ -79,6 +79,19 @@ interface gate {
79
79
  privateSubAccountsPostSubAccountsUserIdUnlock(params?: {}): Promise<implicitReturnType>;
80
80
  privateSubAccountsPutSubAccountsUserIdKeysKey(params?: {}): Promise<implicitReturnType>;
81
81
  privateSubAccountsDeleteSubAccountsUserIdKeysKey(params?: {}): Promise<implicitReturnType>;
82
+ privatePortfolioGetAccounts(params?: {}): Promise<implicitReturnType>;
83
+ privatePortfolioGetAccountMode(params?: {}): Promise<implicitReturnType>;
84
+ privatePortfolioGetBorrowable(params?: {}): Promise<implicitReturnType>;
85
+ privatePortfolioGetTransferable(params?: {}): Promise<implicitReturnType>;
86
+ privatePortfolioGetLoans(params?: {}): Promise<implicitReturnType>;
87
+ privatePortfolioGetLoanRecords(params?: {}): Promise<implicitReturnType>;
88
+ privatePortfolioGetInterestRecords(params?: {}): Promise<implicitReturnType>;
89
+ privatePortfolioGetSpotOrders(params?: {}): Promise<implicitReturnType>;
90
+ privatePortfolioGetSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
91
+ privatePortfolioPostLoans(params?: {}): Promise<implicitReturnType>;
92
+ privatePortfolioPostSpotOrders(params?: {}): Promise<implicitReturnType>;
93
+ privatePortfolioDeleteSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
94
+ privatePortfolioPatchSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
82
95
  privateSpotGetFee(params?: {}): Promise<implicitReturnType>;
83
96
  privateSpotGetBatchFee(params?: {}): Promise<implicitReturnType>;
84
97
  privateSpotGetAccounts(params?: {}): Promise<implicitReturnType>;
@@ -212,11 +225,22 @@ interface gate {
212
225
  privateEarnGetUniInterestRecords(params?: {}): Promise<implicitReturnType>;
213
226
  privateEarnPostUniLends(params?: {}): Promise<implicitReturnType>;
214
227
  privateEarnPatchUniLends(params?: {}): Promise<implicitReturnType>;
228
+ privateLoanGetCollateralOrders(params?: {}): Promise<implicitReturnType>;
229
+ privateLoanGetCollateralOrdersOrderId(params?: {}): Promise<implicitReturnType>;
230
+ privateLoanGetCollateralRepayRecords(params?: {}): Promise<implicitReturnType>;
231
+ privateLoanGetCollateralCollaterals(params?: {}): Promise<implicitReturnType>;
232
+ privateLoanGetCollateralTotalAmount(params?: {}): Promise<implicitReturnType>;
233
+ privateLoanGetCollateralLtv(params?: {}): Promise<implicitReturnType>;
234
+ privateLoanGetCollateralCurrencies(params?: {}): Promise<implicitReturnType>;
235
+ privateLoanPostCollateralOrders(params?: {}): Promise<implicitReturnType>;
236
+ privateLoanPostCollateralRepay(params?: {}): Promise<implicitReturnType>;
237
+ privateLoanPostCollateralCollaterals(params?: {}): Promise<implicitReturnType>;
215
238
  privateAccountGetDetail(params?: {}): Promise<implicitReturnType>;
216
239
  privateAccountGetStpGroups(params?: {}): Promise<implicitReturnType>;
217
240
  privateAccountGetStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
218
241
  privateAccountPostStpGroups(params?: {}): Promise<implicitReturnType>;
219
242
  privateAccountPostStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
243
+ privateAccountDeleteStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
220
244
  privateRebateGetAgencyTransactionHistory(params?: {}): Promise<implicitReturnType>;
221
245
  privateRebateGetAgencyCommissionHistory(params?: {}): Promise<implicitReturnType>;
222
246
  }
@@ -59,6 +59,7 @@ interface okx {
59
59
  publicGetTradingBotGridAiParam(params?: {}): Promise<implicitReturnType>;
60
60
  publicGetTradingBotGridMinInvestment(params?: {}): Promise<implicitReturnType>;
61
61
  publicGetTradingBotPublicRsiBackTesting(params?: {}): Promise<implicitReturnType>;
62
+ publicGetAssetExchangeList(params?: {}): Promise<implicitReturnType>;
62
63
  publicGetFinanceSavingsLendingRateSummary(params?: {}): Promise<implicitReturnType>;
63
64
  publicGetFinanceSavingsLendingRateHistory(params?: {}): Promise<implicitReturnType>;
64
65
  publicGetFinanceSfpDcdProducts(params?: {}): Promise<implicitReturnType>;
@@ -59,6 +59,7 @@ interface okex {
59
59
  publicGetTradingBotGridAiParam(params?: {}): Promise<implicitReturnType>;
60
60
  publicGetTradingBotGridMinInvestment(params?: {}): Promise<implicitReturnType>;
61
61
  publicGetTradingBotPublicRsiBackTesting(params?: {}): Promise<implicitReturnType>;
62
+ publicGetAssetExchangeList(params?: {}): Promise<implicitReturnType>;
62
63
  publicGetFinanceSavingsLendingRateSummary(params?: {}): Promise<implicitReturnType>;
63
64
  publicGetFinanceSavingsLendingRateHistory(params?: {}): Promise<implicitReturnType>;
64
65
  publicGetFinanceSfpDcdProducts(params?: {}): Promise<implicitReturnType>;
@@ -59,6 +59,7 @@ interface Exchange {
59
59
  publicGetTradingBotGridAiParam(params?: {}): Promise<implicitReturnType>;
60
60
  publicGetTradingBotGridMinInvestment(params?: {}): Promise<implicitReturnType>;
61
61
  publicGetTradingBotPublicRsiBackTesting(params?: {}): Promise<implicitReturnType>;
62
+ publicGetAssetExchangeList(params?: {}): Promise<implicitReturnType>;
62
63
  publicGetFinanceSavingsLendingRateSummary(params?: {}): Promise<implicitReturnType>;
63
64
  publicGetFinanceSavingsLendingRateHistory(params?: {}): Promise<implicitReturnType>;
64
65
  publicGetFinanceSfpDcdProducts(params?: {}): Promise<implicitReturnType>;
@@ -734,6 +734,7 @@ export default class Exchange {
734
734
  amountToPrecision(symbol: string, amount: any): any;
735
735
  feeToPrecision(symbol: string, fee: any): any;
736
736
  currencyToPrecision(code: string, fee: any, networkCode?: any): any;
737
+ forceString(value: any): any;
737
738
  isTickPrecision(): boolean;
738
739
  isDecimalPrecision(): boolean;
739
740
  isSignificantPrecision(): boolean;
@@ -3361,12 +3361,18 @@ export default class Exchange {
3361
3361
  precision = this.safeValue(networkItem, 'precision', precision);
3362
3362
  }
3363
3363
  if (precision === undefined) {
3364
- return fee;
3364
+ return this.forceString(fee);
3365
3365
  }
3366
3366
  else {
3367
3367
  return this.decimalToPrecision(fee, ROUND, precision, this.precisionMode, this.paddingMode);
3368
3368
  }
3369
3369
  }
3370
+ forceString(value) {
3371
+ if (typeof value !== 'string') {
3372
+ return this.numberToString(value);
3373
+ }
3374
+ return value;
3375
+ }
3370
3376
  isTickPrecision() {
3371
3377
  return this.precisionMode === TICK_SIZE;
3372
3378
  }
package/js/src/bingx.d.ts CHANGED
@@ -205,7 +205,7 @@ export default class bingx extends Exchange {
205
205
  };
206
206
  fetchDepositWithdrawFees(codes?: string[], params?: {}): Promise<any>;
207
207
  withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<void>;
208
- parseParams(params: any): string;
208
+ parseParams(params: any): {};
209
209
  sign(path: any, section?: string, method?: string, params?: {}, headers?: any, body?: any): {
210
210
  url: any;
211
211
  method: string;