@muhammedaksam/borsats 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/LICENSE +21 -0
- package/README.md +304 -0
- package/dist/index.d.mts +1393 -0
- package/dist/index.d.ts +1393 -0
- package/dist/index.js +11298 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +11175 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +85 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1393 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
|
|
4
|
+
type Period = "1d" | "5d" | "1w" | "1mo" | "3mo" | "6mo" | "1y" | "2y" | "5y" | "10y" | "ytd" | "max" | "1g" | "5g" | "1ay" | "3ay" | "1h" | "3h";
|
|
5
|
+
type Interval = "1m" | "3m" | "5m" | "15m" | "30m" | "45m" | "1h" | "4h" | "1d" | "1w" | "1mo";
|
|
6
|
+
interface OHLCVData {
|
|
7
|
+
date: Date;
|
|
8
|
+
open: number;
|
|
9
|
+
high: number;
|
|
10
|
+
low: number;
|
|
11
|
+
close: number;
|
|
12
|
+
volume: number;
|
|
13
|
+
}
|
|
14
|
+
interface CurrentData {
|
|
15
|
+
symbol: string;
|
|
16
|
+
last: number;
|
|
17
|
+
open?: number;
|
|
18
|
+
high?: number;
|
|
19
|
+
low?: number;
|
|
20
|
+
close?: number;
|
|
21
|
+
volume?: number;
|
|
22
|
+
bid?: number;
|
|
23
|
+
ask?: number;
|
|
24
|
+
change?: number;
|
|
25
|
+
changePercent?: number;
|
|
26
|
+
updateTime?: Date;
|
|
27
|
+
}
|
|
28
|
+
interface DividendData {
|
|
29
|
+
date: Date;
|
|
30
|
+
dividend: number;
|
|
31
|
+
type?: string;
|
|
32
|
+
}
|
|
33
|
+
interface SplitData {
|
|
34
|
+
date: Date;
|
|
35
|
+
ratio: number;
|
|
36
|
+
from: number;
|
|
37
|
+
to: number;
|
|
38
|
+
}
|
|
39
|
+
interface ActionData {
|
|
40
|
+
date: Date;
|
|
41
|
+
type: "dividend" | "split";
|
|
42
|
+
value: number;
|
|
43
|
+
details?: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
interface FinancialRow {
|
|
46
|
+
item: string;
|
|
47
|
+
[period: string]: number | string;
|
|
48
|
+
}
|
|
49
|
+
type BalanceSheet = FinancialRow[];
|
|
50
|
+
type IncomeStatement = FinancialRow[];
|
|
51
|
+
type CashFlowStatement = FinancialRow[];
|
|
52
|
+
interface HolderData {
|
|
53
|
+
name: string;
|
|
54
|
+
percentage: number;
|
|
55
|
+
shares?: number;
|
|
56
|
+
}
|
|
57
|
+
interface Recommendation {
|
|
58
|
+
firm: string;
|
|
59
|
+
date: Date;
|
|
60
|
+
rating: "BUY" | "HOLD" | "SELL" | "STRONG_BUY" | "STRONG_SELL";
|
|
61
|
+
targetPrice?: number;
|
|
62
|
+
}
|
|
63
|
+
interface PriceTarget {
|
|
64
|
+
current: number;
|
|
65
|
+
mean: number;
|
|
66
|
+
median?: number;
|
|
67
|
+
high: number;
|
|
68
|
+
low: number;
|
|
69
|
+
numberOfAnalysts: number;
|
|
70
|
+
}
|
|
71
|
+
interface NewsItem {
|
|
72
|
+
date: Date;
|
|
73
|
+
title: string;
|
|
74
|
+
summary?: string;
|
|
75
|
+
url?: string;
|
|
76
|
+
source?: string;
|
|
77
|
+
}
|
|
78
|
+
interface BankRate {
|
|
79
|
+
bank: string;
|
|
80
|
+
bankName?: string;
|
|
81
|
+
currency: string;
|
|
82
|
+
buy: number;
|
|
83
|
+
sell: number;
|
|
84
|
+
spread: number;
|
|
85
|
+
updated?: Date;
|
|
86
|
+
}
|
|
87
|
+
interface MetalInstitutionRate {
|
|
88
|
+
institution: string;
|
|
89
|
+
institutionName: string;
|
|
90
|
+
asset: string;
|
|
91
|
+
buy: number;
|
|
92
|
+
sell: number;
|
|
93
|
+
spread: number;
|
|
94
|
+
updated?: Date;
|
|
95
|
+
}
|
|
96
|
+
interface InstitutionRate {
|
|
97
|
+
institution: string;
|
|
98
|
+
institutionName: string;
|
|
99
|
+
asset: string;
|
|
100
|
+
buy: number;
|
|
101
|
+
sell: number;
|
|
102
|
+
spread: number;
|
|
103
|
+
updated?: Date;
|
|
104
|
+
}
|
|
105
|
+
interface FundInfo {
|
|
106
|
+
symbol: string;
|
|
107
|
+
name: string;
|
|
108
|
+
type: string;
|
|
109
|
+
price: number;
|
|
110
|
+
dailyReturn?: number;
|
|
111
|
+
weeklyReturn?: number;
|
|
112
|
+
monthlyReturn?: number;
|
|
113
|
+
yearlyReturn?: number;
|
|
114
|
+
totalValue?: number;
|
|
115
|
+
isin?: string;
|
|
116
|
+
categoryRank?: string;
|
|
117
|
+
allocation?: AllocationData[];
|
|
118
|
+
}
|
|
119
|
+
interface AllocationData {
|
|
120
|
+
date: Date;
|
|
121
|
+
assetType: string;
|
|
122
|
+
assetName: string;
|
|
123
|
+
weight: number;
|
|
124
|
+
}
|
|
125
|
+
interface IndexComponent {
|
|
126
|
+
symbol: string;
|
|
127
|
+
name: string;
|
|
128
|
+
weight?: number;
|
|
129
|
+
}
|
|
130
|
+
interface IndexInfo {
|
|
131
|
+
symbol: string;
|
|
132
|
+
name: string;
|
|
133
|
+
value: number;
|
|
134
|
+
change?: number;
|
|
135
|
+
changePercent?: number;
|
|
136
|
+
updateTime?: Date;
|
|
137
|
+
}
|
|
138
|
+
interface CryptoPair {
|
|
139
|
+
pair: string;
|
|
140
|
+
base: string;
|
|
141
|
+
quote: string;
|
|
142
|
+
}
|
|
143
|
+
interface RiskMetrics {
|
|
144
|
+
annualizedReturn: number;
|
|
145
|
+
annualizedVolatility: number;
|
|
146
|
+
sharpeRatio: number;
|
|
147
|
+
sortinoRatio: number;
|
|
148
|
+
maxDrawdown: number;
|
|
149
|
+
beta?: number;
|
|
150
|
+
alpha?: number;
|
|
151
|
+
riskFreeRate?: number;
|
|
152
|
+
tradingDays?: number;
|
|
153
|
+
}
|
|
154
|
+
interface Holding {
|
|
155
|
+
symbol: string;
|
|
156
|
+
assetType: "stock" | "fx" | "crypto" | "fund";
|
|
157
|
+
shares: number;
|
|
158
|
+
costPerShare?: number;
|
|
159
|
+
currentPrice?: number;
|
|
160
|
+
value?: number;
|
|
161
|
+
weight?: number;
|
|
162
|
+
pnl?: number;
|
|
163
|
+
pnlPct?: number;
|
|
164
|
+
}
|
|
165
|
+
interface RequestOptions {
|
|
166
|
+
method?: "GET" | "POST" | "PUT" | "DELETE";
|
|
167
|
+
headers?: Record<string, string>;
|
|
168
|
+
params?: Record<string, string | number | boolean>;
|
|
169
|
+
data?: unknown;
|
|
170
|
+
timeout?: number;
|
|
171
|
+
maxRetries?: number;
|
|
172
|
+
}
|
|
173
|
+
interface CacheOptions {
|
|
174
|
+
ttl?: number;
|
|
175
|
+
enabled?: boolean;
|
|
176
|
+
}
|
|
177
|
+
interface ProviderConfig {
|
|
178
|
+
baseUrl?: string;
|
|
179
|
+
timeout?: number;
|
|
180
|
+
maxRetries?: number;
|
|
181
|
+
rateLimit?: number;
|
|
182
|
+
headers?: Record<string, string>;
|
|
183
|
+
cache?: CacheOptions;
|
|
184
|
+
}
|
|
185
|
+
interface ScreenerCriteria {
|
|
186
|
+
id: string;
|
|
187
|
+
name: string;
|
|
188
|
+
min?: string;
|
|
189
|
+
max?: string;
|
|
190
|
+
}
|
|
191
|
+
interface ScreenerResult {
|
|
192
|
+
symbol: string;
|
|
193
|
+
name: string;
|
|
194
|
+
[key: string]: string | number;
|
|
195
|
+
}
|
|
196
|
+
type AssetType = "stock" | "forex" | "fx" | "crypto" | "index" | "futures" | "bond" | "fund" | "etf";
|
|
197
|
+
|
|
198
|
+
declare class SimpleCache<T> {
|
|
199
|
+
private cache;
|
|
200
|
+
set(key: string, value: T, ttlSeconds?: number): void;
|
|
201
|
+
get(key: string): T | undefined;
|
|
202
|
+
has(key: string): boolean;
|
|
203
|
+
clear(): void;
|
|
204
|
+
delete(key: string): void;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
declare abstract class BaseProvider {
|
|
208
|
+
protected client: AxiosInstance;
|
|
209
|
+
protected cache: SimpleCache<unknown>;
|
|
210
|
+
protected config: ProviderConfig;
|
|
211
|
+
private lastRequestTime;
|
|
212
|
+
private requestCount;
|
|
213
|
+
private resetTime;
|
|
214
|
+
constructor(config?: ProviderConfig);
|
|
215
|
+
protected request<T>(url: string, options?: RequestOptions): Promise<T>;
|
|
216
|
+
private enforceRateLimit;
|
|
217
|
+
private getCacheKey;
|
|
218
|
+
clearCache(): void;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
interface CapitalIncreaseData {
|
|
222
|
+
date: Date;
|
|
223
|
+
capital: number;
|
|
224
|
+
rightsIssue: number;
|
|
225
|
+
bonusFromCapital: number;
|
|
226
|
+
bonusFromDividend: number;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
interface ETFHolder {
|
|
230
|
+
symbol: string;
|
|
231
|
+
exchange: string;
|
|
232
|
+
name: string;
|
|
233
|
+
market_cap_usd: number;
|
|
234
|
+
holding_weight_pct: number;
|
|
235
|
+
issuer: string;
|
|
236
|
+
management: string;
|
|
237
|
+
focus: string;
|
|
238
|
+
expense_ratio: number;
|
|
239
|
+
aum_usd: number;
|
|
240
|
+
price: number;
|
|
241
|
+
change_pct: number;
|
|
242
|
+
}
|
|
243
|
+
declare class TradingViewETFProvider extends BaseProvider {
|
|
244
|
+
private static readonly BASE_URL;
|
|
245
|
+
private static readonly SCANNER_URL;
|
|
246
|
+
constructor();
|
|
247
|
+
getETFHolders(symbol: string): Promise<ETFHolder[]>;
|
|
248
|
+
}
|
|
249
|
+
declare function getTradingViewETFProvider(): TradingViewETFProvider;
|
|
250
|
+
|
|
251
|
+
declare function calculateSMA(data: OHLCVData[], period?: number): number[];
|
|
252
|
+
declare function calculateEMA(data: OHLCVData[], period?: number): number[];
|
|
253
|
+
declare function calculateRSI(data: OHLCVData[], period?: number): number[];
|
|
254
|
+
declare function calculateMACD(data: OHLCVData[], fast?: number, slow?: number, signal?: number): Array<{
|
|
255
|
+
macd: number;
|
|
256
|
+
signal: number;
|
|
257
|
+
histogram: number;
|
|
258
|
+
}>;
|
|
259
|
+
declare function calculateBollingerBands(data: OHLCVData[], period?: number, stdDev?: number): Array<{
|
|
260
|
+
upper: number;
|
|
261
|
+
middle: number;
|
|
262
|
+
lower: number;
|
|
263
|
+
}>;
|
|
264
|
+
declare function calculateATR(data: OHLCVData[], period?: number): number[];
|
|
265
|
+
declare function calculateStochastic(data: OHLCVData[], kPeriod?: number, dPeriod?: number): Array<{
|
|
266
|
+
k: number;
|
|
267
|
+
d: number;
|
|
268
|
+
}>;
|
|
269
|
+
declare function calculateOBV(data: OHLCVData[]): number[];
|
|
270
|
+
declare function calculateVWAP(data: OHLCVData[]): number[];
|
|
271
|
+
declare function calculateADX(data: OHLCVData[], period?: number): number[];
|
|
272
|
+
declare function calculateSupertrend(data: OHLCVData[], atrPeriod?: number, multiplier?: number): Array<{
|
|
273
|
+
supertrend: number;
|
|
274
|
+
direction: number;
|
|
275
|
+
upper: number;
|
|
276
|
+
lower: number;
|
|
277
|
+
}>;
|
|
278
|
+
declare function calculateTilsonT3(data: OHLCVData[], period?: number, vfactor?: number): number[];
|
|
279
|
+
declare function calculateCCI(data: OHLCVData[], period?: number): number[];
|
|
280
|
+
declare function calculateWilliamsR(data: OHLCVData[], period?: number): number[];
|
|
281
|
+
declare function calculatePivotPoints(data: OHLCVData[]): Array<{
|
|
282
|
+
pivot: number;
|
|
283
|
+
r1: number;
|
|
284
|
+
r2: number;
|
|
285
|
+
r3: number;
|
|
286
|
+
s1: number;
|
|
287
|
+
s2: number;
|
|
288
|
+
s3: number;
|
|
289
|
+
}>;
|
|
290
|
+
declare function calculateIchimoku(data: OHLCVData[], conversionPeriod?: number, basePeriod?: number, spanBPeriod?: number, _displacement?: number): Array<{
|
|
291
|
+
tenkan: number;
|
|
292
|
+
kijun: number;
|
|
293
|
+
senkouA: number;
|
|
294
|
+
senkouB: number;
|
|
295
|
+
chikou: number;
|
|
296
|
+
}>;
|
|
297
|
+
interface IndicatorData extends OHLCVData {
|
|
298
|
+
[key: string]: number | Date | undefined;
|
|
299
|
+
}
|
|
300
|
+
interface AddIndicatorsOptions {
|
|
301
|
+
indicators?: string[];
|
|
302
|
+
smaPeriod?: number;
|
|
303
|
+
emaPeriod?: number;
|
|
304
|
+
rsiPeriod?: number;
|
|
305
|
+
bbPeriod?: number;
|
|
306
|
+
atrPeriod?: number;
|
|
307
|
+
adxPeriod?: number;
|
|
308
|
+
supertrendPeriod?: number;
|
|
309
|
+
supertrendMultiplier?: number;
|
|
310
|
+
cciPeriod?: number;
|
|
311
|
+
williamsRPeriod?: number;
|
|
312
|
+
}
|
|
313
|
+
declare function addIndicators(data: OHLCVData[], options?: AddIndicatorsOptions): IndicatorData[];
|
|
314
|
+
declare class TechnicalAnalyzer {
|
|
315
|
+
private data;
|
|
316
|
+
constructor(data: OHLCVData[]);
|
|
317
|
+
heikinAshi(): OHLCVData[];
|
|
318
|
+
get latest(): Record<string, number>;
|
|
319
|
+
rsi(period?: number): number[];
|
|
320
|
+
sma(period?: number): number[];
|
|
321
|
+
ema(period?: number): number[];
|
|
322
|
+
macd(fast?: number, slow?: number, signal?: number): Array<{
|
|
323
|
+
macd: number;
|
|
324
|
+
signal: number;
|
|
325
|
+
histogram: number;
|
|
326
|
+
}>;
|
|
327
|
+
bollingerBands(period?: number, stdDev?: number): Array<{
|
|
328
|
+
upper: number;
|
|
329
|
+
middle: number;
|
|
330
|
+
lower: number;
|
|
331
|
+
}>;
|
|
332
|
+
atr(period?: number): number[];
|
|
333
|
+
stochastic(kPeriod?: number, dPeriod?: number): Array<{
|
|
334
|
+
k: number;
|
|
335
|
+
d: number;
|
|
336
|
+
}>;
|
|
337
|
+
obv(): number[];
|
|
338
|
+
vwap(): number[];
|
|
339
|
+
adx(period?: number): number[];
|
|
340
|
+
supertrend(atrPeriod?: number, multiplier?: number): Array<{
|
|
341
|
+
supertrend: number;
|
|
342
|
+
direction: number;
|
|
343
|
+
upper: number;
|
|
344
|
+
lower: number;
|
|
345
|
+
}>;
|
|
346
|
+
tilsonT3(period?: number, vfactor?: number): number[];
|
|
347
|
+
cci(period?: number): number[];
|
|
348
|
+
williamsR(period?: number): number[];
|
|
349
|
+
pivotPoints(): Array<{
|
|
350
|
+
pivot: number;
|
|
351
|
+
r1: number;
|
|
352
|
+
r2: number;
|
|
353
|
+
r3: number;
|
|
354
|
+
s1: number;
|
|
355
|
+
s2: number;
|
|
356
|
+
s3: number;
|
|
357
|
+
}>;
|
|
358
|
+
ichimoku(conversionPeriod?: number, basePeriod?: number, spanBPeriod?: number): Array<{
|
|
359
|
+
tenkan: number;
|
|
360
|
+
kijun: number;
|
|
361
|
+
senkouA: number;
|
|
362
|
+
senkouB: number;
|
|
363
|
+
chikou: number;
|
|
364
|
+
}>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
type OHLCVWithActions = OHLCVData & {
|
|
368
|
+
dividend?: number;
|
|
369
|
+
split?: number;
|
|
370
|
+
};
|
|
371
|
+
interface EnrichedInfo extends CurrentData {
|
|
372
|
+
marketCap?: number;
|
|
373
|
+
peRatio?: number;
|
|
374
|
+
pbRatio?: number;
|
|
375
|
+
evEbitda?: number;
|
|
376
|
+
netDebt?: number;
|
|
377
|
+
freeFloat?: number;
|
|
378
|
+
foreignRatio?: number;
|
|
379
|
+
sharesOutstanding?: number;
|
|
380
|
+
sector?: string;
|
|
381
|
+
industry?: string;
|
|
382
|
+
website?: string;
|
|
383
|
+
description?: string;
|
|
384
|
+
dividendYield?: number;
|
|
385
|
+
exDividendDate?: Date;
|
|
386
|
+
trailingAnnualDividendRate?: number;
|
|
387
|
+
trailingAnnualDividendYield?: number;
|
|
388
|
+
fiftyTwoWeekHigh?: number;
|
|
389
|
+
fiftyTwoWeekLow?: number;
|
|
390
|
+
fiftyDayAverage?: number;
|
|
391
|
+
twoHundredDayAverage?: number;
|
|
392
|
+
}
|
|
393
|
+
declare class FastInfo {
|
|
394
|
+
private _ticker;
|
|
395
|
+
private _data;
|
|
396
|
+
constructor(ticker: Ticker);
|
|
397
|
+
private load;
|
|
398
|
+
get(key: string): Promise<unknown>;
|
|
399
|
+
get currency(): Promise<string>;
|
|
400
|
+
get exchange(): Promise<string>;
|
|
401
|
+
get lastPrice(): Promise<number>;
|
|
402
|
+
get previousClose(): Promise<number>;
|
|
403
|
+
get open(): Promise<number>;
|
|
404
|
+
get dayHigh(): Promise<number>;
|
|
405
|
+
get dayLow(): Promise<number>;
|
|
406
|
+
get volume(): Promise<number>;
|
|
407
|
+
get marketCap(): Promise<number | undefined>;
|
|
408
|
+
get peRatio(): Promise<number | undefined>;
|
|
409
|
+
get pbRatio(): Promise<number | undefined>;
|
|
410
|
+
get fiftyDayAverage(): Promise<number | undefined>;
|
|
411
|
+
get twoHundredDayAverage(): Promise<number | undefined>;
|
|
412
|
+
get yearHigh(): Promise<number | undefined>;
|
|
413
|
+
get yearLow(): Promise<number | undefined>;
|
|
414
|
+
keys(): string[];
|
|
415
|
+
todict(): Promise<Record<string, unknown>>;
|
|
416
|
+
}
|
|
417
|
+
declare class Ticker {
|
|
418
|
+
readonly symbol: string;
|
|
419
|
+
private _fastInfo;
|
|
420
|
+
constructor(symbol: string);
|
|
421
|
+
get fastInfo(): FastInfo;
|
|
422
|
+
info(): Promise<EnrichedInfo>;
|
|
423
|
+
history(options?: {
|
|
424
|
+
period?: Period;
|
|
425
|
+
interval?: Interval;
|
|
426
|
+
start?: Date | string;
|
|
427
|
+
end?: Date | string;
|
|
428
|
+
actions?: boolean;
|
|
429
|
+
}): Promise<OHLCVWithActions[]>;
|
|
430
|
+
private _mergeActions;
|
|
431
|
+
get balanceSheet(): Promise<BalanceSheet>;
|
|
432
|
+
get incomeStmt(): Promise<IncomeStatement>;
|
|
433
|
+
get cashflow(): Promise<CashFlowStatement>;
|
|
434
|
+
get quarterlyBalanceSheet(): Promise<BalanceSheet>;
|
|
435
|
+
get quarterlyIncomeStmt(): Promise<IncomeStatement>;
|
|
436
|
+
get quarterlyCashflow(): Promise<CashFlowStatement>;
|
|
437
|
+
get dividends(): Promise<DividendData[]>;
|
|
438
|
+
get splits(): Promise<CapitalIncreaseData[]>;
|
|
439
|
+
get majorHolders(): Promise<HolderData[]>;
|
|
440
|
+
get etfHolders(): Promise<ETFHolder[]>;
|
|
441
|
+
get news(): Promise<NewsItem[]>;
|
|
442
|
+
get priceTarget(): Promise<PriceTarget | null>;
|
|
443
|
+
get isin(): Promise<string>;
|
|
444
|
+
technicals(period?: Period, interval?: Interval): Promise<TechnicalAnalyzer>;
|
|
445
|
+
rsi(period?: Period, rsiPeriod?: number): Promise<number>;
|
|
446
|
+
sma(period?: Period, smaPeriod?: number): Promise<number>;
|
|
447
|
+
ema(period?: Period, emaPeriod?: number): Promise<number>;
|
|
448
|
+
macd(period?: Period, fast?: number, slow?: number, signal?: number): Promise<{
|
|
449
|
+
macd: number;
|
|
450
|
+
signal: number;
|
|
451
|
+
histogram: number;
|
|
452
|
+
}>;
|
|
453
|
+
bollingerBands(period?: Period, bbPeriod?: number, stdDev?: number): Promise<{
|
|
454
|
+
upper: number;
|
|
455
|
+
middle: number;
|
|
456
|
+
lower: number;
|
|
457
|
+
}>;
|
|
458
|
+
atr(period?: Period, atrPeriod?: number): Promise<number>;
|
|
459
|
+
stochastic(period?: Period, kPeriod?: number, dPeriod?: number): Promise<{
|
|
460
|
+
k: number;
|
|
461
|
+
d: number;
|
|
462
|
+
}>;
|
|
463
|
+
obv(period?: Period): Promise<number>;
|
|
464
|
+
vwap(period?: Period): Promise<number>;
|
|
465
|
+
adx(period?: Period, adxPeriod?: number): Promise<number>;
|
|
466
|
+
heikinAshi(period?: Period, interval?: Interval): Promise<OHLCVData[]>;
|
|
467
|
+
private calculateStartDate;
|
|
468
|
+
private daysYTD;
|
|
469
|
+
get actions(): Promise<Array<{
|
|
470
|
+
date: Date;
|
|
471
|
+
dividends: number;
|
|
472
|
+
splits: number;
|
|
473
|
+
}>>;
|
|
474
|
+
private calculateTTM;
|
|
475
|
+
getTTMIncomeStmt(financialGroup?: string): Promise<Record<string, number>>;
|
|
476
|
+
getTTMCashflow(financialGroup?: string): Promise<Record<string, number>>;
|
|
477
|
+
get ttmIncomeStmt(): Promise<Record<string, number>>;
|
|
478
|
+
get ttmCashflow(): Promise<Record<string, number>>;
|
|
479
|
+
get recommendationsSummary(): Promise<{
|
|
480
|
+
strongBuy: number;
|
|
481
|
+
buy: number;
|
|
482
|
+
hold: number;
|
|
483
|
+
sell: number;
|
|
484
|
+
strongSell: number;
|
|
485
|
+
}>;
|
|
486
|
+
getNewsContent(disclosureId: string | number): Promise<string | null>;
|
|
487
|
+
get calendar(): Promise<Array<{
|
|
488
|
+
startDate: string;
|
|
489
|
+
endDate: string;
|
|
490
|
+
subject: string;
|
|
491
|
+
period: string;
|
|
492
|
+
year: string;
|
|
493
|
+
}>>;
|
|
494
|
+
get earningsDates(): Promise<Array<{
|
|
495
|
+
date: Date;
|
|
496
|
+
epsEstimate: null;
|
|
497
|
+
reportedEps: null;
|
|
498
|
+
surprise: null;
|
|
499
|
+
}>>;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
interface FundDetail {
|
|
503
|
+
fund_code: string;
|
|
504
|
+
name: string;
|
|
505
|
+
date: string;
|
|
506
|
+
price: number;
|
|
507
|
+
fund_size: number;
|
|
508
|
+
investor_count: number;
|
|
509
|
+
founder: string;
|
|
510
|
+
manager: string;
|
|
511
|
+
fund_type: string;
|
|
512
|
+
category: string;
|
|
513
|
+
risk_value: number;
|
|
514
|
+
return_1m?: number;
|
|
515
|
+
return_3m?: number;
|
|
516
|
+
return_6m?: number;
|
|
517
|
+
return_ytd?: number;
|
|
518
|
+
return_1y?: number;
|
|
519
|
+
return_3y?: number;
|
|
520
|
+
return_5y?: number;
|
|
521
|
+
daily_return?: number;
|
|
522
|
+
weekly_return?: number;
|
|
523
|
+
isin?: string;
|
|
524
|
+
last_trading_time?: string;
|
|
525
|
+
min_purchase?: string;
|
|
526
|
+
min_redemption?: string;
|
|
527
|
+
entry_fee?: number;
|
|
528
|
+
exit_fee?: number;
|
|
529
|
+
kap_link?: string;
|
|
530
|
+
allocation?: Array<{
|
|
531
|
+
asset_type: string;
|
|
532
|
+
asset_name: string;
|
|
533
|
+
weight: number;
|
|
534
|
+
}>;
|
|
535
|
+
}
|
|
536
|
+
interface FundHistoryItem {
|
|
537
|
+
date: Date;
|
|
538
|
+
price: number;
|
|
539
|
+
fundSize: number;
|
|
540
|
+
investors: number;
|
|
541
|
+
}
|
|
542
|
+
interface AllocationItem {
|
|
543
|
+
date: Date;
|
|
544
|
+
asset_type: string;
|
|
545
|
+
asset_name: string;
|
|
546
|
+
weight: number;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
interface FundRiskMetrics {
|
|
550
|
+
annualizedReturn: number;
|
|
551
|
+
annualizedVolatility: number;
|
|
552
|
+
sharpeRatio: number;
|
|
553
|
+
sortinoRatio: number;
|
|
554
|
+
maxDrawdown: number;
|
|
555
|
+
riskFreeRate: number;
|
|
556
|
+
tradingDays: number;
|
|
557
|
+
}
|
|
558
|
+
declare class Fund {
|
|
559
|
+
private _fundCode;
|
|
560
|
+
private _infoCache;
|
|
561
|
+
constructor(fundCode: string);
|
|
562
|
+
get fundCode(): string;
|
|
563
|
+
get symbol(): string;
|
|
564
|
+
get info(): Promise<FundDetail>;
|
|
565
|
+
get detail(): Promise<FundDetail>;
|
|
566
|
+
get performance(): Promise<Partial<FundDetail>>;
|
|
567
|
+
get allocation(): Promise<AllocationItem[]>;
|
|
568
|
+
allocationHistory(options?: {
|
|
569
|
+
period?: string;
|
|
570
|
+
start?: Date | string;
|
|
571
|
+
end?: Date | string;
|
|
572
|
+
}): Promise<AllocationItem[]>;
|
|
573
|
+
history(options?: {
|
|
574
|
+
period?: string;
|
|
575
|
+
start?: Date | string;
|
|
576
|
+
end?: Date | string;
|
|
577
|
+
}): Promise<FundHistoryItem[]>;
|
|
578
|
+
technicals(period?: string): Promise<TechnicalAnalyzer>;
|
|
579
|
+
riskMetrics(period?: string, rfRate?: number): Promise<FundRiskMetrics>;
|
|
580
|
+
sharpeRatio(period?: string, rfRate?: number): Promise<number>;
|
|
581
|
+
}
|
|
582
|
+
declare function searchFunds(query: string): Promise<{
|
|
583
|
+
fund_code: string;
|
|
584
|
+
name: string;
|
|
585
|
+
fund_type: string;
|
|
586
|
+
return_1y?: number;
|
|
587
|
+
}[]>;
|
|
588
|
+
declare function screenFunds(options: Record<string, unknown>): Promise<unknown[]>;
|
|
589
|
+
declare function compareFunds(fundCodes: string[]): Promise<{
|
|
590
|
+
funds: FundDetail[];
|
|
591
|
+
rankings: Record<string, string[]>;
|
|
592
|
+
summary: Record<string, string | number>;
|
|
593
|
+
}>;
|
|
594
|
+
|
|
595
|
+
declare class Screener {
|
|
596
|
+
private _filters;
|
|
597
|
+
private _sector;
|
|
598
|
+
private _index;
|
|
599
|
+
private _recommendation;
|
|
600
|
+
static readonly CRITERIA_DEFAULTS: Record<string, {
|
|
601
|
+
min: number;
|
|
602
|
+
max: number;
|
|
603
|
+
}>;
|
|
604
|
+
static readonly TEMPLATES: string[];
|
|
605
|
+
constructor();
|
|
606
|
+
addFilter(criteria: string, min?: number, max?: number, required?: boolean): Promise<Screener>;
|
|
607
|
+
setSector(sector: string): Screener;
|
|
608
|
+
setIndex(index: string): Screener;
|
|
609
|
+
setRecommendation(recommendation: string): Screener;
|
|
610
|
+
clear(): Screener;
|
|
611
|
+
run(_template?: string): Promise<ScreenerResult[]>;
|
|
612
|
+
private _filterByIndex;
|
|
613
|
+
}
|
|
614
|
+
declare function screenStocks(options: {
|
|
615
|
+
template?: string;
|
|
616
|
+
sector?: string;
|
|
617
|
+
index?: string;
|
|
618
|
+
recommendation?: string;
|
|
619
|
+
market_cap_min?: number;
|
|
620
|
+
market_cap_max?: number;
|
|
621
|
+
pe_min?: number;
|
|
622
|
+
pe_max?: number;
|
|
623
|
+
dividend_yield_min?: number;
|
|
624
|
+
dividend_yield_max?: number;
|
|
625
|
+
[key: string]: unknown;
|
|
626
|
+
}): Promise<ScreenerResult[]>;
|
|
627
|
+
declare function screenerCriteria(): Promise<ScreenerCriteria[]>;
|
|
628
|
+
declare function sectors(): Promise<{
|
|
629
|
+
id: string;
|
|
630
|
+
name: string;
|
|
631
|
+
}[]>;
|
|
632
|
+
declare function stockIndices(): Promise<{
|
|
633
|
+
id: string;
|
|
634
|
+
name: string;
|
|
635
|
+
}[]>;
|
|
636
|
+
|
|
637
|
+
interface ScanResult$1 {
|
|
638
|
+
symbol: string;
|
|
639
|
+
data: Record<string, unknown>;
|
|
640
|
+
conditionsMet: string[];
|
|
641
|
+
timestamp: Date;
|
|
642
|
+
}
|
|
643
|
+
declare function scan(universe: string | string[], condition: string, interval?: string, limit?: number): Promise<ScanResult$1[]>;
|
|
644
|
+
declare class TechnicalScanner {
|
|
645
|
+
private _symbols;
|
|
646
|
+
private _conditions;
|
|
647
|
+
private _conditionNames;
|
|
648
|
+
private _interval;
|
|
649
|
+
private _extraColumns;
|
|
650
|
+
setUniverse(universe: string | string[]): Promise<TechnicalScanner>;
|
|
651
|
+
addSymbol(symbol: string): TechnicalScanner;
|
|
652
|
+
removeSymbol(symbol: string): TechnicalScanner;
|
|
653
|
+
addCondition(condition: string, name?: string): TechnicalScanner;
|
|
654
|
+
removeCondition(nameOrCondition: string): TechnicalScanner;
|
|
655
|
+
clearConditions(): TechnicalScanner;
|
|
656
|
+
setInterval(interval: string): TechnicalScanner;
|
|
657
|
+
addColumn(column: string): TechnicalScanner;
|
|
658
|
+
run(limit?: number): Promise<ScanResult$1[]>;
|
|
659
|
+
private _evaluateCondition;
|
|
660
|
+
private _getValue;
|
|
661
|
+
get symbols(): string[];
|
|
662
|
+
get conditions(): string[];
|
|
663
|
+
toString(): string;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
interface BondData {
|
|
667
|
+
name: string;
|
|
668
|
+
maturity: string | null;
|
|
669
|
+
yield: number | null;
|
|
670
|
+
yieldDecimal: number | null;
|
|
671
|
+
change: number | null;
|
|
672
|
+
changePct: number | null;
|
|
673
|
+
url: string;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
declare class Bond {
|
|
677
|
+
static readonly MATURITIES: string[];
|
|
678
|
+
private _maturity;
|
|
679
|
+
private _dataCache;
|
|
680
|
+
constructor(maturity: string);
|
|
681
|
+
get maturity(): string;
|
|
682
|
+
private load;
|
|
683
|
+
get name(): Promise<string>;
|
|
684
|
+
get yieldRate(): Promise<number | null>;
|
|
685
|
+
get yieldDecimal(): Promise<number | null>;
|
|
686
|
+
get change(): Promise<number | null>;
|
|
687
|
+
get changePct(): Promise<number | null>;
|
|
688
|
+
get info(): Promise<BondData | null>;
|
|
689
|
+
}
|
|
690
|
+
declare function bonds(): Promise<BondData[]>;
|
|
691
|
+
declare function riskFreeRate(): Promise<number | null>;
|
|
692
|
+
|
|
693
|
+
declare class Crypto {
|
|
694
|
+
private _pair;
|
|
695
|
+
private _currentCache;
|
|
696
|
+
constructor(pair: string);
|
|
697
|
+
get pair(): string;
|
|
698
|
+
get symbol(): string;
|
|
699
|
+
private get _btcturk();
|
|
700
|
+
get current(): Promise<CurrentData>;
|
|
701
|
+
history(options?: {
|
|
702
|
+
interval?: string;
|
|
703
|
+
start?: Date | string;
|
|
704
|
+
end?: Date | string;
|
|
705
|
+
}): Promise<OHLCVData[]>;
|
|
706
|
+
technicals(interval?: string): Promise<TechnicalAnalyzer>;
|
|
707
|
+
}
|
|
708
|
+
declare function cryptoList(): Promise<string[]>;
|
|
709
|
+
|
|
710
|
+
declare class FX {
|
|
711
|
+
private _asset;
|
|
712
|
+
private _currentCache;
|
|
713
|
+
constructor(asset: string);
|
|
714
|
+
get asset(): string;
|
|
715
|
+
get symbol(): string;
|
|
716
|
+
private get _canlidoviz();
|
|
717
|
+
private get _dovizcom();
|
|
718
|
+
private get _tradingview();
|
|
719
|
+
private isCanliDovizSupported;
|
|
720
|
+
private getTradingViewSymbol;
|
|
721
|
+
get current(): Promise<CurrentData>;
|
|
722
|
+
get info(): Promise<CurrentData>;
|
|
723
|
+
get bankRates(): Promise<BankRate[]>;
|
|
724
|
+
institutionRates(): Promise<MetalInstitutionRate[]>;
|
|
725
|
+
history(options?: {
|
|
726
|
+
period?: string;
|
|
727
|
+
interval?: string;
|
|
728
|
+
start?: Date | string;
|
|
729
|
+
end?: Date | string;
|
|
730
|
+
}): Promise<OHLCVData[]>;
|
|
731
|
+
}
|
|
732
|
+
declare function banks(): string[];
|
|
733
|
+
declare function metalInstitutions(): string[];
|
|
734
|
+
|
|
735
|
+
interface CompanyInfo {
|
|
736
|
+
ticker: string;
|
|
737
|
+
name: string;
|
|
738
|
+
city: string;
|
|
739
|
+
}
|
|
740
|
+
declare function companies(): Promise<CompanyInfo[]>;
|
|
741
|
+
declare function searchCompanies(query: string): Promise<CompanyInfo[]>;
|
|
742
|
+
|
|
743
|
+
declare class Portfolio {
|
|
744
|
+
private holdings;
|
|
745
|
+
private benchmark;
|
|
746
|
+
add(symbol: string, options: {
|
|
747
|
+
shares: number;
|
|
748
|
+
cost?: number;
|
|
749
|
+
assetType?: "stock" | "fx" | "crypto" | "fund";
|
|
750
|
+
}): Portfolio;
|
|
751
|
+
update(symbol: string, options: {
|
|
752
|
+
shares?: number;
|
|
753
|
+
cost?: number;
|
|
754
|
+
}): Portfolio;
|
|
755
|
+
remove(symbol: string): Portfolio;
|
|
756
|
+
setBenchmark(symbol: string): Portfolio;
|
|
757
|
+
get value(): Promise<number>;
|
|
758
|
+
private calculateTotalValue;
|
|
759
|
+
get cost(): number;
|
|
760
|
+
get pnl(): Promise<number>;
|
|
761
|
+
get pnlPct(): Promise<number>;
|
|
762
|
+
get weights(): Promise<Record<string, number>>;
|
|
763
|
+
toDict(): {
|
|
764
|
+
benchmark: string;
|
|
765
|
+
holdings: Array<Holding & {
|
|
766
|
+
symbol: string;
|
|
767
|
+
}>;
|
|
768
|
+
};
|
|
769
|
+
static fromDict(data: {
|
|
770
|
+
benchmark?: string;
|
|
771
|
+
holdings: Array<Holding & {
|
|
772
|
+
symbol: string;
|
|
773
|
+
}>;
|
|
774
|
+
}): Portfolio;
|
|
775
|
+
clear(): Portfolio;
|
|
776
|
+
private detectAssetType;
|
|
777
|
+
get symbols(): string[];
|
|
778
|
+
holdingsDetail(): Promise<Array<{
|
|
779
|
+
symbol: string;
|
|
780
|
+
assetType: string;
|
|
781
|
+
shares: number;
|
|
782
|
+
cost: number;
|
|
783
|
+
currentPrice: number;
|
|
784
|
+
value: number;
|
|
785
|
+
weight: number;
|
|
786
|
+
pnl: number;
|
|
787
|
+
pnlPct: number;
|
|
788
|
+
}>>;
|
|
789
|
+
history(period?: string): Promise<Array<{
|
|
790
|
+
date: Date;
|
|
791
|
+
value: number;
|
|
792
|
+
dailyReturn: number;
|
|
793
|
+
}>>;
|
|
794
|
+
performance(): Promise<{
|
|
795
|
+
totalReturn: number;
|
|
796
|
+
annualizedReturn: number;
|
|
797
|
+
totalValue: number;
|
|
798
|
+
totalCost: number;
|
|
799
|
+
totalPnl: number;
|
|
800
|
+
}>;
|
|
801
|
+
riskMetrics(period?: string, riskFreeRate?: number): Promise<{
|
|
802
|
+
annualizedReturn: number;
|
|
803
|
+
annualizedVolatility: number;
|
|
804
|
+
sharpeRatio: number;
|
|
805
|
+
sortinoRatio: number;
|
|
806
|
+
maxDrawdown: number;
|
|
807
|
+
riskFreeRate: number;
|
|
808
|
+
tradingDays: number;
|
|
809
|
+
}>;
|
|
810
|
+
sharpeRatio(period?: string): Promise<number>;
|
|
811
|
+
sortinoRatio(period?: string): Promise<number>;
|
|
812
|
+
beta(benchmarkSymbol?: string, period?: string): Promise<number>;
|
|
813
|
+
correlationMatrix(period?: string): Promise<Record<string, Record<string, number>>>;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
declare function calculateHeikinAshi(data: OHLCVData[] | null): OHLCVData[];
|
|
817
|
+
|
|
818
|
+
declare const STANDARD_INDICATORS: Record<string, string>;
|
|
819
|
+
declare const INDICATOR_OUTPUTS: Record<string, Record<string, string>>;
|
|
820
|
+
interface IndicatorMetadata {
|
|
821
|
+
pineId: string;
|
|
822
|
+
pineVersion: string;
|
|
823
|
+
inputs: Record<string, unknown>;
|
|
824
|
+
plots: Record<string, unknown>;
|
|
825
|
+
defaults: Record<string, unknown>;
|
|
826
|
+
output_mapping?: Record<string, string>;
|
|
827
|
+
}
|
|
828
|
+
declare class PineFacadeProvider extends BaseProvider {
|
|
829
|
+
private static readonly BASE_URL;
|
|
830
|
+
private _indicatorCache;
|
|
831
|
+
constructor();
|
|
832
|
+
getIndicator(indicatorId: string, version?: string, session?: string, signature?: string): Promise<IndicatorMetadata>;
|
|
833
|
+
getOutputMapping(indicatorId: string): Record<string, string>;
|
|
834
|
+
private _normalizeIndicatorId;
|
|
835
|
+
private _needsAuth;
|
|
836
|
+
private _parseIndicatorResponse;
|
|
837
|
+
}
|
|
838
|
+
declare function getPineFacadeProvider(): PineFacadeProvider;
|
|
839
|
+
|
|
840
|
+
declare const OSCILLATOR_COLUMNS: string[];
|
|
841
|
+
declare const MOVING_AVERAGE_COLUMNS: string[];
|
|
842
|
+
declare const INTERVAL_MAP: Record<string, string>;
|
|
843
|
+
interface TASignalGroup {
|
|
844
|
+
recommendation: string;
|
|
845
|
+
buy: number;
|
|
846
|
+
sell: number;
|
|
847
|
+
neutral: number;
|
|
848
|
+
compute?: Record<string, string>;
|
|
849
|
+
values?: Record<string, number | null>;
|
|
850
|
+
}
|
|
851
|
+
interface TASignals {
|
|
852
|
+
symbol: string;
|
|
853
|
+
exchange: string;
|
|
854
|
+
interval: string;
|
|
855
|
+
summary: TASignalGroup;
|
|
856
|
+
oscillators: TASignalGroup;
|
|
857
|
+
moving_averages: TASignalGroup;
|
|
858
|
+
}
|
|
859
|
+
declare class TradingViewScannerProvider extends BaseProvider {
|
|
860
|
+
private static readonly SCANNER_URL;
|
|
861
|
+
private static readonly SCREENERS;
|
|
862
|
+
private static readonly CACHE_TTL;
|
|
863
|
+
constructor();
|
|
864
|
+
getTASignals(symbol: string, screener?: string, interval?: string): Promise<TASignals>;
|
|
865
|
+
private _getColumnsWithInterval;
|
|
866
|
+
private _calculateSignals;
|
|
867
|
+
private _processRec;
|
|
868
|
+
private _recToSignal;
|
|
869
|
+
private _countSignals;
|
|
870
|
+
private _getRecommendation;
|
|
871
|
+
}
|
|
872
|
+
declare function getScannerProvider(): TradingViewScannerProvider;
|
|
873
|
+
|
|
874
|
+
interface SearchResult {
|
|
875
|
+
symbol: string;
|
|
876
|
+
full_name: string;
|
|
877
|
+
description: string;
|
|
878
|
+
exchange: string;
|
|
879
|
+
type: string;
|
|
880
|
+
currency: string;
|
|
881
|
+
country: string;
|
|
882
|
+
provider_id?: string;
|
|
883
|
+
}
|
|
884
|
+
declare class TradingViewSearchProvider extends BaseProvider {
|
|
885
|
+
private static readonly SEARCH_URL_V3;
|
|
886
|
+
private static readonly SEARCH_URL_LEGACY;
|
|
887
|
+
private static readonly CACHE_TTL;
|
|
888
|
+
private static readonly TYPE_MAPPING;
|
|
889
|
+
private static readonly EXCHANGE_MAPPING;
|
|
890
|
+
private static readonly DEFAULT_LIMIT;
|
|
891
|
+
private static readonly MAX_LIMIT;
|
|
892
|
+
constructor();
|
|
893
|
+
search(query: string, assetType?: string, exchange?: string, limit?: number): Promise<SearchResult[]>;
|
|
894
|
+
searchBist(query: string, limit?: number): Promise<SearchResult[]>;
|
|
895
|
+
searchCrypto(query: string, limit?: number): Promise<SearchResult[]>;
|
|
896
|
+
searchForex(query: string, limit?: number): Promise<SearchResult[]>;
|
|
897
|
+
private _fetch;
|
|
898
|
+
private _parseResults;
|
|
899
|
+
}
|
|
900
|
+
declare function getSearchProvider(): TradingViewSearchProvider;
|
|
901
|
+
|
|
902
|
+
type Signal = "BUY" | "SELL" | "HOLD" | null;
|
|
903
|
+
type Position = "long" | "short" | null;
|
|
904
|
+
type StrategyFunc = (candle: Candle, position: Position, indicators: Record<string, number>) => Signal | Promise<Signal>;
|
|
905
|
+
interface Candle {
|
|
906
|
+
timestamp: Date;
|
|
907
|
+
open: number;
|
|
908
|
+
high: number;
|
|
909
|
+
low: number;
|
|
910
|
+
close: number;
|
|
911
|
+
volume: number;
|
|
912
|
+
_index: number;
|
|
913
|
+
}
|
|
914
|
+
interface Trade {
|
|
915
|
+
entryTime: Date;
|
|
916
|
+
entryPrice: number;
|
|
917
|
+
exitTime?: Date;
|
|
918
|
+
exitPrice?: number;
|
|
919
|
+
side: "long" | "short";
|
|
920
|
+
shares: number;
|
|
921
|
+
commission: number;
|
|
922
|
+
profit?: number;
|
|
923
|
+
profitPct?: number;
|
|
924
|
+
duration?: number;
|
|
925
|
+
}
|
|
926
|
+
interface BacktestResult {
|
|
927
|
+
symbol: string;
|
|
928
|
+
period: string;
|
|
929
|
+
interval: string;
|
|
930
|
+
strategyName: string;
|
|
931
|
+
initialCapital: number;
|
|
932
|
+
commission: number;
|
|
933
|
+
trades: Trade[];
|
|
934
|
+
netProfit: number;
|
|
935
|
+
netProfitPct: number;
|
|
936
|
+
finalEquity: number;
|
|
937
|
+
totalTrades: number;
|
|
938
|
+
winningTrades: number;
|
|
939
|
+
losingTrades: number;
|
|
940
|
+
winRate: number;
|
|
941
|
+
profitFactor: number;
|
|
942
|
+
avgTrade: number;
|
|
943
|
+
maxDrawdown: number;
|
|
944
|
+
maxDrawdownDuration: number;
|
|
945
|
+
sharpeRatio: number;
|
|
946
|
+
sortinoRatio: number;
|
|
947
|
+
calmarRatio: number;
|
|
948
|
+
buyHoldReturn: number;
|
|
949
|
+
vsBuyHold: number;
|
|
950
|
+
equityCurve: {
|
|
951
|
+
date: Date;
|
|
952
|
+
value: number;
|
|
953
|
+
}[];
|
|
954
|
+
drawdownCurve: {
|
|
955
|
+
date: Date;
|
|
956
|
+
value: number;
|
|
957
|
+
}[];
|
|
958
|
+
buyHoldCurve: {
|
|
959
|
+
date: Date;
|
|
960
|
+
value: number;
|
|
961
|
+
}[];
|
|
962
|
+
}
|
|
963
|
+
declare class BacktestEngine {
|
|
964
|
+
private symbol;
|
|
965
|
+
private strategy;
|
|
966
|
+
private period;
|
|
967
|
+
private interval;
|
|
968
|
+
private capital;
|
|
969
|
+
private commission;
|
|
970
|
+
private indicators;
|
|
971
|
+
private warmupPeriod;
|
|
972
|
+
constructor(symbol: string, strategy: StrategyFunc, options?: {
|
|
973
|
+
period?: Period;
|
|
974
|
+
interval?: Interval;
|
|
975
|
+
capital?: number;
|
|
976
|
+
commission?: number;
|
|
977
|
+
indicators?: string[];
|
|
978
|
+
});
|
|
979
|
+
run(): Promise<BacktestResult>;
|
|
980
|
+
private _calculateIndicators;
|
|
981
|
+
private _merge;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
interface Quote {
|
|
985
|
+
symbol: string;
|
|
986
|
+
[key: string]: unknown;
|
|
987
|
+
}
|
|
988
|
+
interface StudyDataPoint {
|
|
989
|
+
v: number[];
|
|
990
|
+
}
|
|
991
|
+
interface StudyUpdateData {
|
|
992
|
+
st?: StudyDataPoint[];
|
|
993
|
+
s?: StudyDataPoint[];
|
|
994
|
+
}
|
|
995
|
+
interface PineStudy {
|
|
996
|
+
indicatorId: string;
|
|
997
|
+
studyId: string;
|
|
998
|
+
symbol: string;
|
|
999
|
+
interval: string;
|
|
1000
|
+
inputs: Record<string, unknown>;
|
|
1001
|
+
metadata: IndicatorMetadata;
|
|
1002
|
+
values: Record<string, number>;
|
|
1003
|
+
ready: boolean;
|
|
1004
|
+
}
|
|
1005
|
+
declare class StudySession {
|
|
1006
|
+
private _stream;
|
|
1007
|
+
private _studies;
|
|
1008
|
+
private _studyCounter;
|
|
1009
|
+
private _studyIdMap;
|
|
1010
|
+
constructor(stream: TradingViewStream);
|
|
1011
|
+
add(symbol: string, interval: string, indicator: string, inputs?: Record<string, unknown>): Promise<string>;
|
|
1012
|
+
get(symbol: string, interval: string, indicator: string): Record<string, number> | null;
|
|
1013
|
+
handleData(studyId: string, data: StudyUpdateData): void;
|
|
1014
|
+
private _buildTvInputs;
|
|
1015
|
+
remove(symbol: string, interval: string, indicator: string): void;
|
|
1016
|
+
getAll(symbol: string, interval: string): Record<string, Record<string, number>>;
|
|
1017
|
+
waitFor(symbol: string, interval: string, indicator: string, timeout?: number): Promise<Record<string, number>>;
|
|
1018
|
+
onUpdate(symbol: string, interval: string, indicator: string, callback: (values: Record<string, number>) => void): void;
|
|
1019
|
+
onAnyUpdate(callback: (symbol: string, interval: string, indicator: string, values: Record<string, number>) => void): void;
|
|
1020
|
+
}
|
|
1021
|
+
interface StreamCandle {
|
|
1022
|
+
time: Date;
|
|
1023
|
+
open: number;
|
|
1024
|
+
high: number;
|
|
1025
|
+
low: number;
|
|
1026
|
+
close: number;
|
|
1027
|
+
volume: number;
|
|
1028
|
+
}
|
|
1029
|
+
declare class TradingViewStream extends EventEmitter {
|
|
1030
|
+
private static readonly WS_URL;
|
|
1031
|
+
private static readonly ORIGIN;
|
|
1032
|
+
private ws;
|
|
1033
|
+
private isConnected;
|
|
1034
|
+
private _quoteSession;
|
|
1035
|
+
private _chartSession;
|
|
1036
|
+
private _subscribedSymbols;
|
|
1037
|
+
private _chartSubscriptions;
|
|
1038
|
+
private _seriesIdMap;
|
|
1039
|
+
private _candleCache;
|
|
1040
|
+
private _quoteCache;
|
|
1041
|
+
private _seriesCounter;
|
|
1042
|
+
private _shouldReconnect;
|
|
1043
|
+
private _reconnecting;
|
|
1044
|
+
readonly studies: StudySession;
|
|
1045
|
+
constructor();
|
|
1046
|
+
get chartSession(): string;
|
|
1047
|
+
connect(): Promise<void>;
|
|
1048
|
+
disconnect(): void;
|
|
1049
|
+
subscribe(symbol: string, exchange?: string): void;
|
|
1050
|
+
unsubscribe(symbol: string, exchange?: string): void;
|
|
1051
|
+
getQuote(symbol: string, exchange?: string): Quote | null;
|
|
1052
|
+
waitForQuote(symbol: string, exchange?: string, timeout?: number): Promise<Quote>;
|
|
1053
|
+
subscribeMultiple(symbols: string[], exchange?: string): void;
|
|
1054
|
+
unsubscribeMultiple(symbols: string[], exchange?: string): void;
|
|
1055
|
+
onAnyQuote(callback: (quote: Quote) => void): void;
|
|
1056
|
+
onAnyCandle(callback: (data: {
|
|
1057
|
+
symbol: string;
|
|
1058
|
+
interval: string;
|
|
1059
|
+
candle: StreamCandle;
|
|
1060
|
+
}) => void): void;
|
|
1061
|
+
subscribeChart(symbol: string, interval?: string, exchange?: string): void;
|
|
1062
|
+
unsubscribeChart(symbol: string, interval: string, exchange?: string): void;
|
|
1063
|
+
getCandle(symbol: string, interval: string, exchange?: string): StreamCandle | null;
|
|
1064
|
+
getCandles(symbol: string, interval: string, count?: number, exchange?: string): StreamCandle[];
|
|
1065
|
+
waitForCandle(symbol: string, interval: string, timeout?: number, exchange?: string): Promise<StreamCandle>;
|
|
1066
|
+
onQuote(symbol: string, callback: (quote: Quote) => void, exchange?: string): void;
|
|
1067
|
+
onCandle(symbol: string, interval: string, callback: (candle: StreamCandle) => void, exchange?: string): void;
|
|
1068
|
+
send(method: string, params: unknown[]): void;
|
|
1069
|
+
private _generateId;
|
|
1070
|
+
private _parseMessage;
|
|
1071
|
+
private _handlePacket;
|
|
1072
|
+
private _handleQuoteData;
|
|
1073
|
+
private _handleChartData;
|
|
1074
|
+
private _reconnect;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
interface ReplayCandle extends OHLCVData {
|
|
1078
|
+
_index: number;
|
|
1079
|
+
_total: number;
|
|
1080
|
+
_progress: number;
|
|
1081
|
+
}
|
|
1082
|
+
interface ReplayStats {
|
|
1083
|
+
symbol: string;
|
|
1084
|
+
totalCandles: number;
|
|
1085
|
+
currentIndex: number;
|
|
1086
|
+
progress: number;
|
|
1087
|
+
speed: number;
|
|
1088
|
+
realtimeInjection: boolean;
|
|
1089
|
+
elapsedTime: number;
|
|
1090
|
+
startDate: Date | null;
|
|
1091
|
+
endDate: Date | null;
|
|
1092
|
+
callbacksRegistered: number;
|
|
1093
|
+
}
|
|
1094
|
+
type CandleCallback = (candle: ReplayCandle) => void;
|
|
1095
|
+
declare class ReplaySession extends EventEmitter {
|
|
1096
|
+
private data;
|
|
1097
|
+
private _symbol;
|
|
1098
|
+
private speed;
|
|
1099
|
+
private realtimeInjection;
|
|
1100
|
+
private currentIndex;
|
|
1101
|
+
private startTime;
|
|
1102
|
+
private isReplaying;
|
|
1103
|
+
private _callbacks;
|
|
1104
|
+
constructor(symbol: string, data: OHLCVData[], options?: {
|
|
1105
|
+
speed?: number;
|
|
1106
|
+
realtimeInjection?: boolean;
|
|
1107
|
+
});
|
|
1108
|
+
get symbol(): string;
|
|
1109
|
+
get totalCandles(): number;
|
|
1110
|
+
get progress(): number;
|
|
1111
|
+
setData(data: OHLCVData[]): void;
|
|
1112
|
+
setSpeed(speed: number): void;
|
|
1113
|
+
onCandle(callback: CandleCallback): void;
|
|
1114
|
+
removeCallback(callback: CandleCallback): void;
|
|
1115
|
+
reset(): void;
|
|
1116
|
+
stats(): ReplayStats;
|
|
1117
|
+
private _buildCandle;
|
|
1118
|
+
private _calculateDelay;
|
|
1119
|
+
private _fireCallbacks;
|
|
1120
|
+
replay(): AsyncGenerator<ReplayCandle>;
|
|
1121
|
+
replayFiltered(options?: {
|
|
1122
|
+
startDate?: Date | string;
|
|
1123
|
+
endDate?: Date | string;
|
|
1124
|
+
}): AsyncGenerator<ReplayCandle>;
|
|
1125
|
+
stop(): void;
|
|
1126
|
+
}
|
|
1127
|
+
declare function createReplay(symbol: string, options?: {
|
|
1128
|
+
period?: Period;
|
|
1129
|
+
interval?: Interval;
|
|
1130
|
+
speed?: number;
|
|
1131
|
+
realtimeInjection?: boolean;
|
|
1132
|
+
}): Promise<ReplaySession>;
|
|
1133
|
+
|
|
1134
|
+
declare const INDICES: Record<string, {
|
|
1135
|
+
name: string;
|
|
1136
|
+
}>;
|
|
1137
|
+
declare function indices(detailed?: boolean): Promise<string[] | Array<{
|
|
1138
|
+
symbol: string;
|
|
1139
|
+
name: string;
|
|
1140
|
+
count: number;
|
|
1141
|
+
}>>;
|
|
1142
|
+
declare function allIndices(): Promise<Array<{
|
|
1143
|
+
symbol: string;
|
|
1144
|
+
name: string;
|
|
1145
|
+
count: number;
|
|
1146
|
+
}>>;
|
|
1147
|
+
declare function index(symbol: string): Index;
|
|
1148
|
+
declare class Index {
|
|
1149
|
+
readonly symbol: string;
|
|
1150
|
+
constructor(symbol: string);
|
|
1151
|
+
get info(): Promise<IndexInfo>;
|
|
1152
|
+
history(options?: {
|
|
1153
|
+
period?: Period;
|
|
1154
|
+
interval?: Interval;
|
|
1155
|
+
start?: Date | string;
|
|
1156
|
+
end?: Date | string;
|
|
1157
|
+
}): Promise<OHLCVData[]>;
|
|
1158
|
+
get components(): Promise<IndexComponent[]>;
|
|
1159
|
+
componentSymbols(): Promise<string[]>;
|
|
1160
|
+
private calculateStartDate;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
interface UnifiedSearchResult {
|
|
1164
|
+
symbol: string;
|
|
1165
|
+
fullName: string;
|
|
1166
|
+
description: string;
|
|
1167
|
+
exchange: string;
|
|
1168
|
+
type: string;
|
|
1169
|
+
currency: string;
|
|
1170
|
+
country: string;
|
|
1171
|
+
source?: string;
|
|
1172
|
+
}
|
|
1173
|
+
declare function search(query: string, options?: {
|
|
1174
|
+
type?: string;
|
|
1175
|
+
exchange?: string;
|
|
1176
|
+
limit?: number;
|
|
1177
|
+
fullInfo?: boolean;
|
|
1178
|
+
}): Promise<string[] | UnifiedSearchResult[]>;
|
|
1179
|
+
declare function searchBist(query: string, limit?: number): Promise<string[]>;
|
|
1180
|
+
declare function searchCrypto(query: string, limit?: number): Promise<string[]>;
|
|
1181
|
+
declare function searchForex(query: string, limit?: number): Promise<string[]>;
|
|
1182
|
+
declare function searchIndex(query: string, limit?: number): Promise<string[]>;
|
|
1183
|
+
|
|
1184
|
+
interface VIOPContract {
|
|
1185
|
+
code: string;
|
|
1186
|
+
contract: string;
|
|
1187
|
+
price: number | null;
|
|
1188
|
+
change: number | null;
|
|
1189
|
+
volumeTL: number | null;
|
|
1190
|
+
volumeQty: number | null;
|
|
1191
|
+
category: string;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
declare class VIOP {
|
|
1195
|
+
private _futuresCache;
|
|
1196
|
+
private _optionsCache;
|
|
1197
|
+
get futures(): Promise<VIOPContract[]>;
|
|
1198
|
+
get stockFutures(): Promise<VIOPContract[]>;
|
|
1199
|
+
get indexFutures(): Promise<VIOPContract[]>;
|
|
1200
|
+
get currencyFutures(): Promise<VIOPContract[]>;
|
|
1201
|
+
get commodityFutures(): Promise<VIOPContract[]>;
|
|
1202
|
+
get options(): Promise<VIOPContract[]>;
|
|
1203
|
+
get stockOptions(): Promise<VIOPContract[]>;
|
|
1204
|
+
get indexOptions(): Promise<VIOPContract[]>;
|
|
1205
|
+
getBySymbol(symbol: string): Promise<VIOPContract[]>;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
interface RateRecord {
|
|
1209
|
+
date: Date | null;
|
|
1210
|
+
borrowing: number | null;
|
|
1211
|
+
lending: number | null;
|
|
1212
|
+
}
|
|
1213
|
+
interface AllRatesRecord extends RateRecord {
|
|
1214
|
+
rateType: string;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
declare class TCMB {
|
|
1218
|
+
get policyRate(): Promise<number | null>;
|
|
1219
|
+
get overnight(): Promise<{
|
|
1220
|
+
borrowing: number | null;
|
|
1221
|
+
lending: number | null;
|
|
1222
|
+
}>;
|
|
1223
|
+
get lateLiquidity(): Promise<{
|
|
1224
|
+
borrowing: number | null;
|
|
1225
|
+
lending: number | null;
|
|
1226
|
+
}>;
|
|
1227
|
+
get rates(): Promise<AllRatesRecord[]>;
|
|
1228
|
+
history(rateType?: "policy" | "overnight" | "late_liquidity", period?: string): Promise<RateRecord[]>;
|
|
1229
|
+
}
|
|
1230
|
+
declare function policyRate(): Promise<number | null>;
|
|
1231
|
+
|
|
1232
|
+
interface CalendarEvent {
|
|
1233
|
+
date: Date;
|
|
1234
|
+
time: string | null;
|
|
1235
|
+
countryCode: string;
|
|
1236
|
+
country: string;
|
|
1237
|
+
event: string;
|
|
1238
|
+
importance: "low" | "mid" | "high";
|
|
1239
|
+
period: string;
|
|
1240
|
+
actual: string | null;
|
|
1241
|
+
forecast: string | null;
|
|
1242
|
+
previous: string | null;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
declare const COUNTRIES: string[];
|
|
1246
|
+
declare class EconomicCalendar {
|
|
1247
|
+
events(options?: {
|
|
1248
|
+
period?: string;
|
|
1249
|
+
start?: Date | string;
|
|
1250
|
+
end?: Date | string;
|
|
1251
|
+
country?: string | string[];
|
|
1252
|
+
importance?: "low" | "mid" | "high";
|
|
1253
|
+
}): Promise<CalendarEvent[]>;
|
|
1254
|
+
today(options?: {
|
|
1255
|
+
country?: string | string[];
|
|
1256
|
+
importance?: "low" | "mid" | "high";
|
|
1257
|
+
}): Promise<CalendarEvent[]>;
|
|
1258
|
+
thisWeek(options?: {
|
|
1259
|
+
country?: string | string[];
|
|
1260
|
+
importance?: "low" | "mid" | "high";
|
|
1261
|
+
}): Promise<CalendarEvent[]>;
|
|
1262
|
+
thisMonth(options?: {
|
|
1263
|
+
country?: string | string[];
|
|
1264
|
+
importance?: "low" | "mid" | "high";
|
|
1265
|
+
}): Promise<CalendarEvent[]>;
|
|
1266
|
+
highImportance(options?: {
|
|
1267
|
+
period?: string;
|
|
1268
|
+
country?: string | string[];
|
|
1269
|
+
}): Promise<CalendarEvent[]>;
|
|
1270
|
+
static countries(): string[];
|
|
1271
|
+
}
|
|
1272
|
+
declare function economicCalendar(options?: {
|
|
1273
|
+
period?: string;
|
|
1274
|
+
country?: string | string[];
|
|
1275
|
+
importance?: "low" | "mid" | "high";
|
|
1276
|
+
}): Promise<CalendarEvent[]>;
|
|
1277
|
+
|
|
1278
|
+
declare class Inflation {
|
|
1279
|
+
latest(): Promise<Record<string, number>>;
|
|
1280
|
+
calculate(amount: number, startDate: string, endDate: string): Promise<number>;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
interface EurobondData {
|
|
1284
|
+
isin: string;
|
|
1285
|
+
maturity: Date | null;
|
|
1286
|
+
daysToMaturity: number;
|
|
1287
|
+
currency: string;
|
|
1288
|
+
bidPrice: number | null;
|
|
1289
|
+
bidYield: number | null;
|
|
1290
|
+
askPrice: number | null;
|
|
1291
|
+
askYield: number | null;
|
|
1292
|
+
}
|
|
1293
|
+
declare function eurobonds(currency?: string): Promise<EurobondData[]>;
|
|
1294
|
+
declare class Eurobond$1 {
|
|
1295
|
+
readonly isin: string;
|
|
1296
|
+
constructor(isin: string);
|
|
1297
|
+
yieldRate(): Promise<number>;
|
|
1298
|
+
getData(): Promise<EurobondData | null>;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
declare class BorsaTSError extends Error {
|
|
1302
|
+
constructor(message: string);
|
|
1303
|
+
}
|
|
1304
|
+
declare class TickerNotFoundError extends BorsaTSError {
|
|
1305
|
+
constructor(symbol: string);
|
|
1306
|
+
}
|
|
1307
|
+
declare class DataNotAvailableError extends BorsaTSError {
|
|
1308
|
+
constructor(message: string);
|
|
1309
|
+
}
|
|
1310
|
+
declare class APIError extends BorsaTSError {
|
|
1311
|
+
statusCode?: number;
|
|
1312
|
+
response?: unknown;
|
|
1313
|
+
constructor(message: string, statusCode?: number, response?: unknown);
|
|
1314
|
+
}
|
|
1315
|
+
declare class AuthenticationError extends BorsaTSError {
|
|
1316
|
+
constructor(message?: string);
|
|
1317
|
+
}
|
|
1318
|
+
declare class RateLimitError extends BorsaTSError {
|
|
1319
|
+
retryAfter?: number;
|
|
1320
|
+
constructor(message?: string, retryAfter?: number);
|
|
1321
|
+
}
|
|
1322
|
+
declare class InvalidPeriodError extends BorsaTSError {
|
|
1323
|
+
constructor(period: string, validPeriods: string[]);
|
|
1324
|
+
}
|
|
1325
|
+
declare class InvalidIntervalError extends BorsaTSError {
|
|
1326
|
+
constructor(interval: string, validIntervals: string[]);
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
declare const FIELD_MAP: Record<string, string>;
|
|
1330
|
+
declare const OPERATORS: Record<string, string>;
|
|
1331
|
+
declare const LOCAL_CALC_FIELDS: Set<string>;
|
|
1332
|
+
declare const DEFAULT_COLUMNS: string[];
|
|
1333
|
+
interface ScanOptions {
|
|
1334
|
+
symbols: string[];
|
|
1335
|
+
conditions: string[];
|
|
1336
|
+
columns?: string[];
|
|
1337
|
+
interval?: string;
|
|
1338
|
+
limit?: number;
|
|
1339
|
+
}
|
|
1340
|
+
interface ScanResult {
|
|
1341
|
+
symbol: string;
|
|
1342
|
+
close?: number;
|
|
1343
|
+
change?: number;
|
|
1344
|
+
volume?: number;
|
|
1345
|
+
market_cap?: number;
|
|
1346
|
+
[key: string]: string | number | null | undefined;
|
|
1347
|
+
}
|
|
1348
|
+
interface ParsedCondition {
|
|
1349
|
+
left: string;
|
|
1350
|
+
operator: string;
|
|
1351
|
+
right: string | number;
|
|
1352
|
+
}
|
|
1353
|
+
declare class TVScreenerProvider extends BaseProvider {
|
|
1354
|
+
private static readonly SCANNER_URL;
|
|
1355
|
+
getTVColumn(field: string, interval?: string): string;
|
|
1356
|
+
parseNumber(value: string): number;
|
|
1357
|
+
requiresLocalCalc(field: string): boolean;
|
|
1358
|
+
parseCondition(condition: string, interval: string): ParsedCondition | null;
|
|
1359
|
+
extractFields(condition: string): string[];
|
|
1360
|
+
separateConditions(conditions: string[]): {
|
|
1361
|
+
api: string[];
|
|
1362
|
+
local: string[];
|
|
1363
|
+
};
|
|
1364
|
+
getSelectColumns(conditions: string[], extraColumns: string[] | undefined, interval: string): string[];
|
|
1365
|
+
scan(options: ScanOptions): Promise<ScanResult[]>;
|
|
1366
|
+
private scanAPI;
|
|
1367
|
+
}
|
|
1368
|
+
declare function getTVScreenerProvider(): TVScreenerProvider;
|
|
1369
|
+
|
|
1370
|
+
interface Eurobond {
|
|
1371
|
+
isin: string;
|
|
1372
|
+
maturity: Date | null;
|
|
1373
|
+
daysToMaturity: number;
|
|
1374
|
+
currency: string;
|
|
1375
|
+
bidPrice: number | null;
|
|
1376
|
+
bidYield: number | null;
|
|
1377
|
+
askPrice: number | null;
|
|
1378
|
+
askYield: number | null;
|
|
1379
|
+
}
|
|
1380
|
+
declare class ZiraatEurobondProvider extends BaseProvider {
|
|
1381
|
+
private _cache;
|
|
1382
|
+
private _cacheTime;
|
|
1383
|
+
private readonly CACHE_TTL;
|
|
1384
|
+
private parseTurkishNumber;
|
|
1385
|
+
private parseDate;
|
|
1386
|
+
private fetchBondsForDate;
|
|
1387
|
+
private hasValidYields;
|
|
1388
|
+
getEurobonds(currency?: string): Promise<Eurobond[]>;
|
|
1389
|
+
getEurobond(isin: string): Promise<Eurobond | null>;
|
|
1390
|
+
}
|
|
1391
|
+
declare function getEurobondProvider(): ZiraatEurobondProvider;
|
|
1392
|
+
|
|
1393
|
+
export { APIError, type ActionData, type AddIndicatorsOptions, type AllRatesRecord, type AllocationData, type AssetType, AuthenticationError, BacktestEngine, type BacktestResult, type BalanceSheet, type BankRate, Bond, BorsaTSError, COUNTRIES, type CacheOptions, type CalendarEvent, type Candle, type CashFlowStatement, type CompanyInfo, Crypto, type CryptoPair, type CurrentData, DEFAULT_COLUMNS, DataNotAvailableError, type DividendData, type ETFHolder, EconomicCalendar, type EnrichedInfo, Eurobond$1 as Eurobond, type EurobondData, FIELD_MAP, FX, FastInfo, type FinancialRow, Fund, type FundInfo, type FundRiskMetrics, type HolderData, type Holding, INDICATOR_OUTPUTS, INDICES, INTERVAL_MAP, type IncomeStatement, Index, type IndexComponent, type IndexInfo, type IndicatorData, type IndicatorMetadata, Inflation, type InstitutionRate, type Interval, InvalidIntervalError, InvalidPeriodError, LOCAL_CALC_FIELDS, MOVING_AVERAGE_COLUMNS, type MetalInstitutionRate, type NewsItem, type OHLCVData, type OHLCVWithActions, OPERATORS, OSCILLATOR_COLUMNS, type Period, PineFacadeProvider, type PineStudy, Portfolio, type Position, type PriceTarget, type ProviderConfig, type Quote, RateLimitError, type RateRecord, type Recommendation, type ReplayCandle, ReplaySession, type ReplayStats, type RequestOptions, type RiskMetrics, STANDARD_INDICATORS, type ScanOptions, type ScanResult$1 as ScanResult, Screener, type ScreenerCriteria, type ScreenerResult, type SearchResult, type Signal, type SplitData, type StrategyFunc, type StreamCandle, StudySession, type TASignalGroup, type TASignals, TCMB, type ScanResult as TVScanResult, TVScreenerProvider, TechnicalAnalyzer, TechnicalScanner, Ticker, TickerNotFoundError, type Trade, TradingViewETFProvider, TradingViewScannerProvider, TradingViewSearchProvider, TradingViewStream, type UnifiedSearchResult, VIOP, type VIOPContract, type Eurobond as ZiraatEurobondData, ZiraatEurobondProvider, addIndicators, allIndices, banks, bonds, calculateADX, calculateATR, calculateBollingerBands, calculateCCI, calculateEMA, calculateHeikinAshi, calculateIchimoku, calculateMACD, calculateOBV, calculatePivotPoints, calculateRSI, calculateSMA, calculateStochastic, calculateSupertrend, calculateTilsonT3, calculateVWAP, calculateWilliamsR, companies, compareFunds, createReplay, cryptoList, economicCalendar, eurobonds, getEurobondProvider, getPineFacadeProvider, getScannerProvider, getSearchProvider, getTVScreenerProvider, getTradingViewETFProvider, index, indices, metalInstitutions, policyRate, riskFreeRate, scan, screenFunds, screenStocks, screenerCriteria, search, searchBist, searchCompanies, searchCrypto, searchForex, searchFunds, searchIndex, sectors, stockIndices };
|