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 🙏

© 2025 – Pkg Stats / Ryan Hefner

opexrate

v1.0.4

Published

Access Open Exchange Rates API.

Downloads

23

Readme

Opexrate

Opexrate can help you access Open Exchange Rate API.

Installation

npm i opexrate

Usage

const Opexrate = require('opexrate')
// import Opexrate from 'opexrate'

const opexrate = new Opexrate('your_app_id')

Methods

Opexrate supports all Open Exchange Rates endpoints as of March 30, 2025.

.latest([ parameters ]): Promise

Get the latest exchange rates available from the Open Exchange Rates API.

parameters

| Parameter | Type | Necessity | Description | Default | | --- | --- | --- | --- | --- | | base | String | Optional | Base currency 3-letter code. | USD | | symbols | String | Optional | Comma-separated list of specific currencies 3-letter codes. | .currencies() | | prettyprint | Boolean | Optional | Pass True to format the output. | False | | show_alternative | Boolean | Optional | Pass True to extend returned values with alternative, black market, and digital currency rates. | False |

.historical(date [, parameters ]): Promise

Get historical exchange rates for any date available from the Open Exchange Rates API, currently going back to 1st January 1999.

date

The requested date in YYYY-MM-DD format.

parameters

| Parameter | Type | Necessity | Description | Default | | --- | --- | --- | --- | --- | | base | String | Optional | Base currency 3-letter code. | USD | | symbols | String | Optional | Comma-separated list of specific currencies 3-letter codes. | .currencies() | | prettyprint | Boolean | Optional | Pass True to format the output. | False | | show_alternative | Boolean | Optional | Pass True to extend returned values with alternative, black market, and digital currency rates. | False |

.currencies([ parameters ]): Promise

Get a JSON list of all currency symbols available from the Open Exchange Rates API, along with their full names.

parameters

| Parameter | Type | Necessity | Description | Default | | --- | --- | --- | --- | --- | | prettyprint | Boolean | Optional | Pass True to format the output. | False | | show_alternative | Boolean | Optional | Pass True to extend returned values with alternative, black market, and digital currency rates. | False | | show_inactive | Boolean | Optional | Pass True to include historical/inactive currencies. | False |

.timeSeries([ parameters ]): Promise

Get historical exchange rates for a given time period, where available.

parameters

| Parameter | Type | Necessity | Description | Default | | --- | --- | --- | --- | --- | | start | Date | Required | The time series start date in YYYY-MM-DD format. | | | end | Date | Required | The time series end date in YYYY-MM-DD format. | | | base | String | Optional | Base currency 3-letter code. | USD | | symbols | String | Optional | Comma-separated list of specific currencies 3-letter codes. | .currencies() | | prettyprint | Boolean | Optional | Pass True to format the output. | False | | show_alternative | Boolean | Optional | Pass True to extend returned values with alternative, black market, and digital currency rates. | False |

.convert(value, from, to [, parameters ]): Promise

Convert any money value from one currency to another at the latest API rates.

value

The numeric value to be converted.

from

The base currency 3-letter code.

to

The quote currency 3-letter code.

parameters

| Parameter | Type | Necessity | Description | Default | | --- | --- | --- | --- | --- | | prettyprint | Boolean | Optional | Pass True to format the output. | False |

.ohlc([ parameters ]): Promise

Get historical Open, High Low, Close (OHLC) and Average exchange rates for a given time period, ranging from 1 month to 1 minute, where available.

parameters

| Parameter | Type | Necessity | Description | Default | | --- | --- | --- | --- | --- | | start_time | Date | Required | The start time for the requested OHLC period (ISO-8601 format, UTC only). | | | period | String | Required | The requested period (starting on the start_time). Shall be one of the following: "1m", "5m", "15m", "30m", "1h", "12h", "1d", "1w", "1mo". | | | base | String | Optional | Base currency 3-letter code. | USD | | symbols | String | Recommended | Comma-separated list of specific currencies 3-letter codes. | .currencies() | | prettyprint | Boolean | Optional | Pass True to format the output. | False |

.usage([ parameters ]): Promise

Get basic plan information and usage statistics for an Open Exchange Rates App ID.

parameters

| Parameter | Type | Necessity | Description | Default | | --- | --- | --- | --- | --- | | prettyprint | Boolean | Optional | Pass True to format the output. | False |

Contributing

Contributions are only allowed in TON:

UQCYqT9-ycmXE3o57Cac1sM5ntIKdjqIwP3kzWmiZik0VU_b