https://github.com/blockstarter/rate_history_service
Service returns average rates per Unix timestamp. Calculation is based on historical trade data from Poloniex.
https://github.com/blockstarter/rate_history_service
api bitcoin chf cryptocurrency ethereum poloniex trade-api usdt
Last synced: 15 days ago
JSON representation
Service returns average rates per Unix timestamp. Calculation is based on historical trade data from Poloniex.
- Host: GitHub
- URL: https://github.com/blockstarter/rate_history_service
- Owner: blockstarter
- Created: 2017-06-04T23:43:30.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-05T03:01:27.000Z (almost 9 years ago)
- Last Synced: 2025-08-10T13:30:33.956Z (10 months ago)
- Topics: api, bitcoin, chf, cryptocurrency, ethereum, poloniex, trade-api, usdt
- Language: LiveScript
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rate History Service

## Install
```Bash
sudo npm i livescript -g
git clone https://github.com/blockstarter/rate_history_service
cd rate_history_service
npm i
```
## Run
```Bash
sh run
```
## Check
Once server starts it loads calculates average rates and stores them into
memory for faster access.
```Coffeescript
http://localhost:8080 # modify port in server.ls
```
## Usage (REST API)
### `GET /`
Returns a basic information.
### `GET /rate/:unix_ts`
```Coffeescript
# 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`
```Coffeescript
# 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 }
```