ccxt 4.3.52 → 4.3.54

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 (51) hide show
  1. package/README.md +6 -5
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +6 -1
  4. package/dist/cjs/src/abstract/vertex.js +9 -0
  5. package/dist/cjs/src/base/Precise.js +10 -0
  6. package/dist/cjs/src/base/functions/type.js +43 -10
  7. package/dist/cjs/src/bingx.js +1 -1
  8. package/dist/cjs/src/hyperliquid.js +27 -26
  9. package/dist/cjs/src/phemex.js +28 -1
  10. package/dist/cjs/src/poloniex.js +2 -1
  11. package/dist/cjs/src/pro/binance.js +1 -1
  12. package/dist/cjs/src/pro/bybit.js +20 -12
  13. package/dist/cjs/src/pro/kucoin.js +64 -26
  14. package/dist/cjs/src/pro/probit.js +8 -3
  15. package/dist/cjs/src/pro/vertex.js +978 -0
  16. package/dist/cjs/src/probit.js +10 -5
  17. package/dist/cjs/src/static_dependencies/ethers/hash/typed-data.js +1 -1
  18. package/dist/cjs/src/vertex.js +2941 -0
  19. package/dist/cjs/src/woo.js +29 -21
  20. package/js/ccxt.d.ts +8 -2
  21. package/js/ccxt.js +6 -2
  22. package/js/src/abstract/vertex.d.ts +22 -0
  23. package/js/src/abstract/vertex.js +11 -0
  24. package/js/src/base/Exchange.d.ts +1 -1
  25. package/js/src/base/Precise.d.ts +2 -0
  26. package/js/src/base/Precise.js +10 -0
  27. package/js/src/base/functions/type.js +43 -10
  28. package/js/src/binance.d.ts +1 -11
  29. package/js/src/bingx.js +1 -1
  30. package/js/src/bitget.d.ts +1 -1
  31. package/js/src/bitmart.d.ts +1 -1
  32. package/js/src/coinex.d.ts +1 -1
  33. package/js/src/htx.d.ts +1 -1
  34. package/js/src/hyperliquid.js +27 -26
  35. package/js/src/phemex.d.ts +1 -1
  36. package/js/src/phemex.js +28 -1
  37. package/js/src/poloniex.js +2 -1
  38. package/js/src/pro/binance.js +1 -1
  39. package/js/src/pro/bybit.d.ts +1 -1
  40. package/js/src/pro/bybit.js +20 -12
  41. package/js/src/pro/kucoin.js +64 -26
  42. package/js/src/pro/probit.js +8 -3
  43. package/js/src/pro/vertex.d.ts +39 -0
  44. package/js/src/pro/vertex.js +979 -0
  45. package/js/src/probit.js +11 -6
  46. package/js/src/static_dependencies/ethers/hash/typed-data.js +1 -1
  47. package/js/src/vertex.d.ts +112 -0
  48. package/js/src/vertex.js +2942 -0
  49. package/js/src/woo.d.ts +1 -0
  50. package/js/src/woo.js +29 -21
  51. package/package.json +1 -1
package/js/src/phemex.js CHANGED
@@ -2944,14 +2944,41 @@ export default class phemex extends Exchange {
2944
2944
  let response = undefined;
2945
2945
  if (market['settle'] === 'USDT') {
2946
2946
  response = await this.privateDeleteGOrdersAll(this.extend(request, params));
2947
+ //
2948
+ // {
2949
+ // code: '0',
2950
+ // msg: '',
2951
+ // data: '1'
2952
+ // }
2953
+ //
2947
2954
  }
2948
2955
  else if (market['swap']) {
2949
2956
  response = await this.privateDeleteOrdersAll(this.extend(request, params));
2957
+ //
2958
+ // {
2959
+ // code: '0',
2960
+ // msg: '',
2961
+ // data: '1'
2962
+ // }
2963
+ //
2950
2964
  }
2951
2965
  else {
2952
2966
  response = await this.privateDeleteSpotOrdersAll(this.extend(request, params));
2967
+ //
2968
+ // {
2969
+ // code: '0',
2970
+ // msg: '',
2971
+ // data: {
2972
+ // total: '1'
2973
+ // }
2974
+ // }
2975
+ //
2953
2976
  }
2954
- return response;
2977
+ return [
2978
+ this.safeOrder({
2979
+ 'info': response,
2980
+ }),
2981
+ ];
2955
2982
  }
