developers:apiv2:pricing

This is an old revision of the document!


Prices, Volumes & Data Types

Two wrapper types carry exact numbers as strings:

message Price   { string value = 1; }   // e.g. "4200.50"
message Decimal { string value = 1; }   // e.g. "1.50"

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.

  • Order routing — volumes (volume, max_show, max_volume, fill volumes) are Decimal strings. This allows the API to support fractional exchange quantities (e.g. Kalshi).
  • Market data — depth and trade volumes are plain integers (int32).

Set price_format on LoginRequest to choose how Price strings are formatted:

PriceFormat Meaning
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.

  • min_price_increment (in MarketDetails) is the tick — the smallest valid price step. e.g. tick 25 → …, 4000.00, 4025.00, 4050.00, …
  • 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.
  • Timestampsgoogle.protobuf.Timestamp (UTC). Heartbeat.timestamp is UTC epoch milliseconds.
  • Datestrade_date and similar are int64 date values.
  • Idsexchange_id, contract_id, market_id, account_id, user_id are strings, obtained from login and the Instruments API.

proto/t4/v2/common/price.proto and proto/t4/v2/common/enums.proto.

  • developers/apiv2/pricing.1788819044.txt.gz
  • Last modified: 2026/09/07 22:10
  • by chad