ccxt 4.3.18 → 4.3.19

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.
Files changed (168) hide show
  1. package/README.md +7 -5
  2. package/dist/cjs/ccxt.js +6 -1
  3. package/dist/cjs/src/abstract/woofipro.js +9 -0
  4. package/dist/cjs/src/ascendex.js +3 -4
  5. package/dist/cjs/src/base/Exchange.js +42 -2
  6. package/dist/cjs/src/base/functions/crypto.js +10 -3
  7. package/dist/cjs/src/base/functions/encode.js +6 -3
  8. package/dist/cjs/src/base/functions/number.js +8 -5
  9. package/dist/cjs/src/base/functions/rsa.js +5 -5
  10. package/dist/cjs/src/bigone.js +1 -1
  11. package/dist/cjs/src/bitfinex.js +25 -1
  12. package/dist/cjs/src/bitfinex2.js +59 -51
  13. package/dist/cjs/src/bitget.js +1 -5
  14. package/dist/cjs/src/bitmart.js +3 -3
  15. package/dist/cjs/src/bitstamp.js +1 -3
  16. package/dist/cjs/src/bybit.js +1 -0
  17. package/dist/cjs/src/coinex.js +321 -537
  18. package/dist/cjs/src/coinlist.js +1 -2
  19. package/dist/cjs/src/deribit.js +1 -1
  20. package/dist/cjs/src/hollaex.js +3 -3
  21. package/dist/cjs/src/indodax.js +1 -1
  22. package/dist/cjs/src/latoken.js +1 -1
  23. package/dist/cjs/src/mexc.js +1 -1
  24. package/dist/cjs/src/novadax.js +0 -1
  25. package/dist/cjs/src/okx.js +17 -0
  26. package/dist/cjs/src/poloniex.js +1 -2
  27. package/dist/cjs/src/pro/bitget.js +136 -192
  28. package/dist/cjs/src/pro/coinbaseinternational.js +9 -1
  29. package/dist/cjs/src/pro/okx.js +85 -0
  30. package/dist/cjs/src/pro/woofipro.js +1263 -0
  31. package/dist/cjs/src/wavesexchange.js +2 -2
  32. package/dist/cjs/src/woo.js +17 -3
  33. package/dist/cjs/src/woofipro.js +2698 -0
  34. package/js/ccxt.d.ts +8 -2
  35. package/js/ccxt.js +6 -2
  36. package/js/src/abstract/bybit.d.ts +1 -0
  37. package/js/src/abstract/okx.d.ts +1 -0
  38. package/js/src/abstract/woofipro.d.ts +122 -0
  39. package/js/src/abstract/woofipro.js +11 -0
  40. package/js/src/ace.d.ts +2 -2
  41. package/js/src/ascendex.d.ts +5 -15
  42. package/js/src/ascendex.js +3 -4
  43. package/js/src/base/Exchange.d.ts +26 -17
  44. package/js/src/base/Exchange.js +42 -2
  45. package/js/src/base/functions/crypto.d.ts +1 -1
  46. package/js/src/base/functions/crypto.js +10 -3
  47. package/js/src/base/functions/encode.d.ts +1 -1
  48. package/js/src/base/functions/encode.js +6 -3
  49. package/js/src/base/functions/number.d.ts +1 -1
  50. package/js/src/base/functions/number.js +8 -5
  51. package/js/src/base/functions/rsa.js +6 -6
  52. package/js/src/base/types.d.ts +4 -0
  53. package/js/src/bigone.d.ts +4 -14
  54. package/js/src/bigone.js +1 -1
  55. package/js/src/binance.d.ts +13 -71
  56. package/js/src/binancecoinm.d.ts +2 -22
  57. package/js/src/binanceusdm.d.ts +2 -22
  58. package/js/src/bingx.d.ts +4 -14
  59. package/js/src/bit2c.d.ts +2 -2
  60. package/js/src/bitbank.d.ts +2 -2
  61. package/js/src/bitbns.d.ts +2 -2
  62. package/js/src/bitfinex.d.ts +6 -16
  63. package/js/src/bitfinex.js +25 -1
  64. package/js/src/bitfinex2.d.ts +6 -16
  65. package/js/src/bitfinex2.js +59 -51
  66. package/js/src/bitflyer.d.ts +2 -2
  67. package/js/src/bitget.d.ts +7 -17
  68. package/js/src/bitget.js +1 -5
  69. package/js/src/bithumb.d.ts +3 -3
  70. package/js/src/bitmart.d.ts +5 -14
  71. package/js/src/bitmart.js +3 -3
  72. package/js/src/bitmex.d.ts +4 -4
  73. package/js/src/bitopro.d.ts +2 -2
  74. package/js/src/bitrue.d.ts +5 -5
  75. package/js/src/bitso.d.ts +2 -2
  76. package/js/src/bitstamp.d.ts +3 -3
  77. package/js/src/bitstamp.js +1 -3
  78. package/js/src/bitteam.d.ts +2 -2
  79. package/js/src/bitvavo.d.ts +5 -5
  80. package/js/src/bl3p.d.ts +2 -2
  81. package/js/src/blockchaincom.d.ts +2 -2
  82. package/js/src/blofin.d.ts +4 -14
  83. package/js/src/btcalpha.d.ts +2 -2
  84. package/js/src/btcbox.d.ts +2 -2
  85. package/js/src/btcmarkets.d.ts +2 -2
  86. package/js/src/btcturk.d.ts +2 -2
  87. package/js/src/bybit.d.ts +8 -56
  88. package/js/src/bybit.js +1 -0
  89. package/js/src/cex.d.ts +2 -2
  90. package/js/src/coinbase.d.ts +4 -4
  91. package/js/src/coinbasepro.d.ts +3 -3
  92. package/js/src/coincheck.d.ts +2 -2
  93. package/js/src/coinex.d.ts +6 -16
  94. package/js/src/coinex.js +321 -537
  95. package/js/src/coinlist.d.ts +5 -15
  96. package/js/src/coinlist.js +1 -2
  97. package/js/src/coinmate.d.ts +2 -2
  98. package/js/src/coinmetro.d.ts +3 -3
  99. package/js/src/coinone.d.ts +2 -2
  100. package/js/src/coinsph.d.ts +2 -2
  101. package/js/src/coinspot.d.ts +2 -2
  102. package/js/src/cryptocom.d.ts +2 -2
  103. package/js/src/currencycom.d.ts +3 -3
  104. package/js/src/delta.d.ts +5 -43
  105. package/js/src/deribit.d.ts +7 -55
  106. package/js/src/deribit.js +1 -1
  107. package/js/src/digifinex.d.ts +5 -15
  108. package/js/src/exmo.d.ts +2 -2
  109. package/js/src/gate.d.ts +6 -54
  110. package/js/src/gemini.d.ts +2 -2
  111. package/js/src/hitbtc.d.ts +4 -14
  112. package/js/src/hollaex.d.ts +3 -3
  113. package/js/src/hollaex.js +3 -3
  114. package/js/src/htx.d.ts +4 -14
  115. package/js/src/huobijp.d.ts +4 -4
  116. package/js/src/hyperliquid.d.ts +1 -1
  117. package/js/src/idex.d.ts +3 -3
  118. package/js/src/independentreserve.d.ts +2 -2
  119. package/js/src/indodax.d.ts +2 -2
  120. package/js/src/indodax.js +1 -1
  121. package/js/src/kraken.d.ts +4 -14
  122. package/js/src/krakenfutures.d.ts +4 -14
  123. package/js/src/kucoin.d.ts +5 -15
  124. package/js/src/kucoinfutures.d.ts +4 -14
  125. package/js/src/kuna.d.ts +2 -2
  126. package/js/src/latoken.d.ts +5 -15
  127. package/js/src/latoken.js +1 -1
  128. package/js/src/lbank.d.ts +2 -2
  129. package/js/src/luno.d.ts +2 -2
  130. package/js/src/lykke.d.ts +2 -2
  131. package/js/src/mercado.d.ts +2 -2
  132. package/js/src/mexc.d.ts +8 -28
  133. package/js/src/mexc.js +1 -1
  134. package/js/src/ndax.d.ts +2 -2
  135. package/js/src/novadax.d.ts +4 -15
  136. package/js/src/novadax.js +0 -1
  137. package/js/src/okcoin.d.ts +4 -14
  138. package/js/src/okx.d.ts +10 -68
  139. package/js/src/okx.js +17 -0
  140. package/js/src/onetrading.d.ts +2 -2
  141. package/js/src/paymium.d.ts +4 -14
  142. package/js/src/phemex.d.ts +5 -15
  143. package/js/src/poloniex.d.ts +3 -13
  144. package/js/src/poloniex.js +1 -2
  145. package/js/src/poloniexfutures.d.ts +2 -2
  146. package/js/src/pro/bitget.js +137 -193
  147. package/js/src/pro/coinbaseinternational.d.ts +3 -3
  148. package/js/src/pro/coinbaseinternational.js +9 -1
  149. package/js/src/pro/okx.d.ts +4 -1
  150. package/js/src/pro/okx.js +85 -0
  151. package/js/src/pro/woofipro.d.ts +47 -0
  152. package/js/src/pro/woofipro.js +1264 -0
  153. package/js/src/probit.d.ts +3 -3
  154. package/js/src/timex.d.ts +2 -2
  155. package/js/src/tokocrypto.d.ts +3 -3
  156. package/js/src/upbit.d.ts +2 -2
  157. package/js/src/wavesexchange.d.ts +3 -3
  158. package/js/src/wavesexchange.js +2 -2
  159. package/js/src/wazirx.d.ts +2 -2
  160. package/js/src/whitebit.d.ts +3 -13
  161. package/js/src/woo.d.ts +7 -17
  162. package/js/src/woo.js +17 -3
  163. package/js/src/woofipro.d.ts +131 -0
  164. package/js/src/woofipro.js +2699 -0
  165. package/js/src/yobit.d.ts +2 -2
  166. package/js/src/zaif.d.ts +2 -2
  167. package/js/src/zonda.d.ts +4 -14
  168. package/package.json +1 -1
