npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@omc345/borsa

v0.1.0

Published

Turkish financial markets data library for BIST stocks, FX, crypto, funds, and macro data.

Readme

@omc345/borsa

TypeScript library for Turkish financial markets (BIST stocks, FX, crypto, funds, and macro data). The API is yfinance-inspired with async/await patterns.

Install

npm install @omc345/borsa

Quick Start

import {
  Ticker,
  FX,
  Crypto,
  Fund,
  Inflation,
  download,
  companies,
  cryptoPairs
} from '@omc345/borsa';

const stock = new Ticker('THYAO');
console.log(await stock.info());
console.log(await stock.history({ period: '1mo' }));
console.log(await stock.balanceSheet());

const data = await download(['THYAO', 'GARAN', 'AKBNK'], { period: '1mo' });
console.log(data);

const usd = new FX('USD');
console.log(await usd.current());

const btc = new Crypto('BTCTRY');
console.log(await btc.current());

const fund = new Fund('AAK');
console.log(await fund.info());

const inf = new Inflation();
console.log(await inf.latest());

console.log(await companies());
console.log(await cryptoPairs());

Ticker (BIST Stocks)

const ticker = new Ticker('THYAO');

// fast info
console.log(await ticker.fastInfo());

// full info (yfinance aliases included)
console.log(await ticker.info());

// history
console.log(await ticker.history({ period: '1y', interval: '1d' }));

// financials
console.log(await ticker.balanceSheet());
console.log(await ticker.quarterlyIncomeStmt());
console.log(await ticker.ttmCashflow());

// actions
console.log(await ticker.dividends());
console.log(await ticker.splits());
console.log(await ticker.actions());

// KAP disclosures
console.log(await ticker.news());
console.log(await ticker.calendar());
console.log(await ticker.earningsDates());

// analyst data
console.log(await ticker.analystPriceTargets());
console.log(await ticker.recommendationsSummary());

Tickers & download

import { Tickers, download } from '@omc345/borsa';

const tickers = new Tickers(['THYAO', 'GARAN', 'AKBNK']);
for (const [symbol, ticker] of tickers) {
  console.log(symbol, (await ticker.info()).last);
}

const grouped = await download(['THYAO', 'GARAN'], { groupBy: 'ticker' });
const columnGrouped = await download(['THYAO', 'GARAN']);

Index

import { Index, indices } from '@omc345/borsa';

console.log(indices());
const xu100 = new Index('XU100');
console.log(await xu100.info());
console.log(await xu100.history({ period: '1mo' }));

FX

const usd = new FX('USD');
console.log(await usd.current());
console.log(await usd.history({ period: '1mo' }));

Crypto

const btc = new Crypto('BTCTRY');
console.log(await btc.current());
console.log(await btc.history({ period: '1mo' }));

Funds

import { Fund, searchFunds } from '@omc345/borsa';

console.log(await searchFunds('banka'));
const fund = new Fund('AAK');
console.log(await fund.info());
console.log(await fund.history({ period: '1mo' }));

Inflation

const inf = new Inflation();
console.log(await inf.latest('tufe'));
console.log(await inf.tufe({ limit: 12 }));
console.log(await inf.calculate(100000, '2020-01', '2024-01'));

VIOP

import { VIOP } from '@omc345/borsa';

const viop = new VIOP();
console.log(await viop.futures());
console.log(await viop.options());
console.log(await viop.getBySymbol('THYAO'));

Testing

npm test

For live integration tests:

BORSA_LIVE=1 npm test

Disclaimer

Data is sourced from İş Yatırım, Paratic, KAP, TCMB, BtcTurk, TEFAS, doviz.com, hedeffiyat.com.tr, and isinturkiye.com.tr. Intended for personal use only.

License

Apache 2.0