This is an old revision of the document!
Market Data and Definitions
Introduction
The Market Data API provides access to all tradable instruments and their associated definitions within the platform. This REST-based API allows you to explore available markets, retrieve instrument specifications, and access critical trading parameters.
Unlike the real-time trading functionality which utilizes WebSocket and Protocol Buffers, the Market Data API follows REST principles for straightforward data retrieval and exploration. This documentation covers how to authenticate to the API and provides an overview of the available endpoints.
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
API Documentation
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
The Swagger interface allows you to:
- Browse all available endpoints
- Test API calls directly from your browser
- View request and response schemas
- Understand authentication requirements for each endpoint
Market Definition Endpoints
This section will be expanded with detailed information about specific market definition endpoints, including:
How to retrieve available markets Accessing instrument specifications Querying trading parameters Filtering and searching capabilities
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
Here's the improved DokuWiki syntax with parameters in tables:
```
Available Endpoints
Market Groups (/markets/picker/groups)
Retrieves groupings of markets based on strategy type and expiry date, particularly useful for building hierarchical market selection interfaces.
Request Parameters:
Parameter | Description |
---|---|
exchangeID | The identifier for the exchange |
contractID | The identifier for the contract |
Response:
- Returns groups of markets organized by strategy type
- For options, outright markets are further grouped by expiry date
- 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 (/markets/picker)
Retrieves a filtered list of markets based on specified criteria, providing essential information for market selection.
Request Parameters:
Parameter | Description | Required |
---|---|---|
exchangeID | The identifier for the exchange | Yes |
contractID | The identifier for the contract | Yes |
strategyType | Filter by strategy type | No |
expiryDate | Filter by specific expiry date | No |
Response:
- 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 (/markets/picker/firstmarket)
Retrieves the first available market matching specified criteria, typically used to find the front-month contract.
Request Parameters:
Parameter | Description | Required |
---|---|---|
exchangeID | The identifier for the exchange | Yes |
contractID | The identifier for the contract | Yes |
contractType | The type of contract (Future, Option, etc.) | Yes |
strategyType | The strategy type to filter by | Yes |
Response:
- Complete market definition for the first matching market
- 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 (/markets/picker/nextmarket)
Finds the next market in sequence after a specified market, maintaining the same contract and strategy types.
Request Parameters:
Parameter | Description | Required |
---|---|---|
exchangeID | The identifier for the exchange | Yes |
contractID | The identifier for the contract | Yes |
marketID | The current market identifier | Yes |
Response:
- 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 (/markets/picker/nextexpiry)
Locates the next market with a later expiry date than the specified market, while maintaining the same contract and strategy types.
Request Parameters:
Parameter | Description | Required |
---|---|---|
exchangeID | The identifier for the exchange | Yes |
contractID | The identifier for the contract | Yes |
marketID | The current market identifier | Yes |
Response:
- 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