ccxt 4.2.49 → 4.2.51

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/timex.js CHANGED
@@ -73,6 +73,7 @@ export default class timex extends Exchange {
73
73
  'fetchPremiumIndexOHLCV': false,
74
74
  'fetchTicker': true,
75
75
  'fetchTickers': true,
76
+ 'fetchTime': true,
76
77
  'fetchTrades': true,
77
78
  'fetchTradingFee': true,
78
79
  'fetchWithdrawal': false,
@@ -268,11 +269,26 @@ export default class timex extends Exchange {
268
269
  },
269
270
  });
270
271
  }
272
+ async fetchTime(params = {}) {
273
+ /**
274
+ * @method
275
+ * @name timex#fetchTime
276
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
277
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
278
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
279
+ */
280
+ const response = await this.tradingviewGetTime(params);
281
+ //
282
+ // 1708682617
283
+ //
284
+ return this.parseToInt(response) * 1000;
285
+ }
271
286
  async fetchMarkets(params = {}) {
272
287
  /**
273
288
  * @method
274
289
  * @name timex#fetchMarkets
275
290
  * @description retrieves data on all markets for timex
291
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listMarkets
276
292
  * @param {object} [params] extra parameters specific to the exchange API endpoint
277
293
  * @returns {object[]} an array of objects representing market data
278
294
  */
@@ -305,6 +321,7 @@ export default class timex extends Exchange {
305
321
  * @method
306
322
  * @name timex#fetchCurrencies
307
323
  * @description fetches all available currencies on an exchange
324
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listCurrencies
308
325
  * @param {object} [params] extra parameters specific to the exchange API endpoint
309
326
  * @returns {object} an associative dictionary of currencies
310
327
  */
@@ -346,6 +363,7 @@ export default class timex extends Exchange {
346
363
  * @method
347
364
  * @name timex#fetchDeposits
348
365
  * @description fetch all deposits made to an account
366
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Manager/getDeposits
349
367
  * @param {string} code unified currency code
350
368
  * @param {int} [since] the earliest time in ms to fetch deposits for
351
369
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -381,6 +399,7 @@ export default class timex extends Exchange {
381
399
  * @method
382
400
  * @name timex#fetchWithdrawals
383
401
  * @description fetch all withdrawals made to an account
402
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Manager/getWithdraws
384
403
  * @param {string} code unified currency code
385
404
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
386
405
  * @param {int} [limit] the maximum number of transaction structures to retrieve
@@ -465,6 +484,7 @@ export default class timex extends Exchange {
465
484
  * @method
466
485
  * @name timex#fetchTickers
467
486
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
487
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listTickers
468
488
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
469
489
  * @param {object} [params] extra parameters specific to the exchange API endpoint
470
490
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -499,6 +519,7 @@ export default class timex extends Exchange {
499
519
  * @method
500
520
  * @name timex#fetchTicker
501
521
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
522
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listTickers
502
523
  * @param {string} symbol unified symbol of the market to fetch the ticker for
503
524
  * @param {object} [params] extra parameters specific to the exchange API endpoint
504
525
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -536,6 +557,7 @@ export default class timex extends Exchange {
536
557
  * @method
537
558
  * @name timex#fetchOrderBook
538
559
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
560
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/orderbookV2
539
561
  * @param {string} symbol unified symbol of the market to fetch the order book for
540
562
  * @param {int} [limit] the maximum amount of order book entries to return
541
563
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -582,6 +604,7 @@ export default class timex extends Exchange {
582
604
  * @method
583
605
  * @name timex#fetchTrades
584
606
  * @description get the list of most recent trades for a particular symbol
607
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listTrades
585
608
  * @param {string} symbol unified symbol of the market to fetch trades for
586
609
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
587
610
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -629,6 +652,7 @@ export default class timex extends Exchange {
629
652
  * @method
630
653
  * @name timex#fetchOHLCV
631
654
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
655
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listCandles
632
656
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
633
657
  * @param {string} timeframe the length of time each candle represents
634
658
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -694,6 +718,7 @@ export default class timex extends Exchange {
694
718
  * @method
695
719
  * @name timex#fetchBalance
696
720
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
721
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/getBalances
697
722
  * @param {object} [params] extra parameters specific to the exchange API endpoint
698
723
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
699
724
  */
@@ -715,6 +740,7 @@ export default class timex extends Exchange {
715
740
  * @method
716
741
  * @name timex#createOrder
717
742
  * @description create a trade order
743
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/createOrder
718
744
  * @param {string} symbol unified symbol of the market to create an order in
719
745
  * @param {string} type 'market' or 'limit'
720
746
  * @param {string} side 'buy' or 'sell'
@@ -843,6 +869,7 @@ export default class timex extends Exchange {
843
869
  * @method
844
870
  * @name timex#cancelOrder
845
871
  * @description cancels an open order
872
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/deleteOrders
846
873
  * @param {string} id order id
847
874
  * @param {string} symbol not used by timex cancelOrder ()
848
875
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -856,6 +883,7 @@ export default class timex extends Exchange {
856
883
  * @method
857
884
  * @name timex#cancelOrders
858
885
  * @description cancel multiple orders
886
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/deleteOrders
859
887
  * @param {string[]} ids order ids
860
888
  * @param {string} symbol unified market symbol, default is undefined
861
889
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -897,6 +925,7 @@ export default class timex extends Exchange {
897
925
  * @method
898
926
  * @name timex#fetchOrder
899
927
  * @description fetches information on an order made by the user
928
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/History/getOrderDetails
900
929
  * @param {string} symbol not used by timex fetchOrder
901
930
  * @param {object} [params] extra parameters specific to the exchange API endpoint
902
931
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -948,6 +977,7 @@ export default class timex extends Exchange {
948
977
  * @method
949
978
  * @name timex#fetchOpenOrders
950
979
  * @description fetch all unfilled currently open orders
980
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/getOpenOrders
951
981
  * @param {string} symbol unified market symbol
952
982
  * @param {int} [since] the earliest time in ms to fetch open orders for
953
983
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -1002,6 +1032,7 @@ export default class timex extends Exchange {
1002
1032
  * @method
1003
1033
  * @name timex#fetchClosedOrders
1004
1034
  * @description fetches information on multiple closed orders made by the user
1035
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/History/getOrders
1005
1036
  * @param {string} symbol unified market symbol of the market orders were made in
1006
1037
  * @param {int} [since] the earliest time in ms to fetch orders for
1007
1038
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -1061,6 +1092,7 @@ export default class timex extends Exchange {
1061
1092
  * @method
1062
1093
  * @name timex#fetchMyTrades
1063
1094
  * @description fetch all trades made by the user
1095
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/History/getTrades_1
1064
1096
  * @param {string} symbol unified market symbol
1065
1097
  * @param {int} [since] the earliest time in ms to fetch trades for
1066
1098
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -1139,6 +1171,7 @@ export default class timex extends Exchange {
1139
1171
  * @method
1140
1172
  * @name timex#fetchTradingFee
1141
1173
  * @description fetch the trading fees for a market
1174
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/getFees
1142
1175
  * @param {string} symbol unified market symbol
1143
1176
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1144
1177
  * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -1532,6 +1565,7 @@ export default class timex extends Exchange {
1532
1565
  * @method
1533
1566
  * @name timex#fetchDepositAddress
1534
1567
  * @description fetch the deposit address for a currency associated with this account, does not accept params["network"]
1568
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Currency/selectCurrencyBySymbol
1535
1569
  * @param {string} code unified currency code
1536
1570
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1537
1571
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -1594,7 +1628,7 @@ export default class timex extends Exchange {
1594
1628
  if (Object.keys(params).length) {
1595
1629
  url += '?' + this.urlencodeWithArrayRepeat(params);
1596
1630
  }
1597
- if (api !== 'public') {
1631
+ if (api !== 'public' && api !== 'tradingview') {
1598
1632
  this.checkRequiredCredentials();
1599
1633
  const auth = this.stringToBase64(this.apiKey + ':' + this.secret);
1600
1634
  const secret = 'Basic ' + auth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.2.49",
3
+ "version": "4.2.51",
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
@@ -41,7 +41,6 @@
41
41
  }
42
42
  },
43
43
  "bequant": {
44
- "skipWs": "timeouts",
45
44
  "skipMethods": {
46
45
  "loadMarkets": {
47
46
  "currencyIdAndCode": "https://app.travis-ci.com/github/ccxt/ccxt/builds/264802937#L2194"
@@ -241,6 +240,7 @@
241
240
  "fetchTickers": {
242
241
  "bid":"broken bid-ask",
243
242
  "ask":"broken bid-ask",
243
+ "open": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269099593#L3833",
244
244
  "quoteVolume": "quoteVolume >= baseVolume * low is failing",
245
245
  "baseVolume": "quoteVolume >= baseVolume * low is failing"
246
246
  },