Skip to main content

Get quotes history

    -X GET
--header 'Accept: application/json'
--header 'Authorization: Bearer {token here}'
'https://api.lime.co/marketdata/history?symbol=AAPL&period=day&from=1483228800&to=1483488000'

Returns an array of candles:

[
{
"timestamp": 1483074000,
"period": "day",
"open": 116.65,
"high": 117.2,
"low": 115.43,
"close": 115.82,
"volume": 24541183
},
{
"timestamp": 1483419600,
"period": "day",
"open": 115.8,
"high": 116.33,
"low": 114.76,
"close": 116.15,
"volume": 24719541
}
]

The query returns candle structures aggregated by specified period.

If you have an active OPRA data subscription, it is necessary to activate your API token in the Cabinet under My Profile -> API Keys to access market data. OPRA market data will be available for one trading session. On the following day, it will be required to reactivate the API token.

Request

parameterdescription
symbolRequired. The security symbol, stocks in Nasdaq CMS convention, options in OCC
periodRequired. The supported periods are: minute, minute_5, minute_15, minute_30, hour, day, week, month, quarter, year
fromRequired. Start of the period, unix timestamp
toRequired. End of the period, unix timestamp

The valid time range depends on the period value:

  • minute - 1 week
  • minute_5, minute_15, minute_30, hour - 1 month
  • day - 1 year
  • week, month, quarter, year - 5 years

Response

nametypedescription
timestampnumberUnix timestamp of a data point
periodstringSpecified period
opennumberOpen price
highnumberHigh price
lownumberLow price
closenumberClose price
volumenumberVolume