Open Interest


GET openinterest

Description

Get the open interest for the specified instruments and date.

Resource URL

https://api.optionscity.com/openinterest
Authentication Required
HTTP Methods GET
Media Types application/json
Response Object Market Data
Response Type Standard

Parameters

NameDescriptionRequired?Type
instrument_ids The instrument IDs for which to fetch open interest. Yes NumberArray
date The local date for which to return open interest. Only day precision is required; additional precision will be ignored. If not provided, the most recent open interest will be returned. (Many open interest values aren't posted until about 6:30 PM CST.) No LocalDate*

Example Request

GET https://api.optionscity.com/openinterest?instrument_ids=53330019505fad6e0ff1ab25&date=2014-04-16

Example Response

[ {
  "instrument_id" : 1,
  "quantity" : 38125,
  "side" : "OpenInterest",
  "timestamp" : "2018-08-21T14:13:16.132Z",
  "close_date" : "2018-08-21"
} ]

GET greatestopeninterest

Description

Get every future with the greatest open interest for each product group.

Resource URL

https://api.optionscity.com/greatestopeninterest
Authentication Required
HTTP Methods GET
Media Types application/json
Response Object Greatest Open Interest
Response Type Standard

Parameters

NameDescriptionRequired?Type
embed_instrument Whether instrument descriptions should be embedded in the response objects. Default is false. No Boolean

Example Request

GET https://api.optionscity.com/greatestopeninterest

Example Response

[ {
  "instrument_id" : 1234,
  "open_interest" : 1174
} ]

Greatest Open Interest Object

Description

The open interest for the future with the greatest open interest for a product group.

Fields

Field Type Optional Description
instrument_id Number No The City API instrument ID for the future.
instrument Object Yes A full embedded instrument description, if requested.
open_interest Number No The open interest for the future.

JSON Sample

{
  "instrument_id" : 1234,
  "open_interest" : 1174
}

* Date and time elements are ISO-8601 string representations