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:24] – 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 ===== | ||
- | |||
- | ==== 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 ==== | ||
- | |||
- | 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: | ||
- | |||
- | === Bars === | ||
- | ^ Element | ||
- | | tradeDate | ||
- | | time | Time when the bar data starts. | ||
- | | closeTime | ||
- | | marketID | ||
- | | openPrice | ||
- | | highPrice | ||
- | | lowPrice | ||
- | | closePrice | ||
- | | volume | ||
- | | volumeAtBid | ||
- | | volumeAtOffer | ||
- | | trades | ||
- | | tradesAtBid | ||
- | | tradesAtOffer | ||
- | |||
- | === MarketDefinitions === | ||
- | ^ Element | ||
- | | marketID | ||
- | | minPriceIncrement | Minimum increment of the market' | ||
- | | priceCode | ||
- | | tickValue | ||
- | | vpt | Additional market-specific information (variable). | ||
- | |||
- | === ModeChanges === | ||
- | ^ Element | ||
- | | marketID | ||
- | | tradeDate | ||
- | | time | Time when the mode change occurred. | ||
- | | marketMode | ||
- | |||
- | === OpenInterests === | ||
- | ^ Element | ||
- | | marketID | ||
- | | tradeDate | ||
- | | time | Time of the recorded open interest. | ||
- | | openInterest | ||
- | |||
- | === Settlements === | ||
- | ^ Element | ||
- | | marketID | ||
- | | tradeDate | ||
- | | time | Time when the settlement information was recorded. | ||
- | | settlementPrice | ||
- | | isHeld | ||
- | |||
- | ==== Example JSON Response ==== | ||
- | |||
- | < | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | ], | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | ], | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | // ... additional mode changes ... | ||
- | ], | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | // ... additional open interests ... | ||
- | ], | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | // ... additional settlements ... | ||
- | ] | ||
- | } | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ===== Un-Aggregated Chart Data (Trade History) ===== | ||