Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| api:chart [2024/01/09 16:12] – chad | api:chart [2025/03/14 02:48] (current) – removed chad | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== T4 Chart API ====== | ||
| - | |||
| - | Our chart API provides data in aggregated or un-aggregated formats. | ||
| - | |||
| - | < | ||
| - | All times are in CST. | ||
| - | </ | ||
| - | |||
| - | ===== Aggregated Chart Data ===== | ||
| - | |||
| - | ====== GetBarChart API Documentation ====== | ||
| - | |||
| - | ==== Overview ==== | ||
| - | The **GetBarChart** API retrieves bar chart data for a specified trading instrument over a given date range. This API supports various chart types and bar intervals, tailored for detailed data analysis in financial contexts. | ||
| - | |||
| - | ==== API Endpoint ==== | ||
| - | < | ||
| - | |||
| - | ==== Parameters ==== | ||
| - | ^ Parameter | ||
| - | | **exchangeId** | ||
| - | | **contractId** | ||
| - | | **chartType** | ||
| - | | **barInterval** | ||
| - | | **barPeriod** | ||
| - | | **tradeDateStart** | ||
| - | | **tradeDateEnd** | ||
| - | | marketID | ||
| - | | continuationType | Method of continuation for the chart. Only **Volume** is currently supported. | ||
| - | | resetInterval | ||
| - | | contractMonths | ||
| - | | rolloverThreshold| Rollover threshold (not applicable when **ContinuationType.Volume** is used). | ||
| - | | forwardMonths | ||
| - | |||
| - | ====== Response Structure ====== | ||
| - | |||
| - | The response from the **GetBarChart** API is a JSON object containing detailed information about the bar chart data. Below is the structure of the response along with a description of each element: | ||
| - | |||
| - | ^ Element | ||
| - | | tradeDateStart | ||
| - | | tradeDateEnd | ||
| - | | activeMarket | ||
| - | | bars | An array of bar objects, each containing detailed information like trade date, prices, volume, and trades. | ||
| - | | marketDefinitions | ||
| - | | modeChanges | ||
| - | | openInterests | ||
| - | | settlements | ||
| - | |||
| - | ==== Example JSON Response ==== | ||
| - | |||
| - | < | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | } | ||
| - | ], | ||
| - | " | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | } | ||
| - | ], | ||
| - | " | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | }, | ||
| - | // ... additional mode changes ... | ||
| - | ], | ||
| - | " | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | }, | ||
| - | // ... additional open interests ... | ||
| - | ], | ||
| - | " | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | }, | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | } | ||
| - | // ... additional settlements ... | ||
| - | ] | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | ===== Un-Aggregated Chart Data (Trade History) ===== | ||