2956
2983
  async fetchOrder(id, symbol = undefined, params = {}) {
2957
2984
  /**
@@ -1291,7 +1291,8 @@ export default class poloniex extends Exchange {
1291
1291
  // }
1292
1292
  //
1293
1293
  response = this.extend(response, {
1294
- 'type': side,
1294
+ 'type': type,
1295
+ 'side': side,
1295
1296
  });
1296
1297
  return this.parseOrder(response, market);
1297
1298
  }
@@ -3733,7 +3733,7 @@ export default class binance extends binanceRest {
3733
3733
  rejected = true;
3734
3734
  // private endpoint uses id as messageHash
3735
3735
  client.reject(e, id);
3736
- // public endpoint stores messageHash in subscriptios
3736
+ // public endpoint stores messageHash in subscriptions
3737
3737
  const subscriptionKeys = Object.keys(client.subscriptions);
3738
3738
  for (let i = 0; i < subscriptionKeys.length; i++) {
3739
3739
  const subscriptionHash = subscriptionKeys[i];
@@ -4,7 +4,7 @@ import Client from '../base/ws/Client.js';
4
4
  export default class bybit extends bybitRest {
5
5
  describe(): any;
6
6
  requestId(): any;
7
- getUrlByMarketType(symbol?: Str, isPrivate?: boolean, method?: Str, params?: {}): any;
7
+ getUrlByMarketType(symbol?: Str, isPrivate?: boolean, method?: Str, params?: {}): Promise<any>;
8
8
  cleanParams(params: any): any;
9
9
  createOrderWs(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
10
10
  editOrderWs(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
@@ -135,7 +135,7 @@ export default class bybit extends bybitRest {
135
135
  this.options['requestId'] = requestId;
136
136
  return requestId;
137
137
  }
138
- getUrlByMarketType(symbol = undefined, isPrivate = false, method = undefined, params = {}) {
138
+ async getUrlByMarketType(symbol = undefined, isPrivate = false, method = undefined, params = {}) {
139
139
  const accessibility = isPrivate ? 'private' : 'public';
140
140
  let isUsdcSettled = undefined;
141
141
  let isSpot = undefined;
@@ -155,7 +155,15 @@ export default class bybit extends bybitRest {
155
155
  }
156
156
  isSpot = (type === 'spot');
157
157
  if (isPrivate) {
158
- url = (isUsdcSettled) ? url[accessibility]['usdc'] : url[accessibility]['contract'];
158
+ const unified = await this.isUnifiedEnabled();
159
+ const isUnifiedMargin = this.safeBool(unified, 0, false);
160
+ const isUnifiedAccount = this.safeBool(unified, 1, false);
161
+ if (isUsdcSettled && !isUnifiedMargin && !isUnifiedAccount) {
162
+ url = url[accessibility]['usdc'];
163
+ }
164
+ else {
165
+ url = url[accessibility]['contract'];
166
+ }
159
167
  }
160
168
  else {
161
169
  if (isSpot) {
@@ -322,7 +330,7 @@ export default class bybit extends bybitRest {
322
330
  const market = this.market(symbol);
323
331
  symbol = market['symbol'];
324
332
  const messageHash = 'ticker:' + symbol;
325
- const url = this.getUrlByMarketType(symbol, false, 'watchTicker', params);
333
+ const url = await this.getUrlByMarketType(symbol, false, 'watchTicker', params);
326
334
  params = this.cleanParams(params);
327
335
  const options = this.safeValue(this.options, 'watchTicker', {});
328
336
  let topic = this.safeString(options, 'name', 'tickers');
@@ -347,7 +355,7 @@ export default class bybit extends bybitRest {
347
355
  await this.loadMarkets();
348
356
  symbols = this.marketSymbols(symbols, undefined, false);
349
357
  const messageHashes = [];
350
- const url = this.getUrlByMarketType(symbols[0], false, 'watchTickers', params);
358
+ const url = await this.getUrlByMarketType(symbols[0], false, 'watchTickers', params);
351
359
  params = this.cleanParams(params);
352
360
  const options = this.safeValue(this.options, 'watchTickers', {});
353
361
  const topic = this.safeString(options, 'name', 'tickers');
@@ -528,7 +536,7 @@ export default class bybit extends bybitRest {
528
536
  await this.loadMarkets();
529
537
  const market = this.market(symbol);
530
538
  symbol = market['symbol'];
531
- const url = this.getUrlByMarketType(symbol, false, 'watchOHLCV', params);
539
+ const url = await this.getUrlByMarketType(symbol, false, 'watchOHLCV', params);
532
540
  params = this.cleanParams(params);
533
541
  let ohlcv = undefined;
534
542
  const timeframeId = this.safeString(this.timeframes, timeframe, timeframe);
@@ -646,7 +654,7 @@ export default class bybit extends bybitRest {
646
654
  throw new ArgumentsRequired(this.id + ' watchOrderBookForSymbols() requires a non-empty array of symbols');
647
655
  }
648
656
  symbols = this.marketSymbols(symbols);
649
- const url = this.getUrlByMarketType(symbols[0], false, 'watchOrderBook', params);
657
+ const url = await this.getUrlByMarketType(symbols[0], false, 'watchOrderBook', params);
650
658
  params = this.cleanParams(params);
651
659
  const market = this.market(symbols[0]);
652
660
  if (limit === undefined) {
@@ -778,7 +786,7 @@ export default class bybit extends bybitRest {
778
786
  throw new ArgumentsRequired(this.id + ' watchTradesForSymbols() requires a non-empty array of symbols');
779
787
  }
780
788
  params = this.cleanParams(params);
781
- const url = this.getUrlByMarketType(symbols[0], false, 'watchTrades', params);
789
+ const url = await this.getUrlByMarketType(symbols[0], false, 'watchTrades', params);
782
790
  const topics = [];
783
791
  const messageHashes = [];
784
792
  for (let i = 0; i < symbols.length; i++) {
@@ -941,7 +949,7 @@ export default class bybit extends bybitRest {
941
949
  symbol = this.symbol(symbol);
942
950
  messageHash += ':' + symbol;
943
951
  }
944
- const url = this.getUrlByMarketType(symbol, true, method, params);
952
+ const url = await this.getUrlByMarketType(symbol, true, method, params);
945
953
  await this.authenticate(url);
946
954
  const topicByMarket = {
947
955
  'spot': 'ticketInfo',
@@ -1070,7 +1078,7 @@ export default class bybit extends bybitRest {
1070
1078
  messageHash = '::' + symbols.join(',');
1071
1079
  }
1072
1080
  const firstSymbol = this.safeString(symbols, 0);
1073
- const url = this.getUrlByMarketType(firstSymbol, true, method, params);
1081
+ const url = await this.getUrlByMarketType(firstSymbol, true, method, params);
1074
1082
  messageHash = 'positions' + messageHash;
1075
1083
  const client = this.client(url);
1076
1084
  await this.authenticate(url);
@@ -1221,7 +1229,7 @@ export default class bybit extends bybitRest {
1221
1229
  await this.loadMarkets();
1222
1230
  const market = this.market(symbol);
1223
1231
  symbol = market['symbol'];
1224
- const url = this.getUrlByMarketType(symbol, false, 'watchLiquidations', params);
1232
+ const url = await this.getUrlByMarketType(symbol, false, 'watchLiquidations', params);
1225
1233
  params = this.cleanParams(params);
1226
1234
  const messageHash = 'liquidations::' + symbol;
1227
1235
  const topic = 'liquidation.' + market['id'];
@@ -1305,7 +1313,7 @@ export default class bybit extends bybitRest {
1305
1313
  symbol = this.symbol(symbol);
1306
1314
  messageHash += ':' + symbol;
1307
1315
  }
1308
- const url = this.getUrlByMarketType(symbol, true, method, params);
1316
+ const url = await this.getUrlByMarketType(symbol, true, method, params);
1309
1317
  await this.authenticate(url);
1310
1318
  const topicsByMarket = {
1311
1319
  'spot': ['order', 'stopOrder'],
@@ -1617,7 +1625,7 @@ export default class bybit extends bybitRest {
1617
1625
  const unified = await this.isUnifiedEnabled();
1618
1626
  const isUnifiedMargin = this.safeBool(unified, 0, false);
1619
1627
  const isUnifiedAccount = this.safeBool(unified, 1, false);
1620
- const url = this.getUrlByMarketType(undefined, true, method, params);
1628
+ const url = await this.getUrlByMarketType(undefined, true, method, params);
1621
1629
  await this.authenticate(url);
1622
1630
  const topicByMarket = {
1623
1631
  'spot': 'outboundAccountInfo',
@@ -159,6 +159,7 @@ export default class kucoin extends kucoinRest {
159
159
  * @method
160
160
  * @name kucoin#watchTicker
161
161
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
162
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/market-snapshot
162
163
  * @param {string} symbol unified symbol of the market to fetch the ticker for
163
164
  * @param {object} [params] extra parameters specific to the exchange API endpoint
164
165
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -391,6 +392,7 @@ export default class kucoin extends kucoinRest {
391
392
  * @method
392
393
  * @name kucoin#watchOHLCV
393
394
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
395
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/klines
394
396
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
395
397
  * @param {string} timeframe the length of time each candle represents
396
398
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -459,6 +461,7 @@ export default class kucoin extends kucoinRest {
459
461
  * @method
460
462
  * @name kucoin#watchTrades
461
463
  * @description get the list of most recent trades for a particular symbol
464
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/match-execution-data
462
465
  * @param {string} symbol unified symbol of the market to fetch trades for
463
466
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
464
467
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -472,6 +475,7 @@ export default class kucoin extends kucoinRest {
472
475
  * @method
473
476
  * @name kucoin#watchTrades
474
477
  * @description get the list of most recent trades for a particular symbol
478
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/match-execution-data
475
479
  * @param {string} symbol unified symbol of the market to fetch trades for
476
480
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
477
481
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -806,6 +810,8 @@ export default class kucoin extends kucoinRest {
806
810
  * @method
807
811
  * @name kucoin#watchOrders
808
812
  * @description watches information on multiple orders made by the user
813
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/private-order-change
814
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/stop-order-event
809
815
  * @param {string} symbol unified market symbol of the market orders were made in
810
816
  * @param {int} [since] the earliest time in ms to fetch orders for
811
817
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -942,6 +948,10 @@ export default class kucoin extends kucoinRest {
942
948
  //
943
949
  const messageHash = 'orders';
944
950
  const data = this.safeValue(message, 'data');
951
+ const tradeId = this.safeString(data, 'tradeId');
952
+ if (tradeId !== undefined) {
953
+ this.handleMyTrade(client, message);
954
+ }
945
955
  const parsed = this.parseWsOrder(data);
946
956
  const symbol = this.safeString(parsed, 'symbol');
947
957
  const orderId = this.safeString(parsed, 'id');
@@ -971,6 +981,7 @@ export default class kucoin extends kucoinRest {
971
981
  * @method
972
982
  * @name kucoin#watchMyTrades
973
983
  * @description watches information on multiple trades made by the user
984
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/private-order-change
974
985
  * @param {string} symbol unified market symbol of the market trades were made in
975
986
  * @param {int} [since] the earliest time in ms to fetch trades for
976
987
  * @param {int} [limit] the maximum number of trade structures to retrieve
@@ -979,7 +990,7 @@ export default class kucoin extends kucoinRest {
979
990
  */
980
991
  await this.loadMarkets();
981
992
  const url = await this.negotiate(true);
982
- const topic = '/spot/tradeFills';
993
+ const topic = '/spotMarket/tradeOrders';
983
994
  const request = {
984
995
  'privateChannel': true,
985
996
  };
@@ -996,6 +1007,34 @@ export default class kucoin extends kucoinRest {
996
1007
  return this.filterBySymbolSinceLimit(trades, symbol, since, limit, true);
997
1008
  }
998
1009
  handleMyTrade(client, message) {
1010
+ //
1011
+ // {
1012
+ // "type": "message",
1013
+ // "topic": "/spotMarket/tradeOrders",
1014
+ // "subject": "orderChange",
1015
+ // "channelType": "private",
1016
+ // "data": {
1017
+ // "symbol": "KCS-USDT",
1018
+ // "orderType": "limit",
1019
+ // "side": "sell",
1020
+ // "orderId": "5efab07953bdea00089965fa",
1021
+ // "liquidity": "taker",
1022
+ // "type": "match",
1023
+ // "feeType": "takerFee",
1024
+ // "orderTime": 1670329987026,
1025
+ // "size": "0.1",
1026
+ // "filledSize": "0.1",
1027
+ // "price": "0.938",
1028
+ // "matchPrice": "0.96738",
1029
+ // "matchSize": "0.1",
1030
+ // "tradeId": "5efab07a4ee4c7000a82d6d9",
1031
+ // "clientOid": "1593487481000313",
1032
+ // "remainSize": "0",
1033
+ // "status": "match",
1034
+ // "ts": 1670329987311000000
1035
+ // }
1036
+ // }
1037
+ //
999
1038
  if (this.myTrades === undefined) {
1000
1039
  const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
1001
1040
  this.myTrades = new ArrayCacheBySymbolById(limit);
@@ -1010,19 +1049,26 @@ export default class kucoin extends kucoinRest {
1010
1049
  }
1011
1050
  parseWsTrade(trade, market = undefined) {
1012
1051
  //
1013
- // {
1014
- // "fee": 0.00262148,
1015
- // "feeCurrency": "USDT",
1016
- // "feeRate": 0.001,
1017
- // "orderId": "62417436b29df8000183df2f",
1018
- // "orderType": "market",
1019
- // "price": 131.074,
1020
- // "side": "sell",
1021
- // "size": 0.02,
1022
- // "symbol": "LTC-USDT",
1023
- // "time": "1648456758734571745",
1024
- // "tradeId": "624174362e113d2f467b3043"
1025
- // }
1052
+ // {
1053
+ // "symbol": "KCS-USDT",
1054
+ // "orderType": "limit",
1055
+ // "side": "sell",
1056
+ // "orderId": "5efab07953bdea00089965fa",
1057
+ // "liquidity": "taker",
1058
+ // "type": "match",
1059
+ // "feeType": "takerFee",
1060
+ // "orderTime": 1670329987026,
1061
+ // "size": "0.1",
1062
+ // "filledSize": "0.1",
1063
+ // "price": "0.938",
1064
+ // "matchPrice": "0.96738",
1065
+ // "matchSize": "0.1",
1066
+ // "tradeId": "5efab07a4ee4c7000a82d6d9",
1067
+ // "clientOid": "1593487481000313",
1068
+ // "remainSize": "0",
1069
+ // "status": "match",
1070
+ // "ts": 1670329987311000000
1071
+ // }
1026
1072
  //
1027
1073
  const marketId = this.safeString(trade, 'symbol');
1028
1074
  market = this.safeMarket(marketId, market, '-');
@@ -1033,15 +1079,7 @@ export default class kucoin extends kucoinRest {
1033
1079
  const price = this.safeString(trade, 'price');
1034
1080
  const amount = this.safeString(trade, 'size');
1035
1081
  const order = this.safeString(trade, 'orderId');
1036
- const timestamp = this.safeIntegerProduct(trade, 'time', 0.000001);
1037
- const feeCurrency = market['quote'];
1038
- const feeRate = this.safeString(trade, 'feeRate');
1039
- const feeCost = this.safeString(trade, 'fee');
1040
- const fee = {
1041
- 'cost': feeCost,
1042
- 'rate': feeRate,
1043
- 'currency': feeCurrency,
1044
- };
1082
+ const timestamp = this.safeIntegerProduct(trade, 'ts', 0.000001);
1045
1083
  return this.safeTrade({
1046
1084
  'info': trade,
1047
1085
  'timestamp': timestamp,
@@ -1050,12 +1088,12 @@ export default class kucoin extends kucoinRest {
1050
1088
  'id': tradeId,
1051
1089
  'order': order,
1052
1090
  'type': type,
1053
- 'takerOrMaker': undefined,
1091
+ 'takerOrMaker': this.safeString(trade, 'liquidity'),
1054
1092
  'side': side,
1055
1093
  'price': price,
1056
1094
  'amount': amount,
1057
1095
  'cost': undefined,
1058
- 'fee': fee,
1096
+ 'fee': undefined,
1059
1097
  }, market);
1060
1098
  }
1061
1099
  async watchBalance(params = {}) {
@@ -1063,6 +1101,7 @@ export default class kucoin extends kucoinRest {
1063
1101
  * @method
1064
1102
  * @name kucoin#watchBalance
1065
1103
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
1104
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/account-balance-change
1066
1105
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1067
1106
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1068
1107
  */
@@ -1161,7 +1200,6 @@ export default class kucoin extends kucoinRest {
1161
1200
  'trade.l3match': this.handleTrade,
1162
1201
  'trade.candles.update': this.handleOHLCV,
1163
1202
  'account.balance': this.handleBalance,
1164
- '/spot/tradeFills': this.handleMyTrade,
1165
1203
  'orderChange': this.handleOrder,
1166
1204
  'stopOrder': this.handleOrder,
1167
1205
  };
@@ -47,7 +47,6 @@ export default class probit extends probitRest {
47
47
  },
48
48
  },
49
49
  'streaming': {},
50
- 'exceptions': {},
51
50
  });
52
51
  }
53
52
  async watchBalance(params = {}) {
@@ -496,8 +495,14 @@ export default class probit extends probitRest {
496
495
  const code = this.safeString(message, 'errorCode');
497
496
  const errMessage = this.safeString(message, 'message', '');
498
497
  const details = this.safeValue(message, 'details');
499
- // todo - throw properly here
500
- throw new ExchangeError(this.id + ' ' + code + ' ' + errMessage + ' ' + this.json(details));
498
+ const feedback = this.id + ' ' + code + ' ' + errMessage + ' ' + this.json(details);
499
+ if ('exact' in this.exceptions) {
500
+ this.throwExactlyMatchedException(this.exceptions['exact'], code, feedback);
501
+ }
502
+ if ('broad' in this.exceptions) {
503
+ this.throwBroadlyMatchedException(this.exceptions['broad'], errMessage, feedback);
504
+ }
505
+ throw new ExchangeError(feedback);
501
506
  }
502
507
  handleAuthenticate(client, message) {
503
508
  //
@@ -0,0 +1,39 @@
1
+ import vertexRest from '../vertex.js';
2
+ import type { Int, Str, Strings, OrderBook, Order, Trade, Ticker, Market, Position } from '../base/types.js';
3
+ import Client from '../base/ws/Client.js';
4
+ export default class vertex extends vertexRest {
5
+ describe(): any;
6
+ requestId(url: any): any;
7
+ watchPublic(messageHash: any, message: any): Promise<any>;
8
+ watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
9
+ handleTrade(client: Client, message: any): void;
10
+ watchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
11
+ handleMyTrades(client: Client, message: any): void;
12
+ parseWsTrade(trade: any, market?: any): Trade;
13
+ watchTicker(symbol: string, params?: {}): Promise<Ticker>;
14
+ parseWsTicker(ticker: any, market?: any): Ticker;
15
+ handleTicker(client: Client, message: any): any;
16
+ watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
17
+ handleOrderBookSubscription(client: Client, message: any, subscription: any): void;
18
+ fetchOrderBookSnapshot(client: any, message: any, subscription: any): Promise<void>;
19
+ handleOrderBook(client: Client, message: any): void;
20
+ handleOrderBookMessage(client: Client, message: any, orderbook: any): any;
21
+ handleDelta(bookside: any, delta: any): void;
22
+ handleDeltas(bookside: any, deltas: any): void;
23
+ handleSubscriptionStatus(client: Client, message: any): any;
24
+ watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
25
+ setPositionsCache(client: Client, symbols?: Strings, params?: {}): void;
26
+ loadPositionsSnapshot(client: any, messageHash: any, symbols: any, params: any): Promise<void>;
27
+ handlePositions(client: any, message: any): void;
28
+ parseWsPosition(position: any, market?: any): Position;
29
+ handleAuth(client: Client, message: any): void;
30
+ buildWsAuthenticationSig(message: any, chainId: any, verifyingContractAddress: any): string;
31
+ authenticate(params?: {}): Promise<any>;
32
+ watchPrivate(messageHash: any, message: any, params?: {}): Promise<any>;
33
+ watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
34
+ parseWsOrderStatus(status: any): any;
35
+ parseWsOrder(order: any, market?: Market): Order;
36
+ handleOrderUpdate(client: Client, message: any): void;
37
+ handleErrorMessage(client: Client, message: any): boolean;
38
+ handleMessage(client: Client, message: any): void;
39
+ }