ccxt 4.4.28 → 4.4.29

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.
@@ -2073,13 +2073,23 @@ class coincatch extends coincatch$1 {
2073
2073
  request['chain'] = this.networkCodeToId(networkCode);
2074
2074
  }
2075
2075
  const response = await this.privatePostApiSpotV1WalletWithdrawalV2(this.extend(request, params));
2076
- // todo add after withdrawal
2077
2076
  //
2078
- return response;
2077
+ // {
2078
+ // "code": "00000",
2079
+ // "msg": "success",
2080
+ // "data": {
2081
+ // "orderId":888291686266343424",
2082
+ // "clientOrderId":"123"
2083
+ // }
2084
+ // }
2085
+ //
2086
+ const data = this.safeDict(response, 'data', {});
2087
+ return this.parseTransaction(data, currency);
2079
2088
  }
2080
2089
  parseTransaction(transaction, currency = undefined) {
2081
2090
  //
2082
2091
  // fetchDeposits
2092
+ //
2083
2093
  // {
2084
2094
  // "id": "1213046466852196352",
2085
2095
  // "txId": "824246b030cd84d56400661303547f43a1d9fef66cf968628dd5112f362053ff",
@@ -2099,7 +2109,17 @@ class coincatch extends coincatch$1 {
2099
2109
  // "uTime": "1724938746015"
2100
2110
  // }
2101
2111
  //
2102
- const id = this.safeString(transaction, 'id');
2112
+ // withdraw
2113
+ //
2114
+ // {
2115
+ // "code": "00000",
2116
+ // "msg": "success",
2117
+ // "data": {
2118
+ // "orderId":888291686266343424",
2119
+ // "clientOrderId":"123"
2120
+ // }
2121
+ // }
2122
+ //
2103
2123
  let status = this.safeString(transaction, 'status');
2104
2124
  if (status === 'success') {
2105
2125
  status = 'ok';
@@ -2125,7 +2145,7 @@ class coincatch extends coincatch$1 {
2125
2145
  }
2126
2146
  return {
2127
2147
  'info': transaction,
2128
- 'id': id,
2148
+ 'id': this.safeString2(transaction, 'id', 'orderId'),
2129
2149
  'txid': txid,
2130
2150
  'timestamp': timestamp,
2131
2151
  'datetime': this.iso8601(timestamp),
@@ -1193,6 +1193,12 @@ class lbank extends lbank$1 {
1193
1193
  const indexPrice = this.safeNumber(ticker, 'underlyingPrice');
1194
1194
  const fundingRate = this.safeNumber(ticker, 'fundingRate');
1195
1195
  const fundingTime = this.safeInteger(ticker, 'nextFeeTime');
1196
+ const positionFeeTime = this.safeInteger(ticker, 'positionFeeTime');
1197
+ let intervalString = undefined;
1198
+ if (positionFeeTime !== undefined) {
1199
+ const interval = this.parseToInt(positionFeeTime / 60 / 60);
1200
+ intervalString = interval + 'h';
1201
+ }
1196
1202
  return {
1197
1203
  'info': ticker,
1198
1204
  'symbol': symbol,
@@ -1209,7 +1215,7 @@ class lbank extends lbank$1 {
1209
1215
  'previousFundingRate': undefined,
1210
1216
  'previousFundingTimestamp': undefined,
1211
1217
  'previousFundingDatetime': undefined,
1212
- 'interval': undefined,
1218
+ 'interval': intervalString,
1213
1219
  };
1214
1220
  }
1215
1221
  async fetchFundingRate(symbol, params = {}) {
@@ -773,7 +773,8 @@ class bitvavo extends bitvavo$1 {
773
773
  const messageHash = this.buildMessageHash(action, request);
774
774
  this.checkMessageHashDoesNotExist(messageHash);
775
775
  const url = this.urls['api']['ws'];
776
- return await this.watch(url, messageHash, request, messageHash);
776
+ const randomSubHash = this.randNumber(5).toString() + ':' + messageHash;
777
+ return await this.watch(url, messageHash, request, randomSubHash);
777
778
  }
778
779
  async fetchOpenOrdersWs(symbol = undefined, since = undefined, limit = undefined, params = {}) {
779
780
  /**
@@ -75,15 +75,25 @@ class mexc extends mexc$1 {
75
75
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
76
76
  * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#individual-symbol-book-ticker-streams
77
77
  * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#public-channels
78
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#miniticker
78
79
  * @param {string} symbol unified symbol of the market to fetch the ticker for
79
80
  * @param {object} [params] extra parameters specific to the exchange API endpoint
81
+ * @param {boolean} [params.miniTicker] set to true for using the miniTicker endpoint
80
82
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
81
83
  */
82
84
  await this.loadMarkets();
83
85
  const market = this.market(symbol);
84
86
  const messageHash = 'ticker:' + market['symbol'];
85
87
  if (market['spot']) {
86
- const channel = 'spot@public.bookTicker.v3.api@' + market['id'];
88
+ let miniTicker = false;
89
+ [miniTicker, params] = this.handleOptionAndParams(params, 'watchTicker', 'miniTicker');
90
+ let channel = undefined;
91
+ if (miniTicker) {
92
+ channel = 'spot@public.miniTicker.v3.api@' + market['id'] + '@UTC+8';
93
+ }
94
+ else {
95
+ channel = 'spot@public.bookTicker.v3.api@' + market['id'];
96
+ }
87
97
  return await this.watchSpotPublic(channel, messageHash, params);
88
98
  }
89
99
  else {
@@ -95,6 +105,38 @@ class mexc extends mexc$1 {
95
105
  }
96
106
  }
97
107
  handleTicker(client, message) {
108
+ //
109
+ // swap
110
+ //
111
+ // {
112
+ // "symbol": "BTC_USDT",
113
+ // "data": {
114
+ // "symbol": "BTC_USDT",
115
+ // "lastPrice": 76376.2,
116
+ // "riseFallRate": -0.0006,
117
+ // "fairPrice": 76374.4,
118
+ // "indexPrice": 76385.8,
119
+ // "volume24": 962062810,
120
+ // "amount24": 7344207079.96768,
121
+ // "maxBidPrice": 84024.3,
122
+ // "minAskPrice": 68747.2,
123
+ // "lower24Price": 75620.2,
124
+ // "high24Price": 77210,
125
+ // "timestamp": 1731137509138,
126
+ // "bid1": 76376.2,
127
+ // "ask1": 76376.3,
128
+ // "holdVol": 95479623,
129
+ // "riseFallValue": -46.5,
130
+ // "fundingRate": 0.0001,
131
+ // "zone": "UTC+8",
132
+ // "riseFallRates": [ -0.0006, 0.1008, 0.2262, 0.2628, 0.2439, 1.0564 ],
133
+ // "riseFallRatesOfTimezone": [ 0.0065, -0.0013, -0.0006 ]
134
+ // },
135
+ // "channel": "push.ticker",
136
+ // "ts": 1731137509138
137
+ // }
138
+ //
139
+ // spot
98
140
  //
99
141
  // {
100
142
  // "c": "spot@public.bookTicker.v3.api@BTCUSDT",
@@ -108,8 +150,30 @@ class mexc extends mexc$1 {
108
150
  // "t": 1678643605721
109
151
  // }
110
152
  //
153
+ // spot miniTicker
154
+ //
155
+ // {
156
+ // "d": {
157
+ // "s": "BTCUSDT",
158
+ // "p": "76522",
159
+ // "r": "0.0012",
160
+ // "tr": "0.0012",
161
+ // "h": "77196.3",
162
+ // "l": "75630.77",
163
+ // "v": "584664223.92",
164
+ // "q": "7666.720258",
165
+ // "lastRT": "-1",
166
+ // "MT": "0",
167
+ // "NV": "--",
168
+ // "t": "1731135533126"
169
+ // },
170
+ // "c": "spot@public.miniTicker.v3.api@BTCUSDT@UTC+8",
171
+ // "t": 1731135533126,
172
+ // "s": "BTCUSDT"
173
+ // }
174
+ //
111
175
  this.handleBidAsk(client, message);
112
- const rawTicker = this.safeValue2(message, 'd', 'data');
176
+ const rawTicker = this.safeDict2(message, 'd', 'data');
113
177
  const marketId = this.safeString2(message, 's', 'symbol');
114
178
  const timestamp = this.safeInteger(message, 't');
115
179
  const market = this.safeMarket(marketId);
@@ -134,24 +198,51 @@ class mexc extends mexc$1 {
134
198
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
135
199
  * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#individual-symbol-book-ticker-streams
136
200
  * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#public-channels
201
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#minitickers
137
202
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
138
203
  * @param {object} [params] extra parameters specific to the exchange API endpoint
204
+ * @param {boolean} [params.miniTicker] set to true for using the miniTicker endpoint
139
205
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
140
206
  */
141
207
  await this.loadMarkets();
142
- symbols = this.marketSymbols(symbols, undefined, false);
208
+ symbols = this.marketSymbols(symbols, undefined);
143
209
  const messageHashes = [];
144
- const marketIds = this.marketIds(symbols);
145
- const firstMarket = this.market(symbols[0]);
146
- const isSpot = firstMarket['spot'];
210
+ const firstSymbol = this.safeString(symbols, 0);
211
+ let market = undefined;
212
+ if (firstSymbol !== undefined) {
213
+ market = this.market(firstSymbol);
214
+ }
215
+ let type = undefined;
216
+ [type, params] = this.handleMarketTypeAndParams('watchTickers', market, params);
217
+ const isSpot = (type === 'spot');
147
218
  const url = (isSpot) ? this.urls['api']['ws']['spot'] : this.urls['api']['ws']['swap'];
148
219
  const request = {};
149
220
  if (isSpot) {
221
+ let miniTicker = false;
222
+ [miniTicker, params] = this.handleOptionAndParams(params, 'watchTickers', 'miniTicker');
150
223
  const topics = [];
151
- for (let i = 0; i < marketIds.length; i++) {
152
- const marketId = marketIds[i];
153
- messageHashes.push('ticker:' + symbols[i]);
154
- topics.push('spot@public.bookTicker.v3.api@' + marketId);
224
+ if (!miniTicker) {
225
+ if (symbols === undefined) {
226
+ throw new errors.ArgumentsRequired(this.id + 'watchTickers required symbols argument for the bookTicker channel');
227
+ }
228
+ const marketIds = this.marketIds(symbols);
229
+ for (let i = 0; i < marketIds.length; i++) {
230
+ const marketId = marketIds[i];
231
+ messageHashes.push('ticker:' + symbols[i]);
232
+ const channel = 'spot@public.bookTicker.v3.api@' + marketId;
233
+ topics.push(channel);
234
+ }
235
+ }
236
+ else {
237
+ topics.push('spot@public.miniTickers.v3.api@UTC+8');
238
+ if (symbols === undefined) {
239
+ messageHashes.push('spot:ticker');
240
+ }
241
+ else {
242
+ for (let i = 0; i < symbols.length; i++) {
243
+ messageHashes.push('ticker:' + symbols[i]);
244
+ }
245
+ }
155
246
  }
156
247
  request['method'] = 'SUBSCRIPTION';
157
248
  request['params'] = topics;
@@ -170,6 +261,8 @@ class mexc extends mexc$1 {
170
261
  return this.filterByArray(this.tickers, 'symbol', symbols);
171
262
  }
172
263
  handleTickers(client, message) {
264
+ //
265
+ // swap
173
266
  //
174
267
  // {
175
268
  // "channel": "push.tickers",
@@ -192,15 +285,66 @@ class mexc extends mexc$1 {
192
285
  // "ts": 1725872514111
193
286
  // }
194
287
  //
195
- const data = this.safeList(message, 'data');
196
- const topic = 'ticker';
288
+ // spot
289
+ //
290
+ // {
291
+ // "c": "spot@public.bookTicker.v3.api@BTCUSDT",
292
+ // "d": {
293
+ // "A": "4.70432",
294
+ // "B": "6.714863",
295
+ // "a": "20744.54",
296
+ // "b": "20744.17"
297
+ // },
298
+ // "s": "BTCUSDT",
299
+ // "t": 1678643605721
300
+ // }
301
+ //
302
+ // spot miniTicker
303
+ //
304
+ // {
305
+ // "d": {
306
+ // "s": "BTCUSDT",
307
+ // "p": "76522",
308
+ // "r": "0.0012",
309
+ // "tr": "0.0012",
310
+ // "h": "77196.3",
311
+ // "l": "75630.77",
312
+ // "v": "584664223.92",
313
+ // "q": "7666.720258",
314
+ // "lastRT": "-1",
315
+ // "MT": "0",
316
+ // "NV": "--",
317
+ // "t": "1731135533126"
318
+ // },
319
+ // "c": "spot@public.miniTicker.v3.api@BTCUSDT@UTC+8",
320
+ // "t": 1731135533126,
321
+ // "s": "BTCUSDT"
322
+ // }
323
+ //
324
+ const data = this.safeList2(message, 'data', 'd');
325
+ const channel = this.safeString(message, 'c', '');
326
+ const marketId = this.safeString(message, 's');
327
+ const market = this.safeMarket(marketId);
328
+ const channelStartsWithSpot = channel.startsWith('spot');
329
+ const marketIdIsUndefined = marketId === undefined;
330
+ const isSpot = marketIdIsUndefined ? channelStartsWithSpot : market['spot'];
331
+ const spotPrefix = 'spot:';
332
+ const messageHashPrefix = isSpot ? spotPrefix : '';
333
+ const topic = messageHashPrefix + 'ticker';
197
334
  const result = [];
198
335
  for (let i = 0; i < data.length; i++) {
199
- const ticker = this.parseTicker(data[i]);
336
+ const entry = data[i];
337
+ let ticker = undefined;
338
+ if (isSpot) {
339
+ ticker = this.parseWsTicker(entry, market);
340
+ }
341
+ else {
342
+ ticker = this.parseTicker(entry);
343
+ }
200
344
  const symbol = ticker['symbol'];
201
345
  this.tickers[symbol] = ticker;
202
346
  result.push(ticker);
203
- const messageHash = topic + ':' + symbol;
347
+ const messageHash = 'ticker:' + symbol;
204
348
  client.resolve(ticker, messageHash);
205
349
  }
206
350
  client.resolve(result, topic);
@@ -208,21 +352,44 @@ class mexc extends mexc$1 {
208
352
  parseWsTicker(ticker, market = undefined) {
209
353
  //
210
354
  // spot
211
- // {
212
- // "A": "4.70432",
213
- // "B": "6.714863",
214
- // "a": "20744.54",
215
- // "b": "20744.17"
216
- // }
217
355
  //
356
+ // {
357
+ // "A": "4.70432",
358
+ // "B": "6.714863",
359
+ // "a": "20744.54",
360
+ // "b": "20744.17"
361
+ // }
362
+ //
363
+ // spot miniTicker
364
+ //
365
+ // {
366
+ // "s": "BTCUSDT",
367
+ // "p": "76522",
368
+ // "r": "0.0012",
369
+ // "tr": "0.0012",
370
+ // "h": "77196.3",
371
+ // "l": "75630.77",
372
+ // "v": "584664223.92",
373
+ // "q": "7666.720258",
374
+ // "lastRT": "-1",
375
+ // "MT": "0",
376
+ // "NV": "--",
377
+ // "t": "1731135533126"
378
+ // }
379
+ //
380
+ const marketId = this.safeString(ticker, 's');
381
+ const timestamp = this.safeInteger(ticker, 't');
382
+ const price = this.safeString(ticker, 'p');
218
383
  return this.safeTicker({
219
- 'symbol': this.safeSymbol(undefined, market),
220
- 'timestamp': undefined,
221
- 'datetime': undefined,
384
+ 'info': ticker,
385
+ 'symbol': this.safeSymbol(marketId, market),
386
+ 'timestamp': timestamp,
387
+ 'datetime': this.iso8601(timestamp),
222
388
  'open': undefined,
223
- 'high': undefined,
224
- 'low': undefined,
225
- 'close': undefined,
389
+ 'high': this.safeNumber(ticker, 'h'),
390
+ 'low': this.safeNumber(ticker, 'l'),
391
+ 'close': price,
392
+ 'last': price,
226
393
  'bid': this.safeNumber(ticker, 'b'),
227
394
  'bidVolume': this.safeNumber(ticker, 'B'),
228
395
  'ask': this.safeNumber(ticker, 'a'),
@@ -230,11 +397,10 @@ class mexc extends mexc$1 {
230
397
  'vwap': undefined,
231
398
  'previousClose': undefined,
232
399
  'change': undefined,
233
- 'percentage': undefined,
400
+ 'percentage': this.safeNumber(ticker, 'tr'),
234
401
  'average': undefined,
235
- 'baseVolume': undefined,
236
- 'quoteVolume': undefined,
237
- 'info': ticker,
402
+ 'baseVolume': this.safeNumber(ticker, 'v'),
403
+ 'quoteVolume': this.safeNumber(ticker, 'q'),
238
404
  }, market);
239
405
  }
240
406
  async watchBidsAsks(symbols = undefined, params = {}) {
@@ -1337,6 +1503,8 @@ class mexc extends mexc$1 {
1337
1503
  'public.kline.v3.api': this.handleOHLCV,
1338
1504
  'push.kline': this.handleOHLCV,
1339
1505
  'public.bookTicker.v3.api': this.handleTicker,
1506
+ 'public.miniTicker.v3.api': this.handleTicker,
1507
+ 'public.miniTickers.v3.api': this.handleTickers,
1340
1508
  'push.ticker': this.handleTicker,
1341
1509
  'push.tickers': this.handleTickers,
1342
1510
  'public.increase.depth.v3.api': this.handleOrderBook,
@@ -2892,13 +2892,58 @@ class vertex extends vertex$1 {
2892
2892
  };
2893
2893
  const response = await this.v1GatewayPostExecute(this.extend(request, params));
2894
2894
  //
2895
- // {
2896
- // "status": "success",
2897
- // "signature": {signature},
2898
- // "request_type": "execute_withdraw_collateral"
2899
- // }
2895
+ // {
2896
+ // "status": "success",
2897
+ // "signature": {signature},
2898
+ // "request_type": "execute_withdraw_collateral"
2899
+ // }
2900
2900
  //
2901
- return response;
2901
+ const transaction = this.parseTransaction(response, currency);
2902
+ return this.extend(transaction, {
2903
+ 'amount': amount,
2904
+ 'address': address,
2905
+ });
2906
+ }
2907
+ parseTransaction(transaction, currency = undefined) {
2908
+ //
2909
+ // {
2910
+ // "status": "success",
2911
+ // "signature": {signature},
2912
+ // "request_type": "execute_withdraw_collateral"
2913
+ // }
2914
+ //
2915
+ let code = undefined;
2916
+ if (currency !== undefined) {
2917
+ code = currency['code'];
2918
+ }
2919
+ return {
2920
+ 'info': transaction,
2921
+ 'id': undefined,
2922
+ 'txid': undefined,
2923
+ 'timestamp': undefined,
2924
+ 'datetime': undefined,
2925
+ 'addressFrom': undefined,
2926
+ 'address': undefined,
2927
+ 'addressTo': undefined,
2928
+ 'tagFrom': undefined,
2929
+ 'tag': undefined,
2930
+ 'tagTo': undefined,
2931
+ 'type': 'withdrawal',
2932
+ 'amount': undefined,
2933
+ 'currency': code,
2934
+ 'status': this.parseTransactionStatus(this.safeString(transaction, 'status')),
2935
+ 'updated': undefined,
2936
+ 'network': undefined,
2937
+ 'comment': undefined,
2938
+ 'internal': undefined,
2939
+ 'fee': undefined,
2940
+ };
2941
+ }
2942
+ parseTransactionStatus(status) {
2943
+ const statuses = {
2944
+ 'success': 'ok',
2945
+ };
2946
+ return this.safeString(statuses, status, status);
2902
2947
  }
2903
2948
  handlePublicAddress(methodName, params) {
2904
2949
  let userAux = undefined;
@@ -106,8 +106,6 @@ python path/to/example.py # substitute for actual filename here
106
106
 
107
107
  [CC Power Analytics Part 1: How to get the data of the exchanges](https://www.linkedin.com/pulse/part-1-cc-power-analytics-how-get-data-exchanges-steve-rein/) – The first part of a series of articles on cryptocurrency analytics.
108
108
 
109
- [tv2bt: Kraken Example, without leverage](https://backtest-rookies.com/2020/04/18/tv2bt-kraken-example-without-leverage/) – an article on using CCXT for backtesting.
110
-
111
109
  [Looking for arbitrage opportunies with ccxt](https://steemit.com/steemdev/@codewithcheese/looking-for-arbitrage-opportunies-with-javascript-library-cctx-supporting-70-exchanges) – An article @steemit on getting arbitrage started with ccxt for crypto-arbitrage.
112
110
 
113
111
  [Use CCXT to calculate Cryptocurrency trade indicators](https://itnext.io/use-ccxt-to-calculate-cryptocurrency-trade-indicators-102a3ac1428e) – an article @ Medium on building basic indicators using CCXT.
@@ -48,6 +48,13 @@ let foundDescription = undefined;
48
48
  for (let i = 0; i < process.argv.length; i++) {
49
49
  if (process.argv[i] === '--name') {
50
50
  foundDescription = process.argv[i + 1];
51
+ // search that string in `params` and remove it
52
+ for (let j = 0; j < params.length; j++) {
53
+ if (params[j] === foundDescription) {
54
+ params.splice(j, 1);
55
+ break;
56
+ }
57
+ }
51
58
  break;
52
59
  }
53
60
  }
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 { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
7
- declare const version = "4.4.27";
7
+ declare const version = "4.4.28";
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, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.4.28';
41
+ const version = '4.4.29';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -180,19 +180,6 @@ interface Exchange {
180
180
  privateGetV5BrokerEarningsInfo(params?: {}): Promise<implicitReturnType>;
181
181
  privateGetV5BrokerAccountInfo(params?: {}): Promise<implicitReturnType>;
182
182
  privateGetV5BrokerAssetQuerySubMemberDepositRecord(params?: {}): Promise<implicitReturnType>;
183
- privatePostOptionUsdcOpenapiPrivateV1PlaceOrder(params?: {}): Promise<implicitReturnType>;
184
- privatePostOptionUsdcOpenapiPrivateV1ReplaceOrder(params?: {}): Promise<implicitReturnType>;
185
- privatePostOptionUsdcOpenapiPrivateV1CancelOrder(params?: {}): Promise<implicitReturnType>;
186
- privatePostOptionUsdcOpenapiPrivateV1CancelAll(params?: {}): Promise<implicitReturnType>;
187
- privatePostOptionUsdcOpenapiPrivateV1QueryActiveOrders(params?: {}): Promise<implicitReturnType>;
188
- privatePostOptionUsdcOpenapiPrivateV1QueryOrderHistory(params?: {}): Promise<implicitReturnType>;
189
- privatePostOptionUsdcOpenapiPrivateV1ExecutionList(params?: {}): Promise<implicitReturnType>;
190
- privatePostOptionUsdcOpenapiPrivateV1QueryPosition(params?: {}): Promise<implicitReturnType>;
191
- privatePostPerpetualUsdcOpenapiPrivateV1PlaceOrder(params?: {}): Promise<implicitReturnType>;
192
- privatePostPerpetualUsdcOpenapiPrivateV1ReplaceOrder(params?: {}): Promise<implicitReturnType>;
193
- privatePostPerpetualUsdcOpenapiPrivateV1CancelOrder(params?: {}): Promise<implicitReturnType>;
194
- privatePostPerpetualUsdcOpenapiPrivateV1CancelAll(params?: {}): Promise<implicitReturnType>;
195
- privatePostPerpetualUsdcOpenapiPrivateV1PositionLeverageSave(params?: {}): Promise<implicitReturnType>;
196
183
  privatePostSpotV3PrivateOrder(params?: {}): Promise<implicitReturnType>;
197
184
  privatePostSpotV3PrivateCancelOrder(params?: {}): Promise<implicitReturnType>;
198
185
  privatePostSpotV3PrivateCancelOrders(params?: {}): Promise<implicitReturnType>;
@@ -754,6 +754,7 @@ export default class Exchange {
754
754
  unWatchOrderBookForSymbols(symbols: string[], params?: {}): Promise<any>;
755
755
  fetchDepositAddresses(codes?: Strings, params?: {}): Promise<DepositAddress[]>;
756
756
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
757
+ fetchOrderBookWs(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
757
758
  fetchMarginMode(symbol: string, params?: {}): Promise<MarginMode>;
758
759
  fetchMarginModes(symbols?: Strings, params?: {}): Promise<MarginModes>;
759
760
  fetchRestOrderBookSafe(symbol: any, limit?: any, params?: {}): Promise<OrderBook>;
@@ -2052,6 +2052,9 @@ export default class Exchange {
2052
2052
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
2053
2053
  throw new NotSupported(this.id + ' fetchOrderBook() is not supported yet');
2054
2054
  }
2055
+ async fetchOrderBookWs(symbol, limit = undefined, params = {}) {
2056
+ throw new NotSupported(this.id + ' fetchOrderBookWs() is not supported yet');
2057
+ }
2055
2058
  async fetchMarginMode(symbol, params = {}) {
2056
2059
  if (this.has['fetchMarginModes']) {
2057
2060
  const marginModes = await this.fetchMarginModes([symbol], params);
@@ -55,7 +55,7 @@ export default class bitfinex2 extends Exchange {
55
55
  parseTransaction(transaction: Dict, currency?: Currency): Transaction;
56
56
  fetchTradingFees(params?: {}): Promise<TradingFees>;
57
57
  fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
58
- withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<any>;
58
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
59
59
  fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
60
60
  parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
61
61
  nonce(): number;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitget.js';
2
- import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Liquidation, TransferEntry, Leverage, MarginMode, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRate, Dict, LeverageTier, int, LedgerEntry, FundingRate, DepositAddress, LongShortRatio, BorrowInterest } from './base/types.js';
2
+ import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Liquidation, TransferEntry, Leverage, MarginMode, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRate, Dict, LeverageTier, int, LedgerEntry, FundingRate, DepositAddress, LongShortRatio, BorrowInterest, FundingRates } from './base/types.js';
3
3
  /**
4
4
  * @class bitget
5
5
  * @augments Exchange
@@ -67,6 +67,7 @@ export default class bitget extends Exchange {
67
67
  parsePosition(position: Dict, market?: Market): Position;
68
68
  fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
69
69
  fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
70
+ fetchFundingRates(symbols?: Strings, params?: {}): Promise<FundingRates>;
70
71
  parseFundingRate(contract: any, market?: Market): FundingRate;
71
72
  fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingHistory[]>;
72
73
  parseFundingHistory(contract: any, market?: Market): {