ccxt 4.2.95 → 4.2.96

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/gemini.js CHANGED
@@ -288,7 +288,13 @@ export default class gemini extends Exchange {
288
288
  'ATOM': 'cosmos',
289
289
  'DOT': 'polkadot',
290
290
  },
291
- 'nonce': 'milliseconds', // if getting a Network 400 error change to seconds
291
+ 'nonce': 'milliseconds',
292
+ 'conflictingMarkets': {
293
+ 'paxgusd': {
294
+ 'base': 'PAXG',
295
+ 'quote': 'USD',
296
+ },
297
+ },
292
298
  },
293
299
  });
294
300
  }
@@ -682,17 +688,29 @@ export default class gemini extends Exchange {
682
688
  const marketIdUpper = marketId.toUpperCase();
683
689
  const isPerp = (marketIdUpper.indexOf('PERP') >= 0);
684
690
  const marketIdWithoutPerp = marketIdUpper.replace('PERP', '');
685
- const quoteQurrencies = this.handleOption('fetchMarketsFromAPI', 'quoteCurrencies', []);
686
- for (let i = 0; i < quoteQurrencies.length; i++) {
687
- const quoteCurrency = quoteQurrencies[i];
688
- if (marketIdWithoutPerp.endsWith(quoteCurrency)) {
689
- const quoteLength = this.parseToInt(-1 * quoteCurrency.length);
690
- baseId = marketIdWithoutPerp.slice(0, quoteLength);
691
- quoteId = quoteCurrency;
692
- if (isPerp) {
693
- settleId = quoteCurrency; // always same
691
+ const conflictingMarkets = this.safeDict(this.options, 'conflictingMarkets', {});
692
+ const lowerCaseId = marketIdWithoutPerp.toLowerCase();
693
+ if (lowerCaseId in conflictingMarkets) {
694
+ const conflictingMarket = conflictingMarkets[lowerCaseId];
695
+ baseId = conflictingMarket['base'];
696
+ quoteId = conflictingMarket['quote'];
697
+ if (isPerp) {
698
+ settleId = conflictingMarket['quote'];
699
+ }
700
+ }
701
+ else {
702
+ const quoteCurrencies = this.handleOption('fetchMarketsFromAPI', 'quoteCurrencies', []);
703
+ for (let i = 0; i < quoteCurrencies.length; i++) {
704
+ const quoteCurrency = quoteCurrencies[i];
705
+ if (marketIdWithoutPerp.endsWith(quoteCurrency)) {
706
+ const quoteLength = this.parseToInt(-1 * quoteCurrency.length);
707
+ baseId = marketIdWithoutPerp.slice(0, quoteLength);
708
+ quoteId = quoteCurrency;
709
+ if (isPerp) {
710
+ settleId = quoteCurrency; // always same
711
+ }
712
+ break;
694
713
  }
695
- break;
696
714
  }
697
715
  }
698
716
  }
@@ -143,6 +143,11 @@ export default class coinbase extends coinbaseRest {
143
143
  // "low_52_w": "15460",
144
144
  // "high_52_w": "48240",
145
145
  // "price_percent_chg_24_h": "-4.15775596190603"
146
+ // new as of 2024-04-12
147
+ // "best_bid":"21835.29",
148
+ // "best_bid_quantity": "0.02000000",
149
+ // "best_ask":"23011.18",
150
+ // "best_ask_quantity": "0.01500000"
146
151
  // }
147
152
  // ]
148
153
  // }
@@ -168,6 +173,11 @@ export default class coinbase extends coinbaseRest {
168
173
  // "low_52_w": "0.04908",
169
174
  // "high_52_w": "0.1801",
170
175
  // "price_percent_chg_24_h": "0.50177456859626"
176
+ // new as of 2024-04-12
177
+ // "best_bid":"0.07989",
178
+ // "best_bid_quantity": "500.0",
179
+ // "best_ask":"0.08308",
180
+ // "best_ask_quantity": "300.0"
171
181
  // }
172
182
  // ]
173
183
  // }
@@ -222,6 +232,11 @@ export default class coinbase extends coinbaseRest {
222
232
  // "low_52_w": "0.04908",
223
233
  // "high_52_w": "0.1801",
224
234
  // "price_percent_chg_24_h": "0.50177456859626"
235
+ // new as of 2024-04-12
236
+ // "best_bid":"0.07989",
237
+ // "best_bid_quantity": "500.0",
238
+ // "best_ask":"0.08308",
239
+ // "best_ask_quantity": "300.0"
225
240
  // }
226
241
  //
227
242
  const marketId = this.safeString(ticker, 'product_id');
@@ -234,10 +249,10 @@ export default class coinbase extends coinbaseRest {
234
249
  'datetime': this.iso8601(timestamp),
235
250
  'high': this.safeString(ticker, 'high_24_h'),
236
251
  'low': this.safeString(ticker, 'low_24_h'),
237
- 'bid': undefined,
238
- 'bidVolume': undefined,
239
- 'ask': undefined,
240
- 'askVolume': undefined,
252
+ 'bid': this.safeString(ticker, 'best_bid'),
253
+ 'bidVolume': this.safeString(ticker, 'best_bid_quantity'),
254
+ 'ask': this.safeString(ticker, 'best_ask'),
255
+ 'askVolume': this.safeString(ticker, 'best_ask_quantity'),
241
256
  'vwap': undefined,
242
257
  'open': undefined,
243
258
  'close': last,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.2.95",
3
+ "version": "4.2.96",
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",
package/skip-tests.json CHANGED
@@ -1248,6 +1248,7 @@
1248
1248
  "currencyIdAndCode": "some currencies does not exist in currencies"
1249
1249
  },
1250
1250
  "fetchCurrencies": {
1251
+ "currencyIdAndCode": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269956260#L4357",
1251
1252
  "withdraw": "undefined",
1252
1253
  "deposit": "undefined",
1253
1254
  "networks": "networks key is missing",