Markets API

The methods of the Markets API has methods in the following categories: Cash Bids, Quotes, History, Options, Market Scans andMeta-Data.

Open API Specification

Open API Specification (Swagger) documentation can be found here: Markets REST API.To test the APIs in the documentation site, click the Authorize button. Paste the test key of oViXqthDGFNVw3IvAsnKrFG1AcfPyA6b in the apikey-query text box.

Migrating from a previous DTN Markets API

Tips on how to migrate from FimiNetWS or PXWeb can be found here: Migrating from previous DTN APIs.

Symbols

All Markets requests other than cash bids requires a symbol or symbol search pattern. More information on symbols and search patterns can be found here: Symbols and Search Patterns.

Cash Bids

Cash Bids will provide targeted commodity based pricing as it relates to specific elevator locations. These API’s are based on a specific site identifier and requires that a customer configuration within DTN Portal application exists. You will need to ensure you have an appropriate site identifier, represented by an E-zero number provided to you along with your API key in order to access the data for Cash Bids.

Quotes

Quotes will get you access to delayed Market quotes. Some setup and configurations can get real-time based on your subscription. Contact customer support if needed.

History

History requests return historical prices in intervals of minutes, days, weeks, and months.

The Markets API also supports a forward-curve request which will return the closing price for each contract in a futures chain for a given day in history.

Date and Time Range Adjustment

For any date or time range, the actual starting point is determined by the Interval parameter from the request. As a general rule, the actual starting point for the report is set internally in such a way that it always begins at the start of the Interval.

Examples:

  • A daily history request with an Interval of months will take as the starting point the first trading day of the month given in startDate.
  • A daily history request with an Interval of weeks will take as the starting point the first trading day of the week given in startDate.
  • A minute history request with an Interval of 5 minutes will take as a starting point the first minute of the 5 minute block given in startTime.

The end point of the report is the full day or minute specified in the endDate parameter. Since the end point is not adjusted to the end of the interval, to obtain a last full interval, the endDate parameter must be entered accordingly.

Order of Results

The result data is presented in an order determined by the actual values entered in the parameters that define the date or time range. When the Start value is older than the End value the result is sorted in ascending order, when the Start value is newer than the End value the result is sorted in descending order.

This sorting mechanism is applied at the symbol level and it should not be confused with the order of the symbols in a chain of futures contracts. Symbols representing each contract of a future option are always presented in the order of expiration date.

Options

The Markets API has two requests for getting information on futures options: the option strikes request and the option greeks request.

The option strikes request takes a option prefix which is an options root plus a maturity (i.e. @CZ20 or QCLM22). It returns an array of strike price objects each containing pricing information on calls and puts for the given strike. This request can be used to create a table of options information.

The option greeks request takes the symbol of a particular option, and it returns the values commonly known as ‘greeks’ used for evaluating price sensitivities of options. The values returned include delta, gamma, theta, and implied volatility.

Option Strikes Open Interest Filtering

Some applications using options only include strike prices with open interest. This can be done by filtering the response to skip strike prices where both the call and put openInterest value is zero. In this example the 4300 strike price would be ignored since there is no open interest for both the call and put. The other two strikes would be included since there is open interest for at least the call or put.

[
  {
    "strikePrice": "4300",
    "call": {
      "openInterest": 0,
      ...
    },
    "put": {
      "openInterest": 0,
      ...
    }
  },
  {
    "strikePrice": "4400",
    "call": {
      "openInterest": 0,
      ...
    },
    "put": {
      "openInterest": 5,
      ...
    }
  },
  {
    "strikePrice": "4500",
    "call": {
      "openInterest": 17,
      ...
    },
    "put": {
      "openInterest": 21,
      ...
    }
  }
]

Market Scans

Market scan requests take a survey of all equities in a market or markets and returns the top 100 symbols based on a provided criteria. The criteria available are: gainers, percent-gainers, losers, percent-losers, active, volatile, 52-week high, and 52-week low.

Meta-Data

The Markets API includes a method to query the market hours for a particular symbol. The request takes a symbol and a date range and returns the times that the symbol opens and closes during that date range. Some symbols may have more than one trading session during a day, so they will open and close multiple times per day. The market hours request will include hours changes due to holidays and exchange events.