1.0.2 • Published 7 years ago

coinapi-io v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

CoinAPI v2 for JavaScript

Fully rewrited library for CoinAPI.io on JavaScript. Documentation for API. Get free API key here.

NPM

Install

~$ npm install coinapi-io --save
# or
~$ yarn add coinapi-io --save

Example

import CoinAPI from 'coinapi-io';
import {subHours} from 'date-fns';

// Init instance from your API
let coinapi = new CoinAPI('73034021-0EBC-493D-8A00-E0F138111F41');

// Get candlesticks for last 5 hours 
let last_5_hrs = await coinapi.ohlcv_historic_data('POLONIEX_SPOT_ZRX_BTC', '1HRS', subHours(new Date(), 6), new Date());

console.log(last_5_hrs); // => Array<Candlestick>
1.0.2

7 years ago

1.0.0

7 years ago