Skip to content

Latest commit

 

History

History
64 lines (40 loc) · 1.04 KB

File metadata and controls

64 lines (40 loc) · 1.04 KB

Rate History Service

Logo

Install

sudo npm i livescript -g
git clone https://github.com/blockstarter/rate_history_service
cd rate_history_service
npm i

Run

sh run

Check

Once server starts it loads calculates average rates and stores them into memory for faster access.

http://localhost:8080 # modify port in server.ls

Usage (REST API)

GET /

Returns a basic information.

GET /rate/:unix_ts

# Check rate for BTC/ETH and CHF/ETH
http://localhost:8080/rate/:unix_ts

# Response example:
{ "ETH": { "BTC": "0.0917820001808675764", "CHF": "202.00443299777144779363" }}

GET /status

# Get status of service
http://localhost:8080/status

# Possible responses
{ serverStarting: true }

# Service loads historical trading data from Poloniex...

# `true` when service is calculating average rates.
# `false` when averages calculated.
{ btc_eth: true, usdt_eth: false }