GithubHelp home page GithubHelp logo

ivivanov / crypto-charts Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 76 KB

Auto updating line chart in SVG format served from CDN

Home Page: https://ivivanov.github.io/crypto-charts/demo-advanced-max-period.html

License: MIT License

Go 99.07% Dockerfile 0.85% Shell 0.08%
chart crypto ohlc svg

crypto-charts's Introduction

Crypto Charts

Pulls OHLC data from a set of data sources. Generates chart in SVG format and uploads it to a place of your choice.

Purpose

Using canvas for visualizing a chart might be heavy for the browser especially if you have to render tens of charts on the same page. On top of that you have to fetch the data for each pair resulting in MBs of data and many requests. In environment where visualizing live data is not crucial server side SVG rendering sounds like a good idea.

Use

go build .
crypto-charts --help 

Config priority:

  • All flags have default values
  • Values provided from yaml config override default values
  • Values provided via flags have hightest priority

Info

Current implementation includes:

  • fetchers:
    • bitstamp
    • osmosis
    • ecb
  • synths
  • svg generators
    • simple line charts
    • more advanced charts with grids, prices, BB, SMA, ...
  • google cloud storage - persistent store for SVGs
  • .crypto-charts.yaml - contains config for fetchers, generators and uploader
  • ./deploy/Dockerfile - Dockerized cron job running the app
  • ./deploy/crontab - runs the job every 5 minutes

Add new fetcher

To add new fetcher just register it in job.NewJob func. Fetchers without config in .crypto-charts.yaml will not work

Synths

Generate new pair out of the history of other 2. In the current implementation we add new fetcher called ecb which generates artificial price series for bgneur and eurbgn. Then the new pair is used in combination with any other pair which has EUR as base or quote currency.

Demo

  • 7 day simple charts: demo
  • max period advanced: demo

TODOs:

  • extract all chart generators parameters in config
  • add compose to build and deploy with multiple configurations
  • add tests
  • add github build workflows
  • use fetchers in parallel
  • create self hosted CDN server where we can upload the SVGs
    • maybe part of the same service so we can upload to the localhost and use nginx to serve
    • orchestrate with docker compose

crypto-charts's People

Contributors

ivivanov avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

lanastasov

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.