Historical Bar Data API Reference
Benzinga Historical Bar Rest API
API Endpoint
https://api.benzinga.com/api/v2
Schemes
https, http
Version
1.0
Authentication
token
authentication
- Type:
- apiKey
- Name:
- token
- In:
- query
Playground
Endpoints
GET /bars
Get the delayed quotes.
Parameters
Name | Type | Location | Description |
---|---|---|---|
accept | string , x ∈ { application/json (default) , application/xml (deprecated) } | header | Specify return format. |
symbols | string (csv) | query | One or more comma separated symbols to specify companies to get data for. |
from | string (YYYY-MM-DD, or any of YTD, iMONTH, iM, iD) | query | Date to query from point in time. Sorted by published date. If "YTD" Sets from to the first trading day of the current year. Some other valid values: "1MONTH", "1m", "1M" (all meaning "1 month from today"), "1d", "1D" (both meaning "1 day from today"). |
to | string (YYYY-MM-DD, or any of iMONTH, iW, iD, iH, iM) | query | Date to query to point in time. Sorted by published date. |
interval | string | query | The candle intervals to use, i.e., 5 minute bars, daily bars, etc. Some valid values: 1MONTH, 1W, 1D, 1H (1 hour), 2H, 3H, 4H, 5M (5 minutes), 10M, 15M, 30M. Defaults to an appropriate value based on the period of data requested: i.e., 5 minutes bars if less than 5 days, daily bars if greater. |
Responses
Code | Model | Description |
---|---|---|
200 OK | BarsResponse | Successful response |
Response (200 OK)
[
{
"symbol": "string",
"interval": "number",
"candles": [
{
"open": "number (float)",
"high": "number (float)",
"low": "number (float)",
"close": "number (float)",
"volume": "integer",
"time": "integer",
"dateTime": "string (YYYY-MM-DDTHH:MM:SS.mmm-ZZ:zz)"
}
]
}
]
Models
BarsResponse: object
Property | Type | Description |
---|---|---|
symbol | string | The given symbol |
interval | number | The candle interval |
candles | object[] | An array of bar data / candles |
candles[].open | number (float) | Price at same day market open |
candles[].high | number (float) | Indicator of highest price of security for same day |
candles[].low | number (float) | Indicator of lowest price of security for same day |
candles[].close | number (float) | Price at same day close. Only available after market close. |
candles[].volume | integer | Volume for the current or previous regular-only trading session |
candles[].time | integer | Unix timestamp in millis. |
candles[].dateTime | string (YYYY-MM-DDTHH:MM:SS.mmm-ZZ:zz) | Datetime is aligned to the start or the candle, or to the start of the pre-market session if a daily. |
Structure (JSON)
{
"symbol": "string",
"interval": "number",
"candles": [
{
"open": "number (float)",
"high": "number (float)",
"low": "number (float)",
"close": "number (float)",
"volume": "integer",
"time": "integer",
"dateTime": "string (YYYY-MM-DDTHH:MM:SS.mmm-ZZ:zz)"
}
]
}