Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| developers:chart [2026/06/24 14:59] – juan | developers:chart [2026/07/31 17:09] (current) – [Enumerations] frank | ||
|---|---|---|---|
| Line 20: | Line 20: | ||
| **What changed in this revision** \\ | **What changed in this revision** \\ | ||
| This page documents the **open-source decoder libraries** that consume the chart API's compact binary response: | This page documents the **open-source decoder libraries** that consume the chart API's compact binary response: | ||
| - | * A top-level section **[[# | + | * A top-level section **[[# |
| See **[[# | See **[[# | ||
| Line 281: | Line 281: | ||
| Open-source reference decoders are maintained alongside this API so you do not have to implement the binary format by hand. The libraries are line-for-line ports of the original Java ``com.t4login`` chart-data reader and are validated against each other and against the CSV/JSON output. | Open-source reference decoders are maintained alongside this API so you do not have to implement the binary format by hand. The libraries are line-for-line ports of the original Java ``com.t4login`` chart-data reader and are validated against each other and against the CSV/JSON output. | ||
| - | All of the tools below live in the public **CTS-Futures/ | + | Two of the tools below live in the public **CTS-Futures/ |
| [[https:// | [[https:// | ||
| Line 288: | Line 288: | ||
| | JavaScript | | JavaScript | ||
| | Python | | Python | ||
| - | | .NET (C#) | ``T4APIDemo`` (NuGet) | + | |
| + | More information on the .NET(C# | ||
| ==== JavaScript: @t4/ | ==== JavaScript: @t4/ | ||
| Line 445: | Line 446: | ||
| </ | </ | ||
| - | ==== .NET: T4APIDemo | + | ==== .NET ==== |
| - | The .NET reference decoder | + | The .NET reference decoder |
| === Install === | === Install === | ||
| - | Clone the [[https:// | + | Use the terminal commands from the link above to install in your environment. |
| - | + | ||
| - | <code powershell> | + | |
| - | git clone https:// | + | |
| - | cd t4-api-tools/ | + | |
| - | dotnet restore | + | |
| - | dotnet build | + | |
| - | </ | + | |
| ==== ChartDataState field reference (T4Bin) ==== | ==== ChartDataState field reference (T4Bin) ==== | ||
| Line 491: | Line 485: | ||
| === MarketMode === | === MarketMode === | ||
| Exchange session lifecycle state (the ``marketMode`` field in JSON, and ``state.Mode`` / ``onModeChange`` in binary). | Exchange session lifecycle state (the ``marketMode`` field in JSON, and ``state.Mode`` / ``onModeChange`` in binary). | ||
| - | + | ^ Value ^ Name | |
| - | ^ Value ^ Name | + | | 0 | ``Undefined`` |
| - | | 0 | ``Undefined`` | + | | 1 | ``PreOpen`` | Pre-open session: the exchange accepts, modifies, and cancels orders but does no matching. Precedes the open (often with an opening auction). |
| - | | 1 | ``PreOpen`` | | + | | 2 | ``Open`` |
| - | | 2 | ``Open`` | + | | 3 | ``RestrictedOpen`` | Market is open but with restrictions on activity (e.g. limited order types or actions allowed, reduced trading session). |
| - | | 3 | ``RestrictedOpen`` | | 11 | + | | 4 | ``PreClosed`` | Pre-close phase: the wind-down period just before the session closes, typically with restricted activity ahead of the closing process. |
| - | | 4 | ``PreClosed`` | | + | | 5 | ``Closed`` | Session is closed — no order entry or matching. |
| - | | 5 | ``Closed`` | + | | 6 | ``Suspended`` | Trading temporarily suspended by the exchange (an administrative pause, expected to resume). |
| - | | 6 | ``Suspended`` | | + | | 7 | ``Halted`` | Trading halted — typically a volatility/ |
| - | | 7 | ``Halted`` | | 15 | ``TrialExpired`` | | + | | 8 | ``Failed`` |
| + | | 9 | ``PreCross`` | Pre-cross auction phase: orders accumulate in the book ahead of a cross (opening/ | ||
| + | | 10 | ||
| + | | 11 | ``Expired`` | The contract has expired and is no longer tradable. | ||
| + | | 12 | ||
| + | | 13 | ``Unavailable`` | The market is unavailable — no data can be provided for it. | | ||
| + | | 14 | ||
| + | | 15 | ``TrialExpired`` | ||
| === BidOffer === | === BidOffer === | ||
| Line 513: | Line 514: | ||
| ^ Area ^ Change ^ | ^ Area ^ Change ^ | ||
| - | | New section | **Decoder Libraries** — JavaScript (``@t4/ | + | | New section | **Decoder Libraries** — JavaScript (``@t4/ |
| **Source of truth:** the field and enumeration tables above are generated from the decoder source under | **Source of truth:** the field and enumeration tables above are generated from the decoder source under | ||
| ``tools/ | ``tools/ | ||
| - | ``tools/ | + | ``tools/ |
| The response is structured as a JSON object with various elements containing detailed trade data and related information for the specified contract and exchange within the requested time frame. | The response is structured as a JSON object with various elements containing detailed trade data and related information for the specified contract and exchange within the requested time frame. | ||