developers:markets

This is an old revision of the document!


Market Definition Service

The T4 system uses MarketID to uniquely identify tradeable instruments on our platform. These instruments are partitioned in a hierarchical manner using:

ExchangeID Represents the exchange and market segment.
Examples include CME Equities CME_Eq, CME Commodities CME_C, CME NYMEX CME_Ny, and their option variants such as CME Equity Options CME_EqOp, CME Commodity Options CME_COp, and CME NYMEX Options CME_NyOp.
ContractID Represents the specific product group.
Examples include Corn ZC, E-Mini S&P 500 ES, and Crude Oil CL.
MarketID Uniquely identifies the tradeable instrument.
Examples:
- Future: Corn May25 XCME_C ZC (K25)
- Option: Corn Mar26 500 Call XCME_COp OZC (H26P 500)

Note: MarketID is unique across the platform.

Warning: Never parse MarketID into it's component parts. Even if it appears that may work, it will not work across our whole platform.

The Market Data API supports two authentication methods, depending on your integration scenario:

  • AuthKey Authentication: Designed for business-to-business (B2B) integrations, providing a simplified authentication mechanism for server-to-server communication.
  • JWT Authentication: Utilized for client-to-business (C2B) scenarios, offering secure token-based authentication for end-user applications.

To obtain a JWT token:

  1. Send a JWT request Protocol Buffer message to the authentication endpoint
  2. The server will respond with a JWT token that should be included in subsequent API requests
  3. Include the JWT token in the Authorization header using the Bearer scheme

For B2B integrations:

  1. Use your provided AuthKey for direct API access
  2. Include the AuthKey in the request header as specified in the API documentation
  3. AuthKeys have configurable permissions and can be managed through the administration portal

For a complete reference of all available endpoints, request parameters, and response formats, please refer to our interactive Swagger documentation:

Market Data API Swagger Documentation

Exchanges

Retrieves a list of exchanges available in the market data system.

GET https://api-sim.t4login.com/markets/exchanges

Include Authorization which should contain a valid bearer token.

Authorization: Bearer YOUR_ACCESS_TOKEN

The JSON response is an array of objects, each representing an exchange with its ID, clearing exchange, and description.

Element Description
exchangeId Identifier for the exchange.
clearingExchange The clearing exchange name.
description A brief description of the exchange.
[
    {
        "exchangeId": "CME_C",
        "clearingExchange": "CBOT",
        "description": "CBOT Commodity Futures"
    },
    {
        "exchangeId": "CME_CL",
        "clearingExchange": "NYMEX",
        "description": "NYMEX CrudeOil Futures"
    },
    {
        "exchangeId": "CME_CLOp",
        "clearingExchange": "NYMEX",
        "description": "NYMEX CrudeOil Options"
    },
    {
        "exchangeId": "CME_CO",
        "clearingExchange": "COMEX",
        "description": "COMEX Futures"
    },
    // ... additional exchanges ...
]

Contracts

The Contracts API endpoint retrieves a list of contracts for a given exchange.

GET https://api-sim.t4login.com/markets/contracts

Include Authorization which should contain a valid bearer token.

Authorization: Bearer YOUR_ACCESS_TOKEN
Parameter Description
exchangeID Identifier for the exchange.
Element Description
exchangeID Identifier for the exchange.
contractID Identifier for the contract.
contractType Type of the contract (e.g., Future).
description A brief description of the contract.
[
    {
        "exchangeID": "CME_Eq",
        "contractID": "ES",
        "contractType": "Future",
        "description": "E-mini S&P 500"
    },
    {
        "exchangeID": "CME_Eq",
        "contractID": "ES1",
        "contractType": "Future",
        "description": "E-mini S&P 500 Forward BTIC Nearby"
    },
    {
        "exchangeID": "CME_Eq",
        "contractID": "ES1",
        "contractType": "Future",
        "description": "E-mini S&P 500 Forward BTIC Nearby"
    },
    {
        "exchangeID": "CME_Eq",
        "contractID": "ES2",
        "contractType": "Future",
        "description": "E-mini S&P 500 Forward BTIC Deferred"
    },
  // ... additional contracts...
]

The JSON response is an array of objects, each representing a contract with its exchange ID, contract ID, type, and description.

Contract Search

The Contract Search API endpoint is used to search for contracts based on a given search query.

GET https://api-sim.t4login.com/markets/contracts/search

Include Authorization which should contain a valid bearer token.

