Common Model Messages

Common Model Messages .proto file

ProtoPayloadType

Name Number Description
ERROR_RES 50
HEARTBEAT_EVENT 51
PING_REQ 52
PING_RES 53

ProtoErrorCode

Name Number Description
UNKNOWN_ERROR 1
UNSUPPORTED_MESSAGE 2
INVALID_REQUEST 3
WRONG_PASSWORD 4
TIMEOUT_ERROR 5
ENTITY_NOT_FOUND 6
CANT_ROUTE_REQUEST 7
FRAME_TOO_LONG 8
MARKET_CLOSED 9
CONCURRENT_MODIFICATION 10

ProtoTradeSide

Name Number Description
BUY 1
SELL 2

ProtoQuoteType

Name Number Description
BID 1
ASK 2

ProtoTimeInForce

Name Number Description
GOOD_TILL_DATE 1
GOOD_TILL_CANCEL 2
IMMEDIATE_OR_CANCEL 3

ProtoIntRange

Required Type Field Name Description
optional int32 from
optional int32 to

ProtoLongRange

Required Type Field Name Description
optional int64 from
optional int64 to

ProtoDoubleRange

Required Type Field Name Description
optional double from
optional double to

Scalar Value Types

.proto Type Notes C++ Type Java Type Python Type
double double double float
float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always eight bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str