tickatlas 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.cjs ADDED
@@ -0,0 +1,795 @@
1
+ 'use strict';
2
+
3
+ // src/errors.ts
4
+ var TickAtlasError = class extends Error {
5
+ constructor(message, options) {
6
+ super(message);
7
+ this.name = "TickAtlasError";
8
+ Object.setPrototypeOf(this, new.target.prototype);
9
+ if (options && "cause" in options) {
10
+ this.cause = options.cause;
11
+ }
12
+ }
13
+ };
14
+ var TickAtlasAPIError = class extends TickAtlasError {
15
+ constructor(opts) {
16
+ super(opts.message);
17
+ this.name = "TickAtlasAPIError";
18
+ this.statusCode = opts.statusCode;
19
+ this.code = opts.code;
20
+ this.details = opts.details;
21
+ this.requestId = opts.requestId ?? null;
22
+ this.raw = opts.raw ?? null;
23
+ Object.setPrototypeOf(this, new.target.prototype);
24
+ }
25
+ };
26
+ var AuthenticationError = class extends TickAtlasAPIError {
27
+ constructor(opts) {
28
+ super(opts);
29
+ this.name = "AuthenticationError";
30
+ Object.setPrototypeOf(this, new.target.prototype);
31
+ }
32
+ };
33
+ var PermissionDeniedError = class extends TickAtlasAPIError {
34
+ constructor(opts) {
35
+ super(opts);
36
+ this.name = "PermissionDeniedError";
37
+ Object.setPrototypeOf(this, new.target.prototype);
38
+ }
39
+ };
40
+ var NotFoundError = class extends TickAtlasAPIError {
41
+ constructor(opts) {
42
+ super(opts);
43
+ this.name = "NotFoundError";
44
+ Object.setPrototypeOf(this, new.target.prototype);
45
+ }
46
+ };
47
+ var ValidationError = class extends TickAtlasAPIError {
48
+ constructor(opts) {
49
+ super(opts);
50
+ this.name = "ValidationError";
51
+ Object.setPrototypeOf(this, new.target.prototype);
52
+ }
53
+ };
54
+ var RateLimitError = class extends TickAtlasAPIError {
55
+ constructor(opts) {
56
+ super(opts);
57
+ this.name = "RateLimitError";
58
+ this.retryAfter = opts.retryAfter ?? null;
59
+ Object.setPrototypeOf(this, new.target.prototype);
60
+ }
61
+ };
62
+ var ServerError = class extends TickAtlasAPIError {
63
+ constructor(opts) {
64
+ super(opts);
65
+ this.name = "ServerError";
66
+ Object.setPrototypeOf(this, new.target.prototype);
67
+ }
68
+ };
69
+ var TickAtlasNetworkError = class extends TickAtlasError {
70
+ constructor(message, options) {
71
+ super(message, options);
72
+ this.name = "TickAtlasNetworkError";
73
+ this.isTimeout = options?.isTimeout ?? false;
74
+ Object.setPrototypeOf(this, new.target.prototype);
75
+ }
76
+ };
77
+ var TickAtlasConfigError = class extends TickAtlasError {
78
+ constructor(message) {
79
+ super(message);
80
+ this.name = "TickAtlasConfigError";
81
+ Object.setPrototypeOf(this, new.target.prototype);
82
+ }
83
+ };
84
+ function createApiError(statusCode, body, requestId, retryAfter) {
85
+ const code = body.code ?? `HTTP_${statusCode}`;
86
+ const message = body.message ?? `TickAtlas API error (HTTP ${statusCode}, code ${code})`;
87
+ const base = {
88
+ statusCode,
89
+ code,
90
+ message,
91
+ details: body.details,
92
+ requestId,
93
+ raw: body
94
+ };
95
+ if (code === "RATE_LIMIT_EXCEEDED" || code === "QUOTA_EXCEEDED" || code === "RATE_LIMITED") {
96
+ return new RateLimitError({ ...base, retryAfter });
97
+ }
98
+ switch (statusCode) {
99
+ case 401:
100
+ return new AuthenticationError(base);
101
+ case 403:
102
+ return new PermissionDeniedError(base);
103
+ case 404:
104
+ return new NotFoundError(base);
105
+ case 400:
106
+ case 422:
107
+ return new ValidationError(base);
108
+ case 429:
109
+ return new RateLimitError({ ...base, retryAfter });
110
+ default:
111
+ if (statusCode >= 500) return new ServerError(base);
112
+ if (statusCode >= 400) return new ValidationError(base);
113
+ return new TickAtlasAPIError(base);
114
+ }
115
+ }
116
+
117
+ // src/http.ts
118
+ var SDK_VERSION = "0.1.0";
119
+ var RETRYABLE_STATUSES = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
120
+ var defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
121
+ var defaultJitter = () => Math.random();
122
+ function buildQueryString(query) {
123
+ if (!query) return "";
124
+ const sp = new URLSearchParams();
125
+ for (const [key, value] of Object.entries(query)) {
126
+ if (value === void 0 || value === null) continue;
127
+ if (Array.isArray(value)) {
128
+ if (value.length === 0) continue;
129
+ sp.append(key, value.join(","));
130
+ } else {
131
+ sp.append(key, String(value));
132
+ }
133
+ }
134
+ const qs = sp.toString();
135
+ return qs ? `?${qs}` : "";
136
+ }
137
+ function parseIntHeader(headers, name) {
138
+ const raw = headers.get(name);
139
+ if (raw === null) return null;
140
+ const n = Number.parseInt(raw, 10);
141
+ return Number.isNaN(n) ? null : n;
142
+ }
143
+ function retryAfterMs(headers, body) {
144
+ const ra = parseIntHeader(headers, "Retry-After");
145
+ if (ra !== null) return ra * 1e3;
146
+ const reset = parseIntHeader(headers, "X-RateLimit-Reset");
147
+ if (reset !== null) return reset * 1e3;
148
+ const bodyReset = body?.["reset_in_seconds"];
149
+ if (typeof bodyReset === "number") return bodyReset * 1e3;
150
+ return null;
151
+ }
152
+ function backoffMs(config, attempt) {
153
+ const exp = config.backoffBase * Math.pow(2, attempt);
154
+ const capped = Math.min(config.backoffCap, exp);
155
+ return capped * config.jitter();
156
+ }
157
+ async function request(config, opts) {
158
+ const base = opts.root ? new URL(config.baseURL).origin : config.baseURL.replace(/\/+$/, "");
159
+ const url = base + opts.path + buildQueryString(opts.query);
160
+ const maxAttempts = config.maxRetries + 1;
161
+ let lastError;
162
+ for (let attempt = 0; attempt < maxAttempts; attempt++) {
163
+ const isLastAttempt = attempt === maxAttempts - 1;
164
+ const headers = {
165
+ "X-API-Key": config.apiKey,
166
+ Accept: "application/json"
167
+ };
168
+ if (config.sendUserAgent) {
169
+ headers["User-Agent"] = `tickatlas-js/${SDK_VERSION}`;
170
+ }
171
+ let bodyInit;
172
+ if (opts.body !== void 0) {
173
+ headers["Content-Type"] = "application/json";
174
+ bodyInit = JSON.stringify(opts.body);
175
+ }
176
+ const controller = new AbortController();
177
+ const timeoutMs = opts.timeout ?? config.timeout;
178
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
179
+ let timedOut = false;
180
+ const onTimeout = () => {
181
+ timedOut = true;
182
+ };
183
+ controller.signal.addEventListener("abort", onTimeout, { once: true });
184
+ let abortListener;
185
+ if (opts.signal) {
186
+ if (opts.signal.aborted) controller.abort();
187
+ else {
188
+ abortListener = () => controller.abort();
189
+ opts.signal.addEventListener("abort", abortListener, { once: true });
190
+ }
191
+ }
192
+ let response;
193
+ try {
194
+ response = await config.fetch(url, {
195
+ method: opts.method,
196
+ headers,
197
+ body: bodyInit,
198
+ signal: controller.signal
199
+ });
200
+ } catch (err) {
201
+ clearTimeout(timer);
202
+ if (abortListener && opts.signal) {
203
+ opts.signal.removeEventListener("abort", abortListener);
204
+ }
205
+ if (opts.signal?.aborted && !timedOut) {
206
+ throw new TickAtlasNetworkError("Request aborted by caller", {
207
+ cause: err
208
+ });
209
+ }
210
+ const netErr = new TickAtlasNetworkError(
211
+ timedOut ? `Request timed out after ${timeoutMs}ms` : `Network request failed: ${err?.message ?? String(err)}`,
212
+ { cause: err, isTimeout: timedOut }
213
+ );
214
+ lastError = netErr;
215
+ if (isLastAttempt) throw netErr;
216
+ await config.sleep(backoffMs(config, attempt));
217
+ continue;
218
+ } finally {
219
+ clearTimeout(timer);
220
+ if (abortListener && opts.signal) {
221
+ opts.signal.removeEventListener("abort", abortListener);
222
+ }
223
+ }
224
+ const requestId = response.headers.get("X-Request-ID");
225
+ const text = await response.text();
226
+ let parsed = void 0;
227
+ if (text.length > 0) {
228
+ try {
229
+ parsed = JSON.parse(text);
230
+ } catch {
231
+ parsed = void 0;
232
+ }
233
+ }
234
+ if (response.ok) {
235
+ const env2 = parsed;
236
+ if (env2 && typeof env2 === "object" && "data" in env2) {
237
+ return env2.data;
238
+ }
239
+ return parsed;
240
+ }
241
+ const env = parsed;
242
+ const errorBody = env && typeof env === "object" && env.error && typeof env.error === "object" ? env.error : {
243
+ code: `HTTP_${response.status}`,
244
+ message: text.length > 0 ? text : `TickAtlas API returned HTTP ${response.status}`
245
+ };
246
+ const retryMs = response.status === 429 ? retryAfterMs(response.headers, errorBody) : null;
247
+ const apiError = createApiError(
248
+ response.status,
249
+ errorBody,
250
+ requestId,
251
+ retryMs !== null ? Math.round(retryMs / 1e3) : null
252
+ );
253
+ const retryable = RETRYABLE_STATUSES.has(response.status);
254
+ if (!retryable || isLastAttempt) {
255
+ throw apiError;
256
+ }
257
+ lastError = apiError;
258
+ const delay = response.status === 429 && retryMs !== null ? retryMs : backoffMs(config, attempt);
259
+ await config.sleep(delay);
260
+ }
261
+ throw lastError ?? new TickAtlasNetworkError("Request failed after all retries");
262
+ }
263
+
264
+ // src/client.ts
265
+ var DEFAULT_BASE_URL = "https://tickatlas.com/v1";
266
+ function readEnv(name) {
267
+ if (typeof process !== "undefined" && process?.env) {
268
+ return process.env[name];
269
+ }
270
+ return void 0;
271
+ }
272
+ function isNodeLike() {
273
+ return typeof process !== "undefined" && !!process?.versions?.node;
274
+ }
275
+ function csv(value) {
276
+ if (value === void 0) return void 0;
277
+ return Array.isArray(value) ? value.join(",") : value;
278
+ }
279
+ var TickAtlas = class {
280
+ constructor(options = {}) {
281
+ const apiKey = options.apiKey ?? readEnv("TICKATLAS_API_KEY");
282
+ if (!apiKey) {
283
+ throw new TickAtlasConfigError(
284
+ "No TickAtlas API key provided. Pass { apiKey } to the constructor or set the TICKATLAS_API_KEY environment variable."
285
+ );
286
+ }
287
+ const baseURL = options.baseURL ?? readEnv("TICKATLAS_BASE_URL") ?? DEFAULT_BASE_URL;
288
+ const fetchImpl = options.fetch ?? globalThis.fetch;
289
+ if (typeof fetchImpl !== "function") {
290
+ throw new TickAtlasConfigError(
291
+ "Global `fetch` is not available in this runtime. Use Node 18+ or a modern browser, or pass a `fetch` implementation in the options."
292
+ );
293
+ }
294
+ this.config = {
295
+ apiKey,
296
+ baseURL,
297
+ timeout: options.timeout ?? 3e4,
298
+ maxRetries: options.maxRetries ?? 3,
299
+ backoffBase: options.backoffBase ?? 500,
300
+ backoffCap: options.backoffCap ?? 3e4,
301
+ fetch: fetchImpl,
302
+ sleep: options.sleep ?? defaultSleep,
303
+ jitter: options.jitter ?? defaultJitter,
304
+ sendUserAgent: isNodeLike()
305
+ };
306
+ }
307
+ // =========================================================================
308
+ // Symbols
309
+ // =========================================================================
310
+ /** 7.1 `GET /symbols` — list symbols (paginated). */
311
+ getSymbols(opts = {}) {
312
+ const query = {
313
+ category: opts.category,
314
+ search: opts.search,
315
+ offset: opts.offset,
316
+ limit: opts.limit
317
+ };
318
+ return request(this.config, {
319
+ method: "GET",
320
+ path: "/symbols",
321
+ query
322
+ });
323
+ }
324
+ /** 7.2 `GET /symbols/{symbol}` — symbol contract spec. */
325
+ getSymbol(symbol) {
326
+ return request(this.config, {
327
+ method: "GET",
328
+ path: `/symbols/${encodeURIComponent(symbol)}`
329
+ });
330
+ }
331
+ // =========================================================================
332
+ // Quotes
333
+ // =========================================================================
334
+ /** 7.3 `GET /quote` — single real-time quote. */
335
+ getQuote(symbol, opts = {}) {
336
+ const query = {
337
+ symbol,
338
+ include_sources: opts.includeSources,
339
+ source: opts.source
340
+ };
341
+ return request(this.config, {
342
+ method: "GET",
343
+ path: "/quote",
344
+ query
345
+ });
346
+ }
347
+ /**
348
+ * 7.4 `POST /quotes` — batch quotes (1..100 symbols).
349
+ * `fields` ⊆ ["bid","ask","spread","spread_pips","timestamp"] (default all).
350
+ */
351
+ getQuotes(symbols, fields) {
352
+ const body = { symbols };
353
+ if (fields) body.fields = fields;
354
+ return request(this.config, {
355
+ method: "POST",
356
+ path: "/quotes",
357
+ body
358
+ });
359
+ }
360
+ // =========================================================================
361
+ // OHLC / Ticks
362
+ // =========================================================================
363
+ /** 7.5 `GET /ohlc` — OHLC candles. */
364
+ getOhlc(symbol, opts = {}) {
365
+ const query = {
366
+ symbol,
367
+ timeframe: opts.timeframe,
368
+ from: opts.from,
369
+ to: opts.to,
370
+ limit: opts.limit
371
+ };
372
+ return request(this.config, {
373
+ method: "GET",
374
+ path: "/ohlc",
375
+ query
376
+ });
377
+ }
378
+ /**
379
+ * 7.6 `GET /ticks` — tick data (plan: pro/enterprise).
380
+ * `from`/`to` are required ISO 8601; range must be ≤ 1 hour.
381
+ */
382
+ getTicks(symbol, from, to) {
383
+ return request(this.config, {
384
+ method: "GET",
385
+ path: "/ticks",
386
+ query: { symbol, from, to }
387
+ });
388
+ }
389
+ // =========================================================================
390
+ // Indicators
391
+ // =========================================================================
392
+ /** 7.7 `GET /indicator` — single indicator value. */
393
+ getIndicator(symbol, indicator, opts = {}) {
394
+ const query = {
395
+ symbol,
396
+ indicator,
397
+ timeframe: opts.timeframe,
398
+ source: opts.source
399
+ };
400
+ return request(this.config, {
401
+ method: "GET",
402
+ path: "/indicator",
403
+ query
404
+ });
405
+ }
406
+ /** 7.8 `GET /indicators` — all indicators for a symbol. */
407
+ getIndicators(symbol, opts = {}) {
408
+ const query = {
409
+ symbol,
410
+ timeframe: opts.timeframe,
411
+ category: opts.category
412
+ };
413
+ return request(this.config, {
414
+ method: "GET",
415
+ path: "/indicators",
416
+ query
417
+ });
418
+ }
419
+ /** 7.9 `GET /indicators/list` — indicator catalogue. */
420
+ listIndicators() {
421
+ return request(this.config, {
422
+ method: "GET",
423
+ path: "/indicators/list"
424
+ });
425
+ }
426
+ /**
427
+ * 7.10 `GET /indicator/history` — indicator series (plan: starter+).
428
+ */
429
+ getIndicatorHistory(symbol, indicator, opts = {}) {
430
+ const query = {
431
+ symbol,
432
+ indicator,
433
+ timeframe: opts.timeframe,
434
+ from: opts.from,
435
+ to: opts.to,
436
+ limit: opts.limit
437
+ };
438
+ return request(this.config, {
439
+ method: "GET",
440
+ path: "/indicator/history",
441
+ query
442
+ });
443
+ }
444
+ /**
445
+ * 7.11 `GET /multi` — batch indicators across symbols. Supplying `from`
446
+ * switches the server into historical mode (plan: starter+).
447
+ */
448
+ getMulti(symbols, indicators, opts = {}) {
449
+ const query = {
450
+ symbols: symbols.join(","),
451
+ indicators: indicators.join(","),
452
+ timeframe: opts.timeframe,
453
+ from: opts.from,
454
+ to: opts.to
455
+ };
456
+ return request(this.config, {
457
+ method: "GET",
458
+ path: "/multi",
459
+ query
460
+ });
461
+ }
462
+ // =========================================================================
463
+ // Screener
464
+ // =========================================================================
465
+ /**
466
+ * 7.12 `GET /screener` — scan symbols by indicator.
467
+ * Note: `minVal`/`maxVal` serialise to `min_val`/`max_val` (the docs' `min`/
468
+ * `max` are silently ignored by the API — see SPEC §12 F2).
469
+ */
470
+ screen(indicator, opts = {}) {
471
+ const query = {
472
+ indicator,
473
+ timeframe: opts.timeframe,
474
+ min_val: opts.minVal,
475
+ max_val: opts.maxVal,
476
+ sort: opts.sort,
477
+ offset: opts.offset,
478
+ limit: opts.limit
479
+ };
480
+ return request(this.config, {
481
+ method: "GET",
482
+ path: "/screener",
483
+ query
484
+ });
485
+ }
486
+ // =========================================================================
487
+ // Summary
488
+ // =========================================================================
489
+ /** 7.13 `GET /summary` — market-bias summary. */
490
+ getSummary(symbol, timeframe) {
491
+ return request(this.config, {
492
+ method: "GET",
493
+ path: "/summary",
494
+ query: { symbol, timeframe }
495
+ });
496
+ }
497
+ // =========================================================================
498
+ // Spread
499
+ // =========================================================================
500
+ /** 7.14 `GET /spread` — spread statistics. */
501
+ getSpread(symbol, period) {
502
+ return request(this.config, {
503
+ method: "GET",
504
+ path: "/spread",
505
+ query: { symbol, period }
506
+ });
507
+ }
508
+ /** 7.15 `GET /spread/compare` — compare spread across symbols (≤20). */
509
+ compareSpread(symbols, period) {
510
+ return request(this.config, {
511
+ method: "GET",
512
+ path: "/spread/compare",
513
+ query: { symbols: symbols.join(","), period }
514
+ });
515
+ }
516
+ // =========================================================================
517
+ // Sessions / Heatmap / Calendar
518
+ // =========================================================================
519
+ /** 7.16 `GET /sessions` — market session clock. */
520
+ getSessions() {
521
+ return request(this.config, { method: "GET", path: "/sessions" });
522
+ }
523
+ /** 7.17 `GET /heatmap` — currency strength / correlation. */
524
+ getHeatmap(opts = {}) {
525
+ const query = {
526
+ type: opts.type,
527
+ timeframe: opts.timeframe,
528
+ correlations: opts.correlations
529
+ };
530
+ return request(this.config, {
531
+ method: "GET",
532
+ path: "/heatmap",
533
+ query
534
+ });
535
+ }
536
+ /** 7.18 `GET /calendar` — economic calendar. */
537
+ getCalendar(opts = {}) {
538
+ const query = {
539
+ from: opts.from,
540
+ to: opts.to,
541
+ currencies: csv(opts.currencies),
542
+ country: csv(opts.country),
543
+ impact: opts.impact,
544
+ q: opts.q,
545
+ next_hours: opts.nextHours,
546
+ offset: opts.offset,
547
+ limit: opts.limit
548
+ };
549
+ return request(this.config, {
550
+ method: "GET",
551
+ path: "/calendar",
552
+ query
553
+ });
554
+ }
555
+ // =========================================================================
556
+ // Monitor (account / layout)
557
+ // =========================================================================
558
+ /** 7.19 `GET /monitor/account` — account identity & quota. */
559
+ getAccount() {
560
+ return request(this.config, {
561
+ method: "GET",
562
+ path: "/monitor/account"
563
+ });
564
+ }
565
+ /** 7.20 `GET /monitor/layout` — saved dashboard layout. */
566
+ getLayout() {
567
+ return request(this.config, {
568
+ method: "GET",
569
+ path: "/monitor/layout"
570
+ });
571
+ }
572
+ /**
573
+ * 7.21 `PUT /monitor/layout` — save dashboard layout (≤60 widgets).
574
+ *
575
+ * ADVANCED / WRITE: this is the only mutating endpoint in the SDK. It
576
+ * overwrites the user's saved dashboard layout for this API key. Use with care.
577
+ */
578
+ saveLayout(layout) {
579
+ return request(this.config, {
580
+ method: "PUT",
581
+ path: "/monitor/layout",
582
+ body: { layout }
583
+ });
584
+ }
585
+ // =========================================================================
586
+ // Infra probe
587
+ // =========================================================================
588
+ /** `GET /health` — service health probe (no API key required server-side). */
589
+ health() {
590
+ return request(this.config, {
591
+ method: "GET",
592
+ path: "/health",
593
+ root: true
594
+ });
595
+ }
596
+ };
597
+ /** SDK version (e.g. for diagnostics). */
598
+ TickAtlas.version = SDK_VERSION;
599
+
600
+ // src/constants.ts
601
+ var Timeframes = {
602
+ M1: "M1",
603
+ M5: "M5",
604
+ M15: "M15",
605
+ M30: "M30",
606
+ H1: "H1",
607
+ H4: "H4",
608
+ D1: "D1"
609
+ };
610
+ var HeatmapTimeframes = {
611
+ H1: "H1",
612
+ H4: "H4",
613
+ D1: "D1",
614
+ W1: "W1"
615
+ };
616
+ var SymbolCategories = {
617
+ forex: "forex",
618
+ metals: "metals",
619
+ commodities: "commodities",
620
+ indices: "indices",
621
+ crypto: "crypto",
622
+ stocks: "stocks"
623
+ };
624
+ var SpreadPeriods = {
625
+ "1h": "1h",
626
+ "24h": "24h",
627
+ "7d": "7d",
628
+ "30d": "30d"
629
+ };
630
+ var CalendarImpacts = {
631
+ high: "high",
632
+ medium: "medium",
633
+ low: "low"
634
+ };
635
+ var Bias = {
636
+ bullish: "bullish",
637
+ bearish: "bearish",
638
+ neutral: "neutral"
639
+ };
640
+ var BiasStrengths = {
641
+ normal: "normal",
642
+ strong: "strong"
643
+ };
644
+ var HeatmapTypes = {
645
+ strength: "strength",
646
+ correlation: "correlation"
647
+ };
648
+ var IndicatorCategories = {
649
+ trend: "trend",
650
+ oscillator: "oscillator",
651
+ volatility: "volatility",
652
+ volume: "volume"
653
+ };
654
+ var Plans = {
655
+ free: "free",
656
+ trial: "trial",
657
+ starter: "starter",
658
+ pro: "pro",
659
+ enterprise: "enterprise",
660
+ payg: "payg"
661
+ };
662
+ var SortDirections = {
663
+ asc: "asc",
664
+ desc: "desc"
665
+ };
666
+ var Indicators = {
667
+ // --- Trend (23) ---
668
+ SMA_10: "SMA_10",
669
+ SMA_20: "SMA_20",
670
+ SMA_50: "SMA_50",
671
+ SMA_100: "SMA_100",
672
+ SMA_200: "SMA_200",
673
+ EMA_10: "EMA_10",
674
+ EMA_20: "EMA_20",
675
+ EMA_50: "EMA_50",
676
+ MACD_main: "MACD_main",
677
+ MACD_signal: "MACD_signal",
678
+ MACD_hist: "MACD_hist",
679
+ ADX: "ADX",
680
+ ADX_plusDI: "ADX_plusDI",
681
+ ADX_minusDI: "ADX_minusDI",
682
+ Ichimoku_tenkan: "Ichimoku_tenkan",
683
+ Ichimoku_kijun: "Ichimoku_kijun",
684
+ Ichimoku_senkou_a: "Ichimoku_senkou_a",
685
+ Alligator_jaw: "Alligator_jaw",
686
+ Alligator_teeth: "Alligator_teeth",
687
+ Alligator_lips: "Alligator_lips",
688
+ SAR: "SAR",
689
+ TEMA_20: "TEMA_20",
690
+ DEMA_20: "DEMA_20",
691
+ // --- Oscillator (8) ---
692
+ RSI_14: "RSI_14",
693
+ Stochastic_K: "Stochastic_K",
694
+ Stochastic_D: "Stochastic_D",
695
+ CCI_14: "CCI_14",
696
+ CCI_20: "CCI_20",
697
+ WilliamsR_14: "WilliamsR_14",
698
+ Momentum_14: "Momentum_14",
699
+ DeMarker_14: "DeMarker_14",
700
+ // --- Volatility (7) ---
701
+ BB_upper: "BB_upper",
702
+ BB_middle: "BB_middle",
703
+ BB_lower: "BB_lower",
704
+ BB_width: "BB_width",
705
+ ATR_14: "ATR_14",
706
+ ATR_7: "ATR_7",
707
+ StdDev_20: "StdDev_20",
708
+ // --- Volume (4) ---
709
+ OBV: "OBV",
710
+ MFI_14: "MFI_14",
711
+ AD: "AD",
712
+ Volumes: "Volumes"
713
+ };
714
+ var IndicatorsByCategory = {
715
+ trend: [
716
+ "SMA_10",
717
+ "SMA_20",
718
+ "SMA_50",
719
+ "SMA_100",
720
+ "SMA_200",
721
+ "EMA_10",
722
+ "EMA_20",
723
+ "EMA_50",
724
+ "MACD_main",
725
+ "MACD_signal",
726
+ "MACD_hist",
727
+ "ADX",
728
+ "ADX_plusDI",
729
+ "ADX_minusDI",
730
+ "Ichimoku_tenkan",
731
+ "Ichimoku_kijun",
732
+ "Ichimoku_senkou_a",
733
+ "Alligator_jaw",
734
+ "Alligator_teeth",
735
+ "Alligator_lips",
736
+ "SAR",
737
+ "TEMA_20",
738
+ "DEMA_20"
739
+ ],
740
+ oscillator: [
741
+ "RSI_14",
742
+ "Stochastic_K",
743
+ "Stochastic_D",
744
+ "CCI_14",
745
+ "CCI_20",
746
+ "WilliamsR_14",
747
+ "Momentum_14",
748
+ "DeMarker_14"
749
+ ],
750
+ volatility: [
751
+ "BB_upper",
752
+ "BB_middle",
753
+ "BB_lower",
754
+ "BB_width",
755
+ "ATR_14",
756
+ "ATR_7",
757
+ "StdDev_20"
758
+ ],
759
+ volume: ["OBV", "MFI_14", "AD", "Volumes"]
760
+ };
761
+ var ALL_INDICATORS = [
762
+ ...IndicatorsByCategory.trend,
763
+ ...IndicatorsByCategory.oscillator,
764
+ ...IndicatorsByCategory.volatility,
765
+ ...IndicatorsByCategory.volume
766
+ ];
767
+
768
+ exports.ALL_INDICATORS = ALL_INDICATORS;
769
+ exports.AuthenticationError = AuthenticationError;
770
+ exports.Bias = Bias;
771
+ exports.BiasStrengths = BiasStrengths;
772
+ exports.CalendarImpacts = CalendarImpacts;
773
+ exports.HeatmapTimeframes = HeatmapTimeframes;
774
+ exports.HeatmapTypes = HeatmapTypes;
775
+ exports.IndicatorCategories = IndicatorCategories;
776
+ exports.Indicators = Indicators;
777
+ exports.IndicatorsByCategory = IndicatorsByCategory;
778
+ exports.NotFoundError = NotFoundError;
779
+ exports.PermissionDeniedError = PermissionDeniedError;
780
+ exports.Plans = Plans;
781
+ exports.RateLimitError = RateLimitError;
782
+ exports.SDK_VERSION = SDK_VERSION;
783
+ exports.ServerError = ServerError;
784
+ exports.SortDirections = SortDirections;
785
+ exports.SpreadPeriods = SpreadPeriods;
786
+ exports.SymbolCategories = SymbolCategories;
787
+ exports.TickAtlas = TickAtlas;
788
+ exports.TickAtlasAPIError = TickAtlasAPIError;
789
+ exports.TickAtlasConfigError = TickAtlasConfigError;
790
+ exports.TickAtlasError = TickAtlasError;
791
+ exports.TickAtlasNetworkError = TickAtlasNetworkError;
792
+ exports.Timeframes = Timeframes;
793
+ exports.ValidationError = ValidationError;
794
+ //# sourceMappingURL=index.cjs.map
795
+ //# sourceMappingURL=index.cjs.map