infoway-sdk 0.1.0

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/dist/index.js ADDED
@@ -0,0 +1,615 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ BasicClient: () => BasicClient,
34
+ Business: () => Business,
35
+ CommonClient: () => CommonClient,
36
+ CryptoClient: () => CryptoClient,
37
+ HttpClient: () => HttpClient,
38
+ IndiaClient: () => IndiaClient,
39
+ InfowayAPIError: () => InfowayAPIError,
40
+ InfowayAuthError: () => InfowayAuthError,
41
+ InfowayClient: () => InfowayClient,
42
+ InfowayTimeoutError: () => InfowayTimeoutError,
43
+ InfowayWebSocket: () => InfowayWebSocket,
44
+ JapanClient: () => JapanClient,
45
+ KlineType: () => KlineType,
46
+ MarketClient: () => MarketClient,
47
+ PlateClient: () => PlateClient,
48
+ StockClient: () => StockClient,
49
+ StockInfoClient: () => StockInfoClient,
50
+ WsCode: () => WsCode
51
+ });
52
+ module.exports = __toCommonJS(index_exports);
53
+
54
+ // src/errors.ts
55
+ var InfowayTimeoutError = class extends Error {
56
+ constructor(message = "Request timed out") {
57
+ super(message);
58
+ this.name = "InfowayTimeoutError";
59
+ }
60
+ };
61
+ var InfowayAPIError = class extends Error {
62
+ ret;
63
+ msg;
64
+ traceId;
65
+ constructor(ret, msg, traceId) {
66
+ const suffix = traceId ? ` (trace: ${traceId})` : "";
67
+ super(`[${ret}] ${msg}${suffix}`);
68
+ this.name = "InfowayAPIError";
69
+ this.ret = ret;
70
+ this.msg = msg;
71
+ this.traceId = traceId;
72
+ }
73
+ };
74
+ var InfowayAuthError = class extends InfowayAPIError {
75
+ constructor(msg = "Unauthorized") {
76
+ super(401, msg);
77
+ this.name = "InfowayAuthError";
78
+ }
79
+ };
80
+
81
+ // src/http.ts
82
+ var DEFAULT_BASE_URL = "https://data.infoway.io";
83
+ var DEFAULT_TIMEOUT = 15e3;
84
+ var DEFAULT_RETRIES = 3;
85
+ var HttpClient = class {
86
+ _apiKey;
87
+ _baseUrl;
88
+ _timeout;
89
+ _maxRetries;
90
+ constructor(options = {}) {
91
+ this._apiKey = options.apiKey || process.env.INFOWAY_API_KEY || "";
92
+ this._baseUrl = (options.baseUrl || DEFAULT_BASE_URL).replace(/\/+$/, "");
93
+ this._timeout = options.timeout ?? DEFAULT_TIMEOUT;
94
+ this._maxRetries = options.maxRetries ?? DEFAULT_RETRIES;
95
+ }
96
+ /** Expose apiKey for testing. */
97
+ get apiKey() {
98
+ return this._apiKey;
99
+ }
100
+ async get(path, params) {
101
+ const url = this._buildUrl(path, params);
102
+ return this._request("GET", url);
103
+ }
104
+ async post(path, body) {
105
+ const url = this._buildUrl(path);
106
+ return this._request("POST", url, body);
107
+ }
108
+ _buildUrl(path, params) {
109
+ const url = new URL(path, this._baseUrl);
110
+ if (params) {
111
+ for (const [key, value] of Object.entries(params)) {
112
+ if (value !== void 0 && value !== null) {
113
+ url.searchParams.set(key, String(value));
114
+ }
115
+ }
116
+ }
117
+ return url.toString();
118
+ }
119
+ async _request(method, url, body) {
120
+ let lastError;
121
+ for (let attempt = 0; attempt < this._maxRetries; attempt++) {
122
+ try {
123
+ const controller = new AbortController();
124
+ const timeoutId = setTimeout(() => controller.abort(), this._timeout);
125
+ const headers = {
126
+ apiKey: this._apiKey
127
+ };
128
+ const init = {
129
+ method,
130
+ headers,
131
+ signal: controller.signal
132
+ };
133
+ if (body) {
134
+ headers["Content-Type"] = "application/json";
135
+ init.body = JSON.stringify(body);
136
+ }
137
+ const resp = await fetch(url, init);
138
+ clearTimeout(timeoutId);
139
+ return this._handleResponse(resp);
140
+ } catch (error) {
141
+ if (error instanceof InfowayAPIError || error instanceof InfowayAuthError) {
142
+ throw error;
143
+ }
144
+ if (error instanceof DOMException && error.name === "AbortError") {
145
+ lastError = new InfowayTimeoutError(`Request to ${url} timed out`);
146
+ } else {
147
+ lastError = error instanceof Error ? error : new Error(String(error));
148
+ }
149
+ if (attempt < this._maxRetries - 1) {
150
+ await this._sleep(Math.min(2 ** attempt * 1e3, 8e3));
151
+ }
152
+ }
153
+ }
154
+ throw lastError;
155
+ }
156
+ async _handleResponse(resp) {
157
+ if (resp.status === 401) {
158
+ throw new InfowayAuthError();
159
+ }
160
+ const data = await resp.json();
161
+ const ret = data.ret ?? data.code ?? 200;
162
+ const msg = data.msg ?? "";
163
+ const traceId = data.traceId;
164
+ if (ret === 401) {
165
+ throw new InfowayAuthError(msg);
166
+ }
167
+ if (ret !== 200) {
168
+ throw new InfowayAPIError(ret, msg, traceId);
169
+ }
170
+ return data.data;
171
+ }
172
+ _sleep(ms) {
173
+ return new Promise((resolve) => setTimeout(resolve, ms));
174
+ }
175
+ };
176
+
177
+ // src/rest/market-data.ts
178
+ var MarketDataClient = class {
179
+ _http;
180
+ constructor(http) {
181
+ this._http = http;
182
+ }
183
+ /**
184
+ * Get real-time trade data.
185
+ * @param codes - Comma-separated symbol codes (e.g. "AAPL.US" or "AAPL.US,TSLA.US")
186
+ */
187
+ async getTrade(codes) {
188
+ return this._http.get(`/${this._prefix}/batch_trade/${codes}`);
189
+ }
190
+ /**
191
+ * Get real-time order book depth.
192
+ * @param codes - Comma-separated symbol codes
193
+ */
194
+ async getDepth(codes) {
195
+ return this._http.get(`/${this._prefix}/batch_depth/${codes}`);
196
+ }
197
+ /**
198
+ * Get candlestick/K-line data.
199
+ * @param codes - Comma-separated symbol codes
200
+ * @param klineType - K-line interval (use KlineType enum or number 1-12)
201
+ * @param count - Number of candles to return
202
+ */
203
+ async getKline(codes, klineType, count) {
204
+ return this._http.post(`/${this._prefix}/v2/batch_kline`, {
205
+ codes,
206
+ klineType,
207
+ klineCount: count
208
+ });
209
+ }
210
+ };
211
+
212
+ // src/rest/stock.ts
213
+ var StockClient = class extends MarketDataClient {
214
+ _prefix = "stock";
215
+ };
216
+
217
+ // src/rest/crypto.ts
218
+ var CryptoClient = class extends MarketDataClient {
219
+ _prefix = "crypto";
220
+ };
221
+
222
+ // src/rest/japan.ts
223
+ var JapanClient = class extends MarketDataClient {
224
+ _prefix = "japan";
225
+ };
226
+
227
+ // src/rest/india.ts
228
+ var IndiaClient = class extends MarketDataClient {
229
+ _prefix = "india";
230
+ };
231
+
232
+ // src/rest/common.ts
233
+ var CommonClient = class extends MarketDataClient {
234
+ _prefix = "common";
235
+ };
236
+
237
+ // src/rest/basic.ts
238
+ var BasicClient = class {
239
+ _http;
240
+ constructor(http) {
241
+ this._http = http;
242
+ }
243
+ async getSymbols(market) {
244
+ return this._http.get("/common/basic/symbols", market ? { market } : void 0);
245
+ }
246
+ async getSymbolInfo(codes) {
247
+ return this._http.get("/common/basic/symbols/info", { codes });
248
+ }
249
+ async getAdjustmentFactors(codes) {
250
+ return this._http.get("/common/basic/symbols/adjustment_factors", { codes });
251
+ }
252
+ async getTradingDays(market) {
253
+ return this._http.get("/common/basic/markets/trading_days", { market });
254
+ }
255
+ async getTradingHours(market) {
256
+ return this._http.get("/common/basic/markets", market ? { market } : void 0);
257
+ }
258
+ };
259
+
260
+ // src/rest/market.ts
261
+ var MarketClient = class {
262
+ _http;
263
+ constructor(http) {
264
+ this._http = http;
265
+ }
266
+ async getTemperature(market = "HK,US,CN,SG") {
267
+ return this._http.get("/common/v2/basic/market/temperature", { market });
268
+ }
269
+ async getBreadth(market) {
270
+ return this._http.get(`/common/v2/basic/market/breadth/${market}`);
271
+ }
272
+ async getIndexes() {
273
+ return this._http.get("/common/v2/basic/market/indexes");
274
+ }
275
+ async getLeaders(market, limit = 10) {
276
+ return this._http.get(`/common/v2/basic/market/leaders/${market}`, { limit });
277
+ }
278
+ async getRankConfig(market) {
279
+ return this._http.get(`/common/v2/basic/market/rank-config/${market}`);
280
+ }
281
+ };
282
+
283
+ // src/rest/plate.ts
284
+ var PlateClient = class {
285
+ _http;
286
+ constructor(http) {
287
+ this._http = http;
288
+ }
289
+ async getIndustry(market, limit = 200) {
290
+ return this._http.get(`/common/v2/basic/plate/industry/${market}`, { limit });
291
+ }
292
+ async getConcept(market, limit = 100) {
293
+ return this._http.get(`/common/v2/basic/plate/concept/${market}`, { limit });
294
+ }
295
+ async getMembers(plateSymbol, offset = 0, limit = 50) {
296
+ return this._http.get(`/common/v2/basic/plate/members/${plateSymbol}`, { offset, limit });
297
+ }
298
+ async getIntro(plateSymbol) {
299
+ return this._http.get(`/common/v2/basic/plate/intro/${plateSymbol}`);
300
+ }
301
+ async getChart(market, limit = 50) {
302
+ return this._http.get(`/common/v2/basic/plate/chart/${market}`, { limit });
303
+ }
304
+ };
305
+
306
+ // src/rest/stock-info.ts
307
+ var StockInfoClient = class {
308
+ _http;
309
+ constructor(http) {
310
+ this._http = http;
311
+ }
312
+ async getValuation(symbol) {
313
+ return this._http.get(`/common/v2/basic/stock/valuation/${symbol}`);
314
+ }
315
+ async getRatings(symbol) {
316
+ return this._http.get(`/common/v2/basic/stock/ratings/${symbol}`);
317
+ }
318
+ async getCompany(symbol) {
319
+ return this._http.get(`/common/v2/basic/stock/company/${symbol}`);
320
+ }
321
+ async getPanorama(symbol) {
322
+ return this._http.get(`/common/v2/basic/stock/panorama/${symbol}`);
323
+ }
324
+ async getConcepts(symbol) {
325
+ return this._http.get(`/common/v2/basic/stock/concepts/${symbol}`);
326
+ }
327
+ async getEvents(symbol, limit = 20) {
328
+ return this._http.get(`/common/v2/basic/stock/events/${symbol}`, { limit });
329
+ }
330
+ async getDrivers(symbol) {
331
+ return this._http.get(`/common/v2/basic/stock/drivers/${symbol}`);
332
+ }
333
+ };
334
+
335
+ // src/client.ts
336
+ var InfowayClient = class {
337
+ /** @internal */
338
+ _http;
339
+ stock;
340
+ crypto;
341
+ japan;
342
+ india;
343
+ common;
344
+ basic;
345
+ market;
346
+ plate;
347
+ stockInfo;
348
+ constructor(options = {}) {
349
+ this._http = new HttpClient({
350
+ apiKey: options.apiKey,
351
+ baseUrl: options.baseUrl,
352
+ timeout: options.timeout,
353
+ maxRetries: options.maxRetries
354
+ });
355
+ this.stock = new StockClient(this._http);
356
+ this.crypto = new CryptoClient(this._http);
357
+ this.japan = new JapanClient(this._http);
358
+ this.india = new IndiaClient(this._http);
359
+ this.common = new CommonClient(this._http);
360
+ this.basic = new BasicClient(this._http);
361
+ this.market = new MarketClient(this._http);
362
+ this.plate = new PlateClient(this._http);
363
+ this.stockInfo = new StockInfoClient(this._http);
364
+ }
365
+ };
366
+
367
+ // src/ws/client.ts
368
+ var import_ws = __toESM(require("ws"));
369
+ var import_node_crypto = require("crypto");
370
+
371
+ // src/types.ts
372
+ var KlineType = /* @__PURE__ */ ((KlineType2) => {
373
+ KlineType2[KlineType2["MIN_1"] = 1] = "MIN_1";
374
+ KlineType2[KlineType2["MIN_5"] = 2] = "MIN_5";
375
+ KlineType2[KlineType2["MIN_15"] = 3] = "MIN_15";
376
+ KlineType2[KlineType2["MIN_30"] = 4] = "MIN_30";
377
+ KlineType2[KlineType2["HOUR_1"] = 5] = "HOUR_1";
378
+ KlineType2[KlineType2["HOUR_2"] = 6] = "HOUR_2";
379
+ KlineType2[KlineType2["HOUR_4"] = 7] = "HOUR_4";
380
+ KlineType2[KlineType2["DAY"] = 8] = "DAY";
381
+ KlineType2[KlineType2["WEEK"] = 9] = "WEEK";
382
+ KlineType2[KlineType2["MONTH"] = 10] = "MONTH";
383
+ KlineType2[KlineType2["QUARTER"] = 11] = "QUARTER";
384
+ KlineType2[KlineType2["YEAR"] = 12] = "YEAR";
385
+ return KlineType2;
386
+ })(KlineType || {});
387
+ var Business = {
388
+ STOCK: "stock",
389
+ JAPAN: "japan",
390
+ INDIA: "india",
391
+ CRYPTO: "crypto",
392
+ COMMON: "common"
393
+ };
394
+ var WsCode = /* @__PURE__ */ ((WsCode2) => {
395
+ WsCode2[WsCode2["SUB_TRADE"] = 1e4] = "SUB_TRADE";
396
+ WsCode2[WsCode2["PUSH_TRADE"] = 10001] = "PUSH_TRADE";
397
+ WsCode2[WsCode2["UNSUB_TRADE"] = 10002] = "UNSUB_TRADE";
398
+ WsCode2[WsCode2["SUB_DEPTH"] = 10003] = "SUB_DEPTH";
399
+ WsCode2[WsCode2["PUSH_DEPTH"] = 10004] = "PUSH_DEPTH";
400
+ WsCode2[WsCode2["UNSUB_DEPTH"] = 10005] = "UNSUB_DEPTH";
401
+ WsCode2[WsCode2["SUB_KLINE"] = 10006] = "SUB_KLINE";
402
+ WsCode2[WsCode2["PUSH_KLINE"] = 10007] = "PUSH_KLINE";
403
+ WsCode2[WsCode2["UNSUB_KLINE"] = 10008] = "UNSUB_KLINE";
404
+ WsCode2[WsCode2["HEARTBEAT"] = 10010] = "HEARTBEAT";
405
+ return WsCode2;
406
+ })(WsCode || {});
407
+
408
+ // src/ws/client.ts
409
+ var BASE_WS_URL = "wss://data.infoway.io/ws";
410
+ var HEARTBEAT_INTERVAL = 3e4;
411
+ var INITIAL_BACKOFF = 1e3;
412
+ var MAX_BACKOFF = 3e4;
413
+ var InfowayWebSocket = class {
414
+ /** @internal */
415
+ _url;
416
+ _maxReconnect;
417
+ _ws = null;
418
+ /** @internal */
419
+ _subscriptions = /* @__PURE__ */ new Set();
420
+ _running = false;
421
+ _backoff = INITIAL_BACKOFF;
422
+ _heartbeatTimer = null;
423
+ /** Called when a trade push message is received. */
424
+ onTrade = null;
425
+ /** Called when a depth push message is received. */
426
+ onDepth = null;
427
+ /** Called when a kline push message is received. */
428
+ onKline = null;
429
+ /** Called when an error occurs. */
430
+ onError = null;
431
+ /** Called after a successful reconnection. */
432
+ onReconnect = null;
433
+ /** Called when the connection is lost. */
434
+ onDisconnect = null;
435
+ constructor(options) {
436
+ const baseUrl = options.baseUrl || BASE_WS_URL;
437
+ this._url = `${baseUrl}?business=${options.business}&apikey=${options.apiKey}`;
438
+ this._maxReconnect = options.maxReconnectAttempts;
439
+ }
440
+ /**
441
+ * Build a WebSocket message JSON string.
442
+ * @internal
443
+ */
444
+ _buildMessage(code, codes) {
445
+ const msg = {
446
+ code: Number(code),
447
+ trace: (0, import_node_crypto.randomBytes)(6).toString("hex")
448
+ };
449
+ if (codes !== void 0) {
450
+ msg.data = { codes };
451
+ }
452
+ return JSON.stringify(msg);
453
+ }
454
+ /**
455
+ * Connect and start listening. Returns a Promise that resolves
456
+ * when the connection is closed intentionally or max reconnects exceeded.
457
+ */
458
+ async connect() {
459
+ this._running = true;
460
+ let attempt = 0;
461
+ while (this._running) {
462
+ try {
463
+ await this._connectOnce();
464
+ if (!this._running) break;
465
+ } catch (err) {
466
+ if (!this._running) break;
467
+ attempt++;
468
+ if (this._maxReconnect !== void 0 && attempt > this._maxReconnect) {
469
+ break;
470
+ }
471
+ if (this.onDisconnect) this.onDisconnect();
472
+ await this._sleep(this._backoff);
473
+ this._backoff = Math.min(this._backoff * 2, MAX_BACKOFF);
474
+ }
475
+ }
476
+ }
477
+ _connectOnce() {
478
+ return new Promise((resolve, reject) => {
479
+ const ws = new import_ws.default(this._url);
480
+ this._ws = ws;
481
+ ws.on("open", () => {
482
+ this._backoff = INITIAL_BACKOFF;
483
+ this._startHeartbeat();
484
+ if (this._subscriptions.size > 0) {
485
+ this._resubscribe();
486
+ if (this.onReconnect) this.onReconnect();
487
+ }
488
+ });
489
+ ws.on("message", (raw) => {
490
+ try {
491
+ const msg = JSON.parse(raw.toString());
492
+ const code = msg.code;
493
+ if (code === 10001 /* PUSH_TRADE */ && this.onTrade) {
494
+ this.onTrade(msg);
495
+ } else if (code === 10004 /* PUSH_DEPTH */ && this.onDepth) {
496
+ this.onDepth(msg);
497
+ } else if (code === 10007 /* PUSH_KLINE */ && this.onKline) {
498
+ this.onKline(msg);
499
+ }
500
+ } catch {
501
+ }
502
+ });
503
+ ws.on("close", () => {
504
+ this._stopHeartbeat();
505
+ if (this._running) {
506
+ reject(new Error("Connection closed"));
507
+ } else {
508
+ resolve();
509
+ }
510
+ });
511
+ ws.on("error", (err) => {
512
+ this._stopHeartbeat();
513
+ if (this.onError) this.onError(err);
514
+ reject(err);
515
+ });
516
+ });
517
+ }
518
+ _startHeartbeat() {
519
+ this._stopHeartbeat();
520
+ this._heartbeatTimer = setInterval(() => {
521
+ if (this._ws && this._ws.readyState === import_ws.default.OPEN) {
522
+ this._ws.send(this._buildMessage(10010 /* HEARTBEAT */));
523
+ }
524
+ }, HEARTBEAT_INTERVAL);
525
+ }
526
+ _stopHeartbeat() {
527
+ if (this._heartbeatTimer) {
528
+ clearInterval(this._heartbeatTimer);
529
+ this._heartbeatTimer = null;
530
+ }
531
+ }
532
+ _resubscribe() {
533
+ const codeMap = {
534
+ trade: 1e4 /* SUB_TRADE */,
535
+ depth: 10003 /* SUB_DEPTH */,
536
+ kline: 10006 /* SUB_KLINE */
537
+ };
538
+ for (const entry of this._subscriptions) {
539
+ const [subType, codes] = entry.split("|", 2);
540
+ const wsCode = codeMap[subType];
541
+ if (wsCode && this._ws && this._ws.readyState === import_ws.default.OPEN) {
542
+ this._ws.send(this._buildMessage(wsCode, codes));
543
+ }
544
+ }
545
+ }
546
+ async subscribeTrade(codes) {
547
+ this._subscriptions.add(`trade|${codes}`);
548
+ if (this._ws && this._ws.readyState === import_ws.default.OPEN) {
549
+ this._ws.send(this._buildMessage(1e4 /* SUB_TRADE */, codes));
550
+ }
551
+ }
552
+ async subscribeDepth(codes) {
553
+ this._subscriptions.add(`depth|${codes}`);
554
+ if (this._ws && this._ws.readyState === import_ws.default.OPEN) {
555
+ this._ws.send(this._buildMessage(10003 /* SUB_DEPTH */, codes));
556
+ }
557
+ }
558
+ async subscribeKline(codes) {
559
+ this._subscriptions.add(`kline|${codes}`);
560
+ if (this._ws && this._ws.readyState === import_ws.default.OPEN) {
561
+ this._ws.send(this._buildMessage(10006 /* SUB_KLINE */, codes));
562
+ }
563
+ }
564
+ async unsubscribeTrade(codes) {
565
+ this._subscriptions.delete(`trade|${codes}`);
566
+ if (this._ws && this._ws.readyState === import_ws.default.OPEN) {
567
+ this._ws.send(this._buildMessage(10002 /* UNSUB_TRADE */, codes));
568
+ }
569
+ }
570
+ async unsubscribeDepth(codes) {
571
+ this._subscriptions.delete(`depth|${codes}`);
572
+ if (this._ws && this._ws.readyState === import_ws.default.OPEN) {
573
+ this._ws.send(this._buildMessage(10005 /* UNSUB_DEPTH */, codes));
574
+ }
575
+ }
576
+ async unsubscribeKline(codes) {
577
+ this._subscriptions.delete(`kline|${codes}`);
578
+ if (this._ws && this._ws.readyState === import_ws.default.OPEN) {
579
+ this._ws.send(this._buildMessage(10008 /* UNSUB_KLINE */, codes));
580
+ }
581
+ }
582
+ async close() {
583
+ this._running = false;
584
+ this._stopHeartbeat();
585
+ if (this._ws) {
586
+ this._ws.close();
587
+ this._ws = null;
588
+ }
589
+ }
590
+ _sleep(ms) {
591
+ return new Promise((resolve) => setTimeout(resolve, ms));
592
+ }
593
+ };
594
+ // Annotate the CommonJS export names for ESM import in node:
595
+ 0 && (module.exports = {
596
+ BasicClient,
597
+ Business,
598
+ CommonClient,
599
+ CryptoClient,
600
+ HttpClient,
601
+ IndiaClient,
602
+ InfowayAPIError,
603
+ InfowayAuthError,
604
+ InfowayClient,
605
+ InfowayTimeoutError,
606
+ InfowayWebSocket,
607
+ JapanClient,
608
+ KlineType,
609
+ MarketClient,
610
+ PlateClient,
611
+ StockClient,
612
+ StockInfoClient,
613
+ WsCode
614
+ });
615
+ //# sourceMappingURL=index.js.map