Historical Bar Data API Reference

Free Trial ➡

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

NameTypeLocationDescription
acceptstring , x ∈ { application/json (default) , application/xml (deprecated) }header

Specify return format.

symbolsstring (csv)query

One or more comma separated symbols to specify companies to get data for.

fromstring (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").

tostring (YYYY-MM-DD, or any of iMONTH, iW, iD, iH, iM)query

Date to query to point in time. Sorted by published date.

intervalstringquery

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

CodeModelDescription
200 OKBarsResponse

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

PropertyTypeDescription
symbolstring

The given symbol

intervalnumber

The candle interval

candlesobject[]

An array of bar data / candles

candles[].opennumber (float)

Price at same day market open

candles[].highnumber (float)

Indicator of highest price of security for same day

candles[].lownumber (float)

Indicator of lowest price of security for same day

candles[].closenumber (float)

Price at same day close. Only available after market close.

candles[].volumeinteger

Volume for the current or previous regular-only trading session

candles[].timeinteger

Unix timestamp in millis.

candles[].dateTimestring (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)"
    }
  ]
}