ccxt 4.2.1 → 4.2.2

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
@@ -169,7 +169,7 @@ var woo$1 = require('./src/pro/woo.js');
169
169
 
170
170
  //-----------------------------------------------------------------------------
171
171
  // this is updated by vss.js when building
172
- const version = '4.2.1';
172
+ const version = '4.2.2';
173
173
  Exchange["default"].ccxtVersion = version;
174
174
  const exchanges = {
175
175
  'ace': ace,
@@ -1592,6 +1592,7 @@ class binance extends binance$1 {
1592
1592
  '-4046': errors.AuthenticationError,
1593
1593
  '-4047': errors.BadRequest,
1594
1594
  '-4054': errors.BadRequest,
1595
+ '-4164': errors.InvalidOrder,
1595
1596
  '-5001': errors.BadRequest,
1596
1597
  '-5002': errors.InsufficientFunds,
1597
1598
  '-5003': errors.InsufficientFunds,
@@ -117,6 +117,7 @@ class bingx extends bingx$1 {
117
117
  'trade/query': 3,
118
118
  'trade/openOrders': 3,
119
119
  'trade/historyOrders': 3,
120
+ 'user/commissionRate': 3,
120
121
  'account/balance': 3,
121
122
  },
122
123
  'post': {
@@ -124,6 +125,7 @@ class bingx extends bingx$1 {
124
125
  'trade/cancel': 3,
125
126
  'trade/batchOrders': 3,
126
127
  'trade/cancelOrders': 3,
128
+ 'trade/cancelOpenOrders': 3,
127
129
  },
128
130
  },
129
131
  },
@@ -1314,22 +1316,30 @@ class bingx extends bingx$1 {
1314
1316
  // }
1315
1317
  //
1316
1318
  const marketId = this.safeString(ticker, 'symbol');
1317
- // const change = this.safeString (ticker, 'priceChange'); // this is not ccxt's change because it does high-low instead of last-open
1318
1319
  const lastQty = this.safeString(ticker, 'lastQty');
1319
1320
  // in spot markets, lastQty is not present
1320
1321
  // it's (bad, but) the only way we can check the tickers origin
1321
1322
  const type = (lastQty === undefined) ? 'spot' : 'swap';
1322
- const symbol = this.safeSymbol(marketId, market, undefined, type);
1323
+ market = this.safeMarket(marketId, market, undefined, type);
1324
+ const symbol = market['symbol'];
1323
1325
  const open = this.safeString(ticker, 'openPrice');
1324
1326
  const high = this.safeString(ticker, 'highPrice');
1325
1327
  const low = this.safeString(ticker, 'lowPrice');
1326
1328
  const close = this.safeString(ticker, 'lastPrice');
1327
1329
  const quoteVolume = this.safeString(ticker, 'quoteVolume');
1328
1330
  const baseVolume = this.safeString(ticker, 'volume');
1331
+ let percentage = undefined;
1332
+ let change = undefined;
1333
+ if (market['swap']) {
1334
+ // right now only swap uses the 24h change, spot will be added soon
1335
+ percentage = this.safeString(ticker, 'priceChangePercent');
1336
+ change = this.safeString(ticker, 'priceChange');
1337
+ }
1329
1338
  // let percentage = this.safeString (ticker, 'priceChangePercent');
1330
1339
  // if (percentage !== undefined) {
1331
1340
  // percentage = percentage.replace ('%', '');
1332
1341
  // } similarly to change, it's not ccxt's percentage because it does priceChange/open, and priceChange is high-low
1342
+ // const change = this.safeString (ticker, 'priceChange'); // this is not ccxt's change because it does high-low instead of last-open
1333
1343
  const ts = this.safeInteger(ticker, 'closeTime');
1334
1344
  const datetime = this.iso8601(ts);
1335
1345
  const bid = this.safeString(ticker, 'bidPrice');
@@ -1351,8 +1361,8 @@ class bingx extends bingx$1 {
1351
1361
  'close': close,
1352
1362
  'last': undefined,
1353
1363
  'previousClose': undefined,
1354
- 'change': undefined,
1355
- 'percentage': undefined,
1364
+ 'change': change,
1365
+ 'percentage': percentage,
1356
1366
  'average': undefined,
1357
1367
  'baseVolume': baseVolume,
1358
1368
  'quoteVolume': quoteVolume,
@@ -2203,6 +2213,7 @@ class bingx extends bingx$1 {
2203
2213
  * @method
2204
2214
  * @name bingx#cancelAllOrders
2205
2215
  * @description cancel all open orders
2216
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20orders%20by%20symbol
2206
2217
  * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20All%20Orders
2207
2218
  * @param {string} [symbol] unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
2208
2219
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -2213,42 +2224,70 @@ class bingx extends bingx$1 {
2213
2224
  }
2214
2225
  await this.loadMarkets();
2215
2226
  const market = this.market(symbol);
2216
- if (market['type'] !== 'swap') {
2217
- throw new errors.BadRequest(this.id + ' cancelAllOrders is only supported for swap markets.');
2218
- }
2219
2227
  const request = {
2220
2228
  'symbol': market['id'],
2221
2229
  };
2222
- const response = await this.swapV2PrivateDeleteTradeAllOpenOrders(this.extend(request, params));
2223
- //
2224
- // {
2225
- // "code": 0,
2226
- // "msg": "",
2227
- // "data": {
2228
- // "success": [
2229
- // {
2230
- // "symbol": "LINK-USDT",
2231
- // "orderId": 1597783835095859200,
2232
- // "side": "BUY",
2233
- // "positionSide": "LONG",
2234
- // "type": "TRIGGER_LIMIT",
2235
- // "origQty": "5.0",
2236
- // "price": "9.0000",
2237
- // "executedQty": "0.0",
2238
- // "avgPrice": "0.0000",
2239
- // "cumQuote": "0",
2240
- // "stopPrice": "9.5000",
2241
- // "profit": "",
2242
- // "commission": "",
2243
- // "status": "NEW",
2244
- // "time": 1669776326000,
2245
- // "updateTime": 1669776326000
2246
- // }
2247
- // ],
2248
- // "failed": null
2249
- // }
2250
- // }
2251
- //
2230
+ let response = undefined;
2231
+ if (market['spot']) {
2232
+ response = await this.spotV1PrivatePostTradeCancelOpenOrders(this.extend(request, params));
2233
+ //
2234
+ // {
2235
+ // "code": 0,
2236
+ // "msg": "",
2237
+ // "debugMsg": "",
2238
+ // "data": {
2239
+ // "orders": [{
2240
+ // "symbol": "ADA-USDT",
2241
+ // "orderId": 1740659971369992192,
2242
+ // "transactTime": 1703840651730,
2243
+ // "price": 5,
2244
+ // "stopPrice": 0,
2245
+ // "origQty": 10,
2246
+ // "executedQty": 0,
2247
+ // "cummulativeQuoteQty": 0,
2248
+ // "status": "CANCELED",
2249
+ // "type": "LIMIT",
2250
+ // "side": "SELL"
2251
+ // }]
2252
+ // }
2253
+ // }
2254
+ //
2255
+ }
2256
+ else if (market['swap']) {
2257
+ response = await this.swapV2PrivateDeleteTradeAllOpenOrders(this.extend(request, params));
2258
+ //
2259
+ // {
2260
+ // "code": 0,
2261
+ // "msg": "",
2262
+ // "data": {
2263
+ // "success": [
2264
+ // {
2265
+ // "symbol": "LINK-USDT",
2266
+ // "orderId": 1597783835095859200,
2267
+ // "side": "BUY",
2268
+ // "positionSide": "LONG",
2269
+ // "type": "TRIGGER_LIMIT",
2270
+ // "origQty": "5.0",
2271
+ // "price": "9.0000",
2272
+ // "executedQty": "0.0",
2273
+ // "avgPrice": "0.0000",
2274
+ // "cumQuote": "0",
2275
+ // "stopPrice": "9.5000",
2276
+ // "profit": "",
2277
+ // "commission": "",
2278
+ // "status": "NEW",
2279
+ // "time": 1669776326000,
2280
+ // "updateTime": 1669776326000
2281
+ // }
2282
+ // ],
2283
+ // "failed": null
2284
+ // }
2285
+ // }
2286
+ //
2287
+ }
2288
+ else {
2289
+ throw new errors.BadRequest(this.id + ' cancelAllOrders is only supported for spot and swap markets.');
2290
+ }
2252
2291
  return response;
2253
2292
  }
2254
2293
  async cancelOrders(ids, symbol = undefined, params = {}) {
@@ -1332,6 +1332,12 @@ class bitstamp extends bitstamp$1 {
1332
1332
  * @method
1333
1333
  * @name bitstamp#createOrder
1334
1334
  * @description create a trade order
1335
+ * @see https://www.bitstamp.net/api/#tag/Orders/operation/OpenInstantBuyOrder
1336
+ * @see https://www.bitstamp.net/api/#tag/Orders/operation/OpenMarketBuyOrder
1337
+ * @see https://www.bitstamp.net/api/#tag/Orders/operation/OpenLimitBuyOrder
1338
+ * @see https://www.bitstamp.net/api/#tag/Orders/operation/OpenInstantSellOrder
1339
+ * @see https://www.bitstamp.net/api/#tag/Orders/operation/OpenMarketSellOrder
1340
+ * @see https://www.bitstamp.net/api/#tag/Orders/operation/OpenLimitSellOrder
1335
1341
  * @param {string} symbol unified symbol of the market to create an order in
1336
1342
  * @param {string} type 'market' or 'limit'
1337
1343
  * @param {string} side 'buy' or 'sell'
@@ -1342,27 +1348,42 @@ class bitstamp extends bitstamp$1 {
1342
1348
  */
1343
1349
  await this.loadMarkets();
1344
1350
  const market = this.market(symbol);
1345
- let method = 'privatePost' + this.capitalize(side);
1346
1351
  const request = {
1347
1352
  'pair': market['id'],
1348
1353
  'amount': this.amountToPrecision(symbol, amount),
1349
1354
  };
1355
+ const clientOrderId = this.safeString2(params, 'client_order_id', 'clientOrderId');
1356
+ if (clientOrderId !== undefined) {
1357
+ request['client_order_id'] = clientOrderId;
1358
+ params = this.omit(params, ['clientOrderId']);
1359
+ }
1360
+ let response = undefined;
1361
+ const capitalizedSide = this.capitalize(side);
1350
1362
  if (type === 'market') {
1351
- method += 'Market';
1363
+ if (capitalizedSide === 'Buy') {
1364
+ response = await this.privatePostBuyMarketPair(this.extend(request, params));
1365
+ }
1366
+ else {
1367
+ response = await this.privatePostSellMarketPair(this.extend(request, params));
1368
+ }
1352
1369
  }
1353
1370
  else if (type === 'instant') {
1354
- method += 'Instant';
1371
+ if (capitalizedSide === 'Buy') {
1372
+ response = await this.privatePostBuyInstantPair(this.extend(request, params));
1373
+ }
1374
+ else {
1375
+ response = await this.privatePostSellInstantPair(this.extend(request, params));
1376
+ }
1355
1377
  }
1356
1378
  else {
1357
1379
  request['price'] = this.priceToPrecision(symbol, price);
1380
+ if (capitalizedSide === 'Buy') {
1381
+ response = await this.privatePostBuyPair(this.extend(request, params));
1382
+ }
1383
+ else {
1384
+ response = await this.privatePostSellPair(this.extend(request, params));
1385
+ }
1358
1386
  }
1359
- method += 'Pair';
1360
- const clientOrderId = this.safeString2(params, 'client_order_id', 'clientOrderId');
1361
- if (clientOrderId !== undefined) {
1362
- request['client_order_id'] = clientOrderId;
1363
- params = this.omit(params, ['client_order_id', 'clientOrderId']);
1364
- }
1365
- const response = await this[method](this.extend(request, params));
1366
1387
  const order = this.parseOrder(response, market);
1367
1388
  order['type'] = type;
1368
1389
  return order;
@@ -1395,13 +1416,16 @@ class bitstamp extends bitstamp$1 {
1395
1416
  await this.loadMarkets();
1396
1417
  let market = undefined;
1397
1418
  const request = {};
1398
- let method = 'privatePostCancelAllOrders';
1419
+ let response = undefined;
1399
1420
  if (symbol !== undefined) {
1400
1421
  market = this.market(symbol);
1401
1422
  request['pair'] = market['id'];
1402
- method = 'privatePostCancelAllOrdersPair';
1423
+ response = await this.privatePostCancelAllOrdersPair(this.extend(request, params));
1424
+ }
1425
+ else {
1426
+ response = await this.privatePostCancelAllOrders(this.extend(request, params));
1403
1427
  }
1404
- return await this[method](this.extend(request, params));
1428
+ return response;
1405
1429
  }
1406
1430
  parseOrderStatus(status) {
1407
1431
  const statuses = {
@@ -432,7 +432,13 @@ class lykke extends lykke$1 {
432
432
  };
433
433
  // publicGetTickers or publicGetPrices
434
434
  const method = this.safeString(this.options, 'fetchTickerMethod', 'publicGetTickers');
435
- const response = await this[method](this.extend(request, params));
435
+ let response = undefined;
436
+ if (method === 'publicGetPrices') {
437
+ response = await this.publicGetPrices(this.extend(request, params));
438
+ }
439
+ else {
440
+ response = await this.publicGetTickers(this.extend(request, params));
441
+ }
436
442
  const ticker = this.safeValue(response, 'payload', []);
437
443
  //
438
444
  // publicGetTickers
@@ -786,8 +792,13 @@ class lykke extends lykke$1 {
786
792
  if (type === 'limit') {
787
793
  query['price'] = parseFloat(this.priceToPrecision(market['symbol'], price));
788
794
  }
789
- const method = 'privatePostOrders' + this.capitalize(type);
790
- const result = await this[method](this.extend(query, params));
795
+ let result = undefined;
796
+ if (this.capitalize(type) === 'Market') {
797
+ result = await this.privatePostOrdersMarket(this.extend(query, params));
798
+ }
799
+ else {
800
+ result = await this.privatePostOrdersLimit(this.extend(query, params));
801
+ }
791
802
  //
792
803
  // market
793
804
  //
@@ -1189,9 +1189,15 @@ class poloniexfutures extends poloniexfutures$1 {
1189
1189
  if (symbol !== undefined) {
1190
1190
  request['symbol'] = this.marketId(symbol);
1191
1191
  }
1192
- const stop = this.safeValue(params, 'stop');
1193
- const method = stop ? 'privateDeleteStopOrders' : 'privateDeleteOrders';
1194
- const response = await this[method](this.extend(request, params));
1192
+ const stop = this.safeValue2(params, 'stop', 'trigger');
1193
+ params = this.omit(params, ['stop', 'trigger']);
1194
+ let response = undefined;
1195
+ if (stop) {
1196
+ response = await this.privateDeleteStopOrders(this.extend(request, params));
1197
+ }
1198
+ else {
1199
+ response = await this.privateDeleteOrders(this.extend(request, params));
1200
+ }
1195
1201
  //
1196
1202
  // {
1197
1203
  // "code": "200000",
@@ -1253,9 +1259,9 @@ class poloniexfutures extends poloniexfutures$1 {
1253
1259
  * @returns An [array of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1254
1260
  */
1255
1261
  await this.loadMarkets();
1256
- const stop = this.safeValue(params, 'stop');
1262
+ const stop = this.safeValue2(params, 'stop', 'trigger');
1257
1263
  const until = this.safeInteger2(params, 'until', 'till');
1258
- params = this.omit(params, ['stop', 'until', 'till']);
1264
+ params = this.omit(params, ['triger', 'stop', 'until', 'till']);
1259
1265
  if (status === 'closed') {
1260
1266
  status = 'done';
1261
1267
  }
@@ -1277,8 +1283,13 @@ class poloniexfutures extends poloniexfutures$1 {
1277
1283
  if (until !== undefined) {
1278
1284
  request['endAt'] = until;
1279
1285
  }
1280
- const method = stop ? 'privateGetStopOrders' : 'privateGetOrders';
1281
- const response = await this[method](this.extend(request, params));
1286
+ let response = undefined;
1287
+ if (stop) {
1288
+ response = await this.privateGetStopOrders(this.extend(request, params));
1289
+ }
1290
+ else {
1291
+ response = await this.privateGetOrders(this.extend(request, params));
1292
+ }
1282
1293
  //
1283
1294
  // {
1284
1295
  // "code": "200000",
@@ -1388,20 +1399,20 @@ class poloniexfutures extends poloniexfutures$1 {
1388
1399
  */
1389
1400
  await this.loadMarkets();
1390
1401
  const request = {};
1391
- let method = 'privateGetOrdersOrderId';
1402
+ let response = undefined;
1392
1403
  if (id === undefined) {
1393
1404
  const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
1394
1405
  if (clientOrderId === undefined) {
1395
1406
  throw new errors.InvalidOrder(this.id + ' fetchOrder() requires parameter id or params.clientOid');
1396
1407
  }
1397
1408
  request['clientOid'] = clientOrderId;
1398
- method = 'privateGetOrdersByClientOid';
1399
1409
  params = this.omit(params, ['clientOid', 'clientOrderId']);
1410
+ response = await this.privateGetClientOrderIdClientOid(this.extend(request, params));
1400
1411
  }
1401
1412
  else {
1402
1413
  request['order-id'] = id;
1414
+ response = await this.privateGetOrdersOrderId(this.extend(request, params));
1403
1415
  }
1404
- const response = await this[method](this.extend(request, params));
1405
1416
  //
1406
1417
  // {
1407
1418
  // "code": "200000",
@@ -1721,7 +1732,7 @@ class poloniexfutures extends poloniexfutures$1 {
1721
1732
  const version = this.safeString(params, 'version', defaultVersion);
1722
1733
  const tail = '/api/' + version + '/' + this.implodeParams(path, params);
1723
1734
  url += tail;
1724
- const query = this.omit(params, path);
1735
+ const query = this.omit(params, this.extractParams(path));
1725
1736
  const queryLength = Object.keys(query).length;
1726
1737
  if (api === 'public') {
1727
1738
  if (queryLength) {
@@ -1114,25 +1114,27 @@ class binance extends binance$1 {
1114
1114
  const listenKeyRefreshRate = this.safeInteger(this.options, 'listenKeyRefreshRate', 1200000);
1115
1115
  const delay = this.sum(listenKeyRefreshRate, 10000);
1116
1116
  if (time - lastAuthenticatedTime > delay) {
1117
- let method = 'publicPostUserDataStream';
1117
+ let response = undefined;
1118
1118
  if (type === 'future') {
1119
- method = 'fapiPrivatePostListenKey';
1119
+ response = await this.fapiPrivatePostListenKey(query);
1120
1120
  }
1121
1121
  else if (type === 'delivery') {
1122
- method = 'dapiPrivatePostListenKey';
1122
+ response = await this.dapiPrivatePostListenKey(query);
1123
1123
  }
1124
1124
  else if (type === 'margin' && isCrossMargin) {
1125
- method = 'sapiPostUserDataStream';
1125
+ response = await this.sapiPostUserDataStream(query);
1126
1126
  }
1127
1127
  else if (isIsolatedMargin) {
1128
- method = 'sapiPostUserDataStreamIsolated';
1129
1128
  if (symbol === undefined) {
1130
1129
  throw new errors.ArgumentsRequired(this.id + ' authenticate() requires a symbol argument for isolated margin mode');
1131
1130
  }
1132
1131
  const marketId = this.marketId(symbol);
1133
1132
  query = this.extend(query, { 'symbol': marketId });
1133
+ response = await this.sapiPostUserDataStreamIsolated(query);
1134
+ }
1135
+ else {
1136
+ response = await this.publicPostUserDataStream(query);
1134
1137
  }
1135
- const response = await this[method](query);
1136
1138
  this.options[type] = this.extend(options, {
1137
1139
  'listenKey': this.safeString(response, 'listenKey'),
1138
1140
  'lastAuthenticatedTime': time,
@@ -1158,26 +1160,27 @@ class binance extends binance$1 {
1158
1160
  // A network error happened: we can't renew a listen key that does not exist.
1159
1161
  return;
1160
1162
  }
1161
- let method = 'publicPutUserDataStream';
1162
1163
  const request = {};
1163
1164
  const symbol = this.safeString(params, 'symbol');
1164
1165
  const sendParams = this.omit(params, ['type', 'symbol']);
1165
- if (type === 'future') {
1166
- method = 'fapiPrivatePutListenKey';
1167
- }
1168
- else if (type === 'delivery') {
1169
- method = 'dapiPrivatePutListenKey';
1170
- }
1171
- else {
1172
- request['listenKey'] = listenKey;
1173
- if (type === 'margin') {
1174
- request['symbol'] = symbol;
1175
- method = 'sapiPutUserDataStream';
1176
- }
1177
- }
1178
1166
  const time = this.milliseconds();
1179
1167
  try {
1180
- await this[method](this.extend(request, sendParams));
1168
+ if (type === 'future') {
1169
+ await this.fapiPrivatePutListenKey(this.extend(request, sendParams));
1170
+ }
1171
+ else if (type === 'delivery') {
1172
+ await this.dapiPrivatePutListenKey(this.extend(request, sendParams));
1173
+ }
1174
+ else {
1175
+ request['listenKey'] = listenKey;
1176
+ if (type === 'margin') {
1177
+ request['symbol'] = symbol;
1178
+ await this.sapiPutUserDataStream(this.extend(request, sendParams));
1179
+ }
1180
+ else {
1181
+ await this.publicPutUserDataStream(this.extend(request, sendParams));
1182
+ }
1183
+ }
1181
1184
  }
1182
1185
  catch (error) {
1183
1186
  const url = this.urls['api']['ws'][type] + '/' + this.options[type]['listenKey'];
@@ -886,10 +886,15 @@ class bybit extends bybit$1 {
886
886
  }
887
887
  const trades = this.myTrades;
888
888
  const symbols = {};
889
- const method = spot ? 'parseWsTrade' : 'parseTrade';
890
889
  for (let i = 0; i < data.length; i++) {
891
890
  const rawTrade = data[i];
892
- const parsed = this[method](rawTrade);
891
+ let parsed = undefined;
892
+ if (spot) {
893
+ parsed = this.parseWsTrade(rawTrade);
894
+ }
895
+ else {
896
+ parsed = this.parseTrade(rawTrade);
897
+ }
893
898
  const symbol = parsed['symbol'];
894
899
  symbols[symbol] = true;
895
900
  trades.append(parsed);
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 type { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks } 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, NoChange } from './src/base/errors.js';
7
- declare const version = "4.2.0";
7
+ declare const version = "4.2.1";
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, NoChange } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.2.1';
41
+ const version = '4.2.2';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -9,11 +9,13 @@ interface Exchange {
9
9
  spotV1PrivateGetTradeQuery(params?: {}): Promise<implicitReturnType>;
10
10
  spotV1PrivateGetTradeOpenOrders(params?: {}): Promise<implicitReturnType>;
11
11
  spotV1PrivateGetTradeHistoryOrders(params?: {}): Promise<implicitReturnType>;
12
+ spotV1PrivateGetUserCommissionRate(params?: {}): Promise<implicitReturnType>;
12
13
  spotV1PrivateGetAccountBalance(params?: {}): Promise<implicitReturnType>;
13
14
  spotV1PrivatePostTradeOrder(params?: {}): Promise<implicitReturnType>;
14
15
  spotV1PrivatePostTradeCancel(params?: {}): Promise<implicitReturnType>;
15
16
  spotV1PrivatePostTradeBatchOrders(params?: {}): Promise<implicitReturnType>;
16
17
  spotV1PrivatePostTradeCancelOrders(params?: {}): Promise<implicitReturnType>;
18
+ spotV1PrivatePostTradeCancelOpenOrders(params?: {}): Promise<implicitReturnType>;
17
19
  spotV3PrivateGetGetAssetTransfer(params?: {}): Promise<implicitReturnType>;
18
20
  spotV3PrivateGetAssetTransfer(params?: {}): Promise<implicitReturnType>;
19
21
  spotV3PrivateGetCapitalDepositHisrec(params?: {}): Promise<implicitReturnType>;
package/js/src/binance.js CHANGED
@@ -1595,6 +1595,7 @@ export default class binance extends Exchange {
1595
1595
  '-4046': AuthenticationError,
1596
1596
  '-4047': BadRequest,
1597
1597
  '-4054': BadRequest,
1598
+ '-4164': InvalidOrder,
1598
1599
  '-5001': BadRequest,
1599
1600
  '-5002': InsufficientFunds,
1600
1601
  '-5003': InsufficientFunds,