0.0.3 • Published 6 years ago

crypto-fetch v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

crypto-fetch npm version

command line app and JavaScript library to retrieve crypto-currency daily market data. Currently, it support CryptoCompare and Binance websites.

This repository:

CLI

Install Node.js and run this command to install 'crypto-fetch'

npm install -g crypto-fetch

Usage

To get daily price data of BitCoin compare with USD dollar, simply enter

crypto-fetch -f BTC -t USD

You will get information with these following format

symbol, time, open, high, low, close, volume

Options

ParameterRequiredDefaultDescription
--fromsymbol, -ftruesource symbol
--tosymbol, -ttruecounter party symbol
--start, -sfalsestart time in YYYY-MM-DD format (ex. 2017-12-01). If not specify, it will get all available information
--end, -efalseend time in YYYY-MM-DD format (ex. 2017-12-01). If not specify, it will be current date
--market, -mfalsecryptocompareexchange market data source. now support 4 exchanges, which are cryptocompare, binance, bitfinex and poloniex
--output, -ofalseoutput path. If not specify, it will print through console.

For example, you want to get ETH price in USD dollor from binance exchange. you can get with these command

crypto-fetch -f BTC -t USDT -m binance

API

You can get this library from npm

npm install crypto-fetch
getDailyHistoricalPrice(params)

Return daily historical price information (promise)