ccxt 4.2.92 → 4.2.93

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
@@ -182,7 +182,7 @@ var woo$1 = require('./src/pro/woo.js');
182
182
 
183
183
  //-----------------------------------------------------------------------------
184
184
  // this is updated by vss.js when building
185
- const version = '4.2.92';
185
+ const version = '4.2.93';
186
186
  Exchange["default"].ccxtVersion = version;
187
187
  const exchanges = {
188
188
  'ace': ace,
@@ -3447,14 +3447,34 @@ class Exchange {
3447
3447
  // marketIdKey should only be undefined when response is a dictionary
3448
3448
  symbols = this.marketSymbols(symbols);
3449
3449
  const tiers = {};
3450
- for (let i = 0; i < response.length; i++) {
3451
- const item = response[i];
3452
- const id = this.safeString(item, marketIdKey);
3453
- const market = this.safeMarket(id, undefined, undefined, 'swap');
3454
- const symbol = market['symbol'];
3455
- const contract = this.safeBool(market, 'contract', false);
3456
- if (contract && ((symbols === undefined) || this.inArray(symbol, symbols))) {
3457
- tiers[symbol] = this.parseMarketLeverageTiers(item, market);
3450
+ let symbolsLength = 0;
3451
+ if (symbols !== undefined) {
3452
+ symbolsLength = symbols.length;
3453
+ }
3454
+ const noSymbols = (symbols === undefined) || (symbolsLength === 0);
3455
+ if (Array.isArray(response)) {
3456
+ for (let i = 0; i < response.length; i++) {
3457
+ const item = response[i];
3458
+ const id = this.safeString(item, marketIdKey);
3459
+ const market = this.safeMarket(id, undefined, undefined, 'swap');
3460
+ const symbol = market['symbol'];
3461
+ const contract = this.safeBool(market, 'contract', false);
3462
+ if (contract && (noSymbols || this.inArray(symbol, symbols))) {
3463
+ tiers[symbol] = this.parseMarketLeverageTiers(item, market);
3464
+ }
3465
+ }
3466
+ }
3467
+ else {
3468
+ const keys = Object.keys(response);
3469
+ for (let i = 0; i < keys.length; i++) {
3470
+ const marketId = keys[i];
3471
+ const item = response[marketId];
3472
+ const market = this.safeMarket(marketId, undefined, undefined, 'swap');
3473
+ const symbol = market['symbol'];
3474
+ const contract = this.safeBool(market, 'contract', false);
3475
+ if (contract && (noSymbols || this.inArray(symbol, symbols))) {
3476
+ tiers[symbol] = this.parseMarketLeverageTiers(item, market);
3477
+ }
3458
3478
  }
3459
3479
  }
3460
3480
  return tiers;
@@ -9,13 +9,13 @@ var index$1 = require('../../static_dependencies/qs/index.cjs.js');
9
9
 
10
10
  /* eslint-disable */
11
11
  /* ------------------------------------------------------------------------ */
12
- const json = (data, params = undefined) => JSON.stringify(data), isJsonEncodedObject = object => ((typeof object === 'string') &&
12
+ const json = (data, params = undefined) => JSON.stringify(data), isJsonEncodedObject = (object) => ((typeof object === 'string') &&
13
13
  (object.length >= 2) &&
14
- ((object[0] === '{') || (object[0] === '['))), binaryToString = index.utf8.encode, stringToBinary = index.utf8.decode, stringToBase64 = string => index.base64.encode(index.utf8.decode(string)), base64ToString = string => index.utf8.encode(index.base64.decode(string)), base64ToBinary = index.base64.decode, binaryToBase64 = index.base64.encode, base16ToBinary = index.base16.decode, binaryToBase16 = index.base16.encode, base58ToBinary = index.base58.decode, binaryToBase58 = index.base58.encode, binaryConcat = utils.concatBytes, binaryConcatArray = (arr) => utils.concatBytes(...arr), urlencode = object => index$1.stringify(object), urlencodeNested = object => index$1.stringify(object) // implemented only in python
15
- , urlencodeWithArrayRepeat = object => index$1.stringify(object, { arrayFormat: 'repeat' }), rawencode = object => index$1.stringify(object, { encode: false }), encode = index.utf8.decode // lol
14
+ ((object[0] === '{') || (object[0] === '['))), binaryToString = index.utf8.encode, stringToBinary = index.utf8.decode, stringToBase64 = (string) => index.base64.encode(index.utf8.decode(string)), base64ToString = (string) => index.utf8.encode(index.base64.decode(string)), base64ToBinary = index.base64.decode, binaryToBase64 = index.base64.encode, base16ToBinary = index.base16.decode, binaryToBase16 = index.base16.encode, base58ToBinary = index.base58.decode, binaryToBase58 = index.base58.encode, binaryConcat = utils.concatBytes, binaryConcatArray = (arr) => utils.concatBytes(...arr), urlencode = (object) => index$1.stringify(object), urlencodeNested = (object) => index$1.stringify(object) // implemented only in python
15
+ , urlencodeWithArrayRepeat = (object) => index$1.stringify(object, { arrayFormat: 'repeat' }), rawencode = (object) => index$1.stringify(object, { encode: false }), encode = index.utf8.decode // lol
16
16
  , decode = index.utf8.encode
17
17
  // Url-safe-base64 without equals signs, with + replaced by - and slashes replaced by underscores
18
- , urlencodeBase64 = base64string => base64string.replace(/[=]+$/, '')
18
+ , urlencodeBase64 = (base64string) => base64string.replace(/[=]+$/, '')
19
19
  .replace(/\+/g, '-')
20
20
  .replace(/\//g, '_'), numberToLE = (n, padding) => utils.numberToBytesLE(BigInt(n), padding), numberToBE = (n, padding) => utils.numberToBytesBE(BigInt(n), padding);
21
21
  function packb(req) {
@@ -4125,36 +4125,6 @@ class coinex extends coinex$1 {
4125
4125
  const data = this.safeValue(response, 'data', {});
4126
4126
  return this.parseLeverageTiers(data, symbols, undefined);
4127
4127
  }
4128
- parseLeverageTiers(response, symbols = undefined, marketIdKey = undefined) {
4129
- //
4130
- // {
4131
- // "BTCUSD": [
4132
- // ["500001", "100", "0.005"],
4133
- // ["1000001", "50", "0.01"],
4134
- // ["2000001", "30", "0.015"],
4135
- // ["5000001", "20", "0.02"],
4136
- // ["10000001", "15", "0.025"],
4137
- // ["20000001", "10", "0.03"]
4138
- // ],
4139
- // ...
4140
- // }
4141
- //
4142
- const tiers = {};
4143
- const marketIds = Object.keys(response);
4144
- for (let i = 0; i < marketIds.length; i++) {
4145
- const marketId = marketIds[i];
4146
- const market = this.safeMarket(marketId, undefined, undefined, 'spot');
4147
- const symbol = this.safeString(market, 'symbol');
4148
- let symbolsLength = 0;
4149
- if (symbols !== undefined) {
4150
- symbolsLength = symbols.length;
4151
- }
4152
- if (symbol !== undefined && (symbolsLength === 0 || this.inArray(symbols, symbol))) {
4153
- tiers[symbol] = this.parseMarketLeverageTiers(response[marketId], market);
4154
- }
4155
- }
4156
- return tiers;
4157
- }
4158
4128
  parseMarketLeverageTiers(item, market = undefined) {
4159
4129
  const tiers = [];
4160
4130
  let minNotional = 0;
@@ -3805,28 +3805,7 @@ class digifinex extends digifinex$1 {
3805
3805
  //
3806
3806
  const data = this.safeValue(response, 'data', []);
3807
3807
  symbols = this.marketSymbols(symbols);
3808
- return this.parseLeverageTiers(data, symbols, 'symbol');
3809
- }
3810
- parseLeverageTiers(response, symbols = undefined, marketIdKey = undefined) {
3811
- const result = {};
3812
- for (let i = 0; i < response.length; i++) {
3813
- const entry = response[i];
3814
- const marketId = this.safeString(entry, 'instrument_id');
3815
- const market = this.safeMarket(marketId);
3816
- const symbol = this.safeSymbol(marketId, market);
3817
- let symbolsLength = 0;
3818
- this.parseMarketLeverageTiers(response[i], market);
3819
- if (symbols !== undefined) {
3820
- symbolsLength = symbols.length;
3821
- if (this.inArray(symbol, symbols)) {
3822
- result[symbol] = this.parseMarketLeverageTiers(response[i], market);
3823
- }
3824
- }
3825
- if (symbol !== undefined && (symbolsLength === 0 || this.inArray(symbols, symbol))) {
3826
- result[symbol] = this.parseMarketLeverageTiers(response[i], market);
3827
- }
3828
- }
3829
- return result;
3808
+ return this.parseLeverageTiers(data, symbols, 'instrument_id');
3830
3809
  }
3831
3810
  async fetchMarketLeverageTiers(symbol, params = {}) {
3832
3811
  /**
@@ -1487,12 +1487,11 @@ class probit extends probit$1 {
1487
1487
  const result = await this.fetchTransactions(code, since, limit, this.extend(request, params));
1488
1488
  return result;
1489
1489
  }
1490
- async fetchTransactions(code = undefined, since = undefined, limit = undefined, params = {}) {
1490
+ async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
1491
1491
  /**
1492
1492
  * @method
1493
- * @name probit#fetchTransactions
1494
- * @deprecated
1495
- * @description use fetchDepositsWithdrawals instead
1493
+ * @name probit#fetchDepositsWithdrawals
1494
+ * @description fetch history of deposits and withdrawals
1496
1495
  * @see https://docs-en.probit.com/reference/transferpayment
1497
1496
  * @param {string} code unified currency code
1498
1497
  * @param {int} [since] the earliest time in ms to fetch transactions for
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, Leverage, Leverages, Option, OptionChain } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, ExchangeClosedByUser } from './src/base/errors.js';
7
- declare const version = "4.2.91";
7
+ declare const version = "4.2.92";
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, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, ExchangeClosedByUser } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.2.92';
41
+ const version = '4.2.93';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -219,7 +219,7 @@ export default class Exchange {
219
219
  }, digest?: "binary" | "hex" | "base64") => any;
220
220
  arrayConcat: (a: any, b: any) => any;
221
221
  encode: (str: string) => Uint8Array;
222
- urlencode: (object: any) => string;
222
+ urlencode: (object: object) => string;
223
223
  hmac: (request: import("../static_dependencies/noble-hashes/utils.js").Input, secret: import("../static_dependencies/noble-hashes/utils.js").Input, hash: {
224
224
  (message: import("../static_dependencies/noble-hashes/utils.js").Input): Uint8Array;
225
225
  outputLen: number;
@@ -234,12 +234,12 @@ export default class Exchange {
234
234
  yyyymmdd: (timestamp: any, infix?: string) => string;
235
235
  safeStringUpper: (o: any, k: IndexType, $default?: string) => string;
236
236
  safeTimestamp: (o: any, k: IndexType, $default?: number) => number;
237
- binaryConcatArray: (arr: any) => Uint8Array;
237
+ binaryConcatArray: (arr: any[]) => Uint8Array;
238
238
  uuidv1: () => string;
239
239
  numberToLE: (n: number, padding: number) => Uint8Array;
240
240
  ymdhms: (timestamp: any, infix?: string) => string;
241
241
  yymmdd: (timestamp: any, infix?: string) => string;
242
- stringToBase64: (string: any) => string;
242
+ stringToBase64: (string: string) => string;
243
243
  decode: (data: Uint8Array) => string;
244
244
  uuid22: (a?: any) => string;
245
245
  safeIntegerProduct2: (o: any, k1: IndexType, k2: IndexType, $factor: number, $default?: number) => number;
@@ -248,7 +248,7 @@ export default class Exchange {
248
248
  base58ToBinary: (str: string) => Uint8Array;
249
249
  base64ToBinary: (str: string) => Uint8Array;
250
250
  safeTimestamp2: (o: any, k1: IndexType, k2: IndexType, $default?: any) => number;
251
- rawencode: (object: any) => string;
251
+ rawencode: (object: object) => string;
252
252
  keysort: (x: any, out?: {}) => {};
253
253
  inArray: (needle: any, haystack: any) => any;
254
254
  safeStringLower2: (o: any, k1: IndexType, k2: IndexType, $default?: string) => string;
@@ -257,7 +257,7 @@ export default class Exchange {
257
257
  ordered: (x: any) => any;
258
258
  filterBy: (x: any, k: any, value?: any, out?: any[]) => any[];
259
259
  uuid16: (a?: any) => string;
260
- urlencodeWithArrayRepeat: (object: any) => string;
260
+ urlencodeWithArrayRepeat: (object: object) => string;
261
261
  microseconds: () => number;
262
262
  binaryToBase64: (data: Uint8Array) => string;
263
263
  strip: (s: string) => string;
@@ -270,10 +270,10 @@ export default class Exchange {
270
270
  safeStringN: (o: any, k: IndexType[], $default?: string) => string;
271
271
  safeStringLowerN: (o: any, k: IndexType[], $default?: string) => string;
272
272
  safeStringUpperN: (o: any, k: IndexType[], $default?: string) => string;
273
- urlencodeNested: (object: any) => string;
273
+ urlencodeNested: (object: object) => string;
274
274
  parseDate: (x: any) => number;
275
275
  ymd: (timestamp: any, infix: any, fullYear?: boolean) => string;
276
- base64ToString: (string: any) => string;
276
+ base64ToString: (string: string) => string;
277
277
  crc32: typeof functions.crc32;
278
278
  packb: typeof functions.packb;
279
279
  describe(): {
@@ -792,7 +792,7 @@ export default class Exchange {
792
792
  safeNumber2(dictionary: object, key1: IndexType, key2: IndexType, d?: any): number;
793
793
  parseOrderBook(orderbook: object, symbol: string, timestamp?: Int, bidsKey?: string, asksKey?: string, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): OrderBook;
794
794
  parseOHLCVs(ohlcvs: object[], market?: any, timeframe?: string, since?: Int, limit?: Int): OHLCV[];
795
- parseLeverageTiers(response: object[], symbols?: string[], marketIdKey?: any): {};
795
+ parseLeverageTiers(response: any, symbols?: string[], marketIdKey?: any): {};
796
796
  loadTradingLimits(symbols?: string[], reload?: boolean, params?: {}): Promise<Dictionary<any>>;
797
797
  safePosition(position: any): Position;
798
798
  parsePositions(positions: any[], symbols?: string[], params?: {}): Position[];
@@ -3434,14 +3434,34 @@ export default class Exchange {
3434
3434
  // marketIdKey should only be undefined when response is a dictionary
3435
3435
  symbols = this.marketSymbols(symbols);
3436
3436
  const tiers = {};
3437
- for (let i = 0; i < response.length; i++) {
3438
- const item = response[i];
3439
- const id = this.safeString(item, marketIdKey);
3440
- const market = this.safeMarket(id, undefined, undefined, 'swap');
3441
- const symbol = market['symbol'];
3442
- const contract = this.safeBool(market, 'contract', false);
3443
- if (contract && ((symbols === undefined) || this.inArray(symbol, symbols))) {
3444
- tiers[symbol] = this.parseMarketLeverageTiers(item, market);
3437
+ let symbolsLength = 0;
3438
+ if (symbols !== undefined) {
3439
+ symbolsLength = symbols.length;
3440
+ }
3441
+ const noSymbols = (symbols === undefined) || (symbolsLength === 0);
3442
+ if (Array.isArray(response)) {
3443
+ for (let i = 0; i < response.length; i++) {
3444
+ const item = response[i];
3445
+ const id = this.safeString(item, marketIdKey);
3446
+ const market = this.safeMarket(id, undefined, undefined, 'swap');
3447
+ const symbol = market['symbol'];
3448
+ const contract = this.safeBool(market, 'contract', false);
3449
+ if (contract && (noSymbols || this.inArray(symbol, symbols))) {
3450
+ tiers[symbol] = this.parseMarketLeverageTiers(item, market);
3451
+ }
3452
+ }
3453
+ }
3454
+ else {
3455
+ const keys = Object.keys(response);
3456
+ for (let i = 0; i < keys.length; i++) {
3457
+ const marketId = keys[i];
3458
+ const item = response[marketId];
3459
+ const market = this.safeMarket(marketId, undefined, undefined, 'swap');
3460
+ const symbol = market['symbol'];
3461
+ const contract = this.safeBool(market, 'contract', false);
3462
+ if (contract && (noSymbols || this.inArray(symbol, symbols))) {
3463
+ tiers[symbol] = this.parseMarketLeverageTiers(item, market);
3464
+ }
3445
3465
  }
3446
3466
  }
3447
3467
  return tiers;
@@ -1,4 +1,4 @@
1
1
  import { concatBytes } from '../../static_dependencies/noble-curves/abstract/utils.js';
2
- declare const json: (data: any, params?: any) => string, isJsonEncodedObject: (object: any) => boolean, binaryToString: (data: Uint8Array) => string, stringToBinary: (str: string) => Uint8Array, stringToBase64: (string: any) => string, base64ToString: (string: any) => string, base64ToBinary: (str: string) => Uint8Array, binaryToBase64: (data: Uint8Array) => string, base16ToBinary: (str: string) => Uint8Array, binaryToBase16: (data: Uint8Array) => string, base58ToBinary: (str: string) => Uint8Array, binaryToBase58: (data: Uint8Array) => string, binaryConcat: typeof concatBytes, binaryConcatArray: (arr: any) => Uint8Array, urlencode: (object: any) => string, urlencodeNested: (object: any) => string, urlencodeWithArrayRepeat: (object: any) => string, rawencode: (object: any) => string, encode: (str: string) => Uint8Array, decode: (data: Uint8Array) => string, urlencodeBase64: (base64string: any) => any, numberToLE: (n: number, padding: number) => Uint8Array, numberToBE: (n: number, padding: number) => Uint8Array;
2
+ declare const json: (data: any, params?: any) => string, isJsonEncodedObject: (object: any) => boolean, binaryToString: (data: Uint8Array) => string, stringToBinary: (str: string) => Uint8Array, stringToBase64: (string: string) => string, base64ToString: (string: string) => string, base64ToBinary: (str: string) => Uint8Array, binaryToBase64: (data: Uint8Array) => string, base16ToBinary: (str: string) => Uint8Array, binaryToBase16: (data: Uint8Array) => string, base58ToBinary: (str: string) => Uint8Array, binaryToBase58: (data: Uint8Array) => string, binaryConcat: typeof concatBytes, binaryConcatArray: (arr: any[]) => Uint8Array, urlencode: (object: object) => string, urlencodeNested: (object: object) => string, urlencodeWithArrayRepeat: (object: object) => string, rawencode: (object: object) => string, encode: (str: string) => Uint8Array, decode: (data: Uint8Array) => string, urlencodeBase64: (base64string: string) => string, numberToLE: (n: number, padding: number) => Uint8Array, numberToBE: (n: number, padding: number) => Uint8Array;
3
3
  declare function packb(req: any): Uint8Array;
4
4
  export { json, isJsonEncodedObject, binaryToString, stringToBinary, stringToBase64, base64ToBinary, base64ToString, binaryToBase64, base16ToBinary, binaryToBase16, binaryConcat, binaryConcatArray, urlencode, urlencodeWithArrayRepeat, rawencode, encode, decode, urlencodeBase64, numberToLE, numberToBE, base58ToBinary, binaryToBase58, urlencodeNested, packb };
@@ -11,13 +11,13 @@ import { numberToBytesBE, numberToBytesLE, concatBytes } from '../../static_depe
11
11
  import { serialize } from '../../static_dependencies/messagepack/msgpack.js';
12
12
  import qs from '../../static_dependencies/qs/index.cjs';
13
13
  /* ------------------------------------------------------------------------ */
14
- const json = (data, params = undefined) => JSON.stringify(data), isJsonEncodedObject = object => ((typeof object === 'string') &&
14
+ const json = (data, params = undefined) => JSON.stringify(data), isJsonEncodedObject = (object) => ((typeof object === 'string') &&
15
15
  (object.length >= 2) &&
16
- ((object[0] === '{') || (object[0] === '['))), binaryToString = utf8.encode, stringToBinary = utf8.decode, stringToBase64 = string => base64.encode(utf8.decode(string)), base64ToString = string => utf8.encode(base64.decode(string)), base64ToBinary = base64.decode, binaryToBase64 = base64.encode, base16ToBinary = base16.decode, binaryToBase16 = base16.encode, base58ToBinary = base58.decode, binaryToBase58 = base58.encode, binaryConcat = concatBytes, binaryConcatArray = (arr) => concatBytes(...arr), urlencode = object => qs.stringify(object), urlencodeNested = object => qs.stringify(object) // implemented only in python
17
- , urlencodeWithArrayRepeat = object => qs.stringify(object, { arrayFormat: 'repeat' }), rawencode = object => qs.stringify(object, { encode: false }), encode = utf8.decode // lol
16
+ ((object[0] === '{') || (object[0] === '['))), binaryToString = utf8.encode, stringToBinary = utf8.decode, stringToBase64 = (string) => base64.encode(utf8.decode(string)), base64ToString = (string) => utf8.encode(base64.decode(string)), base64ToBinary = base64.decode, binaryToBase64 = base64.encode, base16ToBinary = base16.decode, binaryToBase16 = base16.encode, base58ToBinary = base58.decode, binaryToBase58 = base58.encode, binaryConcat = concatBytes, binaryConcatArray = (arr) => concatBytes(...arr), urlencode = (object) => qs.stringify(object), urlencodeNested = (object) => qs.stringify(object) // implemented only in python
17
+ , urlencodeWithArrayRepeat = (object) => qs.stringify(object, { arrayFormat: 'repeat' }), rawencode = (object) => qs.stringify(object, { encode: false }), encode = utf8.decode // lol
18
18
  , decode = utf8.encode
19
19
  // Url-safe-base64 without equals signs, with + replaced by - and slashes replaced by underscores
20
- , urlencodeBase64 = base64string => base64string.replace(/[=]+$/, '')
20
+ , urlencodeBase64 = (base64string) => base64string.replace(/[=]+$/, '')
21
21
  .replace(/\+/g, '-')
22
22
  .replace(/\//g, '_'), numberToLE = (n, padding) => numberToBytesLE(BigInt(n), padding), numberToBE = (n, padding) => numberToBytesBE(BigInt(n), padding);
23
23
  function packb(req) {
@@ -1,4 +1,4 @@
1
1
  import { CHash } from '../../static_dependencies/noble-hashes/utils.js';
2
- declare function rsa(request: string, secret: string, hash: CHash): string | false;
2
+ declare function rsa(request: string, secret: string, hash: CHash): string;
3
3
  declare function jwt(request: {}, secret: Uint8Array, hash: CHash, isRSA?: boolean, opts?: {}): string;
4
4
  export { rsa, jwt };
@@ -71,7 +71,6 @@ export default class coinex extends Exchange {
71
71
  setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
72
72
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
73
73
  fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<{}>;
74
- parseLeverageTiers(response: any, symbols?: Strings, marketIdKey?: any): {};
75
74
  parseMarketLeverageTiers(item: any, market?: Market): any[];
76
75
  modifyMarginHelper(symbol: string, amount: any, addOrReduce: any, params?: {}): Promise<any>;
77
76
  parseMarginModification(data: any, market?: Market): MarginModification;
package/js/src/coinex.js CHANGED
@@ -4128,36 +4128,6 @@ export default class coinex extends Exchange {
4128
4128
  const data = this.safeValue(response, 'data', {});
4129
4129
  return this.parseLeverageTiers(data, symbols, undefined);
4130
4130
  }
4131
- parseLeverageTiers(response, symbols = undefined, marketIdKey = undefined) {
4132
- //
4133
- // {
4134
- // "BTCUSD": [
4135
- // ["500001", "100", "0.005"],
4136
- // ["1000001", "50", "0.01"],
4137
- // ["2000001", "30", "0.015"],
4138
- // ["5000001", "20", "0.02"],
4139
- // ["10000001", "15", "0.025"],
4140
- // ["20000001", "10", "0.03"]
4141
- // ],
4142
- // ...
4143
- // }
4144
- //
4145
- const tiers = {};
4146
- const marketIds = Object.keys(response);
4147
- for (let i = 0; i < marketIds.length; i++) {
4148
- const marketId = marketIds[i];
4149
- const market = this.safeMarket(marketId, undefined, undefined, 'spot');
4150
- const symbol = this.safeString(market, 'symbol');
4151
- let symbolsLength = 0;
4152
- if (symbols !== undefined) {
4153
- symbolsLength = symbols.length;
4154
- }
4155
- if (symbol !== undefined && (symbolsLength === 0 || this.inArray(symbols, symbol))) {
4156
- tiers[symbol] = this.parseMarketLeverageTiers(response[marketId], market);
4157
- }
4158
- }
4159
- return tiers;
4160
- }
4161
4131
  parseMarketLeverageTiers(item, market = undefined) {
4162
4132
  const tiers = [];
4163
4133
  let minNotional = 0;
@@ -145,7 +145,6 @@ export default class digifinex extends Exchange {
145
145
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
146
146
  fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
147
147
  fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<{}>;
148
- parseLeverageTiers(response: any, symbols?: Strings, marketIdKey?: any): {};
149
148
  fetchMarketLeverageTiers(symbol: string, params?: {}): Promise<any[]>;
150
149
  parseMarketLeverageTiers(info: any, market?: Market): any[];
151
150
  handleMarginModeAndParams(methodName: any, params?: {}, defaultValue?: any): any[];
@@ -3808,55 +3808,7 @@ export default class digifinex extends Exchange {
3808
3808
  //
3809
3809
  const data = this.safeValue(response, 'data', []);
3810
3810
  symbols = this.marketSymbols(symbols);
3811
- return this.parseLeverageTiers(data, symbols, 'symbol');
3812
- }
3813
- parseLeverageTiers(response, symbols = undefined, marketIdKey = undefined) {
3814
- //
3815
- // [
3816
- // {
3817
- // "instrument_id": "BTCUSDTPERP",
3818
- // "type": "REAL",
3819
- // "contract_type": "PERPETUAL",
3820
- // "base_currency": "BTC",
3821
- // "quote_currency": "USDT",
3822
- // "clear_currency": "USDT",
3823
- // "contract_value": "0.001",
3824
- // "contract_value_currency": "BTC",
3825
- // "is_inverse": false,
3826
- // "is_trading": true,
3827
- // "status": "ONLINE",
3828
- // "price_precision": 1,
3829
- // "tick_size": "0.1",
3830
- // "min_order_amount": 1,
3831
- // "open_max_limits": [
3832
- // {
3833
- // "leverage": "50",
3834
- // "max_limit": "1000000"
3835
- // }
3836
- // ]
3837
- // },
3838
- // ]
3839
- //
3840
- const tiers = {};
3841
- const result = {};
3842
- for (let i = 0; i < response.length; i++) {
3843
- const entry = response[i];
3844
- const marketId = this.safeString(entry, 'instrument_id');
3845
- const market = this.safeMarket(marketId);
3846
- const symbol = this.safeSymbol(marketId, market);
3847
- let symbolsLength = 0;
3848
- tiers[symbol] = this.parseMarketLeverageTiers(response[i], market);
3849
- if (symbols !== undefined) {
3850
- symbolsLength = symbols.length;
3851
- if (this.inArray(symbol, symbols)) {
3852
- result[symbol] = this.parseMarketLeverageTiers(response[i], market);
3853
- }
3854
- }
3855
- if (symbol !== undefined && (symbolsLength === 0 || this.inArray(symbols, symbol))) {
3856
- result[symbol] = this.parseMarketLeverageTiers(response[i], market);
3857
- }
3858
- }
3859
- return result;
3811
+ return this.parseLeverageTiers(data, symbols, 'instrument_id');
3860
3812
  }
3861
3813
  async fetchMarketLeverageTiers(symbol, params = {}) {
3862
3814
  /**
@@ -48,7 +48,7 @@ export default class probit extends Exchange {
48
48
  withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
49
49
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
50
50
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
51
- fetchTransactions(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
51
+ fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
52
52
  parseTransaction(transaction: any, currency?: Currency): Transaction;
53
53
  parseTransactionStatus(status: any): string;
54
54
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
package/js/src/probit.js CHANGED
@@ -1490,12 +1490,11 @@ export default class probit extends Exchange {
1490
1490
  const result = await this.fetchTransactions(code, since, limit, this.extend(request, params));
1491
1491
  return result;
1492
1492
  }
1493
- async fetchTransactions(code = undefined, since = undefined, limit = undefined, params = {}) {
1493
+ async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
1494
1494
  /**
1495
1495
  * @method
1496
- * @name probit#fetchTransactions
1497
- * @deprecated
1498
- * @description use fetchDepositsWithdrawals instead
1496
+ * @name probit#fetchDepositsWithdrawals
1497
+ * @description fetch history of deposits and withdrawals
1499
1498
  * @see https://docs-en.probit.com/reference/transferpayment
1500
1499
  * @param {string} code unified currency code
1501
1500
  * @param {int} [since] the earliest time in ms to fetch transactions for
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.2.92",
3
+ "version": "4.2.93",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.js",
6
6
  "type": "module",