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

tcmb-exchange-rate

v1.0.1

Published

Official Central Bank of Türkiye (Türkiye) daily exchange rates — ~20 currencies vs TRY, history since 2020. Zero-dependency Node.js/TypeScript client.

Downloads

127

Readme

Central Bank of Türkiye Exchange Rate API client

Official Central Bank of Türkiye (Türkiye) daily exchange rates in Node.js / TypeScript — ~20 currencies against the TRY, with history back to 2020. Zero dependencies, works in Node 18+, Bun, Deno, and edge runtimes (uses global fetch).

These are the published central bank rates required for tax filings, customs valuations, audits, and compliant invoicing — not moving market rates. Every response carries the bank's own publication date.

Powered by AllRatesToday. Get a free API key at allratestoday.com/register — 300 requests/month, no credit card.

Install

npm install tcmb-exchange-rate

Quick start

import { getRate, getLatestRates } from 'tcmb-exchange-rate';

// One pair at the official Central Bank of Türkiye rate
const pair = await getRate('USD', 'TRY', { apiKey: 'art_live_...' });
console.log(pair.rate, pair.rate_date); // e.g. USD -> TRY on the bank's own date

// The bank's full published table
const table = await getLatestRates({ apiKey: 'art_live_...' });
console.log(table.rate_date, table.rates.length);

Historical data (paid plans)

import { getRatesForDate, getHistory } from 'tcmb-exchange-rate';

// The official table for an invoice date — weekends/holidays return the
// most recent published date, flagged via published_on_requested_date.
const day = await getRatesForDate('2026-06-30', { apiKey: 'art_live_...' });

// Daily series for one pair
const series = await getHistory(
  { source: 'USD', target: 'TRY', from: '2026-01-01' },
  { apiKey: 'art_live_...' }
);

Published vs derived rates

If Central Bank of Türkiye does not print a pair directly, the API resolves it from the bank's table (inverse, or a cross rate via TRY) and flags it derived: true with the method — so official and computed values are never confused.

Notes

  • Every request counts toward your AllRatesToday monthly quota. Rates change once per business day — cache a day's table locally and a small quota goes a long way.
  • Latest rates are on every plan (including free); historical dates and time series need a paid plan.
  • Full API reference: allratestoday.com/docs#central-bank · All covered banks: central bank rates API

License

MIT