ccxt 4.1.78 → 4.1.80

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
@@ -172,7 +172,7 @@ var woo$1 = require('./src/pro/woo.js');
172
172
 
173
173
  //-----------------------------------------------------------------------------
174
174
  // this is updated by vss.js when building
175
- const version = '4.1.78';
175
+ const version = '4.1.80';
176
176
  Exchange["default"].ccxtVersion = version;
177
177
  const exchanges = {
178
178
  'ace': ace,
@@ -1223,35 +1223,6 @@ class bingx extends bingx$1 {
1223
1223
  else {
1224
1224
  response = await this.swapV2PublicGetQuoteTicker(this.extend(request, params));
1225
1225
  }
1226
- //
1227
- // {
1228
- // "code": 0,
1229
- // "msg": "",
1230
- // "data": {
1231
- // "symbol": "BTC-USDT",
1232
- // "priceChange": "52.5",
1233
- // "priceChangePercent": "0.31",
1234
- // "lastPrice": "16880.5",
1235
- // "lastQty": "2.2238",
1236
- // "highPrice": "16897.5",
1237
- // "lowPrice": "16726.0",
1238
- // "volume": "245870.1692",
1239
- // "quoteVolume": "4151395117.73",
1240
- // "openPrice": "16832.0",
1241
- // "openTime": 1672026667803,
1242
- // "closeTime": 1672026648425,
1243
- // added some time ago:
1244
- // "firstId": 12345,
1245
- // "lastId": 12349,
1246
- // "count": 5,
1247
- // added 2023-11-10:
1248
- // "bidPrice": 16726.0,
1249
- // "bidQty": 0.05,
1250
- // "askPrice": 16726.0,
1251
- // "askQty": 0.05,
1252
- // }
1253
- // }
1254
- //
1255
1226
  const data = this.safeValue(response, 'data');
1256
1227
  const ticker = this.safeValue(data, 0, data);
1257
1228
  return this.parseTicker(ticker, market);
@@ -1282,37 +1253,6 @@ class bingx extends bingx$1 {
1282
1253
  else {
1283
1254
  response = await this.swapV2PublicGetQuoteTicker(params);
1284
1255
  }
1285
- //
1286
- // {
1287
- // "code": 0,
1288
- // "msg": "",
1289
- // "data": [
1290
- // {
1291
- // "symbol": "BTC-USDT",
1292
- // "priceChange": "52.5",
1293
- // "priceChangePercent": "0.31",
1294
- // "lastPrice": "16880.5",
1295
- // "lastQty": "2.2238",
1296
- // "highPrice": "16897.5",
1297
- // "lowPrice": "16726.0",
1298
- // "volume": "245870.1692",
1299
- // "quoteVolume": "4151395117.73",
1300
- // "openPrice": "16832.0",
1301
- // "openTime": 1672026667803,
1302
- // "closeTime": 1672026648425,
1303
- // added some time ago:
1304
- // "firstId": 12345,
1305
- // "lastId": 12349,
1306
- // "count": 5,
1307
- // added 2023-11-10:
1308
- // "bidPrice": 16726.0,
1309
- // "bidQty": 0.05,
1310
- // "askPrice": 16726.0,
1311
- // "askQty": 0.05,
1312
- // },
1313
- // ]
1314
- // }
1315
- //
1316
1256
  const tickers = this.safeValue(response, 'data');
1317
1257
  return this.parseTickers(tickers, symbols);
1318
1258
  }
@@ -1329,10 +1269,6 @@ class bingx extends bingx$1 {
1329
1269
  // "quoteVolume": "30288466.44",
1330
1270
  // "openTime": "1693081020762",
1331
1271
  // "closeTime": "1693167420762",
1332
- // added some time ago:
1333
- // "firstId": 12345,
1334
- // "lastId": 12349,
1335
- // "count": 5,
1336
1272
  // added 2023-11-10:
1337
1273
  // "bidPrice": 16726.0,
1338
1274
  // "bidQty": 0.05,
@@ -1344,9 +1280,9 @@ class bingx extends bingx$1 {
1344
1280
  // {
1345
1281
  // "symbol": "BTC-USDT",
1346
1282
  // "priceChange": "52.5",
1347
- // "priceChangePercent": "0.31",
1283
+ // "priceChangePercent": "0.31%", // they started to add the percent sign in value
1348
1284
  // "lastPrice": "16880.5",
1349
- // "lastQty": "2.2238",
1285
+ // "lastQty": "2.2238", // only present in swap!
1350
1286
  // "highPrice": "16897.5",
1351
1287
  // "lowPrice": "16726.0",
1352
1288
  // "volume": "245870.1692",
@@ -1354,10 +1290,6 @@ class bingx extends bingx$1 {
1354
1290
  // "openPrice": "16832.0",
1355
1291
  // "openTime": 1672026667803,
1356
1292
  // "closeTime": 1672026648425,
1357
- // added some time ago:
1358
- // "firstId": 12345,
1359
- // "lastId": 12349,
1360
- // "count": 5,
1361
1293
  // added 2023-11-10:
1362
1294
  // "bidPrice": 16726.0,
1363
1295
  // "bidQty": 0.05,
@@ -1367,7 +1299,10 @@ class bingx extends bingx$1 {
1367
1299
  //
1368
1300
  const marketId = this.safeString(ticker, 'symbol');
1369
1301
  const change = this.safeString(ticker, 'priceChange');
1370
- const type = (change === undefined) ? 'spot' : 'swap';
1302
+ const lastQty = this.safeString(ticker, 'lastQty');
1303
+ // in spot markets, lastQty is not present
1304
+ // it's (bad, but) the only way we can check the tickers origin
1305
+ const type = (lastQty === undefined) ? 'spot' : 'swap';
1371
1306
  const symbol = this.safeSymbol(marketId, market, undefined, type);
1372
1307
  const open = this.safeString(ticker, 'openPrice');
1373
1308
  const high = this.safeString(ticker, 'highPrice');
@@ -1375,8 +1310,10 @@ class bingx extends bingx$1 {
1375
1310
  const close = this.safeString(ticker, 'lastPrice');
1376
1311
  const quoteVolume = this.safeString(ticker, 'quoteVolume');
1377
1312
  const baseVolume = this.safeString(ticker, 'volume');
1378
- let percentage = this.safeString(ticker, 'priceChangePercent', ''); // priceChangePercent: '5.66%',
1379
- percentage = percentage.replace('%', '');
1313
+ let percentage = this.safeString(ticker, 'priceChangePercent');
1314
+ if (percentage !== undefined) {
1315
+ percentage = percentage.replace('%', '');
1316
+ }
1380
1317
  const ts = this.safeInteger(ticker, 'closeTime');
1381
1318
  const datetime = this.iso8601(ts);
1382
1319
  const bid = this.safeString(ticker, 'bidPrice');
@@ -2972,7 +2909,8 @@ class bingx extends bingx$1 {
2972
2909
  }
2973
2910
  parseTransactionStatus(status) {
2974
2911
  const statuses = {
2975
- '0': 'ok',
2912
+ '0': 'pending',
2913
+ '1': 'ok',
2976
2914
  '10': 'pending',
2977
2915
  '20': 'rejected',
2978
2916
  '30': 'ok',
@@ -3941,6 +3941,7 @@ class bitget extends bitget$1 {
3941
3941
  * @param {string} symbol unified symbol of the market the order was made in
3942
3942
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3943
3943
  * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
3944
+ * @param {string} [params.planType] *swap only* either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
3944
3945
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3945
3946
  */
3946
3947
  if (symbol === undefined) {
@@ -4337,6 +4338,7 @@ class bitget extends bitget$1 {
4337
4338
  * @param {int} [since] the earliest time in ms to fetch open orders for
4338
4339
  * @param {int} [limit] the maximum number of open order structures to retrieve
4339
4340
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4341
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
4340
4342
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4341
4343
  */
4342
4344
  await this.loadMarkets();
@@ -4581,6 +4583,7 @@ class bitget extends bitget$1 {
4581
4583
  * @param {int} [limit] the max number of closed orders to return
4582
4584
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4583
4585
  * @param {int} [params.until] the latest time in ms to fetch entries for
4586
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
4584
4587
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4585
4588
  */
4586
4589
  await this.loadMarkets();
@@ -4623,6 +4626,7 @@ class bitget extends bitget$1 {
4623
4626
  * @param {int} [limit] the max number of canceled orders to return
4624
4627
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4625
4628
  * @param {int} [params.until] the latest time in ms to fetch entries for
4629
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
4626
4630
  * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4627
4631
  */
4628
4632
  if (symbol === undefined) {
@@ -201,6 +201,7 @@ class coinbase extends coinbase$1 {
201
201
  'brokerage/product_book',
202
202
  'brokerage/best_bid_ask',
203
203
  'brokerage/convert/trade/{trade_id}',
204
+ 'brokerage/time',
204
205
  ],
205
206
  'post': [
206
207
  'brokerage/orders',
@@ -203,6 +203,9 @@ class cryptocom extends cryptocom$1 {
203
203
  'private/get-currency-networks': 10 / 3,
204
204
  'private/get-deposit-history': 10 / 3,
205
205
  'private/get-deposit-address': 10 / 3,
206
+ 'private/export/create-export-request': 10 / 3,
207
+ 'private/export/get-export-requests': 10 / 3,
208
+ 'private/export/download-export-output': 10 / 3,
206
209
  'private/get-account-summary': 10 / 3,
207
210
  'private/create-order': 2 / 3,
208
211
  'private/cancel-order': 2 / 3,
@@ -221,6 +224,7 @@ class cryptocom extends cryptocom$1 {
221
224
  'private/otc/accept-quote': 100,
222
225
  'private/otc/get-quote-history': 10 / 3,
223
226
  'private/otc/get-trade-history': 10 / 3,
227
+ 'private/otc/create-order': 10 / 3,
224
228
  },
225
229
  },
226
230
  },
@@ -1573,7 +1573,19 @@ class currencycom extends currencycom$1 {
1573
1573
  if (limit !== undefined) {
1574
1574
  request['limit'] = limit;
1575
1575
  }
1576
- const response = await this[method](this.extend(request, params));
1576
+ let response = undefined;
1577
+ if (method === 'privateGetV2Deposits') {
1578
+ response = await this.privateGetV2Deposits(this.extend(request, params));
1579
+ }
1580
+ else if (method === 'privateGetV2Withdrawals') {
1581
+ response = await this.privateGetV2Withdrawals(this.extend(request, params));
1582
+ }
1583
+ else if (method === 'privateGetV2Transactions') {
1584
+ response = await this.privateGetV2Transactions(this.extend(request, params));
1585
+ }
1586
+ else {
1587
+ throw new errors.NotSupported(this.id + ' fetchTransactionsByMethod() not support this method');
1588
+ }
1577
1589
  //
1578
1590
  // [
1579
1591
  // {
@@ -150,9 +150,9 @@ class mexc extends mexc$1 {
150
150
  'get': {
151
151
  'ping': 1,
152
152
  'time': 1,
153
- 'exchangeInfo': 1,
153
+ 'exchangeInfo': 10,
154
154
  'depth': 1,
155
- 'trades': 1,
155
+ 'trades': 5,
156
156
  'historicalTrades': 1,
157
157
  'aggTrades': 1,
158
158
  'klines': 1,
@@ -165,17 +165,18 @@ class mexc extends mexc$1 {
165
165
  },
166
166
  'private': {
167
167
  'get': {
168
- 'order': 1,
169
- 'openOrders': 1,
170
- 'allOrders': 1,
168
+ 'order': 2,
169
+ 'openOrders': 3,
170
+ 'allOrders': 10,
171
171
  'account': 10,
172
- 'myTrades': 1,
172
+ 'myTrades': 10,
173
173
  'sub-account/list': 1,
174
174
  'sub-account/apiKey': 1,
175
- 'capital/config/getall': 1,
175
+ 'capital/config/getall': 10,
176
176
  'capital/deposit/hisrec': 1,
177
177
  'capital/withdraw/history': 1,
178
- 'capital/deposit/address': 1,
178
+ 'capital/withdraw/address': 10,
179
+ 'capital/deposit/address': 10,
179
180
  'capital/transfer': 1,
180
181
  'capital/transfer/tranId': 1,
181
182
  'capital/transfer/internal': 1,
@@ -219,7 +220,7 @@ class mexc extends mexc$1 {
219
220
  'capital/transfer/internal': 1,
220
221
  'capital/deposit/address': 1,
221
222
  'capital/sub-account/universalTransfer': 1,
222
- 'capital/convert': 1,
223
+ 'capital/convert': 10,
223
224
  'mxDeduct/enable': 1,
224
225
  'userDataStream': 1,
225
226
  },
@@ -430,14 +430,22 @@ class probit extends probit$1 {
430
430
  }
431
431
  const precision = this.parsePrecision(this.safeString(network, 'precision'));
432
432
  const withdrawFee = this.safeValue(network, 'withdrawal_fee', []);
433
- const networkfee = this.safeValue(withdrawFee, 0, {});
433
+ let networkFee = this.safeValue(withdrawFee, 0, {});
434
+ for (let k = 0; k < withdrawFee.length; k++) {
435
+ const withdrawPlatform = withdrawFee[k];
436
+ const feeCurrencyId = this.safeString(withdrawPlatform, 'currency_id');
437
+ if (feeCurrencyId === id) {
438
+ networkFee = withdrawPlatform;
439
+ break;
440
+ }
441
+ }
434
442
  networkList[networkCode] = {
435
443
  'id': networkId,
436
444
  'network': networkCode,
437
445
  'active': currentActive,
438
446
  'deposit': currentDeposit,
439
447
  'withdraw': currentWithdraw,
440
- 'fee': this.safeNumber(networkfee, 'amount'),
448
+ 'fee': this.safeNumber(networkFee, 'amount'),
441
449
  'precision': this.parseNumber(precision),
442
450
  'limits': {
443
451
  'withdraw': {
@@ -201,6 +201,11 @@ class woo extends woo$1 {
201
201
  },
202
202
  },
203
203
  'v3': {
204
+ 'public': {
205
+ 'get': {
206
+ 'insuranceFund': 3,
207
+ },
208
+ },
204
209
  'private': {
205
210
  'get': {
206
211
  'algo/order/{oid}': 1,
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, 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.1.77";
7
+ declare const version = "4.1.79";
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.1.78';
41
+ const version = '4.1.80';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -58,6 +58,7 @@ interface Exchange {
58
58
  v3PrivateGetBrokerageProductBook(params?: {}): Promise<implicitReturnType>;
59
59
  v3PrivateGetBrokerageBestBidAsk(params?: {}): Promise<implicitReturnType>;
60
60
  v3PrivateGetBrokerageConvertTradeTradeId(params?: {}): Promise<implicitReturnType>;
61
+ v3PrivateGetBrokerageTime(params?: {}): Promise<implicitReturnType>;
61
62
  v3PrivatePostBrokerageOrders(params?: {}): Promise<implicitReturnType>;
62
63
  v3PrivatePostBrokerageOrdersBatchCancel(params?: {}): Promise<implicitReturnType>;
63
64
  v3PrivatePostBrokerageOrdersEdit(params?: {}): Promise<implicitReturnType>;
@@ -52,6 +52,9 @@ interface Exchange {
52
52
  v2PrivatePostPrivateGetCurrencyNetworks(params?: {}): Promise<implicitReturnType>;
53
53
  v2PrivatePostPrivateGetDepositHistory(params?: {}): Promise<implicitReturnType>;
54
54
  v2PrivatePostPrivateGetDepositAddress(params?: {}): Promise<implicitReturnType>;
55
+ v2PrivatePostPrivateExportCreateExportRequest(params?: {}): Promise<implicitReturnType>;
56
+ v2PrivatePostPrivateExportGetExportRequests(params?: {}): Promise<implicitReturnType>;
57
+ v2PrivatePostPrivateExportDownloadExportOutput(params?: {}): Promise<implicitReturnType>;
55
58
  v2PrivatePostPrivateGetAccountSummary(params?: {}): Promise<implicitReturnType>;
56
59
  v2PrivatePostPrivateCreateOrder(params?: {}): Promise<implicitReturnType>;
57
60
  v2PrivatePostPrivateCancelOrder(params?: {}): Promise<implicitReturnType>;
@@ -70,6 +73,7 @@ interface Exchange {
70
73
  v2PrivatePostPrivateOtcAcceptQuote(params?: {}): Promise<implicitReturnType>;
71
74
  v2PrivatePostPrivateOtcGetQuoteHistory(params?: {}): Promise<implicitReturnType>;
72
75
  v2PrivatePostPrivateOtcGetTradeHistory(params?: {}): Promise<implicitReturnType>;
76
+ v2PrivatePostPrivateOtcCreateOrder(params?: {}): Promise<implicitReturnType>;
73
77
  derivativesPublicGetPublicAuth(params?: {}): Promise<implicitReturnType>;
74
78
  derivativesPublicGetPublicGetInstruments(params?: {}): Promise<implicitReturnType>;
75
79
  derivativesPublicGetPublicGetBook(params?: {}): Promise<implicitReturnType>;
@@ -24,6 +24,7 @@ interface Exchange {
24
24
  spotPrivateGetCapitalConfigGetall(params?: {}): Promise<implicitReturnType>;
25
25
  spotPrivateGetCapitalDepositHisrec(params?: {}): Promise<implicitReturnType>;
26
26
  spotPrivateGetCapitalWithdrawHistory(params?: {}): Promise<implicitReturnType>;
27
+ spotPrivateGetCapitalWithdrawAddress(params?: {}): Promise<implicitReturnType>;
27
28
  spotPrivateGetCapitalDepositAddress(params?: {}): Promise<implicitReturnType>;
28
29
  spotPrivateGetCapitalTransfer(params?: {}): Promise<implicitReturnType>;
29
30
  spotPrivateGetCapitalTransferTranId(params?: {}): Promise<implicitReturnType>;
@@ -46,6 +46,7 @@ interface Exchange {
46
46
  v1PrivateDeleteOrders(params?: {}): Promise<implicitReturnType>;
47
47
  v1PrivateDeleteAssetWithdraw(params?: {}): Promise<implicitReturnType>;
48
48
  v2PrivateGetClientHolding(params?: {}): Promise<implicitReturnType>;
49
+ v3PublicGetInsuranceFund(params?: {}): Promise<implicitReturnType>;
49
50
  v3PrivateGetAlgoOrderOid(params?: {}): Promise<implicitReturnType>;
50
51
  v3PrivateGetAlgoOrders(params?: {}): Promise<implicitReturnType>;
51
52
  v3PrivateGetBalances(params?: {}): Promise<implicitReturnType>;
package/js/src/bingx.js CHANGED
@@ -1226,35 +1226,6 @@ export default class bingx extends Exchange {
1226
1226
  else {
1227
1227
  response = await this.swapV2PublicGetQuoteTicker(this.extend(request, params));
1228
1228
  }
1229
- //
1230
- // {
1231
- // "code": 0,
1232
- // "msg": "",
1233
- // "data": {
1234
- // "symbol": "BTC-USDT",
1235
- // "priceChange": "52.5",
1236
- // "priceChangePercent": "0.31",
1237
- // "lastPrice": "16880.5",
1238
- // "lastQty": "2.2238",
1239
- // "highPrice": "16897.5",
1240
- // "lowPrice": "16726.0",
1241
- // "volume": "245870.1692",
1242
- // "quoteVolume": "4151395117.73",
1243
- // "openPrice": "16832.0",
1244
- // "openTime": 1672026667803,
1245
- // "closeTime": 1672026648425,
1246
- // added some time ago:
1247
- // "firstId": 12345,
1248
- // "lastId": 12349,
1249
- // "count": 5,
1250
- // added 2023-11-10:
1251
- // "bidPrice": 16726.0,
1252
- // "bidQty": 0.05,
1253
- // "askPrice": 16726.0,
1254
- // "askQty": 0.05,
1255
- // }
1256
- // }
1257
- //
1258
1229
  const data = this.safeValue(response, 'data');
1259
1230
  const ticker = this.safeValue(data, 0, data);
1260
1231
  return this.parseTicker(ticker, market);
@@ -1285,37 +1256,6 @@ export default class bingx extends Exchange {
1285
1256
  else {
1286
1257
  response = await this.swapV2PublicGetQuoteTicker(params);
1287
1258
  }
1288
- //
1289
- // {
1290
- // "code": 0,
1291
- // "msg": "",
1292
- // "data": [
1293
- // {
1294
- // "symbol": "BTC-USDT",
1295
- // "priceChange": "52.5",
1296
- // "priceChangePercent": "0.31",
1297
- // "lastPrice": "16880.5",
1298
- // "lastQty": "2.2238",
1299
- // "highPrice": "16897.5",
1300
- // "lowPrice": "16726.0",
1301
- // "volume": "245870.1692",
1302
- // "quoteVolume": "4151395117.73",
1303
- // "openPrice": "16832.0",
1304
- // "openTime": 1672026667803,
1305
- // "closeTime": 1672026648425,
1306
- // added some time ago:
1307
- // "firstId": 12345,
1308
- // "lastId": 12349,
1309
- // "count": 5,
1310
- // added 2023-11-10:
1311
- // "bidPrice": 16726.0,
1312
- // "bidQty": 0.05,
1313
- // "askPrice": 16726.0,
1314
- // "askQty": 0.05,
1315
- // },
1316
- // ]
1317
- // }
1318
- //
1319
1259
  const tickers = this.safeValue(response, 'data');
1320
1260
  return this.parseTickers(tickers, symbols);
1321
1261
  }
@@ -1332,10 +1272,6 @@ export default class bingx extends Exchange {
1332
1272
  // "quoteVolume": "30288466.44",
1333
1273
  // "openTime": "1693081020762",
1334
1274
  // "closeTime": "1693167420762",
1335
- // added some time ago:
1336
- // "firstId": 12345,
1337
- // "lastId": 12349,
1338
- // "count": 5,
1339
1275
  // added 2023-11-10:
1340
1276
  // "bidPrice": 16726.0,
1341
1277
  // "bidQty": 0.05,
@@ -1347,9 +1283,9 @@ export default class bingx extends Exchange {
1347
1283
  // {
1348
1284
  // "symbol": "BTC-USDT",
1349
1285
  // "priceChange": "52.5",
1350
- // "priceChangePercent": "0.31",
1286
+ // "priceChangePercent": "0.31%", // they started to add the percent sign in value
1351
1287
  // "lastPrice": "16880.5",
1352
- // "lastQty": "2.2238",
1288
+ // "lastQty": "2.2238", // only present in swap!
1353
1289
  // "highPrice": "16897.5",
1354
1290
  // "lowPrice": "16726.0",
1355
1291
  // "volume": "245870.1692",
@@ -1357,10 +1293,6 @@ export default class bingx extends Exchange {
1357
1293
  // "openPrice": "16832.0",
1358
1294
  // "openTime": 1672026667803,
1359
1295
  // "closeTime": 1672026648425,
1360
- // added some time ago:
1361
- // "firstId": 12345,
1362
- // "lastId": 12349,
1363
- // "count": 5,
1364
1296
  // added 2023-11-10:
1365
1297
  // "bidPrice": 16726.0,
1366
1298
  // "bidQty": 0.05,
@@ -1370,7 +1302,10 @@ export default class bingx extends Exchange {
1370
1302
  //
1371
1303
  const marketId = this.safeString(ticker, 'symbol');
1372
1304
  const change = this.safeString(ticker, 'priceChange');
1373
- const type = (change === undefined) ? 'spot' : 'swap';
1305
+ const lastQty = this.safeString(ticker, 'lastQty');
1306
+ // in spot markets, lastQty is not present
1307
+ // it's (bad, but) the only way we can check the tickers origin
1308
+ const type = (lastQty === undefined) ? 'spot' : 'swap';
1374
1309
  const symbol = this.safeSymbol(marketId, market, undefined, type);
1375
1310
  const open = this.safeString(ticker, 'openPrice');
1376
1311
  const high = this.safeString(ticker, 'highPrice');
@@ -1378,8 +1313,10 @@ export default class bingx extends Exchange {
1378
1313
  const close = this.safeString(ticker, 'lastPrice');
1379
1314
  const quoteVolume = this.safeString(ticker, 'quoteVolume');
1380
1315
  const baseVolume = this.safeString(ticker, 'volume');
1381
- let percentage = this.safeString(ticker, 'priceChangePercent', ''); // priceChangePercent: '5.66%',
1382
- percentage = percentage.replace('%', '');
1316
+ let percentage = this.safeString(ticker, 'priceChangePercent');
1317
+ if (percentage !== undefined) {
1318
+ percentage = percentage.replace('%', '');
1319
+ }
1383
1320
  const ts = this.safeInteger(ticker, 'closeTime');
1384
1321
  const datetime = this.iso8601(ts);
1385
1322
  const bid = this.safeString(ticker, 'bidPrice');
@@ -2975,7 +2912,8 @@ export default class bingx extends Exchange {
2975
2912
  }
2976
2913
  parseTransactionStatus(status) {
2977
2914
  const statuses = {
2978
- '0': 'ok',
2915
+ '0': 'pending',
2916
+ '1': 'ok',
2979
2917
  '10': 'pending',
2980
2918
  '20': 'rejected',
2981
2919
  '30': 'ok',
package/js/src/bitget.js CHANGED
@@ -3944,6 +3944,7 @@ export default class bitget extends Exchange {
3944
3944
  * @param {string} symbol unified symbol of the market the order was made in
3945
3945
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3946
3946
  * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
3947
+ * @param {string} [params.planType] *swap only* either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
3947
3948
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3948
3949
  */
3949
3950
  if (symbol === undefined) {
@@ -4340,6 +4341,7 @@ export default class bitget extends Exchange {
4340
4341
  * @param {int} [since] the earliest time in ms to fetch open orders for
4341
4342
  * @param {int} [limit] the maximum number of open order structures to retrieve
4342
4343
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4344
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
4343
4345
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4344
4346
  */
4345
4347
  await this.loadMarkets();
@@ -4584,6 +4586,7 @@ export default class bitget extends Exchange {
4584
4586
  * @param {int} [limit] the max number of closed orders to return
4585
4587
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4586
4588
  * @param {int} [params.until] the latest time in ms to fetch entries for
4589
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
4587
4590
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4588
4591
  */
4589
4592
  await this.loadMarkets();
@@ -4626,6 +4629,7 @@ export default class bitget extends Exchange {
4626
4629
  * @param {int} [limit] the max number of canceled orders to return
4627
4630
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4628
4631
  * @param {int} [params.until] the latest time in ms to fetch entries for
4632
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
4629
4633
  * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4630
4634
  */
4631
4635
  if (symbol === undefined) {
@@ -204,6 +204,7 @@ export default class coinbase extends Exchange {
204
204
  'brokerage/product_book',
205
205
  'brokerage/best_bid_ask',
206
206
  'brokerage/convert/trade/{trade_id}',
207
+ 'brokerage/time',
207
208
  ],
208
209
  'post': [
209
210
  'brokerage/orders',
@@ -206,6 +206,9 @@ export default class cryptocom extends Exchange {
206
206
  'private/get-currency-networks': 10 / 3,
207
207
  'private/get-deposit-history': 10 / 3,
208
208
  'private/get-deposit-address': 10 / 3,
209
+ 'private/export/create-export-request': 10 / 3,
210
+ 'private/export/get-export-requests': 10 / 3,
211
+ 'private/export/download-export-output': 10 / 3,
209
212
  'private/get-account-summary': 10 / 3,
210
213
  'private/create-order': 2 / 3,
211
214
  'private/cancel-order': 2 / 3,
@@ -224,6 +227,7 @@ export default class cryptocom extends Exchange {
224
227
  'private/otc/accept-quote': 100,
225
228
  'private/otc/get-quote-history': 10 / 3,
226
229
  'private/otc/get-trade-history': 10 / 3,
230
+ 'private/otc/create-order': 10 / 3,
227
231
  },
228
232
  },
229
233
  },
@@ -6,7 +6,7 @@
6
6
 
7
7
  // ---------------------------------------------------------------------------
8
8
  import Exchange from './abstract/currencycom.js';
9
- import { BadSymbol, ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, BadRequest } from './base/errors.js';
9
+ import { BadSymbol, ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, BadRequest, NotSupported } from './base/errors.js';
10
10
  import { Precise } from './base/Precise.js';
11
11
  import { TICK_SIZE } from './base/functions/number.js';
12
12
  import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
@@ -1576,7 +1576,19 @@ export default class currencycom extends Exchange {
1576
1576
  if (limit !== undefined) {
1577
1577
  request['limit'] = limit;
1578
1578
  }
1579
- const response = await this[method](this.extend(request, params));
1579
+ let response = undefined;
1580
+ if (method === 'privateGetV2Deposits') {
1581
+ response = await this.privateGetV2Deposits(this.extend(request, params));
1582
+ }
1583
+ else if (method === 'privateGetV2Withdrawals') {
1584
+ response = await this.privateGetV2Withdrawals(this.extend(request, params));
1585
+ }
1586
+ else if (method === 'privateGetV2Transactions') {
1587
+ response = await this.privateGetV2Transactions(this.extend(request, params));
1588
+ }
1589
+ else {
1590
+ throw new NotSupported(this.id + ' fetchTransactionsByMethod() not support this method');
1591
+ }
1580
1592
  //
1581
1593
  // [
1582
1594
  // {