| Both sides previous revision Previous revision Next revision | Previous revision |
| developers:apiv2:reference [2026/09/07 15:33] – [ClientMessage (you → server)] chad | developers:apiv2:reference [2026/09/07 17:48] (current) – [ServerMessage (server → you)] chad |
|---|
| ===== ClientMessage (client → server) ===== | ===== ClientMessage (client → server) ===== |
| |
| | <WRAP 75%> |
| ^ Payload ^ Purpose ^ | ^ Payload ^ Purpose ^ |
| | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/service.proto#L75|Heartbeat]]'' | Keepalive. | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/service.proto#L75|Heartbeat]]'' | Keepalive. | |
| | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/auth/auth.proto#L7|LoginRequest]]'' | Authenticate. | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/auth/auth.proto#L9|LoginRequest]]'' | Authenticate. | |
| | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/auth/auth.proto#L59|AuthenticationTokenRequest]]'' | Request a token. | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/auth/auth.proto#L63|AuthenticationTokenRequest]]'' | Request a token. | |
| | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L8|MarketSubscribe]]'' | Subscribe/unsubscribe a market (''quotes'' level + ''ticker''). | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L9|MarketSubscribe]]'' | Subscribe/unsubscribe a market (''quotes'' level + ''ticker''). | |
| | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/account/account.proto#L8|AccountSubscribe]]'' | Subscribe account(s). | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/account/account.proto#L12|AccountSubscribe]]'' | Subscribe account(s). | |
| | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L21|OrderSubmit]]'' | Place order(s). | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L30|OrderSubmit]]'' | Place order(s). | |
| | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L49|OrderRevise]]'' | Revise order(s). | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L74|OrderRevise]]'' | Revise order(s). | |
| | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L68|OrderPull]]'' | Cancel order(s). | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L100|OrderPull]]'' | Cancel order(s). | |
| | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L43|OrderBatch]]'' | All-or-nothing batch. | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L66|OrderBatch]]'' | All-or-nothing batch. | |
| | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L80|CreateUDS]]'' | Define a strategy. | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L118|CreateUDS]]'' | Define a strategy. | |
| | </WRAP> |
| |
| ===== ServerMessage (server → you) ===== | |
| |
| ^ Field ^ Payload ^ Purpose ^ Docs ^ | |
| | 1 | ''Heartbeat'' | Keepalive. | [[developers:apiv2:connecting|Connecting]] | | ===== ServerMessage (server → client) ===== |
| | 2 | ''LoginResponse'' | Login result, identity, entitlements. | [[developers:apiv2:connecting|Connecting]] | | |
| | 3 | ''AuthenticationToken'' | Token + expiry. | [[developers:apiv2:connecting|Connecting]] | | <WRAP 75%> |
| | 100 | ''MarketSubscribeReject'' | Subscribe refused (check ''mode''). | [[developers:apiv2:markets|Market Data]] | | ^ Payload ^ Purpose ^ |
| | 102 | ''MarketDetails'' | Instrument definition. | [[developers:apiv2:markets|Market Data]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/service.proto#L83|Heartbeat]]'' | Keepalive. | |
| | 103 | ''MarketDepth'' | Depth update (top-of-book / full book). | [[developers:apiv2:markets|Market Data]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/auth/auth.proto#L25|LoginResponse]]'' | Login result, identity, entitlements. | |
| | 104 | ''MarketTrade'' | Trade print (''ticker''). | [[developers:apiv2:markets|Market Data]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/auth/auth.proto#L75|AuthenticationToken]]'' | Token + expiry. | |
| | 105 | ''MarketHighLow'' | Session high/low/open. | [[developers:apiv2:markets|Market Data]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L21|MarketSubscribeReject]]'' | Subscribe refused (check ''mode''). | |
| | 106 | ''MarketPriceLimits'' | Price limits. | [[developers:apiv2:markets|Market Data]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L29|MarketDetails]]'' | Instrument definition. | |
| | 107 | ''MarketSettlement'' | Settlement, OI, VWAP. | [[developers:apiv2:markets|Market Data]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L79|MarketDepth]]'' | Depth update (top-of-book / full book). | |
| | 108 | ''MarketSnapshot'' | Full state on subscribe (price feed). | [[developers:apiv2:markets|Market Data]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L119|MarketTrade]]'' | Trade print (''ticker''). | |
| | 109 | ''MarketByOrderSnapshot'' | Full book on subscribe (MBO). | [[developers:apiv2:markets|Market Data]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L144|MarketHighLow]]'' | Session high/low/open. | |
| | 110 | ''MarketByOrderUpdate'' | Per-order changes (MBO). | [[developers:apiv2:markets|Market Data]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L155|MarketPriceLimits]]'' | Price limits. | |
| | 200 | ''AccountSubscribeResponse'' | Subscribe result. | [[developers:apiv2:accounts|Account Feed]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L165|MarketSettlement]]'' | Settlement, OI, VWAP. | |
| | 201 | ''AccountCurrency'' | Currency rates. | [[developers:apiv2:accounts|Account Feed]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L190|MarketSnapshot]]'' | Full state on subscribe (price feed). | |
| | 202 | ''AccountPosition'' | Position. | [[developers:apiv2:accounts|Account Feed]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L213|MarketByOrderSnapshot]]'' | Full book on subscribe (MBO). | |
| | 203 | ''AccountUpdate'' | Balances / margin. | [[developers:apiv2:accounts|Account Feed]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/market/market.proto#L231|MarketByOrderUpdate]]'' | Per-order changes (MBO). | |
| | 204 | ''AccountDetails'' | Account configuration. | [[developers:apiv2:accounts|Account Feed]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/account/account.proto#L18|AccountSubscribeResponse]]'' | Subscribe result. | |
| | 205 | ''AccountSnapshot'' | Full state on subscribe. | [[developers:apiv2:accounts|Account Feed]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/account/account.proto#L26|AccountCurrency]]'' | Currency rates. | |
| | 206 | ''AccountProfit'' | Account UPL / RPL. | [[developers:apiv2:accounts|Account Feed]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/account/account.proto#L34|AccountPosition]]'' | Position. | |
| | 207 | ''AccountPositionProfit'' | Per-position UPL / RPL. | [[developers:apiv2:accounts|Account Feed]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/account/account.proto#L78|AccountUpdate]]'' | Balances / margin. | |
| | 300 | ''OrderUpdate'' | Unified order lifecycle event. | [[developers:apiv2:orders|Order Routing]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/account/account.proto#L107|AccountDetails]]'' | Account configuration. | |
| | 301 | ''OrderTrade'' | Fill. | [[developers:apiv2:orders|Order Routing]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/account/account.proto#L161|AccountSnapshot]]'' | Full state on subscribe. | |
| | 302 | ''MarginInquiryResponse'' | Margin preview. | [[developers:apiv2:orders|Order Routing]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/account/account.proto#L171|AccountProfit]]'' | Account UPL / RPL. | |
| | 310 | ''OrderBatchAcknowledge'' | Batch accepted. | [[developers:apiv2:orders|Order Routing]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/account/account.proto#L191|AccountPositionProfit]]'' | Per-position UPL / RPL. | |
| | 311 | ''OrderBatchReject'' | Batch rejected. | [[developers:apiv2:orders|Order Routing]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L155|OrderUpdate]]'' | Unified order lifecycle event. | |
| | 340 | ''CreateUDSResponse'' | Strategy created. | [[developers:apiv2:orders|Order Routing]] | | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L258|OrderTrade]]'' | Fill. | |
| | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L326|MarginInquiryResponse]]'' | Margin preview. | |
| | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L288|OrderBatchAcknowledge]]'' | Batch accepted. | |
| | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L305|OrderBatchReject]]'' | Batch rejected. | |
| | | ''[[https://github.com/CTS-Futures/t4-api-tools/blob/main/proto/t4/v2/orderrouting/orderrouting.proto#L279|CreateUDSResponse]]'' | Strategy created. | |
| | </WRAP> |
| |