Price History


GET pricehistory/:id

Description

Get a history of price data (high, low, open, close, volume) per pre-defined time interval. Data is available in 1, 2, 10 and 30 minute intervals, as well as a 24 hour option. A maximum of 7 days of 1 minute data, 14 days of 2 minute data, 90 days of 10 minute data, 365 days of 30 minute data, and 5 days of 24 hours data will be returned per API call. Only futures are supported.

Resource URL

https://api.optionscity.com/pricehistory/:id
Authentication Required
HTTP Methods GET
Media Types application/json
Response Object Price History
Response Type Standard

Parameters

NameDescriptionRequired?Type
id The future ID for which to fetch price data. Yes Number
date Filter out data older than this time. No DateTime*
before_date Filter out data more recent than this time. No DateTime*
resolution The resolution of historical price data to return. Can be 'max' (1 minute intervals), 'high' (2 minute intervals), 'medium' (10 minute intervals), 'low' (30 minute intervals), or 'session' (24 hours). All intervals will be returned if left blank. No String

Example Request

GET https://api.optionscity.com/pricehistory/53330019505fad6e0ff1ab25

Example Response

[ {
  "open" : 240.5,
  "close" : 243,
  "high" : 243.5,
  "low" : 238,
  "volume" : 893,
  "end_time" : "1970-01-01T03:37:57.262Z",
  "duration" : 120000,
  "session" : "2019-09-23"
} ]

Price History Object

Description

Summary price data for a future over a short time interval.

Fields

Field Type Optional Description
open Number No The first price seen for this future during the interval.
close Number No The last price seen for this future during the interval.
high Number No The highest price seen for this future during the interval.
low Number No The lowest price seen for this future during the interval.
volume Number No The total volume traded for this future during the interval.
end_time DateTime* No The end time of the interval.
duration Number No The interval duration in milliseconds.
session LocalDate* No The session date within which the price data was captured.

JSON Sample

[ {
  "open" : 240.5,
  "close" : 243,
  "high" : 243.5,
  "low" : 238,
  "volume" : 893,
  "end_time" : "1970-01-01T03:37:57.262Z",
  "duration" : 120000,
  "session" : "2019-09-23"
} ]

* Date and time elements are ISO-8601 string representations