ccxt 4.3.23 → 4.3.27

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 (49) hide show
  1. package/README.md +5 -5
  2. package/dist/cjs/ccxt.js +9 -6
  3. package/dist/cjs/src/base/Exchange.js +26 -27
  4. package/dist/cjs/src/base/functions/number.js +10 -5
  5. package/dist/cjs/src/bitrue.js +6 -1
  6. package/dist/cjs/src/coinbaseadvanced.js +17 -0
  7. package/dist/cjs/src/{coinbasepro.js → coinbaseexchange.js} +40 -40
  8. package/dist/cjs/src/coinex.js +81 -147
  9. package/dist/cjs/src/kraken.js +60 -7
  10. package/dist/cjs/src/kucoin.js +1 -0
  11. package/dist/cjs/src/phemex.js +18 -2
  12. package/dist/cjs/src/pro/binance.js +1 -1
  13. package/dist/cjs/src/pro/bitget.js +12 -3
  14. package/dist/cjs/src/pro/{coinbasepro.js → coinbaseexchange.js} +13 -13
  15. package/dist/cjs/src/pro/cryptocom.js +9 -7
  16. package/dist/cjs/src/pro/kraken.js +6 -4
  17. package/dist/cjs/src/pro/okx.js +1 -1
  18. package/js/ccxt.d.ts +11 -8
  19. package/js/ccxt.js +8 -6
  20. package/js/src/abstract/coinbaseadvanced.d.ts +97 -0
  21. package/js/src/abstract/coinbaseadvanced.js +11 -0
  22. package/js/src/base/Exchange.d.ts +4 -2
  23. package/js/src/base/Exchange.js +26 -27
  24. package/js/src/base/functions/number.js +10 -5
  25. package/js/src/bitrue.js +6 -1
  26. package/js/src/coinbaseadvanced.d.ts +4 -0
  27. package/js/src/coinbaseadvanced.js +18 -0
  28. package/js/src/{coinbasepro.d.ts → coinbaseexchange.d.ts} +3 -3
  29. package/js/src/{coinbasepro.js → coinbaseexchange.js} +39 -39
  30. package/js/src/coinex.d.ts +1 -1
  31. package/js/src/coinex.js +81 -147
  32. package/js/src/kraken.d.ts +3 -1
  33. package/js/src/kraken.js +60 -7
  34. package/js/src/kucoin.js +1 -0
  35. package/js/src/phemex.js +18 -2
  36. package/js/src/pro/binance.d.ts +1 -1
  37. package/js/src/pro/binance.js +1 -1
  38. package/js/src/pro/bitget.js +12 -3
  39. package/js/src/pro/{coinbasepro.d.ts → coinbaseexchange.d.ts} +2 -2
  40. package/js/src/pro/{coinbasepro.js → coinbaseexchange.js} +12 -12
  41. package/js/src/pro/cryptocom.js +9 -7
  42. package/js/src/pro/kraken.d.ts +1 -1
  43. package/js/src/pro/kraken.js +6 -4
  44. package/js/src/pro/okx.d.ts +1 -1
  45. package/js/src/pro/okx.js +1 -1
  46. package/package.json +1 -1
  47. /package/dist/cjs/src/abstract/{coinbasepro.js → coinbaseexchange.js} +0 -0
  48. /package/js/src/abstract/{coinbasepro.d.ts → coinbaseexchange.d.ts} +0 -0
  49. /package/js/src/abstract/{coinbasepro.js → coinbaseexchange.js} +0 -0
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var coinbasepro$1 = require('../coinbasepro.js');
3
+ var coinbaseexchange$1 = require('../coinbaseexchange.js');
4
4
  var errors = require('../base/errors.js');
5
5
  var Cache = require('../base/ws/Cache.js');
6
6
  var sha256 = require('../static_dependencies/noble-hashes/sha256.js');
7
7
 
8
8
  // ---------------------------------------------------------------------------
9
9
  // ---------------------------------------------------------------------------
