developers:chart

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:chart [2026/06/24 14:59] juandevelopers: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 **[[#Decoder Libraries]]** documenting the JavaScript (``@t4/chart-decoder``), Python (``t4login``) and .NET (``T4APIDemo``) reference decoders, including the streaming handler interface, the ``ChartDataState`` field reference, and the ``ChartDataChange`` / ``MarketMode`` / ``BidOffer`` enumerations.+  * A top-level section **[[#Decoder Libraries]]** documenting the JavaScript (``@t4/chart-decoder``), Python (``t4login``) and .NET reference decoders, including the streaming handler interface, the ``ChartDataState`` field reference, and the ``ChartDataChange`` / ``MarketMode`` / ``BidOffer`` enumerations.
  
 See **[[#Revision Notes / Changelog]]** at the bottom for the detailed list. See **[[#Revision Notes / Changelog]]** at the bottom for the detailed list.
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/t4-api-tools** repository:+Two of the tools below live in the public **CTS-Futures/t4-api-tools** repository:
  
 [[https://github.com/CTS-Futures/t4-api-tools/tree/main/tools|https://github.com/CTS-Futures/t4-api-tools/tree/main/tools]] [[https://github.com/CTS-Futures/t4-api-tools/tree/main/tools|https://github.com/CTS-Futures/t4-api-tools/tree/main/tools]]
Line 288: Line 288:
 | JavaScript  | ``@t4/chart-decoder`` (ES modules) | ``tools/JavaScript/t4-javascript-api/`` (and a browser copy under ``tools/JavaScript/JSDemo/decoder/``) | | JavaScript  | ``@t4/chart-decoder`` (ES modules) | ``tools/JavaScript/t4-javascript-api/`` (and a browser copy under ``tools/JavaScript/JSDemo/decoder/``) |
 | Python      | ``t4login``                     | ``tools/Python/t4-pythonConversion-api/src/t4login/``         | | Python      | ``t4login``                     | ``tools/Python/t4-pythonConversion-api/src/t4login/``         |
-.NET (C#)   | ``T4APIDemo`` (NuGet)           | ``tools/dotNet/T4APIDemo/``                                    |+ 
 +More information on the .NET(C#Decoder can be found in it's own section following the Python section. 
  
 ==== JavaScript: @t4/chart-decoder ==== ==== JavaScript: @t4/chart-decoder ====
Line 445: Line 446:
 </code> </code>
  
-==== .NET: T4APIDemo ====+==== .NET ====
  
-The .NET reference decoder ships as the ``T4APIDemo`` NuGet package in the same repository, under ``tools/dotNet/T4APIDemo/``. It mirrors the JavaScript and Python decoders (same class, handler and ``ChartDataState`` field names) for 1:1 parity across all implementations.+The .NET reference decoder can be found at [[https://www.nuget.org/packages/Plus500US.T4ChartDecoder]]. It mirrors the JavaScript and Python decoders (same class, handler and ``ChartDataState`` field names) for 1:1 parity across all implementations.
  
 === Install === === Install ===
-Clone the [[https://github.com/CTS-Futures/t4-api-tools/tree/main/tools|t4-api-tools]] repository, then restore and build the project: +Use the terminal commands from the link above to install in your environment
- +
-<code powershell> +
-git clone https://github.com/CTS-Futures/t4-api-tools.git +
-cd t4-api-tools/tools/dotNet/T4APIDemo +
-dotnet restore +
-dotnet build +
-</code>+
  
 ==== 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             Description 
-^ Value ^ Name               ^ Value ^ Name             +| 0     | ``Undefined``      No mode known yet (initial state, or an unrecognized value from the feed — the get() helpers map anything unknown here). | 
-| 0     | ``Undefined``          | ``Failed``       +| 1     | ``PreOpen``        | Pre-open session: the exchange accepts, modifies, and cancels orders but does no matching. Precedes the open (often with an opening auction). 
-    | ``PreOpen``            | ``PreCross``     +    | ``Open``           Normal continuous trading — orders are matched in real time. | 
-    | ``Open``           10    | ``Cross``        +| 3     | ``RestrictedOpen`` | Market is open but with restrictions on activity (e.g. limited order types or actions allowed, reduced trading session). 
-    | ``RestrictedOpen`` |  11    | ``Expired``      +    | ``PreClosed``      Pre-close phase: the wind-down period just before the session closes, typically with restricted activity ahead of the closing process. | 
-    | ``PreClosed``      12    | ``Rejected``     +| 5     | ``Closed``         | Session is closed — no order entry or matching. 
-5     | ``Closed``         13    | ``Unavailable``  +    | ``Suspended``      Trading temporarily suspended by the exchange (an administrative pause, expected to resume). | 
-6     | ``Suspended``      14    | ``NoPermission`` | +| 7     | ``Halted``         | Trading halted — typically a volatility/circuit-breaker or regulatory halt on the instrument. 
-7     | ``Halted``       |   | 15    | ``TrialExpired`` |+    | ``Failed``         The market is in a failure state (exchange or system problem; data/trading not functioning normally). | 
 +| 9     | ``PreCross``       | Pre-cross auction phase: orders accumulate in the book ahead of a cross (opening/closing auction), no continuous matching. 
 +10    | ``Cross``          The cross/auction itself is executing — orders are being matched at the auction price. | 
 +| 11    | ``Expired``        | The contract has expired and is no longer tradable. 
 +12    | ``Rejected``       The market subscription/request was rejected by the server. | 
 +| 13    | ``Unavailable``    | The market is unavailable — no data can be provided for it. 
 +14    | ``NoPermission``   | Your login doesn't have permission to view or trade this market. | 
 +| 15    | ``TrialExpired``   | Trial access to this market's data has expired. |
  
 === BidOffer === === BidOffer ===
Line 513: Line 514:
  
 ^ Area ^ Change ^ ^ Area ^ Change ^
-| New section | **Decoder Libraries** — JavaScript (``@t4/chart-decoder``), Python (``t4login``) and .NET (``T4APIDemo``) usage, the aggregated handler interface, the non-aggregated state-cursor model, browser loader, the ``ChartDataState`` field reference, and the ``ChartDataChange`` / ``MarketMode`` / ``BidOffer`` enumerations. |+| New section | **Decoder Libraries** — JavaScript (``@t4/chart-decoder``), Python (``t4login``) usage, the aggregated handler interface, the non-aggregated state-cursor model, browser loader, the ``ChartDataState`` field reference, and the ``ChartDataChange`` / ``MarketMode`` / ``BidOffer`` enumerations. |
  
 **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/JavaScript/t4-javascript-api/src`` (mirror under ``tools/JavaScript/JSDemo/decoder``), ``tools/JavaScript/t4-javascript-api/src`` (mirror under ``tools/JavaScript/JSDemo/decoder``),
-``tools/Python/t4-pythonConversion-api/src/t4login`` and ``tools/dotNet/T4APIDemo``.+``tools/Python/t4-pythonConversion-api/src/t4login``.
  
  
 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.
  
  • developers/chart.1782313180.txt.gz
  • Last modified: 2026/06/24 14:59
  • by juan