Skip to content

Stock price chart drawn in HTML Canvas using Typescript with endpoints exposed on express.js API for dynamic use to generate an image or send canvas element to browser

Notifications You must be signed in to change notification settings

LondonMarket/Stock-Price-Chart-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock-Price-Chart & API (Node/Express.JS & Typescript)

This project provides a Stock Price Chart along with an Express.js API which can serve the price chart in either a HTML5 canvas object or Base64 jpeg to be used in other projects or applications.

The chart can be customised with each request by passing theming options and simple toggles for common charting tools.

Price data is fetched from Yahoo Finance using Cheerio WebScraping but can be adapted to use any price data provider by passing data into the chart generation object in a standardised format.

Folder Structure

api
│   The Express.js API with endpoints to generate a price chart

price-chart-core
│   Typescript code for drawing the price chart canvas

test-application
│   An example & test application to conusme the API and provide simple I/O with visual demonstration

API Documentation

API documentation can be found here

Setup & Install

  • cd into api & run npm i
  • Copy .env.example into .env and setup relevant variables
  • TODO: Finish this

Disclaimer

This project is provided publicly for purely educational purposes to demonstrate core concepts (API canvas generation, basic 2d geometry to draw charts etc.).


Created by Charlie for LondonMarket

About

Stock price chart drawn in HTML Canvas using Typescript with endpoints exposed on express.js API for dynamic use to generate an image or send canvas element to browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published