Skip to content

Istom1n/CoinAPI-io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

Updated JavaScript Library for CoinAPI.io

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published