syntax = "proto3"; package DTC_PB; //============================================================================ // DTC protocol version enum DTCVersion { DTC_VERSION_UNSET = 0; CURRENT_VERSION = 8; } //============================================================================ // All messages are preceded by the following 4-byte little-endian binary // header: // // uint16 Size; // size of the entire message including this 4-byte header // uint16 Type; // DTC message type - see DTCProtocol.h // //============================================================================ //----Message types---- enum DTCMessageType { MESSAGE_TYPE_UNSET = 0; // Authentication and connection monitoring LOGON_REQUEST = 1; LOGON_RESPONSE = 2; HEARTBEAT = 3; LOGOFF = 5; ENCODING_REQUEST = 6; ENCODING_RESPONSE = 7; // Market data MARKET_DATA_REQUEST = 101; MARKET_DATA_REJECT = 103; MARKET_DATA_SNAPSHOT = 104; MARKET_DATA_UPDATE_TRADE = 107; MARKET_DATA_UPDATE_TRADE_COMPACT = 112; MARKET_DATA_UPDATE_LAST_TRADE_SNAPSHOT = 134; MARKET_DATA_UPDATE_TRADE_WITH_UNBUNDLED_INDICATOR = 137; MARKET_DATA_UPDATE_TRADE_WITH_UNBUNDLED_INDICATOR_2 = 146; MARKET_DATA_UPDATE_TRADE_NO_TIMESTAMP = 142; MARKET_DATA_UPDATE_BID_ASK = 108; MARKET_DATA_UPDATE_BID_ASK_COMPACT = 117; MARKET_DATA_UPDATE_BID_ASK_NO_TIMESTAMP = 143; MARKET_DATA_UPDATE_BID_ASK_FLOAT_WITH_MICROSECONDS = 144; MARKET_DATA_UPDATE_SESSION_OPEN = 120; MARKET_DATA_UPDATE_SESSION_HIGH = 114; MARKET_DATA_UPDATE_SESSION_LOW = 115; MARKET_DATA_UPDATE_SESSION_VOLUME = 113; MARKET_DATA_UPDATE_OPEN_INTEREST = 124; MARKET_DATA_UPDATE_SESSION_SETTLEMENT = 119; MARKET_DATA_UPDATE_SESSION_NUM_TRADES = 135; MARKET_DATA_UPDATE_TRADING_SESSION_DATE = 136; MARKET_DEPTH_REQUEST = 102; MARKET_DEPTH_REJECT = 121; MARKET_DEPTH_SNAPSHOT_LEVEL = 122; MARKET_DEPTH_SNAPSHOT_LEVEL_FLOAT = 145; MARKET_DEPTH_UPDATE_LEVEL = 106; MARKET_DEPTH_UPDATE_LEVEL_FLOAT_WITH_MILLISECONDS = 140; MARKET_DEPTH_UPDATE_LEVEL_NO_TIMESTAMP = 141; MARKET_DATA_FEED_STATUS = 100; MARKET_DATA_FEED_SYMBOL_STATUS = 116; TRADING_SYMBOL_STATUS = 138; MARKET_ORDERS_REQUEST = 150; MARKET_ORDERS_REJECT = 151; MARKET_ORDERS_ADD = 152; MARKET_ORDERS_MODIFY = 153; MARKET_ORDERS_REMOVE = 154; MARKET_ORDERS_SNAPSHOT_MESSAGE_BOUNDARY = 155; // Order entry and modification SUBMIT_NEW_SINGLE_ORDER = 208; SUBMIT_NEW_OCO_ORDER = 201; SUBMIT_FLATTEN_POSITION_ORDER = 209; CANCEL_ORDER = 203; CANCEL_REPLACE_ORDER = 204; // Trading related OPEN_ORDERS_REQUEST = 300; OPEN_ORDERS_REJECT = 302; ORDER_UPDATE = 301; HISTORICAL_ORDER_FILLS_REQUEST = 303; HISTORICAL_ORDER_FILL_RESPONSE = 304; HISTORICAL_ORDER_FILLS_REJECT = 308; CURRENT_POSITIONS_REQUEST = 305; CURRENT_POSITIONS_REJECT = 307; POSITION_UPDATE = 306; ADD_CORRECTING_ORDER_FILL = 309; CORRECTING_ORDER_FILL_RESPONSE = 310; // Account list TRADE_ACCOUNTS_REQUEST = 400; TRADE_ACCOUNT_RESPONSE = 401; // Symbol discovery and security definitions EXCHANGE_LIST_REQUEST = 500; EXCHANGE_LIST_RESPONSE = 501; SYMBOLS_FOR_EXCHANGE_REQUEST = 502; UNDERLYING_SYMBOLS_FOR_EXCHANGE_REQUEST = 503; SYMBOLS_FOR_UNDERLYING_REQUEST = 504; SECURITY_DEFINITION_FOR_SYMBOL_REQUEST = 506; SECURITY_DEFINITION_RESPONSE = 507; SYMBOL_SEARCH_REQUEST = 508; SECURITY_DEFINITION_REJECT = 509; // Account balance ACCOUNT_BALANCE_REQUEST = 601; ACCOUNT_BALANCE_REJECT = 602; ACCOUNT_BALANCE_UPDATE = 600; ACCOUNT_BALANCE_ADJUSTMENT = 607; ACCOUNT_BALANCE_ADJUSTMENT_REJECT = 608; ACCOUNT_BALANCE_ADJUSTMENT_COMPLETE = 609; HISTORICAL_ACCOUNT_BALANCES_REQUEST = 603; HISTORICAL_ACCOUNT_BALANCES_REJECT = 604; HISTORICAL_ACCOUNT_BALANCE_RESPONSE = 606; // Logging USER_MESSAGE = 700; GENERAL_LOG_MESSAGE = 701; ALERT_MESSAGE = 702; JOURNAL_ENTRY_ADD = 703; JOURNAL_ENTRIES_REQUEST = 704; JOURNAL_ENTRIES_REJECT = 705; JOURNAL_ENTRY_RESPONSE = 706; // Historical price data HISTORICAL_PRICE_DATA_REQUEST= 800; HISTORICAL_PRICE_DATA_RESPONSE_HEADER = 801; HISTORICAL_PRICE_DATA_REJECT = 802; HISTORICAL_PRICE_DATA_RECORD_RESPONSE = 803; HISTORICAL_PRICE_DATA_TICK_RECORD_RESPONSE = 804; HISTORICAL_PRICE_DATA_RESPONSE_TRAILER = 807; // Historical market depth data HISTORICAL_MARKET_DEPTH_DATA_REQUEST = 900; HISTORICAL_MARKET_DEPTH_DATA_RESPONSE_HEADER = 901; HISTORICAL_MARKET_DEPTH_DATA_REJECT = 902; HISTORICAL_MARKET_DEPTH_DATA_RECORD_RESPONSE = 903; } //============================================================================ enum EncodingEnum { BINARY_ENCODING = 0; BINARY_WITH_VARIABLE_LENGTH_STRINGS = 1; JSON_ENCODING = 2; JSON_COMPACT_ENCODING = 3; PROTOCOL_BUFFERS = 4; } //============================================================================ enum LogonStatusEnum { LOGON_STATUS_UNSET = 0; LOGON_SUCCESS = 1; LOGON_ERROR = 2; LOGON_ERROR_NO_RECONNECT = 3; LOGON_RECONNECT_NEW_ADDRESS = 4; } //============================================================================ enum MessageSupportedEnum { MESSAGE_UNSUPPORTED = 0; MESSAGE_SUPPORTED = 1; } //============================================================================ enum RequestActionEnum { REQUEST_ACTION_UNSET = 0; SUBSCRIBE = 1; UNSUBSCRIBE = 2; SNAPSHOT = 3; } /*==========================================================================*/ enum UnbundledTradeIndicatorEnum { UNBUNDLED_TRADE_NONE = 0; FIRST_SUB_TRADE_OF_UNBUNDLED_TRADE = 1; LAST_SUB_TRADE_OF_UNBUNDLED_TRADE = 2; }; //============================================================================ enum OrderStatusEnum { ORDER_STATUS_UNSPECIFIED = 0; ORDER_STATUS_ORDER_SENT = 1; ORDER_STATUS_PENDING_OPEN = 2; ORDER_STATUS_PENDING_CHILD = 3; ORDER_STATUS_OPEN = 4; ORDER_STATUS_PENDING_CANCEL_REPLACE = 5; ORDER_STATUS_PENDING_CANCEL = 6; ORDER_STATUS_FILLED = 7; ORDER_STATUS_CANCELED = 8; ORDER_STATUS_REJECTED = 9; ORDER_STATUS_PARTIALLY_FILLED = 10; } //============================================================================ enum OrderUpdateReasonEnum { ORDER_UPDATE_REASON_UNSET = 0; OPEN_ORDERS_REQUEST_RESPONSE = 1; NEW_ORDER_ACCEPTED = 2; GENERAL_ORDER_UPDATE = 3; ORDER_FILLED = 4; ORDER_FILLED_PARTIALLY = 5; ORDER_CANCELED = 6; ORDER_CANCEL_REPLACE_COMPLETE = 7; NEW_ORDER_REJECTED = 8; ORDER_CANCEL_REJECTED = 9; ORDER_CANCEL_REPLACE_REJECTED = 10; } //============================================================================ enum AtBidOrAskEnum { BID_ASK_UNSET = 0; AT_BID = 1; AT_ASK = 2; } //============================================================================ enum AtBidOrAskEnum8 { BID_ASK_UNSET_8 = 0; AT_BID_8 = 1; AT_ASK_8 = 2; } //============================================================================ enum MarketDepthUpdateTypeEnum { DEPTH_UNSET = 0; MARKET_DEPTH_INSERT_UPDATE_LEVEL = 1; // Insert or update depth at the given price level MARKET_DEPTH_DELETE_LEVEL = 2; // Delete depth at the given price level } //============================================================================ enum FinalUpdateInBatchEnum { FINAL_UPDATE_UNSET = 0; FINAL_UPDATE_TRUE = 1; FINAL_UPDATE_FALSE = 2; FINAL_UPDATE_BEGIN_BATCH = 3; } //============================================================================ enum OrderTypeEnum { ORDER_TYPE_UNSET = 0; ORDER_TYPE_MARKET = 1; ORDER_TYPE_LIMIT = 2; ORDER_TYPE_STOP = 3; ORDER_TYPE_STOP_LIMIT = 4; ORDER_TYPE_MARKET_IF_TOUCHED = 5; ORDER_TYPE_LIMIT_IF_TOUCHED = 6; } //============================================================================ enum TimeInForceEnum { TIF_UNSET = 0; TIF_DAY = 1; TIF_GOOD_TILL_CANCELED = 2; TIF_GOOD_TILL_DATE_TIME = 3; TIF_IMMEDIATE_OR_CANCEL = 4; TIF_ALL_OR_NONE = 5; TIF_FILL_OR_KILL = 6; } //============================================================================ enum BuySellEnum { BUY_SELL_UNSET = 0; BUY = 1; SELL = 2; } //============================================================================ enum OpenCloseTradeEnum { TRADE_UNSET = 0; TRADE_OPEN = 1; TRADE_CLOSE = 2; } //============================================================================ enum PartialFillHandlingEnum { PARTIAL_FILL_UNSET = 0; PARTIAL_FILL_HANDLING_REDUCE_QUANTITY = 1; PARTIAL_FILL_HANDLING_IMMEDIATE_CANCEL = 2; } //============================================================================ enum MarketDataFeedStatusEnum { MARKET_DATA_FEED_STATUS_UNSET = 0; MARKET_DATA_FEED_UNAVAILABLE = 1; MARKET_DATA_FEED_AVAILABLE = 2; } //============================================================================ enum PriceDisplayFormatEnum { PRICE_DISPLAY_FORMAT_DECIMAL_0 = 0; PRICE_DISPLAY_FORMAT_DECIMAL_1 = 1; PRICE_DISPLAY_FORMAT_DECIMAL_2 = 2; PRICE_DISPLAY_FORMAT_DECIMAL_3 = 3; PRICE_DISPLAY_FORMAT_DECIMAL_4 = 4; PRICE_DISPLAY_FORMAT_DECIMAL_5 = 5; PRICE_DISPLAY_FORMAT_DECIMAL_6 = 6; PRICE_DISPLAY_FORMAT_DECIMAL_7 = 7; PRICE_DISPLAY_FORMAT_DECIMAL_8 = 8; PRICE_DISPLAY_FORMAT_DECIMAL_9 = 9; PRICE_DISPLAY_FORMAT_DENOMINATOR_256 = 356; PRICE_DISPLAY_FORMAT_DENOMINATOR_128 = 228; PRICE_DISPLAY_FORMAT_DENOMINATOR_64 = 164; PRICE_DISPLAY_FORMAT_DENOMINATOR_32_QUARTERS = 136; PRICE_DISPLAY_FORMAT_DENOMINATOR_32_HALVES = 134; PRICE_DISPLAY_FORMAT_DENOMINATOR_32 = 132; PRICE_DISPLAY_FORMAT_DENOMINATOR_16 = 116; PRICE_DISPLAY_FORMAT_DENOMINATOR_8 = 108; PRICE_DISPLAY_FORMAT_DENOMINATOR_4 = 104; PRICE_DISPLAY_FORMAT_DENOMINATOR_2 = 102; PRICE_DISPLAY_FORMAT_UNSET = -1; } //============================================================================ enum SecurityTypeEnum { SECURITY_TYPE_UNSET = 0; SECURITY_TYPE_FUTURE = 1; SECURITY_TYPE_STOCK = 2; SECURITY_TYPE_FOREX = 3; SECURITY_TYPE_INDEX = 4; SECURITY_TYPE_FUTURES_STRATEGY = 5; SECURITY_TYPE_FUTURES_OPTION = 7; SECURITY_TYPE_STOCK_OPTION = 6; SECURITY_TYPE_INDEX_OPTION = 8; SECURITY_TYPE_BOND = 9; SECURITY_TYPE_MUTUAL_FUND = 10; } //============================================================================ enum PutCallEnum { PC_UNSET = 0; PC_CALL = 1; PC_PUT = 2; } //============================================================================ enum SearchTypeEnum { SEARCH_TYPE_UNSET = 0; SEARCH_TYPE_BY_SYMBOL = 1; SEARCH_TYPE_BY_DESCRIPTION = 2; } //============================================================================ enum HistoricalDataIntervalEnum { INTERVAL_TICK = 0; INTERVAL_1_SECOND = 1; INTERVAL_2_SECONDS = 2; INTERVAL_4_SECONDS = 4; INTERVAL_5_SECONDS = 5; INTERVAL_10_SECONDS = 10; INTERVAL_30_SECONDS = 30; INTERVAL_1_MINUTE = 60; INTERVAL_5_MINUTE = 300; INTERVAL_10_MINUTE = 600; INTERVAL_15_MINUTE = 900; INTERVAL_30_MINUTE = 1800; INTERVAL_1_HOUR = 3600; INTERVAL_2_HOURS = 7200; INTERVAL_1_DAY = 86400; INTERVAL_1_WEEK = 604800; } //============================================================================ enum HistoricalPriceDataRejectReasonCodeEnum { HPDR_UNSET = 0; HPDR_UNABLE_TO_SERVE_DATA_RETRY_LATER = 1; HPDR_UNABLE_TO_SERVE_DATA_DO_NOT_RETRY = 2; HPDR_DATA_REQUEST_OUTSIDE_BOUNDS_OF_AVAILABLE_DATA = 3; HPDR_GENERAL_REJECT_ERROR = 4; } //============================================================================ enum TradingStatusEnum { TRADING_STATUS_UNKNOWN = 0; TRADING_STATUS_PRE_OPEN = 1; TRADING_STATUS_OPEN = 2; TRADING_STATUS_CLOSE = 3; TRADING_STATUS_TRADING_HALT = 4; }; /*==========================================================================*/ enum MessageSetBoundaryEnum { MESSAGE_SET_BOUNDARY_UNSET = 0; MESSAGE_SET_BOUNDARY_BEGIN = 1; MESSAGE_SET_BOUNDARY_END = 2; }; //============================================================================ message EncodingRequest { int32 ProtocolVersion = 1; EncodingEnum Encoding = 2; string ProtocolType = 3; } //============================================================================ message EncodingResponse { int32 ProtocolVersion = 1; EncodingEnum Encoding = 2; string ProtocolType = 3; } //============================================================================ message LogonRequest { int32 ProtocolVersion = 1; string Username = 2; string Password = 3; string GeneralTextData = 4; int32 Integer_1 = 5; int32 Integer_2 = 6; int32 HeartbeatIntervalInSeconds = 7; int32 Unused1 = 8; string TradeAccount = 9; string HardwareIdentifier = 10; string ClientName = 11; int32 MarketDataTransmissionInterval = 12; } //============================================================================ message LogonResponse { int32 ProtocolVersion = 1; LogonStatusEnum Result = 2; string ResultText = 3; string ReconnectAddress = 4; int32 Integer_1 = 5; string ServerName = 6; uint32 MarketDepthUpdatesBestBidAndAsk = 7; uint32 TradingIsSupported = 8; uint32 OCOOrdersSupported = 9; uint32 OrderCancelReplaceSupported = 10; string SymbolExchangeDelimiter = 11; uint32 SecurityDefinitionsSupported = 12; uint32 HistoricalPriceDataSupported = 13; uint32 ResubscribeWhenMarketDataFeedAvailable = 14; uint32 MarketDepthIsSupported = 15; uint32 OneHistoricalPriceDataRequestPerConnection = 16; uint32 BracketOrdersSupported = 17; uint32 Unused_1 = 18; uint32 UsesMultiplePositionsPerSymbolAndTradeAccount = 19; uint32 MarketDataSupported = 20; } //============================================================================ message Logoff { string Reason = 1; uint32 DoNotReconnect = 2; } //============================================================================ message Heartbeat { uint32 NumDroppedMessages = 1; sfixed64 CurrentDateTime = 2; } //============================================================================ message MarketDataFeedStatus { MarketDataFeedStatusEnum Status = 1; } //============================================================================ message MarketDataFeedSymbolStatus { uint32 SymbolID = 1; MarketDataFeedStatusEnum Status = 2; } //============================================================================ message TradingSymbolStatus { uint32 SymbolID = 1; TradingStatusEnum Status = 2; } //============================================================================ message MarketDataRequest { RequestActionEnum RequestAction = 1; uint32 SymbolID = 2; string Symbol = 3; string Exchange = 4; uint32 IntervalForSnapshotUpdatesInMilliseconds = 5; } //============================================================================ message MarketDepthRequest { RequestActionEnum RequestAction = 1; uint32 SymbolID = 2; string Symbol = 3; string Exchange = 4; int32 NumLevels = 5; } //============================================================================ message MarketDataReject { uint32 SymbolID = 1; string RejectText = 2; } //============================================================================ message MarketDataSnapshot { uint32 SymbolID = 1; double SessionSettlementPrice = 2; double SessionOpenPrice = 3; double SessionHighPrice = 4; double SessionLowPrice = 5; double SessionVolume = 6; uint32 SessionNumTrades = 7; uint32 OpenInterest = 8; double BidPrice = 9; double AskPrice = 10; double AskQuantity = 11; double BidQuantity = 12; double LastTradePrice = 13; double LastTradeVolume = 14; double LastTradeDateTime = 15; double BidAskDateTime = 16; uint32 SessionSettlementDateTime = 17; uint32 TradingSessionDate = 18; TradingStatusEnum TradingStatus = 19; double MarketDepthUpdateDateTime = 20; } //============================================================================ message MarketDepthSnapshotLevel { uint32 SymbolID = 1; AtBidOrAskEnum Side = 2; double Price = 3; double Quantity = 4; uint32 Level = 5; uint32 IsFirstMessageInBatch = 6; uint32 IsLastMessageInBatch = 7; double DateTime = 8; uint32 NumOrders = 9; } //============================================================================ message MarketDepthSnapshotLevelFloat { uint32 SymbolID = 1; float Price = 2; float Quantity = 3; uint32 NumOrders = 4; uint32 Level = 5; AtBidOrAskEnum8 Side = 6; FinalUpdateInBatchEnum FinalUpdateInBatch = 7; } //============================================================================ message MarketDepthUpdateLevel { uint32 SymbolID = 1; AtBidOrAskEnum Side = 2; double Price = 3; double Quantity = 4; MarketDepthUpdateTypeEnum UpdateType = 5; double DateTime = 6; uint32 NumOrders = 7; FinalUpdateInBatchEnum FinalUpdateInBatch = 8; uint32 Level = 9; } //============================================================================ message MarketDepthUpdateLevelFloatWithMilliseconds { uint32 SymbolID = 1; int64 DateTime = 2; float Price = 3; float Quantity = 4; int32 Side = 5; int32 UpdateType = 6; uint32 NumOrders = 7; FinalUpdateInBatchEnum FinalUpdateInBatch = 8; uint32 Level = 9; } //============================================================================ message MarketDepthUpdateLevelNoTimestamp { uint32 SymbolID = 1; float Price = 2; float Quantity = 3; uint32 NumOrders = 4; int32 Side = 5; int32 UpdateType = 6; FinalUpdateInBatchEnum FinalUpdateInBatch = 7; uint32 Level = 8; } //============================================================================ message MarketDataUpdateSessionSettlement { uint32 SymbolID = 1; double Price = 2; uint32 DateTime = 3; } //============================================================================ message MarketDataUpdateSessionOpen { uint32 SymbolID = 1; double Price = 2; uint32 TradingSessionDate = 3; } //============================================================================ message MarketDataUpdateSessionNumTrades { uint32 SymbolID = 1; int32 NumTrades = 2; uint32 TradingSessionDate = 3; } //============================================================================ message MarketDataUpdateTradingSessionDate { uint32 SymbolID = 1; uint32 Date = 2; } //============================================================================ message MarketDepthReject { uint32 SymbolID = 1; string RejectText = 2; } //============================================================================ message MarketDataUpdateTrade { uint32 SymbolID = 1; AtBidOrAskEnum AtBidOrAsk = 2; double Price = 3; double Volume = 4; double DateTime = 5; } //============================================================================ message MarketDataUpdateTradeCompact { float Price = 1; float Volume = 2; sfixed32 DateTime = 3; uint32 SymbolID = 4; AtBidOrAskEnum AtBidOrAsk = 5; } //============================================================================ message MarketDataUpdateLastTradeSnapshot { uint32 SymbolID = 1; double LastTradePrice = 2; double LastTradeVolume = 3; double LastTradeDateTime = 4; } //============================================================================ message MarketDataUpdateTradeWithUnbundledIndicator { uint32 SymbolID = 1; AtBidOrAskEnum8 AtBidOrAsk = 2; UnbundledTradeIndicatorEnum UnbundledTradeIndicator = 3; double Price = 4; uint32 Volume = 5; double DateTime = 6; uint32 TradeCondition = 7; } //============================================================================ message MarketDataUpdateTradeWithUnbundledIndicator2 { uint32 SymbolID = 1; float Price = 2; uint32 Volume = 3; sfixed64 DateTime = 4; AtBidOrAskEnum8 AtBidOrAsk = 5; UnbundledTradeIndicatorEnum UnbundledTradeIndicator = 6; uint32 TradeCondition = 7; } //============================================================================ message MarketDataUpdateTradeNoTimestamp { uint32 SymbolID = 1; float Price = 2; uint32 Volume = 3; AtBidOrAskEnum8 AtBidOrAsk = 4; UnbundledTradeIndicatorEnum UnbundledTradeIndicator = 5; uint32 TradeCondition = 6; } //============================================================================ message MarketDataUpdateBidAsk { uint32 SymbolID = 1; double BidPrice = 2; float BidQuantity = 3; double AskPrice = 4; float AskQuantity = 5; sfixed32 DateTime = 6; } //============================================================================ message MarketDataUpdateBidAsk2 { uint32 SymbolID = 1; float BidPrice = 2; float BidQuantity = 3; float AskPrice = 4; float AskQuantity = 5; int64 DateTime = 6; } //============================================================================ message MarketDataUpdateBidAskCompact { float BidPrice = 1; float BidQuantity = 2; float AskPrice = 3; float AskQuantity = 4; sfixed32 DateTime = 5; uint32 SymbolID = 6; } //============================================================================ message MarketDataUpdateBidAskNoTimeStamp { uint32 SymbolID = 1; float BidPrice = 2; uint32 BidQuantity = 3; float AskPrice = 4; uint32 AskQuantity = 5; }; //============================================================================ message MarketDataUpdateBidAskFloatWithMicroseconds { uint32 SymbolID = 1; float BidPrice = 2; float BidQuantity = 3; float AskPrice = 4; float AskQuantity = 5; uint64 DateTime = 6; }; //============================================================================ message MarketDataUpdateSessionVolume { uint32 SymbolID = 1; double Volume = 2; uint32 TradingSessionDate = 3; uint32 IsFinalSessionVolume = 4; } //============================================================================ message MarketDataUpdateOpenInterest { uint32 SymbolID = 1; uint32 OpenInterest = 2; uint32 TradingSessionDate = 3; } //============================================================================ message MarketDataUpdateSessionHigh { uint32 SymbolID = 1; double Price = 2; uint32 TradingSessionDate = 3; } //============================================================================ message MarketDataUpdateSessionLow { uint32 SymbolID = 1; double Price = 2; uint32 TradingSessionDate = 3; } //============================================================================ message MarketOrdersRequest { RequestActionEnum RequestAction = 1; uint32 SymbolID = 2; string Symbol = 3; string Exchange = 4; int32 SendQuantitiesGreaterOrEqualTo = 5; } //============================================================================ message MarketOrdersReject { uint32 SymbolID = 1; string RejectText = 2; } //============================================================================ message MarketOrdersAdd { uint32 SymbolID = 1; BuySellEnum Side = 2; double Price = 3; uint32 Quantity = 4; uint64 OrderID = 5; uint64 DateTime = 6; } //============================================================================ message MarketOrdersModify { uint32 SymbolID = 1; BuySellEnum Side = 2; double Price = 3; uint32 Quantity = 4; uint64 OrderID = 5; double PriorPrice = 6; uint32 PriorQuantity = 7; uint64 PriorOrderID = 8; uint64 DateTime = 9; } //============================================================================ message MarketOrdersRemove { uint32 SymbolID = 1; double Price = 2; uint32 Quantity = 3; uint64 OrderID = 4; uint64 DateTime = 5; BuySellEnum Side = 6; } //============================================================================ message MarketOrdersSnapshotMessageBoundary { uint32 SymbolID = 1; MessageSetBoundaryEnum MessageBoundary = 2; } //============================================================================ message SubmitNewSingleOrder { string Symbol = 1; string Exchange = 2; string TradeAccount = 3; string ClientOrderID = 4; OrderTypeEnum OrderType = 5; BuySellEnum BuySell = 6; double Price1 = 7; double Price2 = 8; double Quantity = 9; TimeInForceEnum TimeInForce = 10; sfixed64 GoodTillDateTime = 11; uint32 IsAutomatedOrder = 12; uint32 IsParentOrder = 13; string FreeFormText = 14; OpenCloseTradeEnum OpenOrClose = 15; double MaxShowQuantity = 16; string Price1AsString = 17; string Price2AsString = 18; } //============================================================================ message SubmitNewSingleOrderInt { string Symbol = 1; string Exchange = 2; string TradeAccount = 3; string ClientOrderID = 4; OrderTypeEnum OrderType = 5; BuySellEnum BuySell = 6; int64 Price1 = 7; int64 Price2 = 8; float Divisor = 9; int64 Quantity = 10; TimeInForceEnum TimeInForce = 11; sfixed64 GoodTillDateTime = 12; uint32 IsAutomatedOrder = 13; uint32 IsParentOrder = 14; string FreeFormText = 15; OpenCloseTradeEnum OpenOrClose = 16; } //============================================================================ message SubmitFlattenPositionOrder { string Symbol = 1; string Exchange = 2; string TradeAccount = 3; string ClientOrderID = 4; string FreeFormText = 5; uint32 IsAutomatedOrder = 6; } //============================================================================ message CancelReplaceOrder { string ServerOrderID = 1; string ClientOrderID = 2; double Price1 = 3; double Price2 = 4; double Quantity = 5; uint32 Price1IsSet = 6; uint32 Price2IsSet = 7; TimeInForceEnum TimeInForce = 9; uint64 GoodTillDateTime = 10; uint32 UpdatePrice1OffsetToParent = 11; string TradeAccount = 12; string Price1AsString = 13; string Price2AsString = 14; } //============================================================================ message CancelReplaceOrderInt { string ServerOrderID = 1; string ClientOrderID = 2; int64 Price1 = 3; int64 Price2 = 4; float Divisor = 5; int64 Quantity = 6; uint32 Price1IsSet = 7; uint32 Price2IsSet = 8; TimeInForceEnum TimeInForce = 10; uint64 GoodTillDateTime = 11; uint32 UpdatePrice1OffsetToParent = 12; } //============================================================================ message CancelOrder { string ServerOrderID = 1; string ClientOrderID = 2; string TradeAccount = 3; } //============================================================================ message SubmitNewOCOOrder { string Symbol = 1; string Exchange = 2; string ClientOrderID_1 = 3; OrderTypeEnum OrderType_1 = 4; BuySellEnum BuySell_1 = 5; double Price1_1 = 6; double Price2_1 = 7; double Quantity_1 = 8; string ClientOrderID_2 = 9; OrderTypeEnum OrderType_2 = 10; BuySellEnum BuySell_2 = 11; double Price1_2 = 12; double Price2_2 = 13; double Quantity_2 = 14; TimeInForceEnum TimeInForce = 15; sfixed64 GoodTillDateTime = 16; string TradeAccount = 17; uint32 IsAutomatedOrder = 18; string ParentTriggerClientOrderID = 19; string FreeFormText = 20; OpenCloseTradeEnum OpenOrClose = 21; PartialFillHandlingEnum PartialFillHandling = 22; uint32 UseOffsets = 23; double OffsetFromParent1 = 24; double OffsetFromParent2 = 25; uint32 MaintainSamePricesOnParentFill = 26; string Price1_1AsString = 27; string Price2_1AsString = 28; string Price1_2AsString = 29; string Price2_2AsString = 30; } //============================================================================ message SubmitNewOCOOrderInt { string Symbol = 1; string Exchange = 2; string ClientOrderID_1 = 3; OrderTypeEnum OrderType_1 = 4; BuySellEnum BuySell_1 = 5; int64 Price1_1 = 6; int64 Price2_1 = 7; int64 Quantity_1 = 8; string ClientOrderID_2 = 9; OrderTypeEnum OrderType_2 = 10; BuySellEnum BuySell_2 = 11; int64 Price1_2 = 12; int64 Price2_2 = 13; int64 Quantity_2 = 14; TimeInForceEnum TimeInForce = 15; sfixed64 GoodTillDateTime = 16; string TradeAccount = 17; uint32 IsAutomatedOrder = 18; string ParentTriggerClientOrderID = 19; string FreeFormText = 20; float Divisor = 21; OpenCloseTradeEnum OpenOrClose = 22; PartialFillHandlingEnum PartialFillHandling = 23; } //============================================================================ message OpenOrdersRequest { int32 RequestID = 1; int32 RequestAllOrders = 2; string ServerOrderID = 3; string TradeAccount = 4; } //============================================================================ message HistoricalOrderFillsRequest { int32 RequestID = 1; string ServerOrderID = 2; int32 NumberOfDays = 3; string TradeAccount = 4; sfixed64 StartDateTime = 5; } //============================================================================ message HistoricalOrderFillsReject { int32 RequestID = 1; string RejectText = 2; } //============================================================================ message CurrentPositionsRequest { int32 RequestID = 1; string TradeAccount = 2; } //============================================================================ message CurrentPositionsReject { int32 RequestID = 1; string RejectText = 2; } //============================================================================ message OrderUpdate { int32 RequestID = 1; int32 TotalNumMessages = 2; int32 MessageNumber = 3; string Symbol = 4; string Exchange = 5; string PreviousServerOrderID = 6; string ServerOrderID = 7; string ClientOrderID = 8; string ExchangeOrderID = 9; OrderStatusEnum OrderStatus = 10; OrderUpdateReasonEnum OrderUpdateReason = 11; OrderTypeEnum OrderType = 12; BuySellEnum BuySell = 13; double Price1 = 14; double Price2 = 15; TimeInForceEnum TimeInForce = 16; sfixed64 GoodTillDateTime = 17; double OrderQuantity = 18; double FilledQuantity = 19; double RemainingQuantity = 20; double AverageFillPrice = 21; double LastFillPrice = 22; sfixed64 LastFillDateTime = 23; double LastFillQuantity = 24; string LastFillExecutionID = 25; string TradeAccount = 26; string InfoText = 27; uint32 NoOrders = 28; string ParentServerOrderID = 29; string OCOLinkedOrderServerOrderID = 30; OpenCloseTradeEnum OpenOrClose = 31; string PreviousClientOrderID = 32; string FreeFormText = 33; sfixed64 OrderReceivedDateTime = 34; double LatestTransactionDateTime = 35; string Username = 36; } //============================================================================ message OpenOrdersReject { int32 RequestID = 1; string RejectText = 2; } //============================================================================ message HistoricalOrderFillResponse { int32 RequestID = 1; int32 TotalNumberMessages = 2; int32 MessageNumber = 3; string Symbol = 4; string Exchange = 5; string ServerOrderID = 6; BuySellEnum BuySell = 7; double Price = 8; sfixed64 DateTime = 9; double Quantity = 10; string UniqueExecutionID = 11; string TradeAccount = 12; OpenCloseTradeEnum OpenClose = 13; uint32 NoOrderFills = 14; string InfoText = 15; double HighPriceDuringPosition = 16; double LowPriceDuringPosition = 17; double PositionQuantity = 18; string Username = 19; string ExchangeOrderID = 20; string SenderSubID = 21; } //============================================================================ message PositionUpdate { int32 RequestID = 1; int32 TotalNumberMessages = 2; int32 MessageNumber = 3; string Symbol = 4; string Exchange = 5; double Quantity = 6; double AveragePrice = 7; string PositionIdentifier = 8; string TradeAccount = 9; uint32 NoPositions = 10; uint32 Unsolicited = 11; double MarginRequirement = 12; uint32 EntryDateTime = 13; double OpenProfitLoss = 14; double HighPriceDuringPosition = 15; double LowPriceDuringPosition = 16; double QuantityLimit = 17; double MaxPotentialPostionQuantity = 18; } //============================================================================ message AddCorrectingOrderFill { string Symbol = 1; string Exchange = 2; string TradeAccount = 3; string ClientOrderID = 4; BuySellEnum BuySell = 5; double FillPrice = 6; double FillQuantity = 7; string FreeFormText = 8; } //============================================================================ message CorrectingOrderFillResponse { string ClientOrderID = 1; string ResultText = 2; int32 IsError = 3; } //============================================================================ message TradeAccountsRequest { int32 RequestID = 1; } //============================================================================ message TradeAccountResponse { int32 TotalNumberMessages = 1; int32 MessageNumber = 2; string TradeAccount = 3; int32 RequestID = 4; } //============================================================================ message ExchangeListRequest { int32 RequestID = 1; } //============================================================================ message ExchangeListResponse { int32 RequestID = 1; string Exchange = 2; uint32 IsFinalMessage = 3; string Description = 4; } //============================================================================ message SymbolsForExchangeRequest { int32 RequestID = 1; string Exchange = 2; SecurityTypeEnum SecurityType = 3; RequestActionEnum RequestAction = 4; string Symbol = 5; } //============================================================================ message UnderlyingSymbolsForExchangeRequest { int32 RequestID = 1; string Exchange = 2; SecurityTypeEnum SecurityType = 3; } //============================================================================ message SymbolsForUnderlyingRequest { int32 RequestID = 1; string UnderlyingSymbol = 2; string Exchange = 3; SecurityTypeEnum SecurityType = 4; } //============================================================================ message SymbolSearchRequest { int32 RequestID = 1; string SearchText = 2; string Exchange = 3; SecurityTypeEnum SecurityType = 4; SearchTypeEnum SearchType = 5; } //============================================================================ message SecurityDefinitionForSymbolRequest { int32 RequestID = 1; string Symbol = 2; string Exchange = 3; } //============================================================================ message SecurityDefinitionResponse { int32 RequestID = 1; string Symbol = 2; string Exchange = 3; SecurityTypeEnum SecurityType = 4; string Description = 5; float MinPriceIncrement = 6; PriceDisplayFormatEnum PriceDisplayFormat = 7; float CurrencyValuePerIncrement = 8; uint32 IsFinalMessage = 9; float FloatToIntPriceMultiplier = 10; float IntToFloatPriceDivisor = 11; string UnderlyingSymbol = 12; uint32 UpdatesBidAskOnly = 13; float StrikePrice = 14; PutCallEnum PutOrCall = 15; uint32 ShortInterest = 16; sfixed32 SecurityExpirationDate = 17; float BuyRolloverInterest = 18; float SellRolloverInterest = 19; float EarningsPerShare = 20; uint32 SharesOutstanding = 21; float IntToFloatQuantityDivisor = 22; uint32 HasMarketDepthData = 23; float DisplayPriceMultiplier = 24; string ExchangeSymbol = 25; float InitialMarginRequirement = 26; float MaintenanceMarginRequirement = 27; string Currency = 28; float ContractSize = 29; uint32 OpenInterest = 30; sfixed32 RolloverDate = 31; uint32 IsDelayed = 32; int64 SecurityIdentifier = 33; string ProductIdentifier = 34; } //============================================================================ message SecurityDefinitionReject { int32 RequestID = 1; string RejectText = 2; } //============================================================================ message AccountBalanceRequest { int32 RequestID = 1; string TradeAccount = 2; } //============================================================================ message AccountBalanceReject { int32 RequestID = 1; string RejectText = 2; } //============================================================================ message AccountBalanceUpdate { int32 RequestID = 1; double CashBalance = 2; double BalanceAvailableForNewPositions = 3; string AccountCurrency = 4; string TradeAccount = 5; double SecuritiesValue = 6; // Not including cash double MarginRequirement = 7; int32 TotalNumberMessages = 8; int32 MessageNumber = 9; uint32 NoAccountBalances = 10; uint32 Unsolicited = 11; double OpenPositionsProfitLoss = 12; double DailyProfitLoss = 13; string InfoText = 14; uint64 TransactionIdentifier = 15; double DailyNetLossLimit = 16; double TrailingAccountValueToLimitPositions = 17; uint32 DailyNetLossLimitReached = 18; uint32 IsUnderRequiredMargin = 19; uint32 ClosePositionsAtEndOfDay = 20; uint32 TradingIsDisabled = 21; string Description = 22; uint32 IsUnderRequiredAccountValue = 23; sfixed64 TransactionDateTime = 24; double MarginRequirementFull = 25; double MarginRequirementFullPositionsOnly = 26; double PeakMarginRequirement = 27; string IntroducingBroker = 28; } //============================================================================ message AccountBalanceAdjustment { int32 RequestID = 1; double CreditAmount = 2; double DebitAmount = 3; string Currency = 4; string Reason = 5; string TradeAccount = 6; } //============================================================================ message AccountBalanceAdjustmentReject { int32 RequestID = 1; string RejectText = 2; string TradeAccount = 3; } //============================================================================ message AccountBalanceAdjustmentComplete { int32 RequestID = 1; int64 TransactionID = 2; string TradeAccount = 3; } //============================================================================ message HistoricalAccountBalancesRequest { int32 RequestID = 1; string TradeAccount = 2; sfixed64 StartDateTime = 3; } //============================================================================ message HistoricalAccountBalancesReject { int32 RequestID = 1; string RejectText = 2; } //============================================================================ message HistoricalAccountBalanceResponse { int32 RequestID = 1; double DateTime = 2; double CashBalance = 3; string AccountCurrency = 4; string TradeAccount = 5; uint32 IsFinalResponse= 6; uint32 NoAccountBalances = 7; string InfoText = 8; string TransactionId = 9; } //============================================================================ message UserMessage { string UserMessage = 1; uint32 IsPopupMessage = 2; } //============================================================================ message GeneralLogMessage { string MessageText = 3; } /*==========================================================================*/ message JournalEntryAdd { string JournalEntry = 1; uint64 DateTime = 2; }; /*==========================================================================*/ message JournalEntriesRequest { int32 RequestID = 1; uint64 StartDateTime = 2; }; /*==========================================================================*/ message JournalEntriesReject { int32 RequestID = 1; string RejectText = 2; }; /*==========================================================================*/ message JournalEntryResponse { string JournalEntry = 1; uint64 DateTime = 2; uint32 IsFinalResponse = 3; }; //============================================================================ message AlertMessage { string MessageText = 3; string TradeAccount = 4; } //============================================================================ message HistoricalPriceDataRequest { int32 RequestID = 1; string Symbol = 2; string Exchange = 3; HistoricalDataIntervalEnum RecordInterval = 4; sfixed64 StartDateTime = 5; sfixed64 EndDateTime = 6; uint32 MaxDaysToReturn = 7; uint32 UseZLibCompression = 8; uint32 RequestDividendAdjustedStockData = 9; uint32 Integer_1 = 10; } //============================================================================ message HistoricalPriceDataResponseHeader { int32 RequestID = 1; HistoricalDataIntervalEnum RecordInterval = 2; uint32 UseZLibCompression = 3; uint32 NoRecordsToReturn = 4; float IntToFloatPriceDivisor = 5; } //============================================================================ message HistoricalPriceDataReject { int32 RequestID = 1; string RejectText = 2; HistoricalPriceDataRejectReasonCodeEnum RejectReasonCode = 3; uint32 RetryTimeInSeconds = 4; } //============================================================================ message HistoricalPriceDataRecordResponse { int32 RequestID = 1; sfixed64 StartDateTime = 2; double OpenPrice = 3; double HighPrice = 4; double LowPrice = 5; double LastPrice = 6; double Volume = 7; uint32 NumTrades = 8; double BidVolume = 9; double AskVolume = 10; uint32 IsFinalRecord = 11; } //============================================================================ message HistoricalPriceDataTickRecordResponse { int32 RequestID = 1; double DateTime = 2; AtBidOrAskEnum AtBidOrAsk = 3; double Price = 4; double Volume = 5; uint32 IsFinalRecord = 6; } //============================================================================ message HistoricalPriceDataResponseTrailer { int32 RequestID = 1; int64 FinalRecordLastDateTime = 2; } //============================================================================ message HistoricalMarketDepthDataRequest { int32 RequestID = 1; string Symbol = 2; string Exchange = 3; int64 StartDateTime = 4; int64 EndDateTime = 5; uint32 UseZLibCompression = 6; uint32 Integer_1 = 7; } //============================================================================ message HistoricalMarketDepthDataResponseHeader { int32 RequestID = 1; uint32 UseZLibCompression = 2; uint32 NoRecordsToReturn = 3; } //============================================================================ message HistoricalMarketDepthDataReject { int32 RequestID = 1; string RejectText = 2; HistoricalPriceDataRejectReasonCodeEnum RejectReasonCode = 3; } //============================================================================ message HistoricalMarketDepthDataRecordResponse { int32 RequestID = 1; int64 StartDateTime = 2; uint32 Command = 3; uint32 Flags = 4; uint32 NumOrders = 5; float Price = 6; uint32 Quantity = 7; uint32 IsFinalRecord = 8; }