Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xdaksh/crypto-price
A JavaScript Module that allows you to get Crypto Currency price to Local Currency.
https://github.com/0xdaksh/crypto-price
btc crypto currency eth ltc module nodejs npm
Last synced: 2 months ago
JSON representation
A JavaScript Module that allows you to get Crypto Currency price to Local Currency.
- Host: GitHub
- URL: https://github.com/0xdaksh/crypto-price
- Owner: 0xDaksh
- License: mit
- Created: 2017-06-16T17:50:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-20T06:42:12.000Z (almost 7 years ago)
- Last Synced: 2024-08-10T23:16:57.832Z (6 months ago)
- Topics: btc, crypto, currency, eth, ltc, module, nodejs, npm
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/crypto-price
- Size: 6.84 KB
- Stars: 10
- Watchers: 0
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Crypto-Price
Crypto Price is a Node.js Module that provides an Easy API which allows users to easily get crypto currency price in their Local / Base Currency and returns a Promise that gives you the price.
## Supported Crypto Currencies
- Ethereum (ETH)
- Bitcoin (BTC)
- Litecoin (LTC)
- Monero (XMR)
- Ripple (XRP)
- ZCash (ZEC)
- Many More ([Here's a list of them.](https://www.cryptonator.com/api/currencies))## API (with Example)
### getCryptoPrice
The getCryptoPrice allows you to get the price of crypto currency from your base currency.
```javascript
let price = require('crypto-price')
price.getCryptoPrice(base, crypto).then(obj => { // Base for ex - USD, Crypto for ex - ETH
console.log(obj.price)
}).catch(err => {
console.log(err)
})```
### getBasePrice
The getBasePrice allows you to get the price of base currency from your crypto currency.
```javascript
let price = require('crypto-price')
price.getBasePrice(base, crypto).then(obj => { // Base for ex - USD, Crypto for ex - ETH
console.log(obj.price)
}).catch(err => {
console.log(err)
})```
## License
Copyright [Daksh Miglani](https://dak.sh), Licensed Under MIT 2017.