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

@currencycore/sdk

v0.1.2

Published

Official CurrencyCore API client for TypeScript, Node.js, and React Native.

Readme

CurrencyCore SDK for TypeScript

Official client for the CurrencyCore API — currency conversion, FX rates, PPP, and analytics. Runs in Node.js, the browser, and React Native (uses the global fetch).

Generated from the CurrencyCore OpenAPI 3.1 spec with OpenAPI Generator (typescript-fetch), plus a thin hand-written createClient helper for API-key and version handling.

  • Website: https://currency-core.com
  • Documentation: https://currency-core.com/docs

Install

npm install @currencycore/sdk

Quickstart

import { createClient } from '@currencycore/sdk';

const api = createClient({ apiKey: 'cc_live_...' }); // or set CURRENCYCORE_API_KEY
const res = await api.convert({ from: 'USD', to: 'EUR', amount: 100 });
console.log(res.results[0]);

Public reference endpoints need no key:

const api = createClient();
const currencies = await api.currencies();

Endpoints

All 14 endpoints are methods on the api client. * marks a required argument; the rest are optional. Public = no key; Free = any plan with a key; Growth = Growth plan or higher.

| Endpoint | Call | Plan | | --- | --- | --- | | Convert an amount (optional PPP) | api.convert({ from*, to*, amount, ppp, date }) | Free | | Rate snapshot for a date (USD base) | api.rates({ date }) | Free | | Rate snapshot in any base | api.ratesByBase({ base*, date }) | Free | | One currency's daily time series | api.history({ currency*, from, to, base, interval }) | Growth | | Trends, comparisons & movers | api.historyAnalysis({ base, currencies, from, to, period, sort, assetClass, limit, interval, stats }) | Growth | | PPP factor over time / movers | api.pppAnalysis({ countries, from, to, period, sort, limit, stats }) | Growth | | Volatility or stability ranking | api.volatility({ currency, base, from, to, sort, universe, limit }) | Growth | | Return correlation vs a base | api.correlation({ currencies*, base, from, to }) | Growth | | Max drawdown or ranking | api.drawdown({ currency, base, from, to, sort, universe, limit }) | Growth | | Safe-haven score ranking | api.safeHaven({ currencies, base, from, to, limit }) | Growth | | Mean-reversion ranking | api.meanReversion({ currencies, base, from, to, limit }) | Growth | | Supported countries + currencies | api.countries() | Public | | Supported ISO 4217 currencies | api.currencies() | Public | | Natural-language question | api.ai({ q* }) | Free |

More calls:

await api.rates();                                    // latest snapshot (USD base)
await api.ratesByBase({ base: 'EUR' });               // same snapshot, EUR base
await api.history({ currency: 'INR', from: '2024-01-01' });
await api.volatility({ universe: 'majors', sort: 'volatile' }); // most-volatile majors
await api.ai({ q: 'How has the rupee moved this year?' });

API key

createClient resolves the key as options.apiKeyCURRENCYCORE_API_KEY. In the browser or React Native, pass it explicitly — never ship a secret key in a client bundle. Proxy requests through your backend or use a short-lived token.

API version

The base URL is https://api.currency-core.com/{version} (default v1):

createClient({ version: 'v1' });
createClient({ baseUrl: 'https://api.currency-core.com/v1' }); // full override

Low-level client

import { CurrencyCoreApi, Configuration } from '@currencycore/sdk';

const api = new CurrencyCoreApi(
  new Configuration({ basePath: 'https://api.currency-core.com/v1', accessToken: 'cc_live_...' }),
);

Regenerate

The committed openapi.json is the source of truth. After updating it:

npm run generate && npm run build

Hand-written files (package.json, src/index.ts, src/client.ts, this README) are protected by .openapi-generator-ignore.

License

MIT