ccxt-ir 4.9.29 → 4.9.31

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/js/src/binance.js CHANGED
@@ -3047,6 +3047,7 @@ export default class binance extends Exchange {
3047
3047
  */
3048
3048
  async fetchMarkets(params = {}) {
3049
3049
  const promisesRaw = [];
3050
+ params = this.omit(params, ['type']);
3050
3051
  let rawFetchMarkets = undefined;
3051
3052
  const defaultTypes = ['spot', 'linear', 'inverse'];
3052
3053
  const fetchMarketsOptions = this.safeDict(this.options, 'fetchMarkets');
package/js/src/bit24.js CHANGED
@@ -90,7 +90,7 @@ export default class bit24 extends Exchange {
90
90
  'urls': {
91
91
  'logo': 'https://cdn.arz.digital/cr-odin/img/exchanges/bit24/64x64.png',
92
92
  'api': {
93
- 'public': 'https://bit24.cash/api/',
93
+ 'public': 'https://rest.bit24.cash',
94
94
  },
95
95
  'www': 'https://bit24.cash/',
96
96
  'doc': [
@@ -100,7 +100,7 @@ export default class bit24 extends Exchange {
100
100
  'api': {
101
101
  'public': {
102
102
  'get': {
103
- 'pro/v3/markets': 1,
103
+ 'pro/capi/v1/markets': 1,
104
104
  },
105
105
  },
106
106
  },
@@ -120,7 +120,7 @@ export default class bit24 extends Exchange {
120
120
  let page = 1;
121
121
  const limit = 100; // check Bit24 docs for max allowed per page
122
122
  while (true) {
123
- const response = await this.publicGetProV3Markets(this.extend(params, {
123
+ const response = await this.publicGetProCapiV1Markets(this.extend(params, {
124
124
  'page': page,
125
125
  'per_page': limit,
126
126
  }));
@@ -185,10 +185,8 @@ export default class bit24 extends Exchange {
185
185
  // last_price: "83669"
186
186
  // }
187
187
  // }
188
- const base_coin = this.safeDict(market, 'base_coin');
189
- let baseId = this.safeString(base_coin, 'symbol');
190
- const quote_coin = this.safeDict(market, 'quote_coin');
191
- let quoteId = this.safeString(quote_coin, 'symbol');
188
+ let baseId = this.safeString(market, 'base_coin_symbol');
189
+ let quoteId = this.safeString(market, 'quote_coin_symbol');
192
190
  const base = this.safeCurrencyCode(baseId);
193
191
  const quote = this.safeCurrencyCode(quoteId);
194
192
  baseId = baseId.toLowerCase();
@@ -262,7 +260,7 @@ export default class bit24 extends Exchange {
262
260
  const limit = 100; // adjust if Bit24 docs show a different default
263
261
  const result = {};
264
262
  while (true) {
265
- const response = await this.publicGetProV3Markets(this.extend(params, {
263
+ const response = await this.publicGetProCapiV1Markets(this.extend(params, {
266
264
  'page': page,
267
265
  'per_page': limit,
268
266
  }));
@@ -341,21 +339,18 @@ export default class bit24 extends Exchange {
341
339
  // }
342
340
  // },
343
341
  const marketType = 'spot';
344
- const base_coin = this.safeDict(ticker, 'base_coin', {});
345
- let base_symbol = this.safeString(base_coin, 'symbol');
342
+ let base_symbol = this.safeString(ticker, 'base_coin_symbol');
346
343
  base_symbol = base_symbol.toLowerCase();
347
- const quote_coin = this.safeDict(ticker, 'quote_coin', {});
348
- let quote_symbol = this.safeString(quote_coin, 'symbol');
344
+ let quote_symbol = this.safeString(ticker, 'quote_coin_symbol');
349
345
  quote_symbol = quote_symbol.toLowerCase();
350
346
  const marketId = base_symbol + '-' + quote_symbol;
351
347
  const symbol = this.safeSymbol(marketId, market, undefined, marketType);
352
348
  const last = this.safeFloat(ticker, 'each_price', 0);
353
- const markerInfo = this.safeDict(ticker, 'market_24h_information', {});
354
- const change = this.safeFloat(markerInfo, 'change_percent', 0);
355
- const minPrice = this.safeFloat(markerInfo, 'min_price', 0);
356
- const maxPrice = this.safeFloat(markerInfo, 'max_price', 0);
357
- const baseVolume = this.safeFloat(markerInfo, 'base_volume', 0);
358
- const quoteVolume = this.safeFloat(markerInfo, 'quote_volume', 0);
349
+ const change = this.safeFloat(ticker, '24h_change', 0);
350
+ const minPrice = this.safeFloat(ticker, 'min_price', 0);
351
+ const maxPrice = this.safeFloat(ticker, 'max_price', 0);
352
+ const baseVolume = this.safeFloat(ticker, 'base_coin_volume', 0);
353
+ const quoteVolume = this.safeFloat(ticker, 'quote_coin_volume', 0);
359
354
  return this.safeTicker({
360
355
  'symbol': symbol,
361
356
  'timestamp': undefined,
@@ -383,7 +378,7 @@ export default class bit24 extends Exchange {
383
378
  const query = this.omit(params, this.extractParams(path));
384
379
  let url = this.urls['api'][api] + '/' + this.implodeParams(path, params);
385
380
  url = url + '?' + this.urlencode(query);
386
- headers = { 'Content-Type': 'application/json' };
381
+ headers = { 'Content-Type': 'application/json', 'X-BIT24-APIKEY': 'bdfa2c8c971445d5a4a95c95a5a2a4c2' };
387
382
  return { 'url': url, 'method': method, 'body': body, 'headers': headers };
388
383
  }
389
384
  }