developers:systempricing

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:systempricing [2025/08/13 21:15] chaddevelopers:systempricing [2025/12/04 01:48] (current) chad
Line 1: Line 1:
 ====== System Price Format ====== ====== System Price Format ======
- +T4 publishes prices in two formats: **Decimal** (default) and **Real**. The setting controls only decimal placement on all prices, including chart data and API/FIX responses.
-The T4 system publishes market prices in two formatsDecimal and Real. The selected format controls where we place the decimal point on all prices published on the system, including chart data+
- +
-The Decimal format represents the prices exactly as published on the various exchange API's. This is the default for T4. +
- +
-The Real format represents the prices as most trade screens, displays and websites would typically display them.+
  
 <WRAP center round info 100%> <WRAP center round info 100%>
-If you expect to see ES priced like 5954.75 instead of 595475, you most likely want Real price format.+If you expect ES to look like ''5954.75'' instead of ''595475''choose **Real**.
 </WRAP> </WRAP>
  
-===== Overview =====+===== Formats ===== 
 +^ Format ^ Description ^ Example (ES) ^ 
 +| Real | Human-readable decimal placement used by most trading UIs. | <code>5954.75</code>
 +| Decimal (default) | Raw exchange representation, without UI-friendly decimal placement. | <code>595475</code> |
  
-The price format setting determines how price values are returned in API responses. You can configure this during the login process for both API and REST authentication methods. 
  
-===== Available Price Formats =====+===== Where it applies =====
  
-  * **Real** - Returns prices in real/decimal format +  * All price fields in Streaming API (gRPC) and REST responses 
-  * **Numeric value: 1** - Alternative way to specify Real format+  Streaming market data and historical/chart data 
 +  * FIX API order routing and market data messages (when decimal pricing is enabled via RefMsgType on LOGON)
  
-===== API Implementation =====+===== Set format during login =====
  
-==== Setting Price Format in API Login ====+==== Streaming API (gRPC) ==== 
 +<code csharp> 
 +var loginRequest = new T4Proto.V1.Auth.LoginRequest { 
 +    Firm        = demoConfig.Firm, 
 +    Username    = demoConfig.UserName, 
 +    Password    = demoConfig.Password, 
 +    AppName     = demoConfig.AppName, 
 +    AppLicense  = demoConfig.AppLicense, 
 +    PriceFormat = T4Proto.V1.Common.PriceFormat.Real 
 +}; 
 +</code>
  
-When creating your login request using the API, include the ''PriceFormat'' parameter:+==== REST ==== 
 +Option 1 — Use bearer token from Streaming API
 +If you authenticate via Streaming and reuse that bearer token, the price format is already set. No additional REST setup is required.
  
-<code csharp> +Option 2 — /login endpoint\ 
-loginRequest = new T4Proto.V1.Auth.LoginRequest +Specify ''priceFormat'' in the request body: 
 +<code json>
 { {
-    Firm = *demoConfig.Firm+  "firm": "CTSDev"
-    Username = *demoConfig.UserName+  "userName": "user"
-    Password = *demoConfig.Password, +  "password": "*****"
-    AppName = *demoConfig.AppName+  "appName": "TradeBook"
-    AppLicense = _demoConfig.AppLicense+  "appLicense": "F18CC97E-42D1-478A-8CE9-0A850B5C47A7", 
-    PriceFormat = T4Proto.V1.Common.PriceFormat.Real  // You can also use the value of 1it is the same. +  "priceFormat": "Real" 
-};+}
 </code> </code>
  
-<WRAP center round info 60%> +==== FIX API ==== 
-**Note:** You can use either ''T4Proto.V1.Common.PriceFormat.Real'' or the numeric value ''1'' - they are equivalent. +For FIX, price format is selected on the **LOGON [35=A]** message using the RefMsgType session property group:
-</WRAP>+
  
-===== REST Implementation =====+  * Tag **384 (NoMsgTypes)** – number of RefMsgType entries 
 +  * Repeating group: 
 +    * Tag **372 (RefMsgType)** – session property value
  
-==== Setting Price Format in REST Login ====+To control price format, include a RefMsgType value of:
  
-For REST API authentication, you have two options:+  * **D** – **Decimal** pricing 
 +  * **RD** – **Real** decimal pricing
  
-=== Option 1Using Bearer Token from Streaming API === +Example LOGON with Real pricing:
-If you obtain your bearer token from the streaming API, the price format is already configured and no additional setup is required.+
  
-=== Option 2Using /login REST Endpoint === +<code> 
-If you use the ''/login'' REST endpoint directly, include the ''priceFormat'' parameter in your JSON request:+8=FIX.4.2|9=200|35=A|49=T4Example|56=T4|52=20250101-12:00:00.000| 
 +91=112A04B0-5AAF-42F4-994E-FA7CB959C60B|90=36|98=0|108=30| 
 +553=username|554=password|384=1|372=RD|10=123| 
 +</code> 
 + 
 +Example LOGON with Decimal pricing:
  
-<code json+<code> 
-+8=FIX.4.2|9=200|35=A|49=T4Example|56=T4|52=20250101-12:00:00.000| 
-    "firm" "CTSDev", +91=112A04B0-5AAF-42F4-994E-FA7CB959C60B|90=36|98=0|108=30| 
-    "userName" "user", +553=username|554=password|384=1|372=D|10=123|
-    "password" : "*****", +
-    "appName" : "TradeBook", +
-    "appLicense" : "F18CC97E-42D1-478A-8CE9-0A850B5C47A7", +
-    "priceFormat" : "Real" +
-}+
 </code> </code>
  
-===== Important Notes ===== 
  
-<WRAP center round important 60%> +===== Notes =====
-  * The price format must be specified during login - it cannot be changed after authentication +
-  * Both API and REST methods support the same price format options +
-  * Ensure consistency between your application's expected price format and the configured setting +
-</WRAP>+
  
-===== Related Documentation =====+  * Price format must be chosen at login and cannot be changed until you re-authenticate. 
 +  * For FIX API, choose **RefMsgType D** for Decimal or **RefMsgType RD** for Real pricing on the LOGON (35=A) message.
  
-  * [[authentication|Authentication Guide]] 
-  * [[api_reference|API Reference]] 
-  * [[rest_endpoints|REST Endpoints]] 
  • developers/systempricing.1755119710.txt.gz
  • Last modified: 2025/08/13 21:15
  • by chad