developers:apiv2

This is an old revision of the document!


T4 WebSocket API (V2)

A single, streaming WebSocket connection for real-time market data, account/position updates and order routing. Messages are encoded with Google Protocol Buffers.

Proto Files: the .proto files define every message and field. This wiki explains the connection model and the common flows. For message field details, please see the proto files. Message Catalog.

All messages travel inside a transport envelope, one Protobuf message per WebSocket binary frame:

  • ClientMessage — everything you send to the server.
  • ServerMessage — everything the server sends to you.

Each envelope is a oneof: exactly one payload is set. Read the payload case to know what you received.

message ClientMessage {
  oneof payload {
    Heartbeat            heartbeat              = 1;
    auth.LoginRequest    login_request          = 2;
    market.MarketSubscribe        market_subscribe         = 100;
    account.AccountSubscribe      account_subscribe        = 200;
    orderrouting.OrderSubmit      order_submit             = 300;
    // ...
  }
}

message ServerMessage {
  oneof payload {
    Heartbeat            heartbeat              = 1;
    auth.LoginResponse   login_response         = 2;
    market.MarketSnapshot         market_snapshot          = 108;
    account.AccountSnapshot       account_snapshot         = 205;
    orderrouting.OrderUpdate      order_update             = 300;
    // ...
  }
}

The full envelope is in proto/t4/v2/service.proto. See the Message Catalog for the complete list.

Environment URL
Simulator wss:wss-sim.t4login.com/v2 | | Live | wss:wss.t4login.com/v2
Admin (Simulator) wss:wssadmin-sim.t4login.com/v2 | | Admin (Live) | wss:wssadmin.t4login.com/v2

All connections are WSS (TLS) on port 443. Develop and certify against the Simulator. See Connecting & Authenticating.

  • V2 (/v2) — current. These pages.
  • V1 (/v1) — legacy, retained for existing integrations. See Migrating from V1.
  • developers/apiv2.1788787216.txt.gz
  • Last modified: 2026/09/07 13:20
  • by chad