developers:systempricing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
developers:systempricing [2025/08/13 21:12] – created chaddevelopers:systempricing [2025/08/13 21:24] (current) – [Rules & notes] 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 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.+<WRAP center round info 100%> 
 +If you expect ES to look like ''5954.75'' instead of ''595475''choose **Real**. 
 +</WRAP>
  
-The Decimal format represents the prices exactly as published on the various exchange API'sThis is the default for T4.+===== 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 Real format represents the prices as most trade screens, displays and websites would typically display them. 
  
 +===== Where it applies =====
  
 +All price fields in API and REST responses
  
-===== Overview =====+Streaming market data and historical/chart data
  
-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. +===== Set format during login =====
- +
-===== Available Price Formats ===== +
- +
-  * **Real** - Returns prices in real/decimal format +
-  * **Numeric value: 1** - Alternative way to specify Real format +
- +
-===== API Implementation ===== +
- +
-==== Setting Price Format in API Login ==== +
- +
-When creating your login request using the API, include the ''PriceFormat'' parameter:+
  
 +==== Streaming API (gRPC) ====
 <code csharp> <code csharp>
-loginRequest = new T4Proto.V1.Auth.LoginRequest  +var loginRequest = new T4Proto.V1.Auth.LoginRequest { 
-+Firm = demoConfig.Firm, 
-    Firm = *demoConfig.Firm, +Username = demoConfig.UserName, 
-    Username = *demoConfig.UserName, +Password = demoConfig.Password, 
-    Password = *demoConfig.Password, +AppName = demoConfig.AppName, 
-    AppName = *demoConfig.AppName, +AppLicense = demoConfig.AppLicense, 
-    AppLicense = _demoConfig.AppLicense, +PriceFormat = T4Proto.V1.Common.PriceFormat.Real
-    PriceFormat = T4Proto.V1.Common.PriceFormat.Real  // You can also use the value of 1, it is the same.+
 }; };
 </code> </code>
  
-<WRAP center round info 60%> +==== REST ==== 
-**Note:** You can use either ''T4Proto.V1.Common.PriceFormat.Real'' or the numeric value ''1'' - they are equivalent. +Option 1 — Use bearer token from Streaming API\ 
-</WRAP> +If you authenticate via Streaming and reuse that bearer token, the price format is already set. No additional REST setup is required.
- +
-===== REST Implementation ===== +
- +
-==== Setting Price Format in REST Login ==== +
- +
-For REST API authentication, you have two options: +
- +
-=== Option 1: Using Bearer Token from Streaming API === +
-If you obtain your bearer token from the streaming API, the price format is already configured and no additional setup is required. +
- +
-=== Option 2: Using /login REST Endpoint === +
-If you use the ''/login'' REST endpoint directly, include the ''priceFormat'' parameter in your JSON request:+
  
 +Option 2 — /login endpoint\
 +Specify ''priceFormat'' in the request body:
 <code json> <code json>
 { {
-    "firm" : "CTSDev", +"firm": "CTSDev", 
-    "userName" : "user", +"userName": "user", 
-    "password" : "*****", +"password": "*****", 
-    "appName" : "TradeBook", +"appName": "TradeBook", 
-    "appLicense" : "F18CC97E-42D1-478A-8CE9-0A850B5C47A7", +"appLicense": "F18CC97E-42D1-478A-8CE9-0A850B5C47A7", 
-    "priceFormat" : "Real"+"priceFormat": "Real"
 } }
 </code> </code>
  
-===== Important Notes ===== +===== Notes =====
- +
-<WRAP center round important 60%> +
-  * 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 =====+
  
-  * [[authentication|Authentication Guide]] +  * Price format must be chosen at login and cannot be changed until you re-authenticate. 
-  * [[api_reference|API Reference]] +  * Both API and REST support the same options (''Real'' / ''Decimal'').
-  * [[rest_endpoints|REST Endpoints]]+
  • developers/systempricing.1755119560.txt.gz
  • Last modified: 2025/08/13 21:12
  • by chad