developers:markets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developers:markets [2025/04/10 21:13] chaddevelopers:markets [2025/04/10 21:30] (current) chad
Line 1: Line 1:
-====== Market Definition Service ======+====== Instruments API ======
  
 The T4 system uses MarketID to uniquely identify tradeable instruments on our platform. These instruments are partitioned in a hierarchical manner using: 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). | +| **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). |+| **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)'' | | **MarketID** | Uniquely identifies the tradeable instrument. \\ Examples: \\ - Future: Corn May25 ''XCME_C ZC (K25)'' \\ - Option: Corn Mar26 500 Call ''XCME_COp OZC (H26P 500)'' |
  
Line 11: Line 11:
 <bootnote warning>Never parse MarketID into it's component parts. Even if it appears that may work, it will not work across our whole platform.</bootnote> <bootnote warning>Never parse MarketID into it's component parts. Even if it appears that may work, it will not work across our whole platform.</bootnote>
  
 +===== Authentication =====
 +
 +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.
 +
 +==== JWT Authentication ====
 +
 +To obtain a JWT token:
 +
 +  - Send a JWT request Protocol Buffer message to the authentication endpoint
 +  - The server will respond with a JWT token that should be included in subsequent API requests
 +  - Include the JWT token in the Authorization header using the Bearer scheme
 +
 +==== AuthKey Authentication ====
 +
 +For B2B integrations:
 +
 +  - Use your provided AuthKey for direct API access
 +  - Include the AuthKey in the request header as specified in the API documentation
 +  - AuthKeys have configurable permissions and can be managed through the administration portal
 +
 +===== Swagger API Documentation =====
 +
 +For a complete reference of all available endpoints, request parameters, and response formats, please refer to our interactive Swagger documentation:
 +
 +[[https://api-sim.t4login.com/markets/swagger/index.html|Market Data API Swagger Documentation]]
  
  
Line 302: Line 330:
  
  
 +====== 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.
 +
 +===== Benefits of the Market Picker Approach =====
 +
 +  * 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
 +
 +===== Available Endpoints =====
 +
 +====== 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.
 +
 +==== API Endpoint ====
 +<code>GET https://api-sim.t4login.com/markets/picker/groups</code>
 +
 +==== Header ====
 +Include **Authorization** which should contain a valid bearer token.
 +<code>Authorization: Bearer YOUR_ACCESS_TOKEN</code>
 +
 +==== Parameters ====
 +^ Parameter   ^ Description                      ^
 +| exchangeID  | **Required**. Identifier for the exchange. |
 +| contractID  | **Required**. Identifier for the contract. |
 +
 +==== Response ====
 +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.
 +
 +==== Use Case ====
 +  * 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.
 +
 +==== API Endpoint ====
 +<code>GET https://api-sim.t4login.com/markets/picker</code>
 +
 +==== Header ====
 +Include **Authorization** which should contain a valid bearer token.
 +<code>Authorization: Bearer YOUR_ACCESS_TOKEN</code>
 +
 +==== Parameters ====
 +^ 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.     |
 +
 +==== Response ====
 +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.
 +
 +==== Use Case ====
 +  * 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.
 +
 +==== API Endpoint ====
 +<code>GET https://api-sim.t4login.com/markets/picker/firstmarket</code>
 +
 +==== Header ====
 +Include **Authorization** which should contain a valid bearer token.
 +<code>Authorization: Bearer YOUR_ACCESS_TOKEN</code>
 +
 +==== Parameters ====
 +^ 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.        |
 +
 +==== Response ====
 +The response provides a complete market definition for the first matching market. Markets are ordered according to standard market details comparison.
 +
 +==== Use Case ====
 +  * 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.
 +
 +==== API Endpoint ====
 +<code>GET https://api-sim.t4login.com/markets/picker/nextmarket</code>
 +
 +==== Header ====
 +Include **Authorization** which should contain a valid bearer token.
 +<code>Authorization: Bearer YOUR_ACCESS_TOKEN</code>
 +
 +==== Parameters ====
 +^ Parameter   ^ Description                             ^
 +| exchangeID  | **Required**. Identifier for the exchange. |
 +| contractID  | **Required**. Identifier for the contract. |
 +| marketID    | **Required**. The current market identifier. |
 +
 +==== Response ====
 +The response provides a complete market definition for the next market in sequence. Returns 404 if there is no next market.
 +
 +==== Use Case ====
 +  * 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.
 +
 +==== API Endpoint ====
 +<code>GET https://api-sim.t4login.com/markets/picker/nextexpiry</code>
 +
 +==== Header ====
 +Include **Authorization** which should contain a valid bearer token.
 +<code>Authorization: Bearer YOUR_ACCESS_TOKEN</code>
 +
 +==== Parameters ====
 +^ Parameter   ^ Description                             ^
 +| exchangeID  | **Required**. Identifier for the exchange. |
 +| contractID  | **Required**. Identifier for the contract. |
 +| marketID    | **Required**. The current market identifier. |
 +
 +==== Response ====
 +The response provides a complete market definition for the next expiry market. Returns 404 if there is no market with a later expiry.
  
 +==== Use Case ====
 +  * Rolling positions forward to the next expiry period
 +  * Comparing markets across different expiry dates
 +  * Analyzing term structure or calendar spreads
  
  
  • developers/markets.1744319590.txt.gz
  • Last modified: 2025/04/10 21:13
  • by chad