A RESTful API to calculate real-time statistics for financial instruments in a 60-second window
- Make sure you have Go installed (tested on version 1.17.4, Windows 21H2 x64)
- Clone the repo and run
go build
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"
}