10
- class coinbasepro extends coinbasepro$1 {
10
+ class coinbaseexchange extends coinbaseexchange$1 {
11
11
  describe() {
12
12
  return this.deepExtend(super.describe(), {
13
13
  'has': {
@@ -28,7 +28,7 @@ class coinbasepro extends coinbasepro$1 {
28
28
  },
29
29
  'urls': {
30
30
  'api': {
31
- 'ws': 'wss://ws-feed.pro.coinbase.com',
31
+ 'ws': 'wss://ws-feed.exchange.coinbase.com',
32
32
  },
33
33
  'test': {
34
34
  'ws': 'wss://ws-feed-public.sandbox.exchange.coinbase.com',
@@ -109,7 +109,7 @@ class coinbasepro extends coinbasepro$1 {
109
109
  async watchTicker(symbol, params = {}) {
110
110
  /**
111
111
  * @method
112
- * @name coinbasepro#watchTicker
112
+ * @name coinbaseexchange#watchTicker
113
113
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
114
114
  * @param {string} symbol unified symbol of the market to fetch the ticker for
115
115
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -121,7 +121,7 @@ class coinbasepro extends coinbasepro$1 {
121
121
  async watchTickers(symbols = undefined, params = {}) {
122
122
  /**
123
123
  * @method
124
- * @name coinbasepro#watchTickers
124
+ * @name coinbaseexchange#watchTickers
125
125
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
126
126
  * @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
127
127
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -146,7 +146,7 @@ class coinbasepro extends coinbasepro$1 {
146
146
  async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
147
147
  /**
148
148
  * @method
149
- * @name coinbasepro#watchTrades
149
+ * @name coinbaseexchange#watchTrades
150
150
  * @description get the list of most recent trades for a particular symbol
151
151
  * @param {string} symbol unified symbol of the market to fetch trades for
152
152
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
@@ -192,7 +192,7 @@ class coinbasepro extends coinbasepro$1 {
192
192
  async watchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
193
193
  /**
194
194
  * @method
195
- * @name coinbasepro#watchMyTrades
195
+ * @name coinbaseexchange#watchMyTrades
196
196
  * @description watches information on multiple trades made by the user
197
197
  * @param {string} symbol unified market symbol of the market trades were made in
198
198
  * @param {int} [since] the earliest time in ms to fetch trades for
@@ -217,7 +217,7 @@ class coinbasepro extends coinbasepro$1 {
217
217
  async watchMyTradesForSymbols(symbols = undefined, since = undefined, limit = undefined, params = {}) {
218
218
  /**
219
219
  * @method
220
- * @name coinbasepro#watchMyTradesForSymbols
220
+ * @name coinbaseexchange#watchMyTradesForSymbols
221
221
  * @description watches information on multiple trades made by the user
222
222
  * @param {string[]} symbols unified symbol of the market to fetch trades for
223
223
  * @param {int} [since] the earliest time in ms to fetch trades for
@@ -241,7 +241,7 @@ class coinbasepro extends coinbasepro$1 {
241
241
  async watchOrdersForSymbols(symbols = undefined, since = undefined, limit = undefined, params = {}) {
242
242
  /**
243
243
  * @method
244
- * @name coinbasepro#watchOrdersForSymbols
244
+ * @name coinbaseexchange#watchOrdersForSymbols
245
245
  * @description watches information on multiple orders made by the user
246
246
  * @param {string[]} symbols unified symbol of the market to fetch orders for
247
247
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -265,7 +265,7 @@ class coinbasepro extends coinbasepro$1 {
265
265
  async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
266
266
  /**
267
267
  * @method
268
- * @name coinbasepro#watchOrders
268
+ * @name coinbaseexchange#watchOrders
269
269
  * @description watches information on multiple orders made by the user
270
270
  * @param {string} symbol unified market symbol of the market orders were made in
271
271
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -290,7 +290,7 @@ class coinbasepro extends coinbasepro$1 {
290
290
  async watchOrderBookForSymbols(symbols, limit = undefined, params = {}) {
291
291
  /**
292
292
  * @method
293
- * @name coinbasepro#watchOrderBookForSymbols
293
+ * @name coinbaseexchange#watchOrderBookForSymbols
294
294
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
295
295
  * @param {string[]} symbols unified array of symbols
296
296
  * @param {int} [limit] the maximum amount of order book entries to return
@@ -332,7 +332,7 @@ class coinbasepro extends coinbasepro$1 {
332
332
  async watchOrderBook(symbol, limit = undefined, params = {}) {
333
333
  /**
334
334
  * @method
335
- * @name coinbasepro#watchOrderBook
335
+ * @name coinbaseexchange#watchOrderBook
336
336
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
337
337
  * @param {string} symbol unified symbol of the market to fetch the order book for
338
338
  * @param {int} [limit] the maximum amount of order book entries to return
@@ -965,4 +965,4 @@ class coinbasepro extends coinbasepro$1 {
965
965
  }
966
966
  }
967
967
 
968
- module.exports = coinbasepro;
968
+ module.exports = coinbaseexchange;
@@ -102,14 +102,16 @@ class cryptocom extends cryptocom$1 {
102
102
  params['params'] = {};
103
103
  }
104
104
  let bookSubscriptionType = undefined;
105
- [bookSubscriptionType, params] = this.handleOptionAndParams2(params, 'watchOrderBook', 'watchOrderBookForSymbols', 'bookSubscriptionType', 'SNAPSHOT_AND_UPDATE');
106
- if (bookSubscriptionType !== undefined) {
107
- params['params']['bookSubscriptionType'] = bookSubscriptionType;
108
- }
105
+ let bookSubscriptionType2 = undefined;
106
+ [bookSubscriptionType, params] = this.handleOptionAndParams(params, 'watchOrderBook', 'bookSubscriptionType', 'SNAPSHOT_AND_UPDATE');
107
+ [bookSubscriptionType2, params] = this.handleOptionAndParams(params, 'watchOrderBookForSymbols', 'bookSubscriptionType', bookSubscriptionType);
108
+ params['params']['bookSubscriptionType'] = bookSubscriptionType2;
109
109
  let bookUpdateFrequency = undefined;
110
- [bookUpdateFrequency, params] = this.handleOptionAndParams2(params, 'watchOrderBook', 'watchOrderBookForSymbols', 'bookUpdateFrequency');
111
- if (bookUpdateFrequency !== undefined) {
112
- params['params']['bookSubscriptionType'] = bookSubscriptionType;
110
+ let bookUpdateFrequency2 = undefined;
111
+ [bookUpdateFrequency, params] = this.handleOptionAndParams(params, 'watchOrderBook', 'bookUpdateFrequency');
112
+ [bookUpdateFrequency2, params] = this.handleOptionAndParams(params, 'watchOrderBookForSymbols', 'bookUpdateFrequency', bookUpdateFrequency);
113
+ if (bookUpdateFrequency2 !== undefined) {
114
+ params['params']['bookSubscriptionType'] = bookUpdateFrequency2;
113
115
  }
114
116
  for (let i = 0; i < symbols.length; i++) {
115
117
  const symbol = symbols[i];
@@ -134,7 +134,7 @@ class kraken extends kraken$1 {
134
134
  'pair': market['wsId'],
135
135
  'volume': this.amountToPrecision(symbol, amount),
136
136
  };
137
- [request, params] = this.orderRequest('createOrderWs', symbol, type, request, price, params);
137
+ [request, params] = this.orderRequest('createOrderWs', symbol, type, request, amount, price, params);
138
138
  return await this.watch(url, messageHash, this.extend(request, params), messageHash);
139
139
  }
140
140
  handleCreateEditOrder(client, message) {
@@ -161,7 +161,7 @@ class kraken extends kraken$1 {
161
161
  const messageHash = this.safeValue(message, 'reqid');
162
162
  client.resolve(order, messageHash);
163
163
  }
164
- async editOrderWs(id, symbol, type, side, amount, price = undefined, params = {}) {
164
+ async editOrderWs(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
165
165
  /**
166
166
  * @method
167
167
  * @name kraken#editOrderWs
@@ -188,9 +188,11 @@ class kraken extends kraken$1 {
188
188
  'reqid': requestId,
189
189
  'orderid': id,
190
190
  'pair': market['wsId'],
191
- 'volume': this.amountToPrecision(symbol, amount),
192
191
  };
193
- [request, params] = this.orderRequest('editOrderWs', symbol, type, request, price, params);
192
+ if (amount !== undefined) {
193
+ request['volume'] = this.amountToPrecision(symbol, amount);
194
+ }
195
+ [request, params] = this.orderRequest('editOrderWs', symbol, type, request, amount, price, params);
194
196
  return await this.watch(url, messageHash, this.extend(request, params), messageHash);
195
197
  }
196
198
  async cancelOrdersWs(ids, symbol = undefined, params = {}) {
@@ -1433,7 +1433,7 @@ class okx extends okx$1 {
1433
1433
  const first = this.safeDict(orders, 0, {});
1434
1434
  client.resolve(first, messageHash);
1435
1435
  }
1436
- async editOrderWs(id, symbol, type, side, amount, price = undefined, params = {}) {
1436
+ async editOrderWs(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
1437
1437
  /**
1438
1438
  * @method
1439
1439
  * @name okx#editOrderWs
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, Conversion } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
7
- declare const version = "4.3.22";
7
+ declare const version = "4.3.26";
8
8
  import ace from './src/ace.js';
9
9
  import alpaca from './src/alpaca.js';
10
10
  import ascendex from './src/ascendex.js';
@@ -44,8 +44,9 @@ import btcturk from './src/btcturk.js';
44
44
  import bybit from './src/bybit.js';
45
45
  import cex from './src/cex.js';
46
46
  import coinbase from './src/coinbase.js';
47
+ import coinbaseadvanced from './src/coinbaseadvanced.js';
48
+ import coinbaseexchange from './src/coinbaseexchange.js';
47
49
  import coinbaseinternational from './src/coinbaseinternational.js';
48
- import coinbasepro from './src/coinbasepro.js';
49
50
  import coincheck from './src/coincheck.js';
50
51
  import coinex from './src/coinex.js';
51
52
  import coinlist from './src/coinlist.js';
@@ -133,8 +134,8 @@ import blockchaincomPro from './src/pro/blockchaincom.js';
133
134
  import bybitPro from './src/pro/bybit.js';
134
135
  import cexPro from './src/pro/cex.js';
135
136
  import coinbasePro from './src/pro/coinbase.js';
137
+ import coinbaseexchangePro from './src/pro/coinbaseexchange.js';
136
138
  import coinbaseinternationalPro from './src/pro/coinbaseinternational.js';
137
- import coinbaseproPro from './src/pro/coinbasepro.js';
138
139
  import coincheckPro from './src/pro/coincheck.js';
139
140
  import coinexPro from './src/pro/coinex.js';
140
141
  import coinonePro from './src/pro/coinone.js';
@@ -214,8 +215,9 @@ declare const exchanges: {
214
215
  bybit: typeof bybit;
215
216
  cex: typeof cex;
216
217
  coinbase: typeof coinbase;
218
+ coinbaseadvanced: typeof coinbaseadvanced;
219
+ coinbaseexchange: typeof coinbaseexchange;
217
220
  coinbaseinternational: typeof coinbaseinternational;
218
- coinbasepro: typeof coinbasepro;
219
221
  coincheck: typeof coincheck;
220
222
  coinex: typeof coinex;
221
223
  coinlist: typeof coinlist;
@@ -305,8 +307,8 @@ declare const pro: {
305
307
  bybit: typeof bybitPro;
306
308
  cex: typeof cexPro;
307
309
  coinbase: typeof coinbasePro;
310
+ coinbaseexchange: typeof coinbaseexchangePro;
308
311
  coinbaseinternational: typeof coinbaseinternationalPro;
309
- coinbasepro: typeof coinbaseproPro;
310
312
  coincheck: typeof coincheckPro;
311
313
  coinex: typeof coinexPro;
312
314
  coinone: typeof coinonePro;
@@ -377,8 +379,8 @@ declare const ccxt: {
377
379
  bybit: typeof bybitPro;
378
380
  cex: typeof cexPro;
379
381
  coinbase: typeof coinbasePro;
382
+ coinbaseexchange: typeof coinbaseexchangePro;
380
383
  coinbaseinternational: typeof coinbaseinternationalPro;
381
- coinbasepro: typeof coinbaseproPro;
382
384
  coincheck: typeof coincheckPro;
383
385
  coinex: typeof coinexPro;
384
386
  coinone: typeof coinonePro;
@@ -459,8 +461,9 @@ declare const ccxt: {
459
461
  bybit: typeof bybit;
460
462
  cex: typeof cex;
461
463
  coinbase: typeof coinbase;
464
+ coinbaseadvanced: typeof coinbaseadvanced;
465
+ coinbaseexchange: typeof coinbaseexchange;
462
466
  coinbaseinternational: typeof coinbaseinternational;
463
- coinbasepro: typeof coinbasepro;
464
467
  coincheck: typeof coincheck;
465
468
  coinex: typeof coinex;
466
469
  coinlist: typeof coinlist;
@@ -525,5 +528,5 @@ declare const ccxt: {
525
528
  zaif: typeof zaif;
526
529
  zonda: typeof zonda;
527
530
  } & typeof functions & typeof errors;
528
- export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, 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, Conversion, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseinternational, coinbasepro, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, wavesexchange, wazirx, whitebit, woo, woofipro, yobit, zaif, zonda, };
531
+ export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, 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, Conversion, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, wavesexchange, wazirx, whitebit, woo, woofipro, yobit, zaif, zonda, };
529
532
  export default ccxt;
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, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.3.23';
41
+ const version = '4.3.27';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -80,8 +80,9 @@ import btcturk from './src/btcturk.js';
80
80
  import bybit from './src/bybit.js';
81
81
  import cex from './src/cex.js';
82
82
  import coinbase from './src/coinbase.js';
83
+ import coinbaseadvanced from './src/coinbaseadvanced.js';
84
+ import coinbaseexchange from './src/coinbaseexchange.js';
83
85
  import coinbaseinternational from './src/coinbaseinternational.js';
84
- import coinbasepro from './src/coinbasepro.js';
85
86
  import coincheck from './src/coincheck.js';
86
87
  import coinex from './src/coinex.js';
87
88
  import coinlist from './src/coinlist.js';
@@ -170,8 +171,8 @@ import blockchaincomPro from './src/pro/blockchaincom.js';
170
171
  import bybitPro from './src/pro/bybit.js';
171
172
  import cexPro from './src/pro/cex.js';
172
173
  import coinbasePro from './src/pro/coinbase.js';
174
+ import coinbaseexchangePro from './src/pro/coinbaseexchange.js';
173
175
  import coinbaseinternationalPro from './src/pro/coinbaseinternational.js';
174
- import coinbaseproPro from './src/pro/coinbasepro.js';
175
176
  import coincheckPro from './src/pro/coincheck.js';
176
177
  import coinexPro from './src/pro/coinex.js';
177
178
  import coinonePro from './src/pro/coinone.js';
@@ -251,8 +252,9 @@ const exchanges = {
251
252
  'bybit': bybit,
252
253
  'cex': cex,
253
254
  'coinbase': coinbase,
255
+ 'coinbaseadvanced': coinbaseadvanced,
256
+ 'coinbaseexchange': coinbaseexchange,
254
257
  'coinbaseinternational': coinbaseinternational,
255
- 'coinbasepro': coinbasepro,
256
258
  'coincheck': coincheck,
257
259
  'coinex': coinex,
258
260
  'coinlist': coinlist,
@@ -342,8 +344,8 @@ const pro = {
342
344
  'bybit': bybitPro,
343
345
  'cex': cexPro,
344
346
  'coinbase': coinbasePro,
347
+ 'coinbaseexchange': coinbaseexchangePro,
345
348
  'coinbaseinternational': coinbaseinternationalPro,
346
- 'coinbasepro': coinbaseproPro,
347
349
  'coincheck': coincheckPro,
348
350
  'coinex': coinexPro,
349
351
  'coinone': coinonePro,
@@ -396,6 +398,6 @@ pro.exchanges = Object.keys(pro);
396
398
  pro['Exchange'] = Exchange; // now the same for rest and ts
397
399
  //-----------------------------------------------------------------------------
398
400
  const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
399
- export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseinternational, coinbasepro, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, wavesexchange, wazirx, whitebit, woo, woofipro, yobit, zaif, zonda, };
401
+ export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, wavesexchange, wazirx, whitebit, woo, woofipro, yobit, zaif, zonda, };
400
402
  export default ccxt;
401
403
  //-----------------------------------------------------------------------------
@@ -0,0 +1,97 @@
1
+ import { implicitReturnType } from '../base/types.js';
2
+ import _coinbase from '../coinbase.js';
3
+ interface coinbase {
4
+ v2PublicGetCurrencies(params?: {}): Promise<implicitReturnType>;
5
+ v2PublicGetCurrenciesCrypto(params?: {}): Promise<implicitReturnType>;
6
+ v2PublicGetTime(params?: {}): Promise<implicitReturnType>;
7
+ v2PublicGetExchangeRates(params?: {}): Promise<implicitReturnType>;
8
+ v2PublicGetUsersUserId(params?: {}): Promise<implicitReturnType>;
9
+ v2PublicGetPricesSymbolBuy(params?: {}): Promise<implicitReturnType>;
10
+ v2PublicGetPricesSymbolSell(params?: {}): Promise<implicitReturnType>;
11
+ v2PublicGetPricesSymbolSpot(params?: {}): Promise<implicitReturnType>;
12
+ v2PrivateGetAccounts(params?: {}): Promise<implicitReturnType>;
13
+ v2PrivateGetAccountsAccountId(params?: {}): Promise<implicitReturnType>;
14
+ v2PrivateGetAccountsAccountIdAddresses(params?: {}): Promise<implicitReturnType>;
15
+ v2PrivateGetAccountsAccountIdAddressesAddressId(params?: {}): Promise<implicitReturnType>;
16
+ v2PrivateGetAccountsAccountIdAddressesAddressIdTransactions(params?: {}): Promise<implicitReturnType>;
17
+ v2PrivateGetAccountsAccountIdTransactions(params?: {}): Promise<implicitReturnType>;
18
+ v2PrivateGetAccountsAccountIdTransactionsTransactionId(params?: {}): Promise<implicitReturnType>;
19
+ v2PrivateGetAccountsAccountIdBuys(params?: {}): Promise<implicitReturnType>;
20
+ v2PrivateGetAccountsAccountIdBuysBuyId(params?: {}): Promise<implicitReturnType>;
21
+ v2PrivateGetAccountsAccountIdSells(params?: {}): Promise<implicitReturnType>;
22
+ v2PrivateGetAccountsAccountIdSellsSellId(params?: {}): Promise<implicitReturnType>;
23
+ v2PrivateGetAccountsAccountIdDeposits(params?: {}): Promise<implicitReturnType>;
24
+ v2PrivateGetAccountsAccountIdDepositsDepositId(params?: {}): Promise<implicitReturnType>;
25
+ v2PrivateGetAccountsAccountIdWithdrawals(params?: {}): Promise<implicitReturnType>;
26
+ v2PrivateGetAccountsAccountIdWithdrawalsWithdrawalId(params?: {}): Promise<implicitReturnType>;
27
+ v2PrivateGetPaymentMethods(params?: {}): Promise<implicitReturnType>;
28
+ v2PrivateGetPaymentMethodsPaymentMethodId(params?: {}): Promise<implicitReturnType>;
29
+ v2PrivateGetUser(params?: {}): Promise<implicitReturnType>;
30
+ v2PrivateGetUserAuth(params?: {}): Promise<implicitReturnType>;
31
+ v2PrivatePostAccounts(params?: {}): Promise<implicitReturnType>;
32
+ v2PrivatePostAccountsAccountIdPrimary(params?: {}): Promise<implicitReturnType>;
33
+ v2PrivatePostAccountsAccountIdAddresses(params?: {}): Promise<implicitReturnType>;
34
+ v2PrivatePostAccountsAccountIdTransactions(params?: {}): Promise<implicitReturnType>;
35
+ v2PrivatePostAccountsAccountIdTransactionsTransactionIdComplete(params?: {}): Promise<implicitReturnType>;
36
+ v2PrivatePostAccountsAccountIdTransactionsTransactionIdResend(params?: {}): Promise<implicitReturnType>;
37
+ v2PrivatePostAccountsAccountIdBuys(params?: {}): Promise<implicitReturnType>;
38
+ v2PrivatePostAccountsAccountIdBuysBuyIdCommit(params?: {}): Promise<implicitReturnType>;
39
+ v2PrivatePostAccountsAccountIdSells(params?: {}): Promise<implicitReturnType>;
40
+ v2PrivatePostAccountsAccountIdSellsSellIdCommit(params?: {}): Promise<implicitReturnType>;
41
+ v2PrivatePostAccountsAccountIdDeposits(params?: {}): Promise<implicitReturnType>;
42
+ v2PrivatePostAccountsAccountIdDepositsDepositIdCommit(params?: {}): Promise<implicitReturnType>;
43
+ v2PrivatePostAccountsAccountIdWithdrawals(params?: {}): Promise<implicitReturnType>;
44
+ v2PrivatePostAccountsAccountIdWithdrawalsWithdrawalIdCommit(params?: {}): Promise<implicitReturnType>;
45
+ v2PrivatePutAccountsAccountId(params?: {}): Promise<implicitReturnType>;
46
+ v2PrivatePutUser(params?: {}): Promise<implicitReturnType>;
47
+ v2PrivateDeleteAccountsId(params?: {}): Promise<implicitReturnType>;
48
+ v2PrivateDeleteAccountsAccountIdTransactionsTransactionId(params?: {}): Promise<implicitReturnType>;
49
+ v3PublicGetBrokerageTime(params?: {}): Promise<implicitReturnType>;
50
+ v3PublicGetBrokerageMarketProductBook(params?: {}): Promise<implicitReturnType>;
51
+ v3PublicGetBrokerageMarketProducts(params?: {}): Promise<implicitReturnType>;
52
+ v3PublicGetBrokerageMarketProductsProductId(params?: {}): Promise<implicitReturnType>;
53
+ v3PublicGetBrokerageMarketProductsProductIdCandles(params?: {}): Promise<implicitReturnType>;
54
+ v3PublicGetBrokerageMarketProductsProductIdTicker(params?: {}): Promise<implicitReturnType>;
55
+ v3PrivateGetBrokerageAccounts(params?: {}): Promise<implicitReturnType>;
56
+ v3PrivateGetBrokerageAccountsAccountUuid(params?: {}): Promise<implicitReturnType>;
57
+ v3PrivateGetBrokerageOrdersHistoricalBatch(params?: {}): Promise<implicitReturnType>;
58
+ v3PrivateGetBrokerageOrdersHistoricalFills(params?: {}): Promise<implicitReturnType>;
59
+ v3PrivateGetBrokerageOrdersHistoricalOrderId(params?: {}): Promise<implicitReturnType>;
60
+ v3PrivateGetBrokerageProducts(params?: {}): Promise<implicitReturnType>;
61
+ v3PrivateGetBrokerageProductsProductId(params?: {}): Promise<implicitReturnType>;
62
+ v3PrivateGetBrokerageProductsProductIdCandles(params?: {}): Promise<implicitReturnType>;
63
+ v3PrivateGetBrokerageProductsProductIdTicker(params?: {}): Promise<implicitReturnType>;
64
+ v3PrivateGetBrokerageBestBidAsk(params?: {}): Promise<implicitReturnType>;
65
+ v3PrivateGetBrokerageProductBook(params?: {}): Promise<implicitReturnType>;
66
+ v3PrivateGetBrokerageTransactionSummary(params?: {}): Promise<implicitReturnType>;
67
+ v3PrivateGetBrokeragePortfolios(params?: {}): Promise<implicitReturnType>;
68
+ v3PrivateGetBrokeragePortfoliosPortfolioUuid(params?: {}): Promise<implicitReturnType>;
69
+ v3PrivateGetBrokerageConvertTradeTradeId(params?: {}): Promise<implicitReturnType>;
70
+ v3PrivateGetBrokerageCfmBalanceSummary(params?: {}): Promise<implicitReturnType>;
71
+ v3PrivateGetBrokerageCfmPositions(params?: {}): Promise<implicitReturnType>;
72
+ v3PrivateGetBrokerageCfmPositionsProductId(params?: {}): Promise<implicitReturnType>;
73
+ v3PrivateGetBrokerageCfmSweeps(params?: {}): Promise<implicitReturnType>;
74
+ v3PrivateGetBrokerageIntxPortfolioPortfolioUuid(params?: {}): Promise<implicitReturnType>;
75
+ v3PrivateGetBrokerageIntxPositionsPortfolioUuid(params?: {}): Promise<implicitReturnType>;
76
+ v3PrivateGetBrokerageIntxPositionsPortfolioUuidSymbol(params?: {}): Promise<implicitReturnType>;
77
+ v3PrivateGetBrokeragePaymentMethods(params?: {}): Promise<implicitReturnType>;
78
+ v3PrivateGetBrokeragePaymentMethodsPaymentMethodId(params?: {}): Promise<implicitReturnType>;
79
+ v3PrivatePostBrokerageOrders(params?: {}): Promise<implicitReturnType>;
80
+ v3PrivatePostBrokerageOrdersBatchCancel(params?: {}): Promise<implicitReturnType>;
81
+ v3PrivatePostBrokerageOrdersEdit(params?: {}): Promise<implicitReturnType>;
82
+ v3PrivatePostBrokerageOrdersEditPreview(params?: {}): Promise<implicitReturnType>;
83
+ v3PrivatePostBrokerageOrdersPreview(params?: {}): Promise<implicitReturnType>;
84
+ v3PrivatePostBrokeragePortfolios(params?: {}): Promise<implicitReturnType>;
85
+ v3PrivatePostBrokeragePortfoliosMoveFunds(params?: {}): Promise<implicitReturnType>;
86
+ v3PrivatePostBrokerageConvertQuote(params?: {}): Promise<implicitReturnType>;
87
+ v3PrivatePostBrokerageConvertTradeTradeId(params?: {}): Promise<implicitReturnType>;
88
+ v3PrivatePostBrokerageCfmSweepsSchedule(params?: {}): Promise<implicitReturnType>;
89
+ v3PrivatePostBrokerageIntxAllocate(params?: {}): Promise<implicitReturnType>;
90
+ v3PrivatePostBrokerageOrdersClosePosition(params?: {}): Promise<implicitReturnType>;
91
+ v3PrivatePutBrokeragePortfoliosPortfolioUuid(params?: {}): Promise<implicitReturnType>;
92
+ v3PrivateDeleteBrokeragePortfoliosPortfolioUuid(params?: {}): Promise<implicitReturnType>;
93
+ v3PrivateDeleteBrokerageCfmSweeps(params?: {}): Promise<implicitReturnType>;
94
+ }
95
+ declare abstract class coinbase extends _coinbase {
96
+ }
97
+ export default coinbase;
@@ -0,0 +1,11 @@
1
+ // ----------------------------------------------------------------------------
2
+
3
+ // PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
+ // https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
+ // EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
+
7
+ // -------------------------------------------------------------------------------
8
+ import _coinbase from '../coinbase.js';
9
+ class coinbase extends _coinbase {
10
+ }
11
+ export default coinbase;
@@ -845,7 +845,9 @@ export default class Exchange {
845
845
  marketId(symbol: string): string;
846
846
  symbol(symbol: string): string;
847
847
  handleParamString(params: object, paramName: string, defaultValue?: Str): [string, object];
848
+ handleParamString2(params: object, paramName1: string, paramName2: string, defaultValue?: Str): [string, object];
848
849
  handleParamInteger(params: object, paramName: string, defaultValue?: Int): [Int, object];
850
+ handleParamInteger2(params: object, paramName1: string, paramName2: string, defaultValue?: Int): [Int, object];
849
851
  resolvePath(path: any, params: any): any[];
850
852
  getListFromObjectValues(objects: any, key: IndexType): any[];
851
853
  getSymbolsForMarketType(marketType?: Str, subType?: Str, symbolWithActiveStatus?: boolean, symbolWithUnknownStatus?: boolean): any[];
@@ -859,7 +861,7 @@ export default class Exchange {
859
861
  editLimitSellOrder(id: string, symbol: string, amount: number, price?: Num, params?: {}): Promise<Order>;
860
862
  editLimitOrder(id: string, symbol: string, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
861
863
  editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
862
- editOrderWs(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
864
+ editOrderWs(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
863
865
  fetchPermissions(params?: {}): Promise<{}>;
864
866
  fetchPosition(symbol: string, params?: {}): Promise<Position>;
865
867
  fetchPositionWs(symbol: string, params?: {}): Promise<Position[]>;
@@ -897,7 +899,7 @@ export default class Exchange {
897
899
  fetchCrossBorrowRate(code: string, params?: {}): Promise<CrossBorrowRate>;
898
900
  fetchIsolatedBorrowRate(symbol: string, params?: {}): Promise<IsolatedBorrowRate>;
899
901
  handleOptionAndParams(params: object, methodName: string, optionName: string, defaultValue?: any): any[];
900
- handleOptionAndParams2(params: object, methodName: string, methodName2: string, optionName: string, defaultValue?: any): any[];
902
+ handleOptionAndParams2(params: object, methodName1: string, optionName1: string, optionName2: string, defaultValue?: any): any[];
901
903
  handleOption(methodName: string, optionName: string, defaultValue?: any): any;
902
904
  handleMarketTypeAndParams(methodName: string, market?: Market, params?: {}, defaultValue?: any): any;
903
905
  handleSubTypeAndParams(methodName: string, market?: any, params?: {}, defaultValue?: any): any[];
@@ -230,7 +230,7 @@ export default class Exchange {
230
230
  // }
231
231
  // }
232
232
  //
233
- this.options = this.getDefaultOptions(); // exchange-specific options, if any
233
+ this.options = this.getDefaultOptions(); // exchange-specific options if any
234
234
  // fetch implementation options (JS only)
235
235
  // http properties
236
236
  this.headers = {};
@@ -3661,6 +3661,13 @@ export default class Exchange {
3661
3661
  }
3662
3662
  return [value, params];
3663
3663
  }
3664
+ handleParamString2(params, paramName1, paramName2, defaultValue = undefined) {
3665
+ const value = this.safeString2(params, paramName1, paramName2, defaultValue);
3666
+ if (value !== undefined) {
3667
+ params = this.omit(params, [paramName1, paramName2]);
3668
+ }
3669
+ return [value, params];
3670
+ }
3664
3671
  handleParamInteger(params, paramName, defaultValue = undefined) {
3665
3672
  const value = this.safeInteger(params, paramName, defaultValue);
3666
3673
  if (value !== undefined) {
@@ -3668,6 +3675,13 @@ export default class Exchange {
3668
3675
  }
3669
3676
  return [value, params];
3670
3677
  }
3678
+ handleParamInteger2(params, paramName1, paramName2, defaultValue = undefined) {
3679
+ const value = this.safeInteger2(params, paramName1, paramName2, defaultValue);
3680
+ if (value !== undefined) {
3681
+ params = this.omit(params, [paramName1, paramName2]);
3682
+ }
3683
+ return [value, params];
3684
+ }
3671
3685
  resolvePath(path, params) {
3672
3686
  return [
3673
3687
  this.implodeParams(path, params),
@@ -3811,7 +3825,7 @@ export default class Exchange {
3811
3825
  await this.cancelOrder(id, symbol);
3812
3826
  return await this.createOrder(symbol, type, side, amount, price, params);
3813
3827
  }
3814
- async editOrderWs(id, symbol, type, side, amount, price = undefined, params = {}) {
3828
+ async editOrderWs(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
3815
3829
  await this.cancelOrderWs(id, symbol);
3816
3830
  return await this.createOrderWs(symbol, type, side, amount, price, params);
3817
3831
  }
@@ -4087,29 +4101,13 @@ export default class Exchange {
4087
4101
  }
4088
4102
  return [value, params];
4089
4103
  }
4090
- handleOptionAndParams2(params, methodName, methodName2, optionName, defaultValue = undefined) {
4091
- // This method can be used to obtain method specific properties, i.e: this.handleOptionAndParams (params, 'fetchPosition', 'marginMode', 'isolated')
4092
- const defaultOptionName = 'default' + this.capitalize(optionName); // we also need to check the 'defaultXyzWhatever'
4093
- // check if params contain the key
4094
- let value = this.safeValue2(params, optionName, defaultOptionName);
4095
- if (value !== undefined) {
4096
- params = this.omit(params, [optionName, defaultOptionName]);
4097
- }
4098
- else {
4099
- // check if exchange has properties for this method
4100
- const exchangeWideMethodOptions = this.safeValue2(this.options, methodName, methodName2);
4101
- if (exchangeWideMethodOptions !== undefined) {
4102
- // check if the option is defined inside this method's props
4103
- value = this.safeValue2(exchangeWideMethodOptions, optionName, defaultOptionName);
4104
- }
4105
- if (value === undefined) {
4106
- // if it's still undefined, check if global exchange-wide option exists
4107
- value = this.safeValue2(this.options, optionName, defaultOptionName);
4108
- }
4109
- // if it's still undefined, use the default value
4110
- value = (value !== undefined) ? value : defaultValue;
4111
- }
4112
- return [value, params];
4104
+ handleOptionAndParams2(params, methodName1, optionName1, optionName2, defaultValue = undefined) {
4105
+ let value = undefined;
4106
+ [value, params] = this.handleOptionAndParams(params, methodName1, optionName1, defaultValue);
4107
+ // if still undefined, try optionName2
4108
+ let value2 = undefined;
4109
+ [value2, params] = this.handleOptionAndParams(params, methodName1, optionName2, value);
4110
+ return [value2, params];
4113
4111
  }
4114
4112
  handleOption(methodName, optionName, defaultValue = undefined) {
4115
4113
  // eslint-disable-next-line no-unused-vars
@@ -5944,8 +5942,9 @@ export default class Exchange {
5944
5942
  errors = 0;
5945
5943
  const responseLength = response.length;
5946
5944
  if (this.verbose) {
5947
- const iteration = (i + 1).toString();
5948
- const cursorMessage = 'Cursor pagination call ' + iteration + ' method ' + method + ' response length ' + responseLength.toString() + ' cursor ' + cursorValue;
5945
+ const cursorString = (cursorValue === undefined) ? '' : cursorValue;
5946
+ const iteration = (i + 1);
5947
+ const cursorMessage = 'Cursor pagination call ' + iteration.toString() + ' method ' + method + ' response length ' + responseLength.toString() + ' cursor ' + cursorString;
5949
5948
  this.log(cursorMessage);
5950
5949
  }
5951
5950
  if (responseLength === 0) {
@@ -274,13 +274,18 @@ const _decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode =
274
274
  return String.fromCharCode(...out);
275
275
  };
276
276
  function omitZero(stringNumber) {
277
- if (stringNumber === undefined || stringNumber === '') {
278
- return undefined;
277
+ try {
278
+ if (stringNumber === undefined || stringNumber === '') {
279
+ return undefined;
280
+ }
281
+ if (parseFloat(stringNumber) === 0) {
282
+ return undefined;
283
+ }
284
+ return stringNumber;
279
285
  }
280
- if (parseFloat(stringNumber) === 0) {
281
- return undefined;
286
+ catch (e) {
287
+ return stringNumber;
282
288
  }
283
- return stringNumber;
284
289
  }
285
290
  /* ------------------------------------------------------------------------ */
286
291
  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, };
package/js/src/bitrue.js CHANGED
@@ -3145,6 +3145,11 @@ export default class bitrue extends Exchange {
3145
3145
  signPath = signPath + '/' + version + '/' + path;
3146
3146
  let signMessage = timestamp + method + signPath;
3147
3147
  if (method === 'GET') {
3148
+ const keys = Object.keys(params);
3149
+ const keysLength = keys.length;
3150
+ if (keysLength > 0) {
3151
+ signMessage += '?' + this.urlencode(params);
3152
+ }
3148
3153
  const signature = this.hmac(this.encode(signMessage), this.encode(this.secret), sha256);
3149
3154
  headers = {
3150
3155
  'X-CH-APIKEY': this.apiKey,
@@ -3158,7 +3163,7 @@ export default class bitrue extends Exchange {
3158
3163
  'recvWindow': recvWindow,
3159
3164
  }, params);
3160
3165
  body = this.json(query);
3161
- signMessage = signMessage + JSON.stringify(body);
3166
+ signMessage += body;
3162
3167
  const signature = this.hmac(this.encode(signMessage), this.encode(this.secret), sha256);
3163
3168
  headers = {
3164
3169
  'Content-Type': 'application/json',
@@ -0,0 +1,4 @@
1
+ import coinbase from './coinbase.js';
2
+ export default class coinbaseadvanced extends coinbase {
3
+ describe(): any;
4
+ }
@@ -0,0 +1,18 @@
1
+ // ----------------------------------------------------------------------------
2
+
3
+ // PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
+ // https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
+ // EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
+
7
+ // ---------------------------------------------------------------------------
8
+ import coinbase from './coinbase.js';
9
+ // ---------------------------------------------------------------------------
10
+ export default class coinbaseadvanced extends coinbase {
11
+ describe() {
12
+ return this.deepExtend(super.describe(), {
13
+ 'id': 'coinbaseadvanced',
14
+ 'name': 'Coinbase Advanced',
15
+ 'alias': true,
16
+ });
17
+ }
18
+ }