Add/Update Candles

This endpoint is used to update the history data of a symbol

Add or update ohlcv data

POST http://api.stockhero.ai/candles

Header

Name
Type
Example

Authorization

Basic Auth

Basic TWlyYWUyMDI0OmhhQDI0QXMjamdk

Please contact us for username and password

Request Body

Name
Type
Required
Description

ohlcvs

string

An array of candles as a JSON string

Candle structure

Key
Type
Description
Value Example

symbol

string

Full symbol name

AAPL-USD

interval

float

The time slice value for each candle. Supported are 5m, 15m, 1h, 4h and 1d

15m

start

int

Timestamp for starting range of aggregations, in miliseconds

1639508050000

open

float

Open price

165

high

float

High price

173

low

float

Low price

164.22

close

float

Close price

172

volume

float

Traded volume

12345678

Responses:

curl --location 'http://127.0.0.1:8000/candles' \
--header 'Accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic TWlyYWUyMDI0OmhfQDI0QXMjamdk' \
--data-urlencode 'ohlcvs=[{"symbol":"AAPL-USD","interval":"1d","start":1639508050000,"open":165,"high":173,"low":164.22,"close":172,"volume":12244254}]'

Last updated