developers:apiv2:pricing

Differences

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

Link to this comparison view

Next revision
Previous revision
developers:apiv2:pricing [2026/09/07 22:01] – created chaddevelopers:apiv2:pricing [2026/09/07 22:23] (current) – [Ticks and cash value] chad
Line 6: Line 6:
  
 Two wrapper types carry exact numbers as strings: Two wrapper types carry exact numbers as strings:
 +
 +  * [[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/common/price.proto#L12|Price]]
 +  * [[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/common/price.proto#L6|Decimal]]
  
 <code> <code>
Line 12: Line 15:
 </code> </code>
  
-They are sent as text to avoid binary floating-point rounding. **Parse them into your language's native decimal type**, not a ''double''. ''Price'' is used for market/order prices; ''Decimal'' is used for order volumes and cash values.+T4 uses text to avoid binary floating-point rounding. **Parse them into your language's native decimal type**, not a ''double''. ''Price'' is used for market/order prices; ''Decimal'' is used for order volumes and cash values.
  
 ===== Volumes ===== ===== Volumes =====
  
-  * **Order routing** — volumes (''volume'', ''max_show'', ''max_volume'', fill volumes) are ''Decimal'' **strings**. This lets fractional exchange quantities (e.g. Kalshi ''"1.50"''pass through unchanged. The service scales them to/from T4's internal integer volume using the market's volume scale.+  * **Order routing** — volumes (''volume'', ''max_show'', ''max_volume'', fill volumes) are ''Decimal''. This allows the API to support fractional exchange quantities (e.g. Kalshi).
   * **Market data** — depth and trade volumes are plain integers (''int32'').   * **Market data** — depth and trade volumes are plain integers (''int32'').
  
-===== Price format ===== +===== System Price format =====
- +
-Set ''price_format'' on ''LoginRequest'' to choose how ''Price'' strings are formatted:+
  
-''PriceFormat'' ^ Meaning ^ +T4 publishes prices in different formats. The setting controls how prices are formatted in the trading and all other platform API'(chart's, etc.)
-| ''PRICE_FORMAT_DECIMAL'' | Human decimal price (default). | +
-''PRICE_FORMAT_REAL'' | Exchange "real" price+
-| ''PRICE_FORMAT_CLEARING_DECIMAL'' | Clearing price. |+
  
-''MarketDetails'' carries the matching precision fields: ''decimals'', ''real_decimals'', ''display_decimals'', ''clearing_decimals''.+<note>If you expect ES to look like ''5954.75'' instead of ''595475'', choose **Real**.</note>
  
-===== Ticks and cash value =====+Set [[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/common/enums.proto#L35|PriceFormat]] on [[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/auth/auth.proto#L9|LoginRequest]] to choose how ''Price'' strings are formatted:
  
-  * ''min_price_increment'' (in ''MarketDetails'') is the tick — the smallest valid price stepe.g. tick ''25'' → …4000.00, 4025.00, 4050.00, … +<WRAP 75%> 
-  ''point_value'' (in ''MarketDetails'') converts a price move to cash: ''(price2 − price1) × point_value''e.g. 4200.00→4225.00 at ''point_value'' 0.5 = 12.50 per contract.+^ PriceFormat ^ Description ^ Example (ES) ^ 
 +''PRICE_FORMAT_REAL'' | Human-readable decimal placement used by most trading UIs| <code>5954.75</code>
 +''PRICE_FORMAT_DECIMAL'' | Raw exchange representationwithout UI-friendly decimal placement| <code>595475</code> | 
 +''PRICE_FORMAT_CLEARING_DECIMAL'' | Typically used for data imports and exports only| <code>595475</code>
 +</WRAP>
  
-===== Timestamps, dates and ids =====+See [[developers:systempricing|System Price Format]] for more information.
  
-  * **Timestamps** — ''google.protobuf.Timestamp'' (UTC). ''Heartbeat.timestamp'' is UTC epoch **milliseconds**. 
-  * **Dates** — ''trade_date'' and similar are ''int64'' date values. 
-  * **Ids** — ''exchange_id'', ''contract_id'', ''market_id'', ''account_id'', ''user_id'' are strings, obtained from login and the [[developers:markets|Instruments API]]. 
  
-===== Reference ===== 
  
-''proto/t4/v2/common/price.proto'' and ''proto/t4/v2/common/enums.proto''. 
  
  • developers/apiv2/pricing.1788818466.txt.gz
  • Last modified: 2026/09/07 22:01
  • by chad