Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| developers:systempricing [2025/08/13 21:15] – chad | developers: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) | |
| - | The T4 system | + | |
| - | + | ||
| - | The Decimal format represents the prices exactly as published on the various exchange | + | |
| - | + | ||
| - | 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 | + | If you expect ES to look like '' |
| </ | </ | ||
| - | ===== Overview | + | ===== Formats |
| + | ^ Format ^ Description ^ Example (ES) ^ | ||
| + | | Real | Human-readable decimal placement used by most trading UIs. | < | ||
| + | | Decimal (default) | Raw exchange representation, | ||
| - | 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 | + | All price fields |
| - | * **Numeric value: 1** - Alternative way to specify Real format | + | |
| - | ===== API Implementation ===== | + | Streaming market data and historical/ |
| - | ==== Setting Price Format in API Login ==== | + | ===== Set format during login ===== |
| - | + | ||
| - | When creating your login request using the API, include the '' | + | |
| + | ==== 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 | + | |
| }; | }; | ||
| </ | </ | ||
| - | <WRAP center round info 60%> | + | ==== REST ==== |
| - | **Note:** You can use either '' | + | Option 1 — Use bearer token from Streaming API\ |
| - | </ | + | If you authenticate via Streaming and reuse that bearer token, the price format is already |
| - | + | ||
| - | ===== REST Implementation ===== | + | |
| - | + | ||
| - | ==== Setting Price Format in REST Login ==== | + | |
| - | + | ||
| - | For REST API authentication, | + | |
| - | + | ||
| - | === Option 1: Using Bearer Token from Streaming API === | + | |
| - | If you obtain your bearer token from the streaming API, the price format is already | + | |
| - | + | ||
| - | === Option 2: Using /login REST Endpoint === | + | |
| - | If you use the ''/ | + | |
| + | Option 2 — /login endpoint\ | ||
| + | Specify '' | ||
| <code json> | <code json> | ||
| { | { | ||
| - | | + | " |
| - | " | + | " |
| - | " | + | " |
| - | " | + | " |
| - | " | + | " |
| - | " | + | " |
| } | } | ||
| </ | </ | ||
| - | ===== Important | + | ===== 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' | + | |
| - | </ | + | |
| - | + | ||
| - | ===== 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 ('' |
| - | * [[rest_endpoints|REST Endpoints]] | + | |