@xrates/ltc-usd
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Exchange Rates: LTC - USD

Historical exchange rates for the LTC/USD pair.

Installation

npm install --save @xrates/ltc-usd

Usage

const ltcToUsd = require('@xrates/ltc-usd')

console.log(ltcToUsd.lookup('2014-10-15'))
//=> 4.0667

API

lookup(date: string | Date): number

Get the exchange rate for the specified date. The return value is a number that fits the description "1 LTC = ? USD".

If the specified date falls outside the span of the provided data, a RangeError will be thrown.

Source

The data is collected from the CoinMarketCap Litcoin Historical Price page. The value for each day was aquired by averaging the "Open" and "Close" values.

Readme

Keywords

none

Package Sidebar

Install

npm i @xrates/ltc-usd

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

18.8 kB

Total Files

11

Last publish

Collaborators

  • linusu