ccxt 4.2.50 → 4.2.52

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 (44) hide show
  1. package/CHANGELOG.md +76 -16
  2. package/README.md +5 -6
  3. package/dist/ccxt.browser.js +703 -1367
  4. package/dist/ccxt.browser.min.js +3 -3
  5. package/dist/cjs/ccxt.js +1 -4
  6. package/dist/cjs/src/base/Exchange.js +65 -26
  7. package/dist/cjs/src/binance.js +52 -2
  8. package/dist/cjs/src/mexc.js +2 -1
  9. package/dist/cjs/src/okx.js +1 -1
  10. package/dist/cjs/src/pro/binance.js +156 -1
  11. package/dist/cjs/src/pro/bitcoincom.js +4 -5
  12. package/dist/cjs/src/pro/bitfinex2.js +3 -1
  13. package/dist/cjs/src/pro/gate.js +2 -1
  14. package/dist/cjs/src/woo.js +3 -1
  15. package/js/ccxt.d.ts +2 -5
  16. package/js/ccxt.js +2 -4
  17. package/js/src/abstract/binance.d.ts +5 -0
  18. package/js/src/abstract/binancecoinm.d.ts +5 -0
  19. package/js/src/abstract/binanceus.d.ts +5 -0
  20. package/js/src/abstract/binanceusdm.d.ts +5 -0
  21. package/js/src/base/Exchange.d.ts +65 -26
  22. package/js/src/base/Exchange.js +65 -26
  23. package/js/src/binance.d.ts +4 -0
  24. package/js/src/binance.js +52 -2
  25. package/js/src/deribit.js +1 -1
  26. package/js/src/mexc.js +2 -1
  27. package/js/src/ndax.js +1 -1
  28. package/js/src/okx.js +1 -1
  29. package/js/src/pro/binance.d.ts +3 -0
  30. package/js/src/pro/binance.js +156 -1
  31. package/js/src/pro/bingx.js +1 -1
  32. package/js/src/pro/bitcoincom.js +4 -5
  33. package/js/src/pro/bitfinex2.js +3 -1
  34. package/js/src/pro/gate.js +2 -1
  35. package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
  36. package/js/src/woo.js +4 -2
  37. package/package.json +2 -2
  38. package/skip-tests.json +5 -5
  39. package/dist/cjs/src/abstract/bitforex.js +0 -9
  40. package/dist/cjs/src/bitforex.js +0 -884
  41. package/js/src/abstract/bitforex.d.ts +0 -27
  42. package/js/src/abstract/bitforex.js +0 -11
  43. package/js/src/bitforex.d.ts +0 -39
  44. package/js/src/bitforex.js +0 -885
