# @maxifo/cryptodata

> Crypto API

Latest version **1.1.4** (published 2021-05-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install @maxifo/cryptodata
pnpm add @maxifo/cryptodata
yarn add @maxifo/cryptodata
bun add @maxifo/cryptodata
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2021-05-17 |
| First published | 2021-05-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Max Forsström |
| Maintainers | maxifo |
| Keywords | crypto, bitcoin, blockchain, ethereum |

## Links

- npm: https://www.npmjs.com/package/@maxifo/cryptodata
- npm.io page: https://npm.io/package/@maxifo/cryptodata

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.1.4 (latest) — 2021-05-17
- 1.1.3 — 2021-05-17
- 1.1.2 — 2021-05-17
- 1.1.1 — 2021-05-17
- 1.1.0 — 2021-05-16

## README

# Cryptodata

Simple JavaScript API for fetching data from [CryptoCompare](https://www.cryptocompare.com/).

**NOTE:** Node-fetch is required.

## Installation

``` 
npm i @maxifo/cryptodata
```

```
npm i node-fetch
```

## Examples

### cryptoList()
Lists all cryptocurrencies and basic data.

```
const cd = require('@maxifo/cryptodata')

cd.cryptoList()
    .then(data => {
        console.log(data)
    })
```

### priceCheck()
Convert the current price of any cryptocurrency to any other currency/currencies.

priceCheck(fsym, tsyms)
```
const cd = require('@maxifo/cryptodata')

cd.priceCheck('BTC', ['EUR', 'USD'])
.then(data => {
        console.log(data)
    })
```

### priceCheckMulti()
Convert the current price of multiple cryptocurrencies to any other currency/currencies.

priceCheckMulti(fsyms, tsyms)
```
const cd = require('@maxifo/cryptodata')

cd.priceCheckMulti(['BTC', 'ETH', 'DOGE'], ['EUR', 'USD'])
    .then(data => {
        console.log(data)
    }) 
```

### priceHistory()
Check price history from a specific date.

priceHistory(fsym, tsyms, time)
```
const cd = require('@maxifo/cryptodata')

cd.priceHistory('BTC', ['EUR', 'USD'], new Date('2021-01-01'))
    .then(data => {
        console.log(data)
```

### topVolumeExchange()
Check the current most traded cryptocurrency on a specific exchange.

topVolumeExchange(e)
```
const cd = require('@maxifo/cryptodata')

cd.topVolumeExchange('Binance')
    .then(data => {
        console.log(data)
    }) 
```

### miningData()
Get mining data of a cryptocurrency. Useful for calculating profitability of a mining rig.

miningData(fsyms,tsyms)
```
const cd = require('@maxifo/cryptodata')

cd.miningData(['BTC'], ['EUR', 'USD'])
    .then(data => {
        console.log(data)
    })
```

### marketcapList()
Get top list of cryptocurrencies by market capitalization.

marketcapList(limit, tsym)
```

const cd = require('@maxifo/cryptodata')

cd.marketcapList(10, 'EUR')
    .then(data => {
        console.log(data)
    })
```

---
_Source: https://npm.io/package/@maxifo/cryptodata · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
