ccxt 4.3.75 → 4.3.77

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.
@@ -43,8 +43,8 @@ export default class bitmart extends bitmartRest {
43
43
  'private': 'wss://ws-manager-compress.{hostname}/user?protocol=1.1',
44
44
  },
45
45
  'swap': {
46
- 'public': 'wss://openapi-ws.{hostname}/api?protocol=1.1',
47
- 'private': 'wss://openapi-ws.{hostname}/user?protocol=1.1',
46
+ 'public': 'wss://openapi-ws-v2.{hostname}/api?protocol=1.1',
47
+ 'private': 'wss://openapi-ws-v2.{hostname}/user?protocol=1.1',
48
48
  },
49
49
  },
50
50
  },
@@ -138,7 +138,7 @@ export default class bitmart extends bitmartRest {
138
138
  * @method
139
139
  * @name bitmart#watchBalance
140
140
  * @see https://developer-pro.bitmart.com/en/spot/#private-balance-change
141
- * @see https://developer-pro.bitmart.com/en/futures/#private-assets-channel
141
+ * @see https://developer-pro.bitmart.com/en/futuresv2/#private-assets-channel
142
142
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
143
143
  * @param {object} [params] extra parameters specific to the exchange API endpoint
144
144
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
@@ -272,7 +272,7 @@ export default class bitmart extends bitmartRest {
272
272
  * @method
273
273
  * @name bitmart#watchTrades
274
274
  * @see https://developer-pro.bitmart.com/en/spot/#public-trade-channel
275
- * @see https://developer-pro.bitmart.com/en/futures/#public-trade-channel
275
+ * @see https://developer-pro.bitmart.com/en/futuresv2/#public-trade-channel
276
276
  * @description get the list of most recent trades for a particular symbol
277
277
  * @param {string} symbol unified symbol of the market to fetch trades for
278
278
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
@@ -322,6 +322,7 @@ export default class bitmart extends bitmartRest {
322
322
  * @method
323
323
  * @name bitmart#watchTicker
324
324
  * @see https://developer-pro.bitmart.com/en/spot/#public-ticker-channel
325
+ * @see https://developer-pro.bitmart.com/en/futuresv2/#public-ticker-channel
325
326
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
326
327
  * @param {string} symbol unified symbol of the market to fetch the ticker for
327
328
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -336,7 +337,7 @@ export default class bitmart extends bitmartRest {
336
337
  /**
337
338
  * @method
338
339
  * @name bitmart#watchTickers
339
- * @see https://developer-pro.bitmart.com/en/futures/#overview
340
+ * @see https://developer-pro.bitmart.com/en/futuresv2/#public-ticker-channel
340
341
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
341
342
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
342
343
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -360,7 +361,7 @@ export default class bitmart extends bitmartRest {
360
361
  * @name bitmart#watchOrders
361
362
  * @description watches information on multiple orders made by the user
362
363
  * @see https://developer-pro.bitmart.com/en/spot/#private-order-progress
363
- * @see https://developer-pro.bitmart.com/en/futures/#private-order-channel
364
+ * @see https://developer-pro.bitmart.com/en/futuresv2/#private-order-channel
364
365
  * @param {string} symbol unified market symbol of the market orders were made in
365
366
  * @param {int} [since] the earliest time in ms to fetch orders for
366
367
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -995,7 +996,7 @@ export default class bitmart extends bitmartRest {
995
996
  * @method
996
997
  * @name bitmart#watchOHLCV
997
998
  * @see https://developer-pro.bitmart.com/en/spot/#public-kline-channel
998
- * @see https://developer-pro.bitmart.com/en/futures/#public-klinebin-channel
999
+ * @see https://developer-pro.bitmart.com/en/futuresv2/#public-klinebin-channel
999
1000
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1000
1001
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1001
1002
  * @param {string} timeframe the length of time each candle represents
@@ -1123,7 +1124,7 @@ export default class bitmart extends bitmartRest {
1123
1124
  * @name bitmart#watchOrderBook
1124
1125
  * @see https://developer-pro.bitmart.com/en/spot/#public-depth-all-channel
1125
1126
  * @see https://developer-pro.bitmart.com/en/spot/#public-depth-increase-channel
1126
- * @see https://developer-pro.bitmart.com/en/futures/#public-depth-channel
1127
+ * @see https://developer-pro.bitmart.com/en/futuresv2/#public-depth-channel
1127
1128
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1128
1129
  * @param {string} symbol unified symbol of the market to fetch the order book for
1129
1130
  * @param {int} [limit] the maximum amount of order book entries to return
@@ -80,6 +80,25 @@ export default class bybit extends bybitRest {
80
80
  },
81
81
  },
82
82
  },
83
+ 'demotrading': {
84
+ 'ws': {
85
+ 'public': {
86
+ 'spot': 'wss://stream.{hostname}/v5/public/spot',
87
+ 'inverse': 'wss://stream.{hostname}/v5/public/inverse',
88
+ 'option': 'wss://stream.{hostname}/v5/public/option',
89
+ 'linear': 'wss://stream.{hostname}/v5/public/linear',
90
+ },
91
+ 'private': {
92
+ 'spot': {
93
+ 'unified': 'wss://stream-demo.{hostname}/v5/private',
94
+ 'nonUnified': 'wss://stream-demo.{hostname}/spot/private/v3',
95
+ },
96
+ 'contract': 'wss://stream-demo.{hostname}/v5/private',
97
+ 'usdc': 'wss://stream-demo.{hostname}/trade/option/usdc/private/v1',
98
+ 'trade': 'wss://stream-demo.bybit.com/v5/trade',
99
+ },
100
+ },
101
+ },
83
102
  },
84
103
  'options': {
85
104
  'watchTicker': {
@@ -169,7 +188,7 @@ export default class bybit extends bybitRest {
169
188
  if (isSpot) {
170
189
  url = url[accessibility]['spot'];
171
190
  }
172
- else if (type === 'swap') {
191
+ else if ((type === 'swap') || (type === 'future')) {
173
192
  let subType = undefined;
174
193
  [subType, params] = this.handleSubTypeAndParams(method, market, params, 'linear');
175
194
  url = url[accessibility][subType];
@@ -2064,7 +2083,7 @@ export default class bybit extends bybitRest {
2064
2083
  this.handleSubscriptionStatus(client, message);
2065
2084
  return;
2066
2085
  }
2067
- const topic = this.safeString2(message, 'topic', 'op');
2086
+ const topic = this.safeString2(message, 'topic', 'op', '');
2068
2087
  const methods = {
2069
2088
  'orderbook': this.handleOrderBook,
2070
2089
  'kline': this.handleOHLCV,
package/js/src/pro/woo.js CHANGED
@@ -646,7 +646,7 @@ export default class woo extends wooRest {
646
646
  },
647
647
  };
648
648
  const message = this.extend(request, params);
649
- this.watch(url, messageHash, message, messageHash);
649
+ this.watch(url, messageHash, message, messageHash, message);
650
650
  }
651
651
  return await future;
652
652
  }
package/js/src/xt.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import Exchange from './abstract/xt.js';
2
2
  import { Currencies, Currency, Dict, FundingHistory, FundingRateHistory, Int, LeverageTier, MarginModification, Market, Num, OHLCV, Order, OrderSide, OrderType, Str, Tickers, Transaction, TransferEntry } from './base/types.js';
3
+ /**
4
+ * @class xt
5
+ * @augments Exchange
6
+ */
3
7
  export default class xt extends Exchange {
4
8
  describe(): any;
5
9
  nonce(): number;
package/js/src/xt.js CHANGED
@@ -11,6 +11,10 @@ import { TICK_SIZE } from './base/functions/number.js';
11
11
  import { ArgumentsRequired, AuthenticationError, BadRequest, BadSymbol, ExchangeError, InsufficientFunds, InvalidOrder, NetworkError, NotSupported, OnMaintenance, PermissionDenied, RateLimitExceeded, RequestTimeout } from './base/errors.js';
12
12
  import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
13
13
  // ---------------------------------------------------------------------------
14
+ /**
15
+ * @class xt
16
+ * @augments Exchange
17
+ */
14
18
  export default class xt extends Exchange {
15
19
  describe() {
16
20
  return this.deepExtend(super.describe(), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.75",
3
+ "version": "4.3.77",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",