Get Candles
This endpoint is used to update the price of a symbol.
GET symbol price
GET http://api.stockhero.ai/candles
Headers
Name
Type
Example
Authorization
Basic Auth
Basic TWlyYWUyRdd0OmhhQDI0QXMjamdkcw==
Request Body
Name
Type
Required
Description
Example
symbol
string
Full symbol name
AAPL-USD
interval
string
1m, 5m, 15m, 1h, 1d
1m
start_time_ms
int
Get candles from start_time (miliseconds)
1715828406000
end_time_ms
int
Get candles up to end_time (miliseconds)
1655828406000
Responses:
curl --location 'http://127.0.0.1:8000/candles?symbol=XMTS-IDR&interval=1m&start_time_ms=1680652800000&end_time_ms=1716258423000' \
--header 'Accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic TWlyYWUyMDI0OmhhQDI0QXMjamdk'{
"code": 200,
"message": "Success",
"candles": [
{
"id": 1,
"pair_id": 2,
"kline_start_time": 1680652800000,
"close_price": 490,
"interval": "1m",
"updated_at": "2024-04-25 02:13:59",
"created_at": "2024-04-25 02:13:59",
"open_price": 490,
"high_price": 490,
"low_price": 490,
"volume": 8000
}
]
}{
"code": 200,
"message": "Success",
"candles": {
...
}
}Last updated