@@ -7,7 +7,7 @@
7
7
  // ----------------------------------------------------------------------------
8
8
  /* eslint-disable */
9
9
  import * as functions from './functions.js';
10
- const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS } = functions;
10
+ const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, urlencodeBase64, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS } = functions;
11
11
  import { keys as keysFunc, values as valuesFunc, vwap as vwapFunc } from './functions.js';
12
12
  // import exceptions from "./errors.js"
13
13
  import { // eslint-disable-line object-curly-newline
@@ -62,6 +62,7 @@ export default class Exchange {
62
62
  this.balance = {};
63
63
  this.orderbooks = {};
64
64
  this.tickers = {};
65
+ this.fundingRates = {};
65
66
  this.bidsasks = {};
66
67
  this.orders = undefined;
67
68
  this.triggerOrders = undefined;
@@ -211,6 +212,7 @@ export default class Exchange {
211
212
  this.base64ToString = base64ToString;
212
213
  this.crc32 = crc32;
213
214
  this.packb = packb;
215
+ this.urlencodeBase64 = urlencodeBase64;
214
216
  this.httpProxyAgentModule = undefined;
215
217
  this.httpsProxyAgentModule = undefined;
216
218
  this.socksProxyAgentModule = undefined;
@@ -571,6 +573,7 @@ export default class Exchange {
571
573
  'apiKey': true,
572
574
  'secret': true,
573
575
  'uid': false,
576
+ 'accountId': false,
574
577
  'login': false,
575
578
  'password': false,
576
579
  'twofa': false,
@@ -2145,6 +2148,13 @@ export default class Exchange {
2145
2148
  const res = this.parseToNumeric((value % 1));
2146
2149
  return res === 0;
2147
2150
  }
2151
+ safeIntegerOmitZero(obj, key, defaultValue = undefined) {
2152
+ const timestamp = this.safeInteger(obj, key, defaultValue);
2153
+ if (timestamp === undefined || timestamp === 0) {
2154
+ return undefined;
2155
+ }
2156
+ return timestamp;
2157
+ }
2148
2158
  afterConstruct() {
2149
2159
  this.createNetworksByIdObject();
2150
2160
  }
@@ -5233,6 +5243,7 @@ export default class Exchange {
5233
5243
  //
5234
5244
  // the value of tickers is either a dict or a list
5235
5245
  //
5246
+ //
5236
5247
  // dict
5237
5248
  //
5238
5249
  // {
@@ -5327,13 +5338,17 @@ export default class Exchange {
5327
5338
  }
5328
5339
  return result;
5329
5340
  }
5330
- isTriggerOrder(params) {
5341
+ handleTriggerAndParams(params) {
5331
5342
  const isTrigger = this.safeBool2(params, 'trigger', 'stop');
5332
5343
  if (isTrigger) {
5333
5344
  params = this.omit(params, ['trigger', 'stop']);
5334
5345
  }
5335
5346
  return [isTrigger, params];
5336
5347
  }
5348
+ isTriggerOrder(params) {
5349
+ // for backwards compatibility
5350
+ return this.handleTriggerAndParams(params);
5351
+ }
5337
5352
  isPostOnly(isMarketOrder, exchangeSpecificParam, params = {}) {
5338
5353
  /**
5339
5354
  * @ignore
@@ -6285,5 +6300,30 @@ export default class Exchange {
6285
6300
  }
6286
6301
  return marginModifications;
6287
6302
  }
6303
+ async fetchTransfer(id, code = undefined, params = {}) {
6304
+ /**
6305
+ * @method
6306
+ * @name exchange#fetchTransfer
6307
+ * @description fetches a transfer
6308
+ * @param {string} id transfer id
6309
+ * @param {[string]} code unified currency code
6310
+ * @param {object} params extra parameters specific to the exchange api endpoint
6311
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
6312
+ */
6313
+ throw new NotSupported(this.id + ' fetchTransfer () is not supported yet');
6314
+ }
6315
+ async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
6316
+ /**
6317
+ * @method
6318
+ * @name exchange#fetchTransfer
6319
+ * @description fetches a transfer
6320
+ * @param {string} id transfer id
6321
+ * @param {int} [since] timestamp in ms of the earliest transfer to fetch
6322
+ * @param {int} [limit] the maximum amount of transfers to fetch
6323
+ * @param {object} params extra parameters specific to the exchange api endpoint
6324
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
6325
+ */
6326
+ throw new NotSupported(this.id + ' fetchTransfers () is not supported yet');
6327
+ }
6288
6328
  }
6289
6329
  export { Exchange, };
@@ -11,6 +11,6 @@ declare function ecdsa(request: Hex, secret: Hex, curve: CurveFn, prehash?: CHas
11
11
  v: number;
12
12
  };
13
13
  declare function axolotl(request: Hex, secret: Hex, curve: CurveFnEDDSA): string;
14
- declare function eddsa(request: Hex, secret: string, curve: CurveFnEDDSA): string;
14
+ declare function eddsa(request: Hex, secret: Input, curve: CurveFnEDDSA): string;
15
15
  declare function crc32(str: any, signed?: boolean): number;
16
16
  export { hash, hmac, crc32, ecdsa, eddsa, axolotl, };
@@ -92,9 +92,16 @@ function axolotl(request, secret, curve) {
92
92
  return base58.encode(signature);
93
93
  }
94
94
  function eddsa(request, secret, curve) {
95
- // secret is the base64 pem encoded key
96
- // we get the last 32 bytes
97
- const privateKey = new Uint8Array(Base64.unarmor(secret).slice(16));
95
+ let privateKey = undefined;
96
+ if (secret.length === 32) {
97
+ // ed25519 secret is 32 bytes
98
+ privateKey = secret;
99
+ }
100
+ else if (typeof secret === 'string') {
101
+ // secret is the base64 pem encoded key
102
+ // we get the last 32 bytes
103
+ privateKey = new Uint8Array(Base64.unarmor(secret).slice(16));
104
+ }
98
105
  const signature = curve.sign(request, privateKey);
99
106
  return base64.encode(signature);
100
107
  }
@@ -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: 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;
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: (payload: string | Uint8Array) => 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 };
@@ -17,9 +17,12 @@ const json = (data, params = undefined) => JSON.stringify(data), isJsonEncodedOb
17
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(/[=]+$/, '')
21
- .replace(/\+/g, '-')
22
- .replace(/\//g, '_'), numberToLE = (n, padding) => numberToBytesLE(BigInt(n), padding), numberToBE = (n, padding) => numberToBytesBE(BigInt(n), padding);
20
+ , urlencodeBase64 = (payload) => {
21
+ const payload64 = (typeof payload === 'string') ? stringToBase64(payload) : binaryToBase64(payload);
22
+ return payload64.replace(/[=]+$/, '')
23
+ .replace(/\+/g, '-')
24
+ .replace(/\//g, '_');
25
+ }, numberToLE = (n, padding) => numberToBytesLE(BigInt(n), padding), numberToBE = (n, padding) => numberToBytesBE(BigInt(n), padding);
23
26
  function packb(req) {
24
27
  return serialize(req);
25
28
  }
@@ -22,6 +22,6 @@ declare function numberToString(x: any): string | undefined;
22
22
  declare const truncate_to_string: (num: number | string, precision?: number) => string;
23
23
  declare const truncate: (num: number | string, precision?: number) => number;
24
24
  declare function precisionFromString(str: string): number;
25
- declare const decimalToPrecision: (x: any, roundingMode: any, numPrecisionDigits: any, countingMode?: number, paddingMode?: number) => any;
25
+ declare const decimalToPrecision: (x: string, roundingMode: number, numPrecisionDigits: any, countingMode?: number, paddingMode?: number) => string;
26
26
  declare function omitZero(stringNumber: string): string;
27
27
  export { numberToString, precisionFromString, decimalToPrecision, truncate_to_string, truncate, omitZero, precisionConstants, ROUND, TRUNCATE, ROUND_UP, ROUND_DOWN, DECIMAL_PLACES, SIGNIFICANT_DIGITS, TICK_SIZE, NO_PADDING, PAD_WITH_ZERO, };
@@ -98,6 +98,9 @@ function precisionFromString(str) {
98
98
  }
99
99
  /* ------------------------------------------------------------------------ */
100
100
  const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode = DECIMAL_PLACES, paddingMode = NO_PADDING) => {
101
+ return _decimalToPrecision(x, roundingMode, numPrecisionDigits, countingMode, paddingMode);
102
+ };
103
+ const _decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode = DECIMAL_PLACES, paddingMode = NO_PADDING) => {
101
104
  if (countingMode === TICK_SIZE) {
102
105
  if (typeof numPrecisionDigits === 'string') {
103
106
  numPrecisionDigits = parseFloat(numPrecisionDigits);
@@ -109,7 +112,7 @@ const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode =
109
112
  if (numPrecisionDigits < 0) {
110
113
  const toNearest = Math.pow(10, -numPrecisionDigits);
111
114
  if (roundingMode === ROUND) {
112
- return (toNearest * decimalToPrecision(x / toNearest, roundingMode, 0, countingMode, paddingMode)).toString();
115
+ return (toNearest * _decimalToPrecision(x / toNearest, roundingMode, 0, countingMode, paddingMode)).toString();
113
116
  }
114
117
  if (roundingMode === TRUNCATE) {
115
118
  return (x - (x % toNearest)).toString();
@@ -117,12 +120,12 @@ const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode =
117
120
  }
118
121
  /* handle tick size */
119
122
  if (countingMode === TICK_SIZE) {
120
- const precisionDigitsString = decimalToPrecision(numPrecisionDigits, ROUND, 22, DECIMAL_PLACES, NO_PADDING);
123
+ const precisionDigitsString = _decimalToPrecision(numPrecisionDigits, ROUND, 22, DECIMAL_PLACES, NO_PADDING);
121
124
  const newNumPrecisionDigits = precisionFromString(precisionDigitsString);
122
125
  let missing = x % numPrecisionDigits;
123
126
  // See: https://github.com/ccxt/ccxt/pull/6486
124
- missing = Number(decimalToPrecision(missing, ROUND, 8, DECIMAL_PLACES, NO_PADDING));
125
- const fpError = decimalToPrecision(missing / numPrecisionDigits, ROUND, Math.max(newNumPrecisionDigits, 8), DECIMAL_PLACES, NO_PADDING);
127
+ missing = Number(_decimalToPrecision(missing, ROUND, 8, DECIMAL_PLACES, NO_PADDING));
128
+ const fpError = _decimalToPrecision(missing / numPrecisionDigits, ROUND, Math.max(newNumPrecisionDigits, 8), DECIMAL_PLACES, NO_PADDING);
126
129
  if (precisionFromString(fpError) !== 0) {
127
130
  if (roundingMode === ROUND) {
128
131
  if (x > 0) {
@@ -146,7 +149,7 @@ const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode =
146
149
  x = x - missing;
147
150
  }
148
151
  }
149
- return decimalToPrecision(x, ROUND, newNumPrecisionDigits, DECIMAL_PLACES, paddingMode);
152
+ return _decimalToPrecision(x, ROUND, newNumPrecisionDigits, DECIMAL_PLACES, paddingMode);
150
153
  }
151
154
  /* Convert to a string (if needed), skip leading minus sign (if any) */
152
155
  const str = numberToString(x);
@@ -6,7 +6,7 @@
6
6
 
7
7
  import { JSEncrypt } from "../../static_dependencies/jsencrypt/JSEncrypt.js";
8
8
  import { base16, utf8 } from '../../static_dependencies/scure-base/index.js';
9
- import { urlencodeBase64, stringToBase64, base16ToBinary, binaryToBase64 } from './encode.js';
9
+ import { urlencodeBase64, base16ToBinary, base64ToBinary } from './encode.js';
10
10
  import { hmac } from './crypto.js';
11
11
  import { P256 } from '../../static_dependencies/noble-curves/p256.js';
12
12
  import { ecdsa } from '../../base/functions/crypto.js';
@@ -27,22 +27,22 @@ function jwt(request, secret, hash, isRSA = false, opts = {}) {
27
27
  request['iat'] = header['iat'];
28
28
  delete header['iat'];
29
29
  }
30
- const encodedHeader = urlencodeBase64(stringToBase64(JSON.stringify(header)));
31
- const encodedData = urlencodeBase64(stringToBase64(JSON.stringify(request)));
30
+ const encodedHeader = urlencodeBase64(JSON.stringify(header));
31
+ const encodedData = urlencodeBase64(JSON.stringify(request));
32
32
  const token = [encodedHeader, encodedData].join('.');
33
33
  const algoType = alg.slice(0, 2);
34
34
  let signature = undefined;
35
35
  if (algoType === 'HS') {
36
- signature = urlencodeBase64(hmac(token, secret, hash, 'base64'));
36
+ signature = urlencodeBase64(hmac(token, secret, hash, 'binary'));
37
37
  }
38
38
  else if (isRSA || algoType === 'RS') {
39
- signature = urlencodeBase64(rsa(token, utf8.encode(secret), hash));
39
+ signature = urlencodeBase64(base64ToBinary(rsa(token, utf8.encode(secret), hash)));
40
40
  }
41
41
  else if (algoType === 'ES') {
42
42
  const signedHash = ecdsa(token, utf8.encode(secret), P256, hash);
43
43
  const r = signedHash.r.padStart(64, '0');
44
44
  const s = signedHash.s.padStart(64, '0');
45
- signature = urlencodeBase64(binaryToBase64(base16ToBinary(r + s)));
45
+ signature = urlencodeBase64(base16ToBinary(r + s));
46
46
  }
47
47
  return [token, signature].join('.');
48
48
  }
@@ -265,6 +265,8 @@ export interface FundingRate {
265
265
  previousFundingDatetime?: string;
266
266
  previousFundingRate?: number;
267
267
  }
268
+ export interface FundingRates extends Dictionary<FundingRate> {
269
+ }
268
270
  export interface Position {
269
271
  symbol: string;
270
272
  id?: Str;
@@ -520,6 +522,8 @@ export interface IsolatedBorrowRates extends Dictionary<IsolatedBorrowRates> {
520
522
  }
521
523
  export interface CrossBorrowRates extends Dictionary<CrossBorrowRates> {
522
524
  }
525
+ export interface TransferEntries extends Dictionary<TransferEntry> {
526
+ }
523
527
  /** [ timestamp, open, high, low, close, volume ] */
524
528
  export declare type OHLCV = [Num, Num, Num, Num, Num, Num];
525
529
  /** [ timestamp, open, high, low, close, volume, count ] */
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bigone.js';
2
- import type { TransferEntry, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num, Currencies } from './base/types.js';
2
+ import type { TransferEntry, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num, Currencies, Dict } from './base/types.js';
3
3
  /**
4
4
  * @class bigone
5
5
  * @augments Exchange
@@ -8,7 +8,7 @@ export default class bigone extends Exchange {
8
8
  describe(): any;
9
9
  fetchCurrencies(params?: {}): Promise<Currencies>;
10
10
  fetchMarkets(params?: {}): Promise<Market[]>;
11
- parseTicker(ticker: any, market?: Market): Ticker;
11
+ parseTicker(ticker: Dict, market?: Market): Ticker;
12
12
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
13
13
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
14
14
  fetchTime(params?: {}): Promise<number>;
@@ -52,18 +52,8 @@ export default class bigone extends Exchange {
52
52
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
53
53
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
54
54
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
55
- parseTransfer(transfer: any, currency?: Currency): {
56
- info: any;
57
- id: any;
58
- timestamp: any;
59
- datetime: any;
60
- currency: any;
61
- amount: any;
62
- fromAccount: any;
63
- toAccount: any;
64
- status: string;
65
- };
66
- parseTransferStatus(status: any): string;
55
+ parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
56
+ parseTransferStatus(status: Str): Str;
67
57
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
68
58
  handleErrors(httpCode: any, reason: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
69
59
  }
package/js/src/bigone.js CHANGED
@@ -2143,7 +2143,7 @@ export default class bigone extends Exchange {
2143
2143
  // "data": null
2144
2144
  // }
2145
2145
  //
2146
- const code = this.safeNumber(transfer, 'code');
2146
+ const code = this.safeString(transfer, 'code');
2147
2147
  return {
2148
2148
  'info': transfer,
2149
2149
  'id': undefined,
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/binance.js';
2
- import type { TransferEntry, Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface, MarginMode, MarginModes, Leverage, Leverages, Num, Option, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRates, IsolatedBorrowRate } from './base/types.js';
2
+ import type { TransferEntry, Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface, MarginMode, MarginModes, Leverage, Leverages, Num, Option, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRates, IsolatedBorrowRate, Dict, TransferEntries } from './base/types.js';
3
3
  /**
4
4
  * @class binance
5
5
  * @augments Exchange
@@ -12,8 +12,8 @@ export default class binance extends Exchange {
12
12
  createExpiredOptionMarket(symbol: string): MarketInterface;
13
13
  market(symbol: string): MarketInterface;
14
14
  safeMarket(marketId?: Str, market?: Market, delimiter?: Str, marketType?: Str): MarketInterface;
15
- costToPrecision(symbol: any, cost: any): any;
16
- currencyToPrecision(code: any, fee: any, networkCode?: any): any;
15
+ costToPrecision(symbol: any, cost: any): string;
16
+ currencyToPrecision(code: any, fee: any, networkCode?: any): string;
17
17
  nonce(): number;
18
18
  fetchTime(params?: {}): Promise<number>;
19
19
  fetchCurrencies(params?: {}): Promise<Currencies>;
@@ -23,7 +23,7 @@ export default class binance extends Exchange {
23
23
  parseBalanceCustom(response: any, type?: any, marginMode?: any, isPortfolioMargin?: boolean): Balances;
24
24
  fetchBalance(params?: {}): Promise<Balances>;
25
25
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
26
- parseTicker(ticker: any, market?: Market): Ticker;
26
+ parseTicker(ticker: Dict, market?: Market): Ticker;
27
27
  fetchStatus(params?: {}): Promise<{
28
28
  status: string;
29
29
  updated: any;
@@ -32,7 +32,7 @@ export default class binance extends Exchange {
32
32
  info: any;
33
33
  }>;
34
34
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
35
- fetchBidsAsks(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
35
+ fetchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
36
36
  fetchLastPrices(symbols?: Strings, params?: {}): Promise<import("./base/types.js").LastPrices>;
37
37
  parseLastPrice(entry: any, market?: Market): {
38
38
  symbol: string;
@@ -98,18 +98,8 @@ export default class binance extends Exchange {
98
98
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
99
99
  parseTransactionStatusByType(status: any, type?: any): string;
100
100
  parseTransaction(transaction: any, currency?: Currency): Transaction;
101
- parseTransferStatus(status: any): string;
102
- parseTransfer(transfer: any, currency?: Currency): {
103
- info: any;
104
- id: string;
105
- timestamp: number;
106
- datetime: string;
107
- currency: string;
108
- amount: number;
109
- fromAccount: any;
110
- toAccount: any;
111
- status: string;
112
- };
101
+ parseTransferStatus(status: Str): Str;
102
+ parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
113
103
  parseIncome(income: any, market?: Market): {
114
104
  info: any;
115
105
  symbol: string;
@@ -120,7 +110,7 @@ export default class binance extends Exchange {
120
110
  amount: number;
121
111
  };
122
112
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
123
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
113
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
124
114
  fetchDepositAddress(code: string, params?: {}): Promise<{
125
115
  currency: string;
126
116
  address: string;
@@ -139,17 +129,7 @@ export default class binance extends Exchange {
139
129
  parseTradingFee(fee: any, market?: Market): TradingFeeInterface;
140
130
  fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
141
131
  fetchTradingFees(params?: {}): Promise<TradingFees>;
142
- futuresTransfer(code: string, amount: any, type: any, params?: {}): Promise<{
143
- info: any;
144
- id: string;
145
- timestamp: number;
146
- datetime: string;
147
- currency: string;
148
- amount: number;
149
- fromAccount: any;
150
- toAccount: any;
151
- status: string;
152
- }>;
132
+ futuresTransfer(code: string, amount: any, type: any, params?: {}): Promise<TransferEntry>;
153
133
  fetchFundingRate(symbol: string, params?: {}): Promise<{
154
134
  info: any;
155
135
  symbol: string;
@@ -258,7 +238,7 @@ export default class binance extends Exchange {
258
238
  setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
259
239
  setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
260
240
  fetchLeverages(symbols?: string[], params?: {}): Promise<Leverages>;
261
- parseLeverage(leverage: any, market?: any): Leverage;
241
+ parseLeverage(leverage: Dict, market?: Market): Leverage;
262
242
  fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
263
243
  fetchMySettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
264
244
  parseSettlement(settlement: any, market: any): {
@@ -400,27 +380,7 @@ export default class binance extends Exchange {
400
380
  fetchMyLiquidations(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Liquidation[]>;
401
381
  parseLiquidation(liquidation: any, market?: Market): Liquidation;
402
382
  fetchGreeks(symbol: string, params?: {}): Promise<Greeks>;
403
- parseGreeks(greeks: any, market?: Market): {
404
- symbol: string;
405
- timestamp: any;
406
- datetime: any;
407
- delta: number;
408
- gamma: number;
409
- theta: number;
410
- vega: number;
411
- rho: any;
412
- bidSize: any;
413
- askSize: any;
414
- bidImpliedVolatility: number;
415
- askImpliedVolatility: number;
416
- markImpliedVolatility: number;
417
- bidPrice: any;
418
- askPrice: any;
419
- markPrice: number;
420
- lastPrice: any;
421
- underlyingPrice: any;
422
- info: any;
423
- };
383
+ parseGreeks(greeks: Dict, market?: Market): Greeks;
424
384
  fetchTradingLimits(symbols?: Strings, params?: {}): Promise<{}>;
425
385
  fetchPositionMode(symbol?: Str, params?: {}): Promise<{
426
386
  info: any;
@@ -429,30 +389,12 @@ export default class binance extends Exchange {
429
389
  fetchMarginModes(symbols?: string[], params?: {}): Promise<MarginModes>;
430
390
  parseMarginMode(marginMode: any, market?: any): MarginMode;
431
391
  fetchOption(symbol: string, params?: {}): Promise<Option>;
432
- parseOption(chain: any, currency?: Currency, market?: Market): {
433
- info: any;
434
- currency: any;
435
- symbol: string;
436
- timestamp: any;
437
- datetime: any;
438
- impliedVolatility: any;
439
- openInterest: any;
440
- bidPrice: number;
441
- askPrice: number;
442
- midPrice: any;
443
- markPrice: any;
444
- lastPrice: number;
445
- underlyingPrice: number;
446
- change: number;
447
- percentage: number;
448
- baseVolume: number;
449
- quoteVolume: any;
450
- };
392
+ parseOption(chain: Dict, currency?: Currency, market?: Market): Option;
451
393
  fetchMarginAdjustmentHistory(symbol?: Str, type?: Str, since?: Num, limit?: Num, params?: {}): Promise<MarginModification[]>;
452
394
  fetchConvertCurrencies(params?: {}): Promise<Currencies>;
453
395
  fetchConvertQuote(fromCode: string, toCode: string, amount?: Num, params?: {}): Promise<Conversion>;
454
396
  createConvertTrade(id: string, fromCode: string, toCode: string, amount?: Num, params?: {}): Promise<Conversion>;
455
397
  fetchConvertTrade(id: string, code?: Str, params?: {}): Promise<Conversion>;
456
398
  fetchConvertTradeHistory(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Conversion[]>;
457
- parseConversion(conversion: any, fromCurrency?: Currency, toCurrency?: Currency): Conversion;
399
+ parseConversion(conversion: Dict, fromCurrency?: Currency, toCurrency?: Currency): Conversion;
458
400
  }
@@ -1,26 +1,6 @@
1
1
  import binance from './binance.js';
2
2
  export default class binancecoinm extends binance {
3
3
  describe(): any;
4
- transferIn(code: string, amount: any, params?: {}): Promise<{
5
- info: any;
6
- id: string;
7
- timestamp: number;
8
- datetime: string;
9
- currency: string;
10
- amount: number;
11
- fromAccount: any;
12
- toAccount: any;
13
- status: string;
14
- }>;
15
- transferOut(code: string, amount: any, params?: {}): Promise<{
16
- info: any;
17
- id: string;
18
- timestamp: number;
19
- datetime: string;
20
- currency: string;
21
- amount: number;
22
- fromAccount: any;
23
- toAccount: any;
24
- status: string;
25
- }>;
4
+ transferIn(code: string, amount: any, params?: {}): Promise<import("./base/types.js").TransferEntry>;
5
+ transferOut(code: string, amount: any, params?: {}): Promise<import("./base/types.js").TransferEntry>;
26
6
  }
@@ -1,26 +1,6 @@
1
1
  import binance from './binance.js';
2
2
  export default class binanceusdm extends binance {
3
3
  describe(): any;
4
- transferIn(code: string, amount: any, params?: {}): Promise<{
5
- info: any;
6
- id: string;
7
- timestamp: number;
8
- datetime: string;
9
- currency: string;
10
- amount: number;
11
- fromAccount: any;
12
- toAccount: any;
13
- status: string;
14
- }>;
15
- transferOut(code: string, amount: any, params?: {}): Promise<{
16
- info: any;
17
- id: string;
18
- timestamp: number;
19
- datetime: string;
20
- currency: string;
21
- amount: number;
22
- fromAccount: any;
23
- toAccount: any;
24
- status: string;
25
- }>;
4
+ transferIn(code: string, amount: any, params?: {}): Promise<import("./base/types.js").TransferEntry>;
5
+ transferOut(code: string, amount: any, params?: {}): Promise<import("./base/types.js").TransferEntry>;
26
6
  }
package/js/src/bingx.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bingx.js';
2
- import type { TransferEntry, Int, OrderSide, OHLCV, FundingRateHistory, Order, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Dict, Leverage, MarginMode, Num, MarginModification, Currencies } from './base/types.js';
2
+ import type { TransferEntry, Int, OrderSide, OHLCV, FundingRateHistory, Order, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Dict, Leverage, MarginMode, Num, MarginModification, Currencies, TransferEntries } from './base/types.js';
3
3
  /**
4
4
  * @class bingx
5
5
  * @augments Exchange
@@ -85,18 +85,8 @@ export default class bingx extends Exchange {
85
85
  fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
86
86
  fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
87
87
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
88
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
89
- parseTransfer(transfer: any, currency?: Currency): {
90
- info: any;
91
- id: string;
92
- timestamp: number;
93
- datetime: string;
94
- currency: string;
95
- amount: number;
96
- fromAccount: string;
97
- toAccount: string;
98
- status: string;
99
- };
88
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
89
+ parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
100
90
  fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
101
91
  fetchDepositAddress(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
102
92
  parseDepositAddress(depositAddress: any, currency?: Currency): {
@@ -116,7 +106,7 @@ export default class bingx extends Exchange {
116
106
  setMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
117
107
  parseMarginModification(data: any, market?: Market): MarginModification;
118
108
  fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
119
- parseLeverage(leverage: any, market?: any): Leverage;
109
+ parseLeverage(leverage: Dict, market?: Market): Leverage;
120
110
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
121
111
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
122
112
  parseDepositWithdrawFee(fee: any, currency?: Currency): {
package/js/src/bit2c.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bit2c.js';
2
- import type { Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees } from './base/types.js';
2
+ import type { Balances, Currency, Dict, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees } from './base/types.js';
3
3
  /**
4
4
  * @class bit2c
5
5
  * @augments Exchange
@@ -9,7 +9,7 @@ export default class bit2c extends Exchange {
9
9
  parseBalance(response: any): Balances;
10
10
  fetchBalance(params?: {}): Promise<Balances>;
11
11
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
12
- parseTicker(ticker: any, market?: Market): Ticker;
12
+ parseTicker(ticker: Dict, market?: Market): Ticker;
13
13
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
14
14
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
15
15
  fetchTradingFees(params?: {}): Promise<TradingFees>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitbank.js';
2
- import type { Balances, Currency, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees, Transaction } from './base/types.js';
2
+ import type { Balances, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitbank
5
5
  * @augments Exchange
@@ -8,7 +8,7 @@ export default class bitbank extends Exchange {
8
8
  describe(): any;
9
9
  fetchMarkets(params?: {}): Promise<Market[]>;
10
10
  parseMarket(entry: any): Market;
11
- parseTicker(ticker: any, market?: Market): Ticker;
11
+ parseTicker(ticker: Dict, market?: Market): Ticker;
12
12
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
13
13
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
14
14
  parseTrade(trade: any, market?: Market): Trade;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitbns.js';
2
- import type { Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
2
+ import type { Balances, Currency, Dict, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitbns
5
5
  * @augments Exchange
@@ -15,7 +15,7 @@ export default class bitbns extends Exchange {
15
15
  }>;
16
16
  fetchMarkets(params?: {}): Promise<Market[]>;
17
17
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
18
- parseTicker(ticker: any, market?: Market): Ticker;
18
+ parseTicker(ticker: Dict, market?: Market): Ticker;
19
19
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
20
20
  parseBalance(response: any): Balances;
21
21
  fetchBalance(params?: {}): Promise<Balances>;