Authorization: Bearer YOUR_ACCESS_TOKEN
Parameter Description
s The search query string used to search for contracts.

The response structure will be an array of contract objects. Each object includes details about the contract found in the search.

[
    {
        "exchangeID": "CME_CO",
        "contractID": "GC",
        "contractType": "Future",
        "description": "Gold"
    },
    {
        "exchangeID": "CME_CO",
        "contractID": "GC",
        "contractType": "Future",
        "description": "Gold"
    },
    {
        "exchangeID": "CME_COOp",
        "contractID": "OG",
        "contractType": "Option",
        "description": "Gold"
    },
    {
        "exchangeID": "LME_PR",
        "contractID": "AU",
        "contractType": "Future",
        "description": "Gold"
    },
    {
        "exchangeID": "CME_CO",
        "contractID": "GCT",
        "contractType": "Future",
        "description": "Gold TAS"
    },
    {
        "exchangeID": "CME_CO",
        "contractID": "GVF",
        "contractType": "Future",
        "description": "Gold VIX"
    },
	// ... additional results ...
]

Markets

The Markets API endpoint retrieves information about markets based on specified criteria, including exchange ID, contract ID, and optionally market ID and strategy type.

GET https://api-sim.t4login.com/markets

Include Authorization which should contain a valid bearer token.

Authorization: Bearer YOUR_ACCESS_TOKEN
Parameter Description
exchangeID Required. Identifier for the exchange.
contractID Required. Identifier for the contract.
marketID Optional identifier for the market.
strategyType Optional. Type of strategy (Default is Any).

The JSON response is an array of objects, each representing a market with specific details such as exchange ID, contract ID, market ID, description, contract type, expiry date, and last trading date.

Element Description
exchangeID Identifier for the exchange.
contractID Identifier for the contract.
marketID Identifier for the market.
description Description of the market.
contractType Type of the contract (e.g., Future).
expiryDate Expiry date of the contract.
lastTradingDate Last trading date for the contract.
[
    {
        "exchangeID": "CME_C",
        "contractID": "ZS",
        "marketID": "XCME_C ZS (F24)",
        "description": "Soybean Jan24",
        "contractType": "Future",
        "expiryDate": 20240100,
        "lastTradingDate": "2024-01-12T12:01:00"
    },
    // ... additional markets ...
]

Market Details

The Market Details API endpoint retrieves detailed information about a specific market expiry.

GET https://api-sim.t4login.com/markets/marketdetails

Include Authorization which should contain a valid bearer token.

Authorization: Bearer YOUR_ACCESS_TOKEN
Parameter Description
exchangeID Required. Identifier for the exchange.
contractID Required. Identifier for the contract.
marketID Required. Identifier for the market.
Element Description
marketID Identifier for the market.
lastUpdateTime Last update time of market details.
lastClientUpdateTime Last update time of market details on the client side.
description Description of the market.
exchangeID Identifier for the exchange.
contractID Identifier for the contract.
expiryDate Expiry date of the contract.
lastTradingDate Last trading date for the contract.
delistDate Delist date of the contract.
exchangeDelistDate Delist date of the contract on the exchange.
activationDate Activation date of the market.
volumeIncrement Increment of the volume.
numerator Numerator for calculating market values.
denominator Denominator for calculating market values.
priceCode Price code for the market.
tickValue Value per tick for the market.
orderTypes Types of orders allowed in the market.
contractType Type of the contract (e.g., Future).
rtsPriceCode Real-time system price code.
rtsNumerator Real-time system numerator.
rtsDenominator Real-time system denominator.
rtsTickValue Real-time system tick value.
marketRef Market reference.
legs Details of the contract legs.
realDecimals Number of real decimals.
clearingDecimals Number of clearing decimals.
group Group identifier for the market.
marketRef2 Additional market reference.
details Additional details of the market.
vtt Variable pertaining to the market.
underlyingMarketID Underlying market identifier.
maintIntraMargin Maintenance intraday margin.
maintMargin Maintenance margin.
maintVolScan Maintenance volume scan.
minPriceIncrement Minimum price increment.
pointValue Point value for the market.
securityGroup Security group for the market.
exchangeDetailsJSON JSON-formatted exchange details.
messageType Type of message.
messageCategory Category of the message.
messageVersion Version of the message.
{
    "marketID": "XCME_Eq ES (Z23)",
    "lastUpdateTime": "2023-12-10T15:00:35.31",
    "lastClientUpdateTime": "2023-12-10T15:00:35.31",
    // ... other properties as outlined in the response structure ...
}

