Crypto market data aggregator
This project is used by influx crypto trader to make a complete system of trading (with backtesting)
This application help gathering data about cryptocurrencies (stock price, signals, tweet) and store those data in InfluxDB
Install dependencies
npm install
Run docker containers (influx, mongodb) (Need docker-compose)
npm run docker-start
Start watcher api
npm start
Create your first watcher (binance, BTC/USDT)
curl --request POST --url http://localhost:3000/watchers --header 'content-type: application/json' --data\
'{ "type": "MarketWatcher",
"exchange": "binance",
"quote": "USDT",
"base": "BTC",
"extra": {
"refreshInterval": 30000,
"maxHistory": "2018-10-01T00:00:00Z"
}
}'
When creating the grafana image everything should be configure for localhost usage (dashboards+datasource). Grafana povisioning help to import directly the different dashboards.
If there is nothing already ready in grafana you can follow the manual configuration: Go to grafana (http://localhost:3001/):
- Configure data source
- import the dashboard given in "docker/grafana/dashboards/cypto-watcher.json"
The software let you deploy watcher which will collect data about a specific exchange cryptocurrency.
The principal concept is the watcher. A watcher can track price/signal (TODO => telegram signal part)
A watcher will track a cryptocurrency price given a configuration. For example to watch the price of BTC/USDT on binance we configure a MarketWatcher as:
{
type: 'MarketWatcher'
exchange: 'binance';
base: 'BTC';
quote: 'USDT';
extra: {
refreshInterval: 30000; // refresh every 30 seconds
maxHistory: "2018-10-01T00:00:00Z"; // onInit will fetch history data
};
}
Every watcher are persist to MongoDB to restart them on reboot.
- Doc available at http://localhost:3000/docs generated with lout
- Easy watcher deployment
- Watch specific currencies
- TODO Watch signals (telegram, ...?)
A grafana container will run when using npm run docker
Then go to http://localhost:3001/
- username: admin
- password: admin