Skip to content

A RESTful API to calculate real-time statistics for financial instruments

Notifications You must be signed in to change notification settings

k-shrey/streamcalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stream Statistics Calculator

A RESTful API to calculate real-time statistics for financial instruments in a 60-second window

Usage

  1. Make sure you have Go installed (tested on version 1.17.4, Windows 21H2 x64)
  2. Clone the repo and run
 go build

Endpoints

Send data: /tick POST
Request format:

{
   "instrument": "string",
   "value": "float",
   "timestamp": "epoch/int64",
}

Get statistics: /stats/{instrument} GET
Example: /stats/GOOGL
Use /stats/ALL for stats across all instruments
Response format:

{
   "avg": "float",
   "min": "float",
   "max": "float",
   "count": "int64"
}

License

MIT

About

A RESTful API to calculate real-time statistics for financial instruments

Topics

Resources

Stars

Watchers

Forks

Languages