The JSON response provides detailed information about the specified market, including various attributes like market IDs, dates, margin requirements, and order types.

Market Picker Endpoints

The Market Picker endpoints provide an efficient way to navigate and select markets, particularly for options markets that may contain thousands of individual instruments. Rather than loading all market definitions at once, these endpoints enable hierarchical browsing and targeted retrieval of market data.

  • Performance Optimization: Eliminates the need to load thousands of market definitions upfront
  • Efficient Navigation: Provides a structured approach to browse complex market hierarchies
  • Reduced Bandwidth: Retrieves only the necessary market data when needed
  • Improved User Experience: Enables faster application load times and responsive market selection

Market Groups

The Market Groups API endpoint retrieves groupings of markets based on strategy type and expiry date, particularly useful for building hierarchical market selection interfaces.

GET https://api-sim.t4login.com/markets/picker/groups

Include Authorization which should contain a valid bearer token.

Authorization: Bearer YOUR_ACCESS_TOKEN
Parameter Description
exchangeID Required. Identifier for the exchange.
contractID Required. Identifier for the contract.

The response provides groups of markets organized by strategy type. For options, outright markets are further grouped by expiry date. The response includes count of markets in each group.

  • Building the top level of a hierarchical market picker
  • Allowing users to navigate to specific market types or expiry periods
  • Displaying summary information about available markets

Market List

The Market List API endpoint retrieves a filtered list of markets based on specified criteria, providing essential information for market selection.

GET https://api-sim.t4login.com/markets/picker

Include Authorization which should contain a valid bearer token.

Authorization: Bearer YOUR_ACCESS_TOKEN
Parameter Description
exchangeID Required. Identifier for the exchange.
contractID Required. Identifier for the contract.
strategyType Optional. Filter by strategy type.
expiryDate Optional. Filter by specific expiry date.

The response is a list of markets matching the filter criteria. Each market includes MarketID, ExpiryDescription, ExpiryDate, ContractType, and StrategyType. Results are ordered by market details.

  • Displaying markets after a user selects a specific group
  • Populating selection dropdowns or lists with available markets
  • Enabling users to browse markets with specific characteristics

First Market

The First Market API endpoint retrieves the first available market matching specified criteria, typically used to find the front-month contract.

GET https://api-sim.t4login.com/markets/picker/firstmarket

Include Authorization which should contain a valid bearer token.

Authorization: Bearer YOUR_ACCESS_TOKEN
Parameter Description
exchangeID Required. Identifier for the exchange.
contractID Required. Identifier for the contract.
contractType Required. Type of contract (Future, Option, etc.).
strategyType Required. Strategy type to filter by.

The response provides a complete market definition for the first matching market. Markets are ordered according to standard market details comparison.

  • Automatically selecting the front-month contract
  • Setting a default market when a user first accesses a trading interface
  • Quick access to the most liquid or commonly traded market in a group

Next Market

The Next Market API endpoint finds the next market in sequence after a specified market, maintaining the same contract and strategy types.

GET https://api-sim.t4login.com/markets/picker/nextmarket

Include Authorization which should contain a valid bearer token.

Authorization: Bearer YOUR_ACCESS_TOKEN
Parameter Description
exchangeID Required. Identifier for the exchange.
contractID Required. Identifier for the contract.
marketID Required. The current market identifier.

The response provides a complete market definition for the next market in sequence. Returns 404 if there is no next market.

  • Implementing “next” navigation in a market explorer
  • Allowing users to iterate through available markets
  • Cycling through markets with the same characteristics

Next Expiry

The Next Expiry API endpoint locates the next market with a later expiry date than the specified market, while maintaining the same contract and strategy types.

GET https://api-sim.t4login.com/markets/picker/nextexpiry

Include Authorization which should contain a valid bearer token.

Authorization: Bearer YOUR_ACCESS_TOKEN
Parameter Description
exchangeID Required. Identifier for the exchange.
contractID Required. Identifier for the contract.
marketID Required. The current market identifier.

The response provides a complete market definition for the next expiry market. Returns 404 if there is no market with a later expiry.

  • Rolling positions forward to the next expiry period
  • Comparing markets across different expiry dates
  • Analyzing term structure or calendar spreads
  • developers/markets.1744320478.txt.gz
  • Last modified: 2025/04/10 21:27
  • by 127.0.0.1