Market Data


GET marketdata

Description

Get a snapshot of market data (bid, ask, high, low, volume, last, last block) for the specified instruments, including greeks and theoretical values, when available.

Resource URL

https://api.optionscity.com/marketdata
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 market data. Greeks and theos will be calculated with an implied volatility by default. Optionally, the volatility can be specified by placing it after the instrument ID, separated by an underscore (see example request). Yes StringArray
sides Filter the results to only return the specified sides. Valid sides are 'Buy', 'Sell', 'Last', 'Block', 'Close', 'Low', 'High', 'OpenInterest' and 'Volume'. If not specified, buy and sell data is provided. No StringArray
include_depth Whether book depth should be included for quotes. Default is false. No Boolean

Example Request

GET https://api.optionscity.com/marketdata?instrument_ids=123&instrument_ids=456_0.13

Example Response

[ {
  "instrument_id" : 1,
  "price" : 6.25,
  "quantity" : 5,
  "side" : "Last",
  "timestamp" : "2019-09-23T00:53:32.262Z",
  "delta" : 0.5137990663,
  "gamma" : 0.02255201356,
  "vega" : 52.87263451,
  "theta" : -1.57024116,
  "epsilon" : 0.001774341197,
  "zeta" : 0.2643631725,
  "rho" : 85.81178772,
  "rho2" : -12.44348579,
  "volatility" : 0.1227738043,
  "underlying_price" : 100
} ]

GET marketdata/mdgroups

Description

Get a list of all market data groups currently supported by the City Platform.

Resource URL

https://api.optionscity.com/marketdata/mdgroups
Authentication Optional
HTTP Methods GET
Media Types application/json
Response Object String
Response Type Standard

Example Request

GET https://api.optionscity.com/marketdata/mdgroups

Example Response

[ "CME", "CBOT", "COMEX", "NYMEX", "ICE", "ICEEU", "LIFFE", "EUREX", "NFX", "NORDIC" ]

GET marketdata/exchanges

Description

Get a list of all exchanges currently supported by the City Platform.

Resource URL

https://api.optionscity.com/marketdata/exchanges
Authentication Optional
HTTP Methods GET
Media Types application/json
Response Object String
Response Type Standard

Example Request

GET https://api.optionscity.com/marketdata/exchanges

Example Response

[ "CME", "NYMEX", "COMEX", "CBOT", "KCBT", "ICE", "ICEEU", "LIFFE", "EUREX", "EEX", "NFX", "NORDIC" ]

GET marketdata/tradingplatforms

Description

Get a list of all trading platforms currently supported by the City Platform.

Resource URL

https://api.optionscity.com/marketdata/tradingplatforms
Authentication Optional
HTTP Methods GET
Media Types application/json
Response Object String
Response Type Standard

Example Request

GET https://api.optionscity.com/marketdata/tradingplatforms

Example Response

[ "Globex", "Ice", "Liffe", "Eurex", "Nfx", "Nordic" ]

Market Data Object

Description

Any of the following data points published for an instrument by an exchange: quotes, trades, daily volume, open interest and daily high/low prices.

Fields

Field Type Optional Subtypes Description
instrument_id Number No All City API assigned instrument identifier.
price Number No Buy Sell Last High Low VolumeAtPrice Block Associated price, if applicable.
quantity Number No Buy Sell Last OpenInterest Volume VolumeAtPrice Block Associated quantity or size, if applicable.
side String No All Buy, Sell, Last, Block, Close, High, Low, OpenInterest or Volume.
timestamp DateTime* No All The exchange-given time the data was produced.
depth ObjectArray Yes Buy Sell The book depth for a quote, if requested.
is_final Boolean No Settlement Whether this is a final settlement price.
close_date LocalDate* No Settlement The settlement date.
theo Number Yes All An option's current theoretical value.
delta Number Yes All An option's current delta, if inputs are available for calculation.
gamma Number Yes All An option's current gamma, if inputs are available for calculation.
vega Number Yes All An option's current vega, if inputs are available for calculation.
theta Number Yes All An option's current theta, if inputs are available for calculation.
epsilon Number Yes All An option's current epsilon, if inputs are available for calculation.
zeta Number Yes All An option's current zeta, if inputs are available for calculation.
rho Number Yes All An option's current rho, if inputs are available for calculation.
volatility Number Yes All The current market implied volatility of the underlying, used to calculate greeks, if applicable, and if inputs are available for calculation.
underlying_price Number Yes All The underlying price used to calculate greeks, if applicable.
missing_greeks_reason String Yes All If greeks are unavailable, a detailed reason they are unavailable.

JSON Sample

[ {
  "instrument_id" : 1,
  "price" : 6.25,
  "quantity" : 5,
  "side" : "Last",
  "timestamp" : "2019-09-23T00:53:32.262Z",
  "delta" : 0.5137990663,
  "gamma" : 0.02255201356,
  "vega" : 52.87263451,
  "theta" : -1.57024116,
  "epsilon" : 0.001774341197,
  "zeta" : 0.2643631725,
  "rho" : 85.81178772,
  "rho2" : -12.44348579,
  "volatility" : 0.1227738043,
  "underlying_price" : 100
} ]

Book Depth Data Object

Description

A single quote entry in the market book.

Fields

Field Type Optional Description
price Number No Associated price, if applicable.
quantity Number No Associated quantity or size, if applicable.
exchange String Yes The published exchange of the data, if markets are available across multiple exchanges.

JSON Sample

{
  "price" : 10,
  "quantity" : 3
}

* Date and time elements are ISO-8601 string representations