Skip to content

Keep track of price & volume evolution for various crypto currencies

Notifications You must be signed in to change notification settings

aloysius-pgast/heatmap-me

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

heatmap-me

Keep track of price & volume evolution for various crypto currencies

Disclaimer

This project cannot be considered in any way as trading advice.

Use it at your own risks and be careful with your money ;)

What it does

  • it subscribes to a stream on Crypto Exchanges Gateway
  • it computes price & volume evolution for multiple periods, for each pair in the stream
  • it emits computed data every 60s over a ws
  • it comes with a basic UI which displays heatmaps

By default, data will be computed for following periods :

  • 5 minutes
  • 15 minutes
  • 1 hour
  • 4 hours
  • 1 day
  • 5 days

See documentation in doc directory for a description of websocket data

Check https://www.neotodamoon.com for a demo of the UI

NB: Heatmap Me relies on Crypto Exchanges Gateway to connect to exchanges, so you will need to deploy your own instance of Crypto Exchanges Gateway in order to use it

Installation

  • Install dependencies
npm install
  • Copy sample config
cp config/config.sample.json config/config.json
  • Start service
node index.js

It should output something similar to

1530891675933|WARN|Starting...
1530891675956|WARN|WS server is alive on 127.0.0.1:8003
  • Build UI

If you want to use the UI, follow these steps to build the UI before starting the service :

cd ui && npm install && npm run build
  • Connect to websocket to start receiving data

You should be able to access service on ws://127.0.0.1:8003 using any ws client such as wscat

Docker

A docker image is available at https://hub.docker.com/r/apendergast/heatmap-me/

  • Pull image
docker pull apendergast/heatmap-me
  • Run image
docker run --rm -p 8002:8002 -p 8003:8003 --name hm apendergast/heatmap-me

You should then be able to access service on ws://127.0.0.1:8003 using any ws client such as wscat

Following environment variables are available :

  • cfg.logLevel : log level (default = warn)
  • cfg.gateway.restEndpoint : Crypto Exchange Gateway rest endpoint (default = http://127.0.0.1:8000)
  • cfg.gateway.wsEndpoint : Crypto Exchange Gateway ws endpoint (default = ws://127.0.0.1:8001)
  • cfg.gateway.sessionId : identifier of the session to connect to on Crypto Exchange Gateway (default = mystream.heatmap-me)
  • cfg.gateway.apiKey : api key defined on Crypto Exchange Gateway
  • cfg.computeInterval : duration in seconds between two data computation
  • cfg.dataPeriods : comma-separated list of periods to compute data for (default = xm,15m,1h,4h,1d,5d)

If you don't want to use environment variables or want to customize config for a running container, you can create and edit custom_config/config.json

Examples :

docker run --rm -p 8002:8002 -p 8003:8003 --name hm -e cfg.computeInterval='60' -e cfg.gateway.wsEndpoint='ws://172.17.0.1:8001' -e cfg.gateway.sessionId='mySessionId' apendergast/heatmap-me

Dependencies

This project was made possible thanks to following projects :

Donate

This project is a work in progress. If you find it useful, you might consider a little donation ;)

BTC: 163Bu8qMSDoHc1sCatcnyZcpm38Z6PWf6E

ETH: 0xDEBBEEB9624449D7f2c87497F21722b1731D42a8

NEO/GAS: AaQ5xJt4v8GunVchTJXur8WtM8ksprnxRZ

About

Keep track of price & volume evolution for various crypto currencies

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published