package/js/src/binance.js CHANGED
@@ -47,6 +47,10 @@ export default class binance extends Exchange {
47
47
  'createMarketBuyOrderWithCost': true,
48
48
  'createMarketOrderWithCost': true,
49
49
  'createMarketSellOrderWithCost': true,
50
+ 'createLimitBuyOrder': true,
51
+ 'createLimitSellOrder': true,
52
+ 'createMarketBuyOrder': true,
53
+ 'createMarketSellOrder': true,
50
54
  'createOrder': true,
51
55
  'createOrders': true,
52
56
  'createOrderWithTakeProfitAndStopLoss': true,
@@ -111,6 +115,7 @@ export default class binance extends Exchange {
111
115
  'fetchOrders': true,
112
116
  'fetchOrderTrades': true,
113
117
  'fetchPosition': true,
118
+ 'fetchPositionMode': true,
114
119
  'fetchPositions': true,
115
120
  'fetchPositionsRisk': true,
116
121
  'fetchPremiumIndexOHLCV': false,
@@ -126,6 +131,7 @@ export default class binance extends Exchange {
126
131
  'fetchTransactionFee': 'emulated',
127
132
  'fetchTransactionFees': true,
128
133
  'fetchTransactions': false,
134
+ 'fetchTransfer': false,
129
135
  'fetchTransfers': true,
130
136
  'fetchUnderlyingAssets': false,
131
137
  'fetchVolatilityHistory': false,
@@ -475,6 +481,10 @@ export default class binance extends Exchange {
475
481
  'simple-earn/flexible/history/rewardsRecord': 15,
476
482
  'simple-earn/locked/history/rewardsRecord': 15,
477
483
  'simple-earn/flexible/history/collateralRecord': 0.1,
484
+ // Convert
485
+ 'dci/product/list': 0.1,
486
+ 'dci/product/positions': 0.1,
487
+ 'dci/product/accounts': 0.1,
478
488
  },
479
489
  'post': {
480
490
  'asset/dust': 0.06667,
@@ -603,6 +613,9 @@ export default class binance extends Exchange {
603
613
  'simple-earn/locked/redeem': 0.1,
604
614
  'simple-earn/flexible/setAutoSubscribe': 15,
605
615
  'simple-earn/locked/setAutoSubscribe': 15,
616
+ // convert
617
+ 'dci/product/subscribe': 0.1,
618
+ 'dci/product/auto_compound/edit': 0.1,
606
619
  },
607
620
  'put': {
608
621
  'userDataStream': 0.1,
@@ -4109,7 +4122,8 @@ export default class binance extends Exchange {
4109
4122
  // "closeTime": 1677097200000
4110
4123
  // }
4111
4124
  //
4112
- const volumeIndex = (market['inverse']) ? 7 : 5;
4125
+ const inverse = this.safeBool(market, 'inverse');
4126
+ const volumeIndex = inverse ? 7 : 5;
4113
4127
  return [
4114
4128
  this.safeInteger2(ohlcv, 0, 'closeTime'),
4115
4129
  this.safeNumber2(ohlcv, 1, 'open'),
@@ -8095,7 +8109,6 @@ export default class binance extends Exchange {
8095
8109
  /**
8096
8110
  * @method
8097
8111
  * @name binance#fetchTransfers
8098
- * @see https://binance-docs.github.io/apidocs/spot/en/#user-universal-transfer-user_data
8099
8112
  * @description fetch a history of internal transfers made on an account
8100
8113
  * @see https://binance-docs.github.io/apidocs/spot/en/#query-user-universal-transfer-history-user_data
8101
8114
  * @param {string} code unified currency code of the currency transferred
@@ -11984,4 +11997,41 @@ export default class binance extends Exchange {
11984
11997
  'info': greeks,
11985
11998
  };
11986
11999
  }
12000
+ async fetchPositionMode(symbol = undefined, params = {}) {
12001
+ /**
12002
+ * @method
12003
+ * @name binance#fetchPositionMode
12004
+ * @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
12005
+ * @param {string} symbol unified symbol of the market to fetch the order book for
12006
+ * @param {object} params extra parameters specific to the exchange API endpoint
12007
+ * @param {string} params.subType "linear" or "inverse"
12008
+ * @returns {object} an object detailing whether the market is in hedged or one-way mode
12009
+ */
12010
+ let market = undefined;
12011
+ if (symbol !== undefined) {
12012
+ market = this.market(symbol);
12013
+ }
12014
+ let subType = undefined;
12015
+ [subType, params] = this.handleSubTypeAndParams('fetchPositionMode', market, params);
12016
+ let response = undefined;
12017
+ if (subType === 'linear') {
12018
+ response = await this.fapiPrivateGetPositionSideDual(params);
12019
+ }
12020
+ else if (subType === 'inverse') {
12021
+ response = await this.dapiPrivateGetPositionSideDual(params);
12022
+ }
12023
+ else {
12024
+ throw new BadRequest(this.id + ' fetchPositionMode requires either a symbol argument or params["subType"]');
12025
+ }
12026
+ //
12027
+ // {
12028
+ // dualSidePosition: false
12029
+ // }
12030
+ //
12031
+ const dualSidePosition = this.safeBool(response, 'dualSidePosition');
12032
+ return {
12033
+ 'info': response,
12034
+ 'hedged': dualSidePosition,
12035
+ };
12036
+ }
11987
12037
  }
package/js/src/deribit.js CHANGED
@@ -10,7 +10,7 @@ import { TICK_SIZE } from './base/functions/number.js';
10
10
  import { AuthenticationError, ExchangeError, ArgumentsRequired, PermissionDenied, InvalidOrder, OrderNotFound, DDoSProtection, NotSupported, ExchangeNotAvailable, InsufficientFunds, BadRequest, InvalidAddress, OnMaintenance } from './base/errors.js';
11
11
  import { Precise } from './base/Precise.js';
12
12
  import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
13
- import totp from './base/functions/totp.js';
13
+ import { totp } from './base/functions/totp.js';
14
14
  // ---------------------------------------------------------------------------
15
15
  /**
16
16
  * @class deribit
package/js/src/mexc.js CHANGED
@@ -892,6 +892,7 @@ export default class mexc extends Exchange {
892
892
  '700006': BadRequest,
893
893
  '700007': AuthenticationError,
894
894
  '700008': BadRequest,
895
+ '700013': AuthenticationError,
895
896
  '730001': BadRequest,
896
897
  '730002': BadRequest,
897
898
  '730000': ExchangeError,
@@ -5424,7 +5425,7 @@ export default class mexc extends Exchange {
5424
5425
  'source': this.safeString(this.options, 'broker', 'CCXT'),
5425
5426
  };
5426
5427
  }
5427
- if (method === 'POST') {
5428
+ if ((method === 'POST') || (method === 'PUT')) {
5428
5429
  headers['Content-Type'] = 'application/json';
5429
5430
  }
5430
5431
  }
package/js/src/ndax.js CHANGED
@@ -10,7 +10,7 @@ import { ExchangeError, AuthenticationError, InsufficientFunds, BadSymbol, Order
10
10
  import { TICK_SIZE } from './base/functions/number.js';
11
11
  import { Precise } from './base/Precise.js';
12
12
  import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
13
- import totp from './base/functions/totp.js';
13
+ import { totp } from './base/functions/totp.js';
14
14
  // ---------------------------------------------------------------------------
15
15
  /**
16
16
  * @class ndax
package/js/src/okx.js CHANGED
@@ -5471,7 +5471,7 @@ export default class okx extends Exchange {
5471
5471
  const liquidationPrice = this.safeNumber(position, 'liqPx');
5472
5472
  const percentageString = this.safeString(position, 'uplRatio');
5473
5473
  const percentage = this.parseNumber(Precise.stringMul(percentageString, '100'));
5474
- const timestamp = this.safeInteger(position, 'uTime');
5474
+ const timestamp = this.safeInteger(position, 'cTime');
5475
5475
  const marginRatio = this.parseNumber(Precise.stringDiv(maintenanceMarginString, collateralString, 4));
5476
5476
  return this.safePosition({
5477
5477
  'info': position,
@@ -20,6 +20,8 @@ export default class binance extends binanceRest {
20
20
  handleTrade(client: Client, message: any): void;
21
21
  watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
22
22
  handleOHLCV(client: Client, message: any): void;
23
+ fetchOHLCVWs(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
24
+ handleFetchOHLCV(client: Client, message: any): void;
23
25
  watchTicker(symbol: string, params?: {}): Promise<Ticker>;
24
26
  watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
25
27
  parseWsTicker(message: any, marketType: any): Ticker;
@@ -55,6 +57,7 @@ export default class binance extends binanceRest {
55
57
  handlePositions(client: any, message: any): void;
56
58
  parseWsPosition(position: any, market?: any): Position;
57
59
  fetchMyTradesWs(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
60
+ fetchTradesWs(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
58
61
  handleTradesWs(client: Client, message: any): void;
59
62
  watchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
60
63
  handleMyTrade(client: Client, message: any): void;
@@ -41,9 +41,11 @@ export default class binance extends binanceRest {
41
41
  'fetchDepositsWs': false,
42
42
  'fetchMarketsWs': false,
43
43
  'fetchMyTradesWs': true,
44
+ 'fetchOHLCVWs': true,
44
45
  'fetchOpenOrdersWs': true,
45
46
  'fetchOrderWs': true,
46
47
  'fetchOrdersWs': true,
48
+ 'fetchTradesWs': true,
47
49
  'fetchTradingFeesWs': false,
48
50
  'fetchWithdrawalsWs': false,
49
51
  },
@@ -840,6 +842,94 @@ export default class binance extends binanceRest {
840
842
  stored.append(parsed);
841
843
  client.resolve(stored, messageHash);
842
844
  }
845
+ async fetchOHLCVWs(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
846
+ /**
847
+ * @method
848
+ * @name binance#fetchOHLCVWs
849
+ * @see https://binance-docs.github.io/apidocs/websocket_api/en/#klines
850
+ * @description query historical candlestick data containing the open, high, low, and close price, and the volume of a market
851
+ * @param {string} symbol unified symbol of the market to query OHLCV data for
852
+ * @param {string} timeframe the length of time each candle represents
853
+ * @param {int} since timestamp in ms of the earliest candle to fetch
854
+ * @param {int} limit the maximum amount of candles to fetch
855
+ * @param {object} params extra parameters specific to the exchange API endpoint
856
+ * @param {int} params.until timestamp in ms of the earliest candle to fetch
857
+ *
858
+ * EXCHANGE SPECIFIC PARAMETERS
859
+ * @param {string} params.timeZone default=0 (UTC)
860
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
861
+ */
862
+ await this.loadMarkets();
863
+ this.checkIsSpot('fetchOHLCVWs', symbol, params);
864
+ const url = this.urls['api']['ws']['ws'];
865
+ const requestId = this.requestId(url);
866
+ const messageHash = requestId.toString();
867
+ let returnRateLimits = false;
868
+ [returnRateLimits, params] = this.handleOptionAndParams(params, 'fetchOHLCVWs', 'returnRateLimits', false);
869
+ const payload = {
870
+ 'symbol': this.marketId(symbol),
871
+ 'returnRateLimits': returnRateLimits,
872
+ 'interval': this.timeframes[timeframe],
873
+ };
874
+ const until = this.safeInteger(params, 'until');
875
+ params = this.omit(params, 'until');
876
+ if (since !== undefined) {
877
+ payload['startTime'] = since;
878
+ }
879
+ if (limit !== undefined) {
880
+ payload['limit'] = limit;
881
+ }
882
+ if (until !== undefined) {
883
+ payload['endTime'] = until;
884
+ }
885
+ const message = {
886
+ 'id': messageHash,
887
+ 'method': 'klines',
888
+ 'params': this.extend(payload, params),
889
+ };
890
+ const subscription = {
891
+ 'method': this.handleFetchOHLCV,
892
+ };
893
+ return await this.watch(url, messageHash, message, messageHash, subscription);
894
+ }
895
+ handleFetchOHLCV(client, message) {
896
+ //
897
+ // {
898
+ // "id": "1dbbeb56-8eea-466a-8f6e-86bdcfa2fc0b",
899
+ // "status": 200,
900
+ // "result": [
901
+ // [
902
+ // 1655971200000, // Kline open time
903
+ // "0.01086000", // Open price
904
+ // "0.01086600", // High price
905
+ // "0.01083600", // Low price
906
+ // "0.01083800", // Close price
907
+ // "2290.53800000", // Volume
908
+ // 1655974799999, // Kline close time
909
+ // "24.85074442", // Quote asset volume
910
+ // 2283, // Number of trades
911
+ // "1171.64000000", // Taker buy base asset volume
912
+ // "12.71225884", // Taker buy quote asset volume
913
+ // "0" // Unused field, ignore
914
+ // ]
915
+ // ],
916
+ // "rateLimits": [
917
+ // {
918
+ // "rateLimitType": "REQUEST_WEIGHT",
919
+ // "interval": "MINUTE",
920
+ // "intervalNum": 1,
921
+ // "limit": 6000,
922
+ // "count": 2
923
+ // }
924
+ // ]
925
+ // }
926
+ //
927
+ const result = this.safeList(message, 'result');
928
+ const parsed = this.parseOHLCVs(result);
929
+ // use a reverse lookup in a static map instead
930
+ const messageHash = this.safeString(message, 'id');
931
+ client.resolve(parsed, messageHash);
932
+ }
843
933
  async watchTicker(symbol, params = {}) {
844
934
  /**
845
935
  * @method
@@ -2541,12 +2631,58 @@ export default class binance extends binanceRest {
2541
2631
  const trades = await this.watch(url, messageHash, message, messageHash, subscription);
2542
2632
  return this.filterBySymbolSinceLimit(trades, symbol, since, limit);
2543
2633
  }
2634
+ async fetchTradesWs(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2635
+ /**
2636
+ * @method
2637
+ * @name binance#fetchTradesWs
2638
+ * @see https://binance-docs.github.io/apidocs/websocket_api/en/#recent-trades
2639
+ * @description fetch all trades made by the user
2640
+ * @param {string} symbol unified market symbol
2641
+ * @param {int} [since] the earliest time in ms to fetch trades for
2642
+ * @param {int} [limit] the maximum number of trades structures to retrieve, default=500, max=1000
2643
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2644
+ *
2645
+ * EXCHANGE SPECIFIC PARAMETERS
2646
+ * @param {int} [params.fromId] trade ID to begin at
2647
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
2648
+ */
2649
+ await this.loadMarkets();
2650
+ if (symbol === undefined) {
2651
+ throw new BadRequest(this.id + ' fetchTradesWs () requires a symbol argument');
2652
+ }
2653
+ this.checkIsSpot('fetchTradesWs', symbol, params);
2654
+ const url = this.urls['api']['ws']['ws'];
2655
+ const requestId = this.requestId(url);
2656
+ const messageHash = requestId.toString();
2657
+ let returnRateLimits = false;
2658
+ [returnRateLimits, params] = this.handleOptionAndParams(params, 'fetchTradesWs', 'returnRateLimits', false);
2659
+ const payload = {
2660
+ 'symbol': this.marketId(symbol),
2661
+ 'returnRateLimits': returnRateLimits,
2662
+ };
2663
+ if (limit !== undefined) {
2664
+ payload['limit'] = limit;
2665
+ }
2666
+ const message = {
2667
+ 'id': messageHash,
2668
+ 'method': 'trades.historical',
2669
+ 'params': this.extend(payload, params),
2670
+ };
2671
+ const subscription = {
2672
+ 'method': this.handleTradesWs,
2673
+ };
2674
+ const trades = await this.watch(url, messageHash, message, messageHash, subscription);
2675
+ return this.filterBySinceLimit(trades, since, limit);
2676
+ }
2544
2677
  handleTradesWs(client, message) {
2678
+ //
2679
+ // fetchMyTradesWs
2545
2680
  //
2546
2681
  // {
2547
2682
  // "id": "f4ce6a53-a29d-4f70-823b-4ab59391d6e8",
2548
2683
  // "status": 200,
2549
- // "result": [{
2684
+ // "result": [
2685
+ // {
2550
2686
  // "symbol": "BTCUSDT",
2551
2687
  // "id": 1650422481,
2552
2688
  // "orderId": 12569099453,
@@ -2565,6 +2701,25 @@ export default class binance extends binanceRest {
2565
2701
  // ],
2566
2702
  // }
2567
2703
  //
2704
+ // fetchTradesWs
2705
+ //
2706
+ // {
2707
+ // "id": "f4ce6a53-a29d-4f70-823b-4ab59391d6e8",
2708
+ // "status": 200,
2709
+ // "result": [
2710
+ // {
2711
+ // "id": 0,
2712
+ // "price": "0.00005000",
2713
+ // "qty": "40.00000000",
2714
+ // "quoteQty": "0.00200000",
2715
+ // "time": 1500004800376,
2716
+ // "isBuyerMaker": true,
2717
+ // "isBestMatch": true
2718
+ // }
2719
+ // ...
2720
+ // ],
2721
+ // }
2722
+ //
2568
2723
  const messageHash = this.safeString(message, 'id');
2569
2724
  const result = this.safeValue(message, 'result', []);
2570
2725
  const trades = this.parseTrades(result);
@@ -8,7 +8,7 @@
8
8
  import bingxRest from '../bingx.js';
9
9
  import { BadRequest, NetworkError } from '../base/errors.js';
10
10
  import { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById } from '../base/ws/Cache.js';
11
- import Precise from '../base/Precise.js';
11
+ import { Precise } from '../base/Precise.js';
12
12
  // ---------------------------------------------------------------------------
13
13
  export default class bingx extends bingxRest {
14
14
  describe() {
@@ -6,15 +6,14 @@
6
6
 
7
7
  // ---------------------------------------------------------------------------
8
8
  import hitbtc from './hitbtc.js';
9
- import bequantRest from '../bequant.js';
9
+ import hitbtcRest from '../hitbtc.js';
10
+ import bitcoincomRest from '../bitcoincom.js';
10
11
  // ---------------------------------------------------------------------------
11
12
  export default class bitcoincom extends hitbtc {
12
13
  describe() {
13
14
  // eslint-disable-next-line new-cap
14
- const restInstance = new bequantRest();
15
- const restDescribe = restInstance.describe();
16
- const extended = this.deepExtend(super.describe(), restDescribe);
17
- return this.deepExtend(extended, {
15
+ const describeExtended = this.getDescribeForExtendedWsExchange(new bitcoincomRest(), new hitbtcRest(), super.describe());
16
+ return this.deepExtend(describeExtended, {
18
17
  'id': 'bitcoincom',
19
18
  'name': 'bitcoin.com',
20
19
  'countries': ['KN'],
@@ -323,7 +323,9 @@ export default class bitfinex2 extends bitfinex2Rest {
323
323
  const messageLength = message.length;
324
324
  if (messageLength === 2) {
325
325
  // initial snapshot
326
- const trades = this.safeValue(message, 1, []);
326
+ let trades = this.safeList(message, 1, []);
327
+ // needs to be reversed to make chronological order
328
+ trades = trades.reverse();
327
329
  for (let i = 0; i < trades.length; i++) {
328
330
  const parsed = this.parseWsTrade(trades[i], market);
329
331
  stored.append(parsed);
@@ -386,8 +386,9 @@ export default class gate extends gateRest {
386
386
  const parts = channel.split('.');
387
387
  const rawMarketType = this.safeString(parts, 0);
388
388
  const marketType = (rawMarketType === 'futures') ? 'contract' : 'spot';
389
+ const result = this.safeValue(message, 'result');
389
390
  let results = [];
390
- if (marketType === 'contract') {
391
+ if (Array.isArray(result)) {
391
392
  results = this.safeList(message, 'result', []);
392
393
  }
393
394
  else {
@@ -15,7 +15,7 @@ export declare class BigInteger {
15
15
  protected intValue(): number;
16
16
  protected byteValue(): number;
17
17
  protected shortValue(): number;
18
- protected signum(): 0 | 1 | -1;
18
+ protected signum(): 1 | 0 | -1;
19
19
  toByteArray(): number[];
20
20
  protected equals(a: BigInteger): boolean;
21
21
  protected min(a: BigInteger): BigInteger;
package/js/src/woo.js CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  // ---------------------------------------------------------------------------
8
8
  import Exchange from './abstract/woo.js';
9
- import { AuthenticationError, RateLimitExceeded, BadRequest, ExchangeError, InvalidOrder, ArgumentsRequired, NotSupported } from './base/errors.js';
9
+ import { AuthenticationError, RateLimitExceeded, BadRequest, ExchangeError, InvalidOrder, ArgumentsRequired, NotSupported, OnMaintenance } from './base/errors.js';
10
10
  import { Precise } from './base/Precise.js';
11
11
  import { TICK_SIZE } from './base/functions/number.js';
12
12
  import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
@@ -298,7 +298,6 @@ export default class woo extends Exchange {
298
298
  '-1007': BadRequest,
299
299
  '-1008': InvalidOrder,
300
300
  '-1009': BadRequest,
301
- '-1011': ExchangeError,
302
301
  '-1012': BadRequest,
303
302
  '-1101': InvalidOrder,
304
303
  '-1102': InvalidOrder,
@@ -307,6 +306,8 @@ export default class woo extends Exchange {
307
306
  '-1105': InvalidOrder, // { "code": -1105, "message": "Price is X% too high or X% too low from the mid price." }
308
307
  },
309
308
  'broad': {
309
+ 'Can not place': ExchangeError,
310
+ 'maintenance': OnMaintenance,
310
311
  'symbol must not be blank': BadRequest,
311
312
  'The token is not supported': BadRequest,
312
313
  'Your order and symbol are not valid or already canceled': BadRequest,
@@ -2383,6 +2384,7 @@ export default class woo extends Exchange {
2383
2384
  }
2384
2385
  //
2385
2386
  // 400 Bad Request {"success":false,"code":-1012,"message":"Amount is required for buy market orders when margin disabled."}
2387
+ // {"code":"-1011","message":"The system is under maintenance.","success":false}
2386
2388
  //
2387
2389
  const success = this.safeValue(response, 'success');
2388
2390
  const errorCode = this.safeString(response, 'code');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.2.50",
3
+ "version": "4.2.52",
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",
@@ -146,7 +146,7 @@
146
146
  "as-table": "1.0.37",
147
147
  "asciichart": "^1.5.25",
148
148
  "assert": "^2.0.0",
149
- "ast-transpiler": "^0.0.43",
149
+ "ast-transpiler": "^0.0.44",
150
150
  "docsify": "^4.11.4",
151
151
  "eslint": "8.22.0",
152
152
  "eslint-config-airbnb-base": "15.0.0",
package/skip-tests.json CHANGED
@@ -199,7 +199,6 @@
199
199
  }
200
200
  },
201
201
  "bitfinex2": {
202
- "skipWs": true,
203
202
  "skipMethods": {
204
203
  "loadMarkets": {
205
204
  "currencyIdAndCode": "broken currencies"
@@ -240,6 +239,7 @@
240
239
  "fetchTickers": {
241
240
  "bid":"broken bid-ask",
242
241
  "ask":"broken bid-ask",
242
+ "open": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269099593#L3833",
243
243
  "quoteVolume": "quoteVolume >= baseVolume * low is failing",
244
244
  "baseVolume": "quoteVolume >= baseVolume * low is failing"
245
245
  },
@@ -370,7 +370,6 @@
370
370
  }
371
371
  },
372
372
  "bitrue": {
373
- "skipWs": true,
374
373
  "skipMethods": {
375
374
  "loadMarkets": {
376
375
  "currencyIdAndCode": "broken currencies",
@@ -390,6 +389,7 @@
390
389
  }
391
390
  },
392
391
  "bitso": {
392
+ "skipWs": true,
393
393
  "skipMethods": {
394
394
  "loadMarkets": {
395
395
  "active": "not provided"
@@ -397,8 +397,10 @@
397
397
  "fetchOHLCV": "randomly failing with 404 not found"
398
398
  }
399
399
  },
400
+ "bitforex": {
401
+ "skipWs": true
402
+ },
400
403
  "bitstamp": {
401
- "skipWs": true,
402
404
  "skipMethods": {
403
405
  "fetchOrderBook": "bid/ask might be 0",
404
406
  "fetchL2OrderBook": "same",
@@ -449,8 +451,6 @@
449
451
  }
450
452
  },
451
453
  "bitvavo": {
452
- "skip": "temp",
453
- "skipWs": "temp",
454
454
  "httpsProxy": "http://51.83.140.52:11230",
455
455
  "skipMethods": {
456
456
  "fetchCurrencies": {
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- var Exchange$1 = require('../base/Exchange.js');
4
-
5
- // -------------------------------------------------------------------------------
6
- class Exchange extends Exchange$1["default"] {
7
- }
8
-
9
- module.exports = Exchange;