@muhammedaksam/borsats 0.8.4 → 0.8.7

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.d.cts CHANGED
@@ -421,9 +421,11 @@ declare class TechnicalAnalyzer {
421
421
  }>;
422
422
  }
423
423
 
424
+ declare function computeAdjClose(closePrices: number[], closeDates: Date[], dividends: DividendData[]): number[];
424
425
  type OHLCVWithActions = OHLCVData & {
425
426
  dividend?: number;
426
427
  split?: number;
428
+ adjClose?: number;
427
429
  };
428
430
  interface EnrichedInfo extends CurrentData {
429
431
  marketCap?: number;
@@ -484,6 +486,7 @@ declare class Ticker {
484
486
  end?: Date | string;
485
487
  actions?: boolean;
486
488
  adjust?: boolean;
489
+ autoAdjust?: boolean;
487
490
  }): Promise<OHLCVWithActions[]>;
488
491
  private _unadjustPrices;
489
492
  private _mergeActions;
@@ -1480,6 +1483,40 @@ declare class Inflation {
1480
1483
  }>;
1481
1484
  }
1482
1485
 
1486
+ interface Eurobond$1 {
1487
+ isin: string;
1488
+ maturity: Date | null;
1489
+ daysToMaturity: number;
1490
+ currency: string;
1491
+ bidPrice: number | null;
1492
+ bidYield: number | null;
1493
+ askPrice: number | null;
1494
+ askYield: number | null;
1495
+ }
1496
+ interface EurobondHistoryRow {
1497
+ date: Date;
1498
+ bidPrice: number | null;
1499
+ bidYield: number | null;
1500
+ askPrice: number | null;
1501
+ askYield: number | null;
1502
+ daysToMaturity: number;
1503
+ }
1504
+ declare class ZiraatEurobondProvider extends BaseProvider {
1505
+ private _cache;
1506
+ private _cacheTime;
1507
+ private readonly CACHE_TTL;
1508
+ private parseTurkishNumber;
1509
+ private parseDate;
1510
+ private fetchBondsForDate;
1511
+ private hasValidYields;
1512
+ getEurobonds(currency?: string): Promise<Eurobond$1[]>;
1513
+ getEurobond(isin: string): Promise<Eurobond$1 | null>;
1514
+ private fetchBondsForDateCached;
1515
+ static iterBusinessDates(start: Date, end: Date, skipWeekends?: boolean): Date[];
1516
+ getHistory(isin: string, start: Date, end: Date, skipWeekends?: boolean, maxWorkers?: number): Promise<EurobondHistoryRow[]>;
1517
+ }
1518
+ declare function getEurobondProvider(): ZiraatEurobondProvider;
1519
+
1483
1520
  interface EurobondData {
1484
1521
  isin: string;
1485
1522
  maturity: Date | null;
@@ -1491,7 +1528,7 @@ interface EurobondData {
1491
1528
  askYield: number | null;
1492
1529
  }
1493
1530
  declare function eurobonds(currency?: string): Promise<EurobondData[]>;
1494
- declare class Eurobond$1 {
1531
+ declare class Eurobond {
1495
1532
  readonly isin: string;
1496
1533
  constructor(isin: string);
1497
1534
  maturity(): Promise<Date | null>;
@@ -1504,6 +1541,12 @@ declare class Eurobond$1 {
1504
1541
  askYield(): Promise<number | null>;
1505
1542
  getData(): Promise<EurobondData | null>;
1506
1543
  info(): Promise<EurobondData | null>;
1544
+ history(options?: {
1545
+ period?: string;
1546
+ start?: string | Date;
1547
+ end?: string | Date;
1548
+ skipWeekends?: boolean;
1549
+ }): Promise<EurobondHistoryRow[]>;
1507
1550
  }
1508
1551
 
1509
1552
  declare class BorsaTSError extends Error {
@@ -1605,27 +1648,4 @@ declare class TVScreenerProvider extends BaseProvider {
1605
1648
  }
1606
1649
  declare function getTVScreenerProvider(): TVScreenerProvider;
1607
1650
 
1608
- interface Eurobond {
1609
- isin: string;
1610
- maturity: Date | null;
1611
- daysToMaturity: number;
1612
- currency: string;
1613
- bidPrice: number | null;
1614
- bidYield: number | null;
1615
- askPrice: number | null;
1616
- askYield: number | null;
1617
- }
1618
- declare class ZiraatEurobondProvider extends BaseProvider {
1619
- private _cache;
1620
- private _cacheTime;
1621
- private readonly CACHE_TTL;
1622
- private parseTurkishNumber;
1623
- private parseDate;
1624
- private fetchBondsForDate;
1625
- private hasValidYields;
1626
- getEurobonds(currency?: string): Promise<Eurobond[]>;
1627
- getEurobond(isin: string): Promise<Eurobond | null>;
1628
- }
1629
- declare function getEurobondProvider(): ZiraatEurobondProvider;
1630
-
1631
- export { APIError, type ActionData, type AddIndicatorsOptions, type AllRatesRecord, type AllocationData, type AssetType, AuthenticationError, Backtest, BacktestEngine, type BacktestResult, type BacktestSummaryData, 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 FundType, 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, TAX_CATEGORIES, TAX_PERIODS, TCMB, type ScanResult as TVScanResult, TVScreenerProvider, type TaxCategory, type TaxPeriod, TechnicalAnalyzer, TechnicalScanner, Ticker, TickerNotFoundError, type Trade, TradingViewETFProvider, TradingViewScannerProvider, TradingViewSearchProvider, TradingViewStream, type UnifiedSearchResult, VIOP, type VIOPContract, type Eurobond as ZiraatEurobondData, ZiraatEurobondProvider, addIndicators, allIndices, backtest, banks, bonds, calculateADX, calculateATR, calculateBollingerBands, calculateCCI, calculateDEMA, calculateEMA, calculateHHV, calculateHeikinAshi, calculateIchimoku, calculateLLV, calculateMACD, calculateMOM, calculateOBV, calculatePivotPoints, calculateROC, calculateRSI, calculateSMA, calculateStochastic, calculateSupertrend, calculateTEMA, calculateTilsonT3, calculateVWAP, calculateWMA, calculateWilliamsR, classifyFundTaxCategory, companies, compareFunds, createReplay, cryptoList, economicCalendar, eurobonds, getEurobondProvider, getPineFacadeProvider, getScannerProvider, getSearchProvider, getTVScreenerProvider, getTradingViewETFProvider, getWithholdingTaxRate, index, indices, managementFees, metalInstitutions, policyRate, riskFreeRate, scan, screenFunds, screenStocks, screenerCriteria, search, searchBist, searchCompanies, searchCrypto, searchForex, searchFunds, searchIndex, searchViop, sectors, stockIndices, viopContracts, withholdingTaxRate, withholdingTaxTable };
1651
+ export { APIError, type ActionData, type AddIndicatorsOptions, type AllRatesRecord, type AllocationData, type AssetType, AuthenticationError, Backtest, BacktestEngine, type BacktestResult, type BacktestSummaryData, 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, type EurobondData, type EurobondHistoryRow, FIELD_MAP, FX, FastInfo, type FinancialRow, Fund, type FundInfo, type FundRiskMetrics, type FundType, 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, TAX_CATEGORIES, TAX_PERIODS, TCMB, type ScanResult as TVScanResult, TVScreenerProvider, type TaxCategory, type TaxPeriod, TechnicalAnalyzer, TechnicalScanner, Ticker, TickerNotFoundError, type Trade, TradingViewETFProvider, TradingViewScannerProvider, TradingViewSearchProvider, TradingViewStream, type UnifiedSearchResult, VIOP, type VIOPContract, type Eurobond$1 as ZiraatEurobondData, ZiraatEurobondProvider, addIndicators, allIndices, backtest, banks, bonds, calculateADX, calculateATR, calculateBollingerBands, calculateCCI, calculateDEMA, calculateEMA, calculateHHV, calculateHeikinAshi, calculateIchimoku, calculateLLV, calculateMACD, calculateMOM, calculateOBV, calculatePivotPoints, calculateROC, calculateRSI, calculateSMA, calculateStochastic, calculateSupertrend, calculateTEMA, calculateTilsonT3, calculateVWAP, calculateWMA, calculateWilliamsR, classifyFundTaxCategory, companies, compareFunds, computeAdjClose, createReplay, cryptoList, economicCalendar, eurobonds, getEurobondProvider, getPineFacadeProvider, getScannerProvider, getSearchProvider, getTVScreenerProvider, getTradingViewETFProvider, getWithholdingTaxRate, index, indices, managementFees, metalInstitutions, policyRate, riskFreeRate, scan, screenFunds, screenStocks, screenerCriteria, search, searchBist, searchCompanies, searchCrypto, searchForex, searchFunds, searchIndex, searchViop, sectors, stockIndices, viopContracts, withholdingTaxRate, withholdingTaxTable };
package/dist/index.d.ts CHANGED
@@ -421,9 +421,11 @@ declare class TechnicalAnalyzer {
421
421
  }>;
422
422
  }
423
423
 
424
+ declare function computeAdjClose(closePrices: number[], closeDates: Date[], dividends: DividendData[]): number[];
424
425
  type OHLCVWithActions = OHLCVData & {
425
426
  dividend?: number;
426
427
  split?: number;
428
+ adjClose?: number;
427
429
  };
428
430
  interface EnrichedInfo extends CurrentData {
429
431
  marketCap?: number;
@@ -484,6 +486,7 @@ declare class Ticker {
484
486
  end?: Date | string;
485
487
  actions?: boolean;
486
488
  adjust?: boolean;
489
+ autoAdjust?: boolean;
487
490
  }): Promise<OHLCVWithActions[]>;
488
491
  private _unadjustPrices;
489
492
  private _mergeActions;
@@ -1480,6 +1483,40 @@ declare class Inflation {
1480
1483
  }>;
1481
1484
  }
1482
1485
 
1486
+ interface Eurobond$1 {
1487
+ isin: string;
1488
+ maturity: Date | null;
1489
+ daysToMaturity: number;
1490
+ currency: string;
1491
+ bidPrice: number | null;
1492
+ bidYield: number | null;
1493
+ askPrice: number | null;
1494
+ askYield: number | null;
1495
+ }
1496
+ interface EurobondHistoryRow {
1497
+ date: Date;
1498
+ bidPrice: number | null;
1499
+ bidYield: number | null;
1500
+ askPrice: number | null;
1501
+ askYield: number | null;
1502
+ daysToMaturity: number;
1503
+ }
1504
+ declare class ZiraatEurobondProvider extends BaseProvider {
1505
+ private _cache;
1506
+ private _cacheTime;
1507
+ private readonly CACHE_TTL;
1508
+ private parseTurkishNumber;
1509
+ private parseDate;
1510
+ private fetchBondsForDate;
1511
+ private hasValidYields;
1512
+ getEurobonds(currency?: string): Promise<Eurobond$1[]>;
1513
+ getEurobond(isin: string): Promise<Eurobond$1 | null>;
1514
+ private fetchBondsForDateCached;
1515
+ static iterBusinessDates(start: Date, end: Date, skipWeekends?: boolean): Date[];
1516
+ getHistory(isin: string, start: Date, end: Date, skipWeekends?: boolean, maxWorkers?: number): Promise<EurobondHistoryRow[]>;
1517
+ }
1518
+ declare function getEurobondProvider(): ZiraatEurobondProvider;
1519
+
1483
1520
  interface EurobondData {
1484
1521
  isin: string;
1485
1522
  maturity: Date | null;
@@ -1491,7 +1528,7 @@ interface EurobondData {
1491
1528
  askYield: number | null;
1492
1529
  }
1493
1530
  declare function eurobonds(currency?: string): Promise<EurobondData[]>;
1494
- declare class Eurobond$1 {
1531
+ declare class Eurobond {
1495
1532
  readonly isin: string;
1496
1533
  constructor(isin: string);
1497
1534
  maturity(): Promise<Date | null>;
@@ -1504,6 +1541,12 @@ declare class Eurobond$1 {
1504
1541
  askYield(): Promise<number | null>;
1505
1542
  getData(): Promise<EurobondData | null>;
1506
1543
  info(): Promise<EurobondData | null>;
1544
+ history(options?: {
1545
+ period?: string;
1546
+ start?: string | Date;
1547
+ end?: string | Date;
1548
+ skipWeekends?: boolean;
1549
+ }): Promise<EurobondHistoryRow[]>;
1507
1550
  }
1508
1551
 
1509
1552
  declare class BorsaTSError extends Error {
@@ -1605,27 +1648,4 @@ declare class TVScreenerProvider extends BaseProvider {
1605
1648
  }
1606
1649
  declare function getTVScreenerProvider(): TVScreenerProvider;
1607
1650
 
1608
- interface Eurobond {
1609
- isin: string;
1610
- maturity: Date | null;
1611
- daysToMaturity: number;
1612
- currency: string;
1613
- bidPrice: number | null;
1614
- bidYield: number | null;
1615
- askPrice: number | null;
1616
- askYield: number | null;
1617
- }
1618
- declare class ZiraatEurobondProvider extends BaseProvider {
1619
- private _cache;
1620
- private _cacheTime;
1621
- private readonly CACHE_TTL;
1622
- private parseTurkishNumber;
1623
- private parseDate;
1624
- private fetchBondsForDate;
1625
- private hasValidYields;
1626
- getEurobonds(currency?: string): Promise<Eurobond[]>;
1627
- getEurobond(isin: string): Promise<Eurobond | null>;
1628
- }
1629
- declare function getEurobondProvider(): ZiraatEurobondProvider;
1630
-
1631
- export { APIError, type ActionData, type AddIndicatorsOptions, type AllRatesRecord, type AllocationData, type AssetType, AuthenticationError, Backtest, BacktestEngine, type BacktestResult, type BacktestSummaryData, 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 FundType, 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, TAX_CATEGORIES, TAX_PERIODS, TCMB, type ScanResult as TVScanResult, TVScreenerProvider, type TaxCategory, type TaxPeriod, TechnicalAnalyzer, TechnicalScanner, Ticker, TickerNotFoundError, type Trade, TradingViewETFProvider, TradingViewScannerProvider, TradingViewSearchProvider, TradingViewStream, type UnifiedSearchResult, VIOP, type VIOPContract, type Eurobond as ZiraatEurobondData, ZiraatEurobondProvider, addIndicators, allIndices, backtest, banks, bonds, calculateADX, calculateATR, calculateBollingerBands, calculateCCI, calculateDEMA, calculateEMA, calculateHHV, calculateHeikinAshi, calculateIchimoku, calculateLLV, calculateMACD, calculateMOM, calculateOBV, calculatePivotPoints, calculateROC, calculateRSI, calculateSMA, calculateStochastic, calculateSupertrend, calculateTEMA, calculateTilsonT3, calculateVWAP, calculateWMA, calculateWilliamsR, classifyFundTaxCategory, companies, compareFunds, createReplay, cryptoList, economicCalendar, eurobonds, getEurobondProvider, getPineFacadeProvider, getScannerProvider, getSearchProvider, getTVScreenerProvider, getTradingViewETFProvider, getWithholdingTaxRate, index, indices, managementFees, metalInstitutions, policyRate, riskFreeRate, scan, screenFunds, screenStocks, screenerCriteria, search, searchBist, searchCompanies, searchCrypto, searchForex, searchFunds, searchIndex, searchViop, sectors, stockIndices, viopContracts, withholdingTaxRate, withholdingTaxTable };
1651
+ export { APIError, type ActionData, type AddIndicatorsOptions, type AllRatesRecord, type AllocationData, type AssetType, AuthenticationError, Backtest, BacktestEngine, type BacktestResult, type BacktestSummaryData, 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, type EurobondData, type EurobondHistoryRow, FIELD_MAP, FX, FastInfo, type FinancialRow, Fund, type FundInfo, type FundRiskMetrics, type FundType, 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, TAX_CATEGORIES, TAX_PERIODS, TCMB, type ScanResult as TVScanResult, TVScreenerProvider, type TaxCategory, type TaxPeriod, TechnicalAnalyzer, TechnicalScanner, Ticker, TickerNotFoundError, type Trade, TradingViewETFProvider, TradingViewScannerProvider, TradingViewSearchProvider, TradingViewStream, type UnifiedSearchResult, VIOP, type VIOPContract, type Eurobond$1 as ZiraatEurobondData, ZiraatEurobondProvider, addIndicators, allIndices, backtest, banks, bonds, calculateADX, calculateATR, calculateBollingerBands, calculateCCI, calculateDEMA, calculateEMA, calculateHHV, calculateHeikinAshi, calculateIchimoku, calculateLLV, calculateMACD, calculateMOM, calculateOBV, calculatePivotPoints, calculateROC, calculateRSI, calculateSMA, calculateStochastic, calculateSupertrend, calculateTEMA, calculateTilsonT3, calculateVWAP, calculateWMA, calculateWilliamsR, classifyFundTaxCategory, companies, compareFunds, computeAdjClose, createReplay, cryptoList, economicCalendar, eurobonds, getEurobondProvider, getPineFacadeProvider, getScannerProvider, getSearchProvider, getTVScreenerProvider, getTradingViewETFProvider, getWithholdingTaxRate, index, indices, managementFees, metalInstitutions, policyRate, riskFreeRate, scan, screenFunds, screenStocks, screenerCriteria, search, searchBist, searchCompanies, searchCrypto, searchForex, searchFunds, searchIndex, searchViop, sectors, stockIndices, viopContracts, withholdingTaxRate, withholdingTaxTable };