From 884a79e13a4e49b6179bbeec242dd73c6d64fa50 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Sat, 12 Feb 2022 15:14:01 -0500 Subject: [PATCH] refactor: Clean up protobuf files * Rename files to snake_case (per Google style guide) https://developers.google.com/protocol-buffers/docs/style * Prohibit single line functions in clang-format for proto files * Run clang-format --- .clang-format | 1 + src/lib/CMakeDeps_win.cmake | 2 +- src/lib/api/core/ApiClientInterop.cpp | 2 +- src/lib/config/protos/AlgoTypes.proto | 22 -- src/lib/config/protos/ExchangeSimCfg.proto | 14 - src/lib/config/protos/MarketData.proto | 256 ------------------ src/lib/config/protos/Ports.proto | 11 - src/lib/config/protos/UI.proto | 207 -------------- src/lib/config/protos/algo_types.proto | 22 ++ .../config/protos/cme_reference_data.proto | 6 +- src/lib/config/protos/exchange_sim_cfg.proto | 14 + src/lib/config/protos/jetfix.proto | 170 +++++++----- src/lib/config/protos/keycode.proto | 29 +- src/lib/config/protos/logging.proto | 10 +- src/lib/config/protos/market_data.proto | 254 +++++++++++++++++ src/lib/config/protos/mercury_cfg.proto | 6 +- src/lib/config/protos/orderman_cfg.proto | 8 +- .../config/protos/orders_fills_cleanup.proto | 14 +- src/lib/config/protos/perflog_cfg.proto | 8 +- src/lib/config/protos/ports.proto | 11 + src/lib/config/protos/position_cfg.proto | 34 ++- src/lib/config/protos/quickbus_cfg.proto | 26 +- src/lib/config/protos/span.proto | 13 +- src/lib/config/protos/spartan.proto | 28 +- src/lib/config/protos/spreader.proto | 26 +- src/lib/config/protos/subprocess.proto | 18 +- .../protos/{Symbols.proto => symbols.proto} | 5 +- src/lib/config/protos/system.proto | 59 ++-- src/lib/config/protos/testkeys.proto | 88 +++--- src/lib/config/protos/threads.proto | 11 +- src/lib/config/protos/toggles.proto | 68 ++--- src/lib/config/protos/ui.proto | 208 ++++++++++++++ src/lib/md/MDConsumer.cpp | 2 +- src/lib/md/MemorySegmentUtils.cpp | 2 +- src/lib/md/PlatformLoader.cpp | 2 +- src/lib/md/PlatformLoader.h | 2 +- src/lib/md/SecurityDB.cpp | 2 +- src/lib/md/SecurityIDRecorder.cpp | 2 +- src/lib/md/SecurityMapper.cpp | 2 +- src/lib/md/Shm/MDStructure.h | 2 +- src/lib/md/cme/MDP3Utils.cpp | 2 +- src/lib/md/common.cpp | 2 +- src/lib/md/get_symbols.h | 2 +- src/lib/md/ice/ICEUtils.cpp | 2 +- src/lib/md/relay/RelayClient.cpp | 2 +- src/lib/md/relay/RelayRecorder.cpp | 2 +- src/lib/md/test/md2_tests.cpp | 2 +- src/lib/md/vendor/OnixsUtils.cpp | 2 +- src/lib/orderman/orderman_utils/Book.h | 2 +- src/lib/orderman/orderman_utils/BookUtils.h | 2 +- src/lib/orderman/orderman_utils/Formatter.h | 2 +- src/lib/utils/AuthSessionManager.cpp | 4 +- src/server/sparkd/cmds/Run.cpp | 2 +- src/server/sparkd/cmds/Web.cpp | 4 +- src/server/sparkd/cmds/md/cmds/Cleanup.cpp | 2 +- src/server/sparkd/cmds/md/cmds/Dump.cpp | 2 +- src/server/sparkd/cmds/md/cmds/Run.cpp | 2 +- src/server/sparkd/cmds/md/cmds/Tail.cpp | 2 +- .../sparkd/exchange_sim/ExchangeSim.cpp | 4 +- .../exchange_sim/ExchangeSimApplication.cpp | 2 +- .../sparkd/exchange_sim/book/OrderMatcher.cpp | 2 +- .../md/platforms/ice_onixs/ICEListener.cpp | 2 +- .../sparkd/md/platforms/ice_onixs/ICEMain.cpp | 2 +- .../platforms/ice_onixs/tests/ice_tests.cpp | 2 +- .../md/platforms/mdp3_onixs/MDP3Listener.cpp | 2 +- .../md/platforms/mdp3_onixs/MDP3Main.cpp | 2 +- .../platforms/mdp3_onixs/tests/mdp3_tests.cpp | 2 +- 67 files changed, 876 insertions(+), 851 deletions(-) delete mode 100644 src/lib/config/protos/AlgoTypes.proto delete mode 100644 src/lib/config/protos/ExchangeSimCfg.proto delete mode 100755 src/lib/config/protos/MarketData.proto delete mode 100644 src/lib/config/protos/Ports.proto delete mode 100644 src/lib/config/protos/UI.proto create mode 100644 src/lib/config/protos/algo_types.proto create mode 100644 src/lib/config/protos/exchange_sim_cfg.proto create mode 100644 src/lib/config/protos/market_data.proto create mode 100644 src/lib/config/protos/ports.proto rename src/lib/config/protos/{Symbols.proto => symbols.proto} (95%) create mode 100644 src/lib/config/protos/ui.proto diff --git a/.clang-format b/.clang-format index 76027b85f..0e81015ba 100644 --- a/.clang-format +++ b/.clang-format @@ -7,3 +7,4 @@ PenaltyReturnTypeOnItsOwnLine: 140 --- Language: Proto IndentWidth: 2 +AllowShortFunctionsOnASingleLine: None diff --git a/src/lib/CMakeDeps_win.cmake b/src/lib/CMakeDeps_win.cmake index a242a7db9..816356c20 100644 --- a/src/lib/CMakeDeps_win.cmake +++ b/src/lib/CMakeDeps_win.cmake @@ -1 +1 @@ -set(sources api/apicore.proto;api/apigateway.proto;api/apioptions.proto;api/core/ApiClientInterop.cpp;api/core/ApiServerInterop.cpp;api/domain/Currency.proto;api/domain/SecurityType.proto;api/domain/Venue.proto;api/io/URL.proto;api/md/MarketDataSubscriptionParams.proto;api/md/binance/BinanceMarketDataSubscriptionParams.proto;api/md/deribit/DeribitMarketDataSubscriptionParams.proto;api/md/ftx/FTXMarketDataSubscriptionParams.proto;api/md/glbx/GlbxMarketDataSubscriptionParams.proto;api/md/huobi/HuobiMarketDataSubscriptionParams.proto;api/public/ApiServer.cpp;api/public/ClientChannel.cpp;api/public/QuickbusClientChannel.cpp;api/public/ServerChannel.cpp;api/public/ServiceContext.cpp;api/service_helpers/AdminServiceUtils.cpp;api/service_helpers/AlgoServiceUtils.cpp;api/service_helpers/PositionUtilities.cpp;api/services/AdminService.proto;api/services/AlgoDefinitionService.proto;api/services/AlgoService.proto;api/services/AnalyticsService.proto;api/services/ApiUnitTestService.proto;api/services/AuthService.proto;api/services/BasePositionService.proto;api/services/ErrorReportService.proto;api/services/HelloService.proto;api/services/MBOService.proto;api/services/MarginService.proto;api/services/MarketDataAuxiliaryService.proto;api/services/MarketDataRelay.proto;api/services/MarketDataService.proto;api/services/MoneyFileService.proto;api/services/OrderService.proto;api/services/OutOfProcessURLListener.proto;api/services/PersistenceService.proto;api/services/PositionService.proto;api/services/ShellDiagnosticService.proto;api/services/ShellLatencyService.proto;api/services/SyntheticSecurityService.proto;api/test/ApiTests.cpp;api/test/HelloServiceServer.cpp;config/ConfigCheck.cpp;config/ConfigDownloader.cpp;config/ConfigErrorCollector.cpp;config/ConfigLog.cpp;config/ConfigPropertyEvaluator.cpp;config/ConfigValueQueue.cpp;config/ConfigurationException.cpp;config/ConfigurationState.cpp;config/PreprocessInputStream.cpp;config/config.cpp;config/defaults/MarketData.conf;config/defaults/Ports.conf;config/defaults/Symbols.conf;config/defaults/cme_reference_data.conf;config/defaults/edge.conf;config/defaults/jetfix.conf;config/defaults/keycode.conf;config/defaults/logging.conf;config/defaults/orderman_cfg.conf;config/defaults/orders_fills_cleanup.conf;config/defaults/position_cfg.conf;config/defaults/span.conf;config/defaults/spreader.conf;config/defaults/testkeys.conf;config/defaults/threads.conf;config/defaults/toggles.conf;config/extensions/extensions.proto;config/invalid/invalid.proto;config/protos/AlgoTypes.proto;config/protos/ExchangeSimCfg.proto;config/protos/MarketData.proto;config/protos/Ports.proto;config/protos/Symbols.proto;config/protos/UI.proto;config/protos/cme_reference_data.proto;config/protos/jetfix.proto;config/protos/keycode.proto;config/protos/logging.proto;config/protos/mercury_cfg.proto;config/protos/orderman_cfg.proto;config/protos/orders_fills_cleanup.proto;config/protos/perflog_cfg.proto;config/protos/position_cfg.proto;config/protos/quickbus_cfg.proto;config/protos/span.proto;config/protos/spartan.proto;config/protos/spreader.proto;config/protos/subprocess.proto;config/protos/system.proto;config/protos/testkeys.proto;config/protos/threads.proto;config/protos/toggles.proto;config/tests/HTTPServer.cpp;config/tests/config_ref_tests.cpp;config/tests/config_tests.cpp;config/text_format/text_format.cpp;domain_model/Security.cpp;domain_model/Security.proto;domain_model/SecurityTests.cpp;domain_model/sod.cpp;domain_model/tests/domain_tests.cpp;expression/BooleanGrammar.cpp;expression/ExpressionEvaluator.cpp;expression/ParserExceptions.cpp;expression/Value.cpp;expression/tests/expression_parser_tests.cpp;io/QueryParams.cpp;io/URL.cpp;io/http/CurlHandle.cpp;io/http/HTTPClient.cpp;io/http/HTTPHeaders.cpp;io/http/HTTPRequest.cpp;io/http/HTTPResponse.cpp;io/websocket/WebsocketClient.cpp;io/websocket/WebsocketClientConfiguration.cpp;io/websocket/WebsocketError.cpp;io/websocket/WebsocketMessage.cpp;io/websocket/WebsocketSSLClientInternal.cpp;io/websocket/tests/WebsocketClientTests.cpp;logging/LoggerHub.cpp;logging/Sink.cpp;logging/logging.cpp;logging/tests/logging_tests.cpp;md/Diag/MDPeriodicDumper.cpp;md/Diag/ShmDumper.cpp;md/MBOProcessor.cpp;md/MBOServiceServer.cpp;md/MDClient.cpp;md/MDConsumer.cpp;md/MDConsumerHandle.cpp;md/MDConsumerInterop.cpp;md/MDProducer.cpp;md/MDProducerHandle.cpp;md/MarketDataError.cpp;md/MarketDataGateway.cpp;md/MarketDataRegistrationFactory.cpp;md/MemorySegmentUtils.cpp;md/PlatformLoader.cpp;md/PriceSize.cpp;md/Product.cpp;md/SecurityCache.cpp;md/SecurityDB.cpp;md/SecurityIDRecorder.cpp;md/SecurityMapper.cpp;md/SecurityMarketState.cpp;md/SecurityOracle.cpp;md/SecurityStore.cpp;md/SettlementRecorder.cpp;md/Shm/FixedSecurity.cpp;md/SyntheticSecurityService.cpp;md/binance/BinanceBookLevel.cpp;md/binance/BinanceDepthBootstrapper.cpp;md/binance/BinanceDepthSnapshot.cpp;md/binance/BinanceDepthStreamParams.cpp;md/binance/BinanceDepthStreamSite.cpp;md/binance/BinanceDepthStreamSiteKey.cpp;md/binance/BinanceDiffDepthSubscription.cpp;md/binance/BinanceDiffDepthUpdate.cpp;md/binance/BinanceWebsocketStreamDemuxer.cpp;md/cme/MDP3Utils.cpp;md/common.cpp;md/ice/ICEUtils.cpp;md/listeners/LiveLadderPrinter.cpp;md/protos/co2.proto;md/relay/QueryServer.cpp;md/relay/RelayClient.cpp;md/relay/RelayRecorder.cpp;md/service/MarketDataServiceServer.cpp;md/test/Co2ManagedTestHelper.cpp;md/test/Co2TestInstrument.cpp;md/test/mbo_tests.cpp;md/test/md2_tests.cpp;md/test/md_test_utils.cpp;md/test/synthetic_book_merge_tests.cpp;md/vendor/OnixsUtils.cpp;os/os.cpp;os/tests/os_tests.cpp;quickbus/core/LocalNode.cpp;quickbus/core/Quickbus.cpp;quickbus/core/SubscriptionID.cpp;quickbus/core/TableID.cpp;quickbus/message_model/Update.cpp;quickbus/message_model/merge_updates.cpp;quickbus/network/QBConnection.cpp;quickbus/network/QBConnectionManager.cpp;quickbus/network/endpoint_description.cpp;quickbus/network/quickbus_msgs.proto;quickbus/pubsub/TablePublisher.cpp;quickbus/pubsub/TableSubscriber.cpp;quickbus/pubsub/tests/qb_pubsub_tests.cpp;quickbus/routing/INode.cpp;quickbus/routing/NodeID.cpp;quickbus/routing/Router.cpp;quickbus/rpc/RPCClient.cpp;quickbus/rpc/RPCServer.cpp;quickbus/rpc/RPCSessionID.cpp;quickbus/rpc/rpc_utils.cpp;quickbus/rpc/tests/qb_rpc_tests.cpp;quickbus/tests/quickbus_tests.cpp;sparkproto/SparkProtos.proto;testing/catch_test_runner.cpp;utils/AuthSessionManager.cpp;utils/AuthToken.cpp;utils/Dispatcher.cpp;utils/GrowableSPSCQueue.cpp;utils/HTTPStream.cpp;utils/MathUtils.cpp;utils/PBUtils.cpp;utils/Puid.cpp;utils/SecureLogon.cpp;utils/SharedMemory.cpp;utils/Sqlite_utils.cpp;utils/Uuid.cpp;utils/crypto/CipherType.cpp;utils/crypto/CryptoInit.cpp;utils/crypto/Digest.cpp;utils/crypto/KeyCodeHelper.cpp;utils/crypto/PasswordCallback.cpp;utils/crypto/PrivateKey.cpp;utils/crypto/PublicKey.cpp;utils/crypto/iostreambio.cpp;utils/datetime.cpp;utils/download.cpp;utils/file_utils.cpp;utils/init_spark_lib.cpp;utils/is_unittest_environment.cpp;utils/sftp.cpp;utils/stats.cpp;utils/tests/AuthTokenTests.cpp;utils/tests/IDGeneratorTests.cpp;utils/tests/MathUtilsTests.cpp;utils/tests/SingleWriterConcurrentVectorTests.cpp;utils/thread_manager.cpp) \ No newline at end of file +set(sources api/apicore.proto;api/apigateway.proto;api/apioptions.proto;api/core/ApiClientInterop.cpp;api/core/ApiServerInterop.cpp;api/domain/Currency.proto;api/domain/SecurityType.proto;api/domain/Venue.proto;api/io/URL.proto;api/md/MarketDataSubscriptionParams.proto;api/md/binance/BinanceMarketDataSubscriptionParams.proto;api/md/deribit/DeribitMarketDataSubscriptionParams.proto;api/md/ftx/FTXMarketDataSubscriptionParams.proto;api/md/glbx/GlbxMarketDataSubscriptionParams.proto;api/md/huobi/HuobiMarketDataSubscriptionParams.proto;api/public/ApiServer.cpp;api/public/ClientChannel.cpp;api/public/QuickbusClientChannel.cpp;api/public/ServerChannel.cpp;api/public/ServiceContext.cpp;api/service_helpers/AdminServiceUtils.cpp;api/service_helpers/AlgoServiceUtils.cpp;api/service_helpers/PositionUtilities.cpp;api/services/AdminService.proto;api/services/AlgoDefinitionService.proto;api/services/AlgoService.proto;api/services/AnalyticsService.proto;api/services/ApiUnitTestService.proto;api/services/AuthService.proto;api/services/BasePositionService.proto;api/services/ErrorReportService.proto;api/services/HelloService.proto;api/services/MBOService.proto;api/services/MarginService.proto;api/services/MarketDataAuxiliaryService.proto;api/services/MarketDataRelay.proto;api/services/MarketDataService.proto;api/services/MoneyFileService.proto;api/services/OrderService.proto;api/services/OutOfProcessURLListener.proto;api/services/PersistenceService.proto;api/services/PositionService.proto;api/services/ShellDiagnosticService.proto;api/services/ShellLatencyService.proto;api/services/SyntheticSecurityService.proto;api/test/ApiTests.cpp;api/test/HelloServiceServer.cpp;config/ConfigCheck.cpp;config/ConfigDownloader.cpp;config/ConfigErrorCollector.cpp;config/ConfigLog.cpp;config/ConfigPropertyEvaluator.cpp;config/ConfigValueQueue.cpp;config/ConfigurationException.cpp;config/ConfigurationState.cpp;config/PreprocessInputStream.cpp;config/config.cpp;config/defaults/MarketData.conf;config/defaults/Ports.conf;config/defaults/Symbols.conf;config/defaults/cme_reference_data.conf;config/defaults/edge.conf;config/defaults/jetfix.conf;config/defaults/keycode.conf;config/defaults/logging.conf;config/defaults/orderman_cfg.conf;config/defaults/orders_fills_cleanup.conf;config/defaults/position_cfg.conf;config/defaults/span.conf;config/defaults/spreader.conf;config/defaults/testkeys.conf;config/defaults/threads.conf;config/defaults/toggles.conf;config/extensions/extensions.proto;config/invalid/invalid.proto;config/protos/algo_types.proto;config/protos/cme_reference_data.proto;config/protos/exchange_sim_cfg.proto;config/protos/jetfix.proto;config/protos/keycode.proto;config/protos/logging.proto;config/protos/market_data.proto;config/protos/mercury_cfg.proto;config/protos/orderman_cfg.proto;config/protos/orders_fills_cleanup.proto;config/protos/perflog_cfg.proto;config/protos/ports.proto;config/protos/position_cfg.proto;config/protos/quickbus_cfg.proto;config/protos/span.proto;config/protos/spartan.proto;config/protos/spreader.proto;config/protos/subprocess.proto;config/protos/symbols.proto;config/protos/system.proto;config/protos/testkeys.proto;config/protos/threads.proto;config/protos/toggles.proto;config/protos/ui.proto;config/tests/HTTPServer.cpp;config/tests/config_ref_tests.cpp;config/tests/config_tests.cpp;config/text_format/text_format.cpp;domain_model/Security.cpp;domain_model/Security.proto;domain_model/SecurityTests.cpp;domain_model/sod.cpp;domain_model/tests/domain_tests.cpp;expression/BooleanGrammar.cpp;expression/ExpressionEvaluator.cpp;expression/ParserExceptions.cpp;expression/Value.cpp;expression/tests/expression_parser_tests.cpp;io/QueryParams.cpp;io/URL.cpp;io/http/CurlHandle.cpp;io/http/HTTPClient.cpp;io/http/HTTPHeaders.cpp;io/http/HTTPRequest.cpp;io/http/HTTPResponse.cpp;io/websocket/WebsocketClient.cpp;io/websocket/WebsocketClientConfiguration.cpp;io/websocket/WebsocketError.cpp;io/websocket/WebsocketMessage.cpp;io/websocket/WebsocketSSLClientInternal.cpp;io/websocket/tests/WebsocketClientTests.cpp;logging/LoggerHub.cpp;logging/Sink.cpp;logging/logging.cpp;logging/tests/logging_tests.cpp;md/Diag/MDPeriodicDumper.cpp;md/Diag/ShmDumper.cpp;md/MBOProcessor.cpp;md/MBOServiceServer.cpp;md/MDClient.cpp;md/MDConsumer.cpp;md/MDConsumerHandle.cpp;md/MDConsumerInterop.cpp;md/MDProducer.cpp;md/MDProducerHandle.cpp;md/MarketDataError.cpp;md/MarketDataGateway.cpp;md/MarketDataRegistrationFactory.cpp;md/MemorySegmentUtils.cpp;md/PlatformLoader.cpp;md/PriceSize.cpp;md/Product.cpp;md/SecurityCache.cpp;md/SecurityDB.cpp;md/SecurityIDRecorder.cpp;md/SecurityMapper.cpp;md/SecurityMarketState.cpp;md/SecurityOracle.cpp;md/SecurityStore.cpp;md/SettlementRecorder.cpp;md/Shm/FixedSecurity.cpp;md/SyntheticSecurityService.cpp;md/binance/BinanceBookLevel.cpp;md/binance/BinanceDepthBootstrapper.cpp;md/binance/BinanceDepthSnapshot.cpp;md/binance/BinanceDepthStreamParams.cpp;md/binance/BinanceDepthStreamSite.cpp;md/binance/BinanceDepthStreamSiteKey.cpp;md/binance/BinanceDiffDepthSubscription.cpp;md/binance/BinanceDiffDepthUpdate.cpp;md/binance/BinanceWebsocketStreamDemuxer.cpp;md/cme/MDP3Utils.cpp;md/common.cpp;md/ice/ICEUtils.cpp;md/listeners/LiveLadderPrinter.cpp;md/protos/co2.proto;md/relay/QueryServer.cpp;md/relay/RelayClient.cpp;md/relay/RelayRecorder.cpp;md/service/MarketDataServiceServer.cpp;md/test/Co2ManagedTestHelper.cpp;md/test/Co2TestInstrument.cpp;md/test/mbo_tests.cpp;md/test/md2_tests.cpp;md/test/md_test_utils.cpp;md/test/synthetic_book_merge_tests.cpp;md/vendor/OnixsUtils.cpp;os/os.cpp;os/tests/os_tests.cpp;quickbus/core/LocalNode.cpp;quickbus/core/Quickbus.cpp;quickbus/core/SubscriptionID.cpp;quickbus/core/TableID.cpp;quickbus/message_model/Update.cpp;quickbus/message_model/merge_updates.cpp;quickbus/network/QBConnection.cpp;quickbus/network/QBConnectionManager.cpp;quickbus/network/endpoint_description.cpp;quickbus/network/quickbus_msgs.proto;quickbus/pubsub/TablePublisher.cpp;quickbus/pubsub/TableSubscriber.cpp;quickbus/pubsub/tests/qb_pubsub_tests.cpp;quickbus/routing/INode.cpp;quickbus/routing/NodeID.cpp;quickbus/routing/Router.cpp;quickbus/rpc/RPCClient.cpp;quickbus/rpc/RPCServer.cpp;quickbus/rpc/RPCSessionID.cpp;quickbus/rpc/rpc_utils.cpp;quickbus/rpc/tests/qb_rpc_tests.cpp;quickbus/tests/quickbus_tests.cpp;sparkproto/SparkProtos.proto;testing/catch_test_runner.cpp;utils/AuthSessionManager.cpp;utils/AuthToken.cpp;utils/Dispatcher.cpp;utils/GrowableSPSCQueue.cpp;utils/HTTPStream.cpp;utils/MathUtils.cpp;utils/PBUtils.cpp;utils/Puid.cpp;utils/SecureLogon.cpp;utils/SharedMemory.cpp;utils/Sqlite_utils.cpp;utils/Uuid.cpp;utils/crypto/CipherType.cpp;utils/crypto/CryptoInit.cpp;utils/crypto/Digest.cpp;utils/crypto/KeyCodeHelper.cpp;utils/crypto/PasswordCallback.cpp;utils/crypto/PrivateKey.cpp;utils/crypto/PublicKey.cpp;utils/crypto/iostreambio.cpp;utils/datetime.cpp;utils/download.cpp;utils/file_utils.cpp;utils/init_spark_lib.cpp;utils/is_unittest_environment.cpp;utils/sftp.cpp;utils/stats.cpp;utils/tests/AuthTokenTests.cpp;utils/tests/IDGeneratorTests.cpp;utils/tests/MathUtilsTests.cpp;utils/tests/SingleWriterConcurrentVectorTests.cpp;utils/thread_manager.cpp) \ No newline at end of file diff --git a/src/lib/api/core/ApiClientInterop.cpp b/src/lib/api/core/ApiClientInterop.cpp index 2d194dffe..c7849f014 100644 --- a/src/lib/api/core/ApiClientInterop.cpp +++ b/src/lib/api/core/ApiClientInterop.cpp @@ -9,7 +9,7 @@ #include "../public/ServiceContext.h" #include "lib/api/apicore.pb.h" -#include "lib/config/protos/Ports.pb.h" +#include "lib/config/protos/ports.pb.h" #include "lib/config/protos/quickbus_cfg.pb.h" #include "lib/config/protos/system.pb.h" diff --git a/src/lib/config/protos/AlgoTypes.proto b/src/lib/config/protos/AlgoTypes.proto deleted file mode 100644 index 904beea3e..000000000 --- a/src/lib/config/protos/AlgoTypes.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax='proto2'; -package bts.config; - -message AlgoTypeContext { - repeated string exchanges = 1; - repeated string symbols = 2; - repeated string security_types = 3; -} - -message AlgoTypeDef { - optional string name = 1; - optional bool is_attachable = 2 [default = false]; -} - -message AlgoTypeRule { - optional AlgoTypeContext context = 1; - repeated AlgoTypeDef algos = 2; -} - -message AlgoTypeRuleSet { - repeated AlgoTypeRule rules = 1; -} \ No newline at end of file diff --git a/src/lib/config/protos/ExchangeSimCfg.proto b/src/lib/config/protos/ExchangeSimCfg.proto deleted file mode 100644 index 9271985fd..000000000 --- a/src/lib/config/protos/ExchangeSimCfg.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax='proto2'; -package bts.config; - -message ExchangeSim { - optional bool merge_with_md = 1 [default=true]; - optional bool forward_implied = 2 [default = false]; - oneof source { - string replay_url = 11 [default = "http://10.96.18.45/spark/futures.coconut"]; - string replay_file = 12 [default = "futures.coconut"]; - bool local_relay = 13; - } - optional uint32 orders_per_level = 20 [default = 10]; -} - diff --git a/src/lib/config/protos/MarketData.proto b/src/lib/config/protos/MarketData.proto deleted file mode 100755 index 456d51893..000000000 --- a/src/lib/config/protos/MarketData.proto +++ /dev/null @@ -1,256 +0,0 @@ -syntax='proto2'; -package bts.md; - -message MarketDataConfig { - // Allows you to turn off in-proc market data entirely - optional bool use_md = 1 [default = true]; - optional bool use_onixs = 2 [default=true]; - optional bool use_replay = 3 [default=false]; - optional bool use_sim = 4 [default=true]; -} - -message PlatformMap -{ - // PLATFORM_MDP3ONIXS - optional string glbx_platform = 1 [default = "PLATFORM_SIM"]; - // PLATFORM_ICEONIXS - optional string ice_platform = 2 [default = "PLATFORM_ICEONIXS"]; -} - -// LOCAL TIME -message MDBootDelayWindow { - message TimeSpan { - optional string start = 1 [default = "16:30"]; - optional string end = 2 [default = "16:40"]; - } - optional uint32 delay_seconds = 1 [default = 120]; - optional TimeSpan standard = 2; - optional TimeSpan sunday = 3; -} - - -// -// Options that apply to market data server -// - -message PublisherOptions -{ - // removed 2 - optional string network_interface = 3 [default = "0.0.0.0"]; - // Supply either network_interface -or- network_interface_[a,b] - optional string network_interface_a = 30; - optional string network_interface_b = 31; - // removed 4,5 - // removed 6,7,8 - optional string channel_prefix = 9 [default = ""]; - - // Co2 options - - // How old can the heartbeat be before it's considered dead - optional uint32 heartbeat_ms = 10 [default = 5000]; - optional bool disable_heartbeat = 11 [default = false]; - optional uint32 heartbeat_boot_seconds = 12 [default = 60]; // 1 minute grace period from shm creation - - optional bool skip_options = 13 [default = true]; - - optional uint32 hot_initial = 20 [default = 1024]; - optional uint32 hot_growth = 21 [default = 1024]; - optional uint32 cold_initial = 22 [default = 8192]; - optional uint32 cold_growth = 23 [default = 2048]; -} - -message ICEPublisherOptions -{ - optional string network_interface = 3 [default = "0.0.0.0"]; - // Supply either network_interface -or- network_interface_[a,b] - optional string network_interface_a = 30; - optional string network_interface_b = 31; -} - -message PlatformConfig -{ - required string platform = 1; - optional string exchange = 2 [default = "VENUE_UNSET"]; - optional string type = 3 [default = "SECURITYTYPE_UNSET"]; -} - -message StreamOptions -{ - optional uint32 trade_log_stream_size = 2 [default = 1024]; -} - -message PublisherNamespace { - optional string shared_memory_namespace = 1; -} - -// -// CME Options -// -message CMEOptions -{ - enum OnixSLogMode { - None = 0; - Important = 10; - Regular = 50; - Debug = 100; - } - message FeedEngineSettings { - optional string name = 1; - // If num_threads is set it will use that - otherwise it will use channels_per_thread and the number of threads configured for this channel to determine the number of threads - optional uint32 num_threads = 2 [default = 1]; - // Defines amount of time Feed Engine spends on socket waiting for I/O while running master processing loop. - optional uint32 data_wait = 3 [default = 10]; - // Defines amount of time Feed Engine keeps cycling before going to sleep when no useful activity can be done - optional uint32 spin_time = 4 [default = 1]; - optional uint32 channels_per_thread = 5 [default = 3]; - // rmem_max - optional uint32 udp_socket_buffer_size = 11 [default = 268435456]; //256mb - } - message CMEChannel { - repeated string id = 2; - optional string feed_engine = 3 [default = "default"]; - - - // for re-orders - optional uint32 max_gap_recovery_cache_size = 11 [default = 6]; - // for re-orders - optional uint32 lost_packet_wait_timeout_ms = 12 [default = 10]; - - optional OnixSLogMode onixs_log_mode = 13 [default = Important]; - // If using both feeds prefer the B feed for snapshots - optional bool prefer_backup_feeds = 15 [default = false]; - - optional bool use_tcp_replay = 20 [default = true]; - optional string tcp_replay_username = 21 [default = "MDPFFBLUE"]; - optional string tcp_replay_password = 22 [default = "password01"]; - optional int32 tcp_replay_connect_attempts = 23 [default = 3]; - optional int32 tcp_replay_reconnect_interval_ms = 24 [default = 30000]; - optional int32 tcp_replay_timeout_s = 25 [default = 10]; - - optional uint32 recovery_queue_size = 30 [default = 640000]; - optional bool use_natural_refresh = 31 [default = false]; - optional bool join_snapshot_on_gap = 32 [default = false]; - - optional bool load_security_db = 33 [default = true]; - reserved 34; - // optional BookType book_type = 34 [default = BOOKTYPE_CONSOLIDATED]; - optional bool validate_mbo = 35 [default = false]; - - } - // optional string onixs_license = 1 [default = "{default}"]; - reserved 1; - repeated CMEChannel channel = 3; - repeated FeedEngineSettings feed_engine = 5; - - // Prevents parsing trades/rfqs/doing anything not required for quoting - optional bool quoter_mode = 6; - optional bool verbose_ticker = 7 [default=false]; -} - -// -// ICE Options -// -message ICEOptions -{ - enum OnixSLogMode { - Fatal = 0; - Error = 1; - Warning = 2; - Info = 3; - Trace = 4; - Debug = 5; - } - - //A channel is one onixs-ice thread - message ICEChannel { - required string name = 1; - repeated uint32 market_type = 2; - repeated uint32 uds_market_type = 7; - optional uint32 udp_buffer_size = 3 [default = 4194304]; //4mb - optional uint32 heartbeat_interval = 4 [default = 36000]; - optional uint32 sequence_gap_margin = 5 [default = 10000]; - optional uint32 gap_timeout_in_ms = 6 [default = 10000]; - - optional int32 snapshot_recovery_timeout_in_ms = 10 [default = -1]; - optional int32 maximum_number_of_snapshot_recovery_attempts = 11 [default = -1]; - optional int32 maximum_size_of_snapshot_message_queue = 12 [default = -1]; - optional int32 maximum_size_of_live_message_queue = 13 [default = 200000]; - - optional string processing_thread_affinity = 20 [default = ""]; - optional bool track_top_of_the_book_only = 30 [default = false]; - optional bool receive_product_definitions_only = 31 [default = false]; - optional uint32 max_multicast_message_block_size = 32 [default = 1400]; - optional string product_definition_cache_directory = 35 [default = ""]; - - optional OnixSLogMode onixs_log_mode = 40 [default = Warning]; - optional bool load_security_db = 41 [default = true]; - } - - // optional string onixs_license = 1 [default = "{default}"]; - reserved 1; - optional string ice_config_file = 2 [default = "ConnectivityConfiguration.Production.xml"]; - repeated ICEChannel channel = 3; -} - -message OnixsOptions { - optional string onixs_license = 1 [default = "{default}"]; -} - -message RecordOptions { -// optional string output_path = 2 [default = "/home/bts/md/today"]; - optional bool enable_depth = 3 [default = false]; - optional bool enable_future_depth = 4 [default = true]; - optional bool record_sim = 5 [default=false]; -} - -// If starting on Sunday pre-load the selected symbols from disk -message SecurityPreload { - repeated string symbol = 1; -} - -// -// Replay options -// -message ReplayOptions { - // Tired of fighting with dns - optional string url = 1 [default = "http://10.96.18.45/spark/futures.coconut"]; - - // 2.0 = double speed, 0.5 = half speed - optional double speed = 11 [default = 1.0]; - - optional bool interactive = 12 [default = false]; - - optional string fallback = 20 [default ="data_files/futures.coconut"]; -} - -message RelayOptions { - optional uint32 naggle_ms = 1 [default = 100]; - optional uint32 security_scan_interval = 2 [default = 500]; - optional uint32 recovery_interval = 3 [default = 30000]; -} - -message CMETradingSchedule { - // we can elaborate later, but for now it's very simple: - // this is "hours after midnight, in Central Time" - optional double gen_open_hour = 1 [default = 8.5]; // 8:30 am CT -} - -message SecurityExpirationCutoff { - optional uint32 max_days_after_expiration =1 [default = 7]; -} - -message DisplayFactorOverride { - message Override { - required string symbol = 1; - required string exchange = 2; - optional string type = 3; - optional double price_multiplier = 10; - } - repeated Override override = 1; -} - -message FeedHandlerConfig { - repeated string channel = 1; - optional string network_interface_a = 3 [default = "0.0.0.0"]; - optional string network_interface_b = 4 [default = ""]; -} \ No newline at end of file diff --git a/src/lib/config/protos/Ports.proto b/src/lib/config/protos/Ports.proto deleted file mode 100644 index 2176315c1..000000000 --- a/src/lib/config/protos/Ports.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax='proto2'; -package bts.config; - -message Ports { - // see ports.conf for actual defaults - optional int32 config_port = 1 ; - optional int32 qbus_port = 2 ; - optional int32 glbx_sim_fix_port = 3 ; - optional int32 ice_sim_fix_port = 5 ; - optional int32 replicator_port = 4 ; -} diff --git a/src/lib/config/protos/UI.proto b/src/lib/config/protos/UI.proto deleted file mode 100644 index 60007a108..000000000 --- a/src/lib/config/protos/UI.proto +++ /dev/null @@ -1,207 +0,0 @@ -syntax='proto2'; -package bts.config; - -message Shell -{ - repeated string modules = 1; - //optional bool enable_diagnostics = 2 [default = false]; - // optional int32 launcher_style = 3 [default = 3]; -} - -// Save the UI state every 5 minutes by default -message ShellSettingsConfig { - optional uint32 save_timer = 1 [default = 300]; -} - -message ShellRenderMode { - optional bool software_only = 1 [default = false]; -} - -message IShellModuleProps -{ - message ModuleProps - { - optional string name = 1; - optional bool visible = 2 [default = true]; - } - - repeated ModuleProps module = 1; -} - -message GridSettings { - optional string font_family = 1 [default = "Calibri"]; - optional float font_size = 2 [default = 10]; - optional string locale = 3 [default = "en-us"]; - - optional uint32 row_height = 10 [default = 16]; - optional uint32 col_width = 11 [default = 75]; - - // Default grid colors - optional uint32 color_background = 20 [default = 0xFFFFFF]; // White - optional uint32 color_foreground = 21 [default = 0]; // Black - optional uint32 color_grid_line = 22 [default = 0x778899]; // LightSlateGray -} - -message ShellLimits { - optional bool kill_on_close = 1 [default = true]; - optional uint64 limit_memory_mb = 2; - optional uint64 limit_group_memory_mb = 3; -} - -message MultiThreadedWindows { - optional bool market_view = 1 [default = true]; - optional bool time_and_sales = 2 [default = true]; - optional bool order_book = 3 [default = true]; - optional bool fills = 4 [default = true]; - optional bool manual_fills = 9 [default = true]; - optional bool pnl = 5 [default = true]; - optional bool algo_studio = 6 [default = true]; - optional bool ladder = 7 [default = true]; - optional bool synthetic_management = 8 [default = true]; - optional bool vol_surface = 10 [default = true]; -} - -message LadderKnobs { - // priorities (ordered): SystemIdle, ApplicationIdle, ContextIdle, Background, Input, Loaded, Render, DataBind, Normal, Send - // It seems like all priorities higher than ApplicationIdle choke the main thread. - optional string priority = 1 [default = "ApplicationIdle"]; - optional double interval_ms = 2 [default = 100]; - optional uint32 seconds_to_recenter = 3 [default = 300]; - optional uint32 max_open_ladders = 4 [default = 75]; - optional uint32 security_timeout_secs = 5 [default = 60]; - optional bool open_algo_popup_on_select = 6 [default = false]; - optional bool use_algo_param_grid = 7 [default = true]; - optional uint32 max_mbo_orders = 8 [default = 200]; - optional bool show_scrollbar = 9 [default = false]; - // DJ wants bid/ask cells with markets (i.e., size > 0) to have a - // lighter background than those without markets. - optional bool lighten_market_cells = 10 [default = true]; - - // For market cell backgrounds, 0 means 'ignore this color setting' - // (i.e., employ the ladder's default behavior instead). - // - // Note that despite reserving the value 0 as a flag, the full range of - // colors can still be expressed. Zero is one of 2^24 representations - // of 'transparent.' - // - // The channels alpha, red, green, and blue are stored in the - // 1-4th bytes respectively. For example: - // Transparent: 0x00XXXXXX (any value with the first byte set to 0) - // Pure Red : 0xFFFF0000 - // Pure Blue : 0xFF00FF00 - // Pure Green : 0xFF0000FF - optional uint32 bid_market_cell_background = 11; - optional uint32 ask_market_cell_background = 12; - optional bool mimic_tt = 13 [default = true]; - // Defines the number of price rows rendered by the ladder. The smaller this - // window is, the cheaper it is to render the ladder grid (redraw prices, - // sizes, etc.). However, if the window is too small, scrolling may appear - // choppy. - optional uint32 scrollable_tick_window_size = 14 [default = 256]; -} - -message OrderBookOptions { - optional bool animate_child_order_rows = 1 [default = false]; - optional double status_color_opacity_when_selected = 2 [default = 0.35]; - optional bool can_edit_specific_algo_params = 3 [default = false]; -} - -message OrderTicketOptions { - optional bool close_on_send = 1 [default = true]; -} - -message OrderAlerts { - // when the client sees an order for the first time, - // this time period is used to determine if the order is actually new, - // or [presumably]just arrived bc shell is still initializing, or the server restarted. - optional int32 stale_order_threshold_seconds = 1 [default = 60]; -} - -message ShellPingOptions { - optional bool shell_ping_is_enabled = 1 [default = true]; - optional int32 workloop_milliseconds_interval = 2 [default = 5000]; - // 4000 is default Windows ping timeout as specified here: - // https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490968(v=technet.10) - optional int32 timeout_milliseconds_threshold = 3 [default = 4000]; - optional int32 logging_milliseconds_threshold = 4 [default = 50]; - optional int32 maximum_backoff_milliseconds = 5 [default = 60000]; -} - -message PNLOptions { - optional bool show_new_pnl = 1 [default = true]; - optional bool show_old_pnl = 2 [default = false]; - optional bool show_pause_resume = 3 [default = false]; - optional bool enable_animations = 4 [default = false]; -} - -message TimeAndSalesOptions { - // Adds a 'pause/resume updates' toggle button to the spark menu if set to true. - // This may be helpful when debugging, or diagnosing problems. - optional bool can_pause_updates = 1 [default = false]; -} - -message AlgoStudioOptions { - enum ModelType { - FlatDefinitions = 0; - DefinitionsAndTemplates = 1; - } - - optional bool can_modify_definition_name = 1 [default = true]; - optional bool can_modify_definition_values = 2 [default = true]; - optional bool can_modify_definition_structure = 3 [default = true]; - optional bool can_save_specific = 4 [default = false]; - optional bool can_undo_redo = 5 [default = false]; - - // Props below are vestiges from the algo 'template' model in the original spec (as opposed to the 'flat' definition model used now). - // ------------------------------------------------------------------- - // optional bool include_custom_templates = 6 [default = true]; - // optional bool include_legacy_custom_templates = 7 [default = true]; - // optional bool show_badges_in_tree_view = 8 [default = false]; - // optional AddTemplateButton add_template_button = 9 [default = None]; - // optional ModelType model_type = 10 [default = FlatDefinitions]; - // ------------------------------------------------------------------- - - optional bool show_algo_toolbar_rename = 11 [default = false]; - optional bool show_algo_toolbar_revert = 12 [default = false]; - optional bool show_algo_toolbar_save = 13 [default = false]; - optional bool show_algo_toolbar_undo_redo = 14 [default = false]; -} - -// TODO: The following algo-type specific attach ui messages should be consolidated into a single location, along with other algo-type metadata. -message CoverAttachUIOptions { - optional bool show_price = 1 [default = false]; - optional bool show_quantity = 2 [default = false]; -} - -message JoinAttachUIOptions { - optional bool show_price = 1 [default = false]; - optional bool show_quantity = 2 [default = false]; -} - -message LeanAttachUIOptions { - optional bool show_price = 1 [default = false]; - optional bool show_quantity = 2 [default = false]; -} - -message TopAttachUIOptions { - optional bool show_price = 1 [default = false]; - optional bool show_quantity = 2 [default = false]; -} - -message OffsetAttachUIOptions { - optional bool show_price = 1 [default = false]; - optional bool show_quantity = 2 [default = false]; -} - -message ManualFillsOptions { - optional bool modal_transactions = 1 [default = true]; -} - -message SymbolUIConfigurationItem { - optional string symbol = 1 [default = ""]; - optional uint32 display_quantity_divisor = 2 [default = 1]; -} - -message SymbolUIConfiguration { - repeated SymbolUIConfigurationItem items = 1; -} diff --git a/src/lib/config/protos/algo_types.proto b/src/lib/config/protos/algo_types.proto new file mode 100644 index 000000000..b3def0682 --- /dev/null +++ b/src/lib/config/protos/algo_types.proto @@ -0,0 +1,22 @@ +syntax = 'proto2'; +package bts.config; + +message AlgoTypeContext { + repeated string exchanges = 1; + repeated string symbols = 2; + repeated string security_types = 3; +} + +message AlgoTypeDef { + optional string name = 1; + optional bool is_attachable = 2 [ default = false ]; +} + +message AlgoTypeRule { + optional AlgoTypeContext context = 1; + repeated AlgoTypeDef algos = 2; +} + +message AlgoTypeRuleSet { + repeated AlgoTypeRule rules = 1; +} diff --git a/src/lib/config/protos/cme_reference_data.proto b/src/lib/config/protos/cme_reference_data.proto index 4aba79684..98529a0ba 100644 --- a/src/lib/config/protos/cme_reference_data.proto +++ b/src/lib/config/protos/cme_reference_data.proto @@ -1,11 +1,11 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; import "lib/domain_model/Security.proto"; message CppConfig { - map cpp_entry = 1; + map cpp_entry = 1; } message CmeSymbolMics { - map cme_mic = 1; + map cme_mic = 1; } \ No newline at end of file diff --git a/src/lib/config/protos/exchange_sim_cfg.proto b/src/lib/config/protos/exchange_sim_cfg.proto new file mode 100644 index 000000000..1a64a7090 --- /dev/null +++ b/src/lib/config/protos/exchange_sim_cfg.proto @@ -0,0 +1,14 @@ +syntax = 'proto2'; +package bts.config; + +message ExchangeSim { + optional bool merge_with_md = 1 [ default = true ]; + optional bool forward_implied = 2 [ default = false ]; + oneof source { + string replay_url = 11 + [ default = "http://10.96.18.45/spark/futures.coconut" ]; + string replay_file = 12 [ default = "futures.coconut" ]; + bool local_relay = 13; + } + optional uint32 orders_per_level = 20 [ default = 10 ]; +} diff --git a/src/lib/config/protos/jetfix.proto b/src/lib/config/protos/jetfix.proto index 22426e072..8e427c91a 100644 --- a/src/lib/config/protos/jetfix.proto +++ b/src/lib/config/protos/jetfix.proto @@ -1,4 +1,4 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; message JetFIX { @@ -7,88 +7,92 @@ message JetFIX { required string name = 10; enum JetFIXPlatform { - GLBX = 1; - CBOE = 6; - SIM = 2; - ICE = 3; - SIMICE = 4; + GLBX = 1; + CBOE = 6; + SIM = 2; + ICE = 3; + SIMICE = 4; } - optional JetFIXPlatform platform = 15 [default = GLBX]; - + optional JetFIXPlatform platform = 15 [ default = GLBX ]; + // the ip address to connect to required string socket_connect_host_ip = 30; // the port to connect to required uint32 socket_connect_port = 40; - + // time in seconds before reconnect attempt - optional int32 reconnect_interval = 20 [default = 60]; + optional int32 reconnect_interval = 20 [ default = 60 ]; // time of day the FIX session becomes activated (local time) - optional string start_time = 50 [default = "00:30:00"]; + optional string start_time = 50 [ default = "00:30:00" ]; // time of day the FIX session become deactiviated (local time) - optional string end_time = 60 [ default = "23:30:00"]; + optional string end_time = 60 [ default = "23:30:00" ]; // time in seconds between heartbeat messages (typically 30) - optional int32 seconds_between_hbs = 70 [default = 30]; + optional int32 seconds_between_hbs = 70 [ default = 30 ]; // maximum number of incoming hbs we can miss before we close // the connection - optional int32 max_missed_hbs = 75 [default = 2]; + optional int32 max_missed_hbs = 75 [ default = 2 ]; - // day of the week (local time) when the fix session starts (blank for every day) - optional string start_day = 80; + // day of the week (local time) when the fix session starts (blank for every + // day) + optional string start_day = 80; - // day of the week (local time) when the fix session ends (blank for every day) + // day of the week (local time) when the fix session ends (blank for every + // day) optional string end_day = 90; - optional string sender_compid = 100 [default = ""]; - optional string target_compid = 110 [default = ""]; - optional string sender_subid = 120 [default = ""]; - optional string target_subid = 130 [default = ""]; - optional string sender_locationid = 135 [default = "US,NC"]; - optional string raw_data = 136 [default =""]; - optional string user_name = 138 [default =""]; - optional string self_match_prevention_id = 140 [default=""]; - optional string cti_code = 145 [default="1"]; - optional int32 customer_or_firm = 147 [default=1]; - optional string mm_account = 150 [default = ""]; + optional string sender_compid = 100 [ default = "" ]; + optional string target_compid = 110 [ default = "" ]; + optional string sender_subid = 120 [ default = "" ]; + optional string target_subid = 130 [ default = "" ]; + optional string sender_locationid = 135 [ default = "US,NC" ]; + optional string raw_data = 136 [ default = "" ]; + optional string user_name = 138 [ default = "" ]; + optional string self_match_prevention_id = 140 [ default = "" ]; + optional string cti_code = 145 [ default = "1" ]; + optional int32 customer_or_firm = 147 [ default = 1 ]; + optional string mm_account = 150 [ default = "" ]; - optional int32 quote_entries_per_message = 160 [default = 15]; - optional int32 registered_instrument_group_count = 170 [default = 100]; - optional int32 seconds_to_pause = 180 [default = 35]; - optional int32 seconds_to_logon = 185 [default = 5]; - optional int32 seconds_to_logout = 190 [default = 5]; - optional int32 seconds_between_syncs = 200 [default = 3]; + optional int32 quote_entries_per_message = 160 [ default = 15 ]; + optional int32 registered_instrument_group_count = 170 [ default = 100 ]; + optional int32 seconds_to_pause = 180 [ default = 35 ]; + optional int32 seconds_to_logon = 185 [ default = 5 ]; + optional int32 seconds_to_logout = 190 [ default = 5 ]; + optional int32 seconds_between_syncs = 200 [ default = 3 ]; - optional uint32 max_qps = 210 [default = 750]; + optional uint32 max_qps = 210 [ default = 750 ]; - optional uint32 max_spt = 214 [default = 100]; - optional uint32 max_spt_window_secs = 217 [default = 3]; + optional uint32 max_spt = 214 [ default = 100 ]; + optional uint32 max_spt_window_secs = 217 [ default = 3 ]; - optional uint32 max_msgs_in_resend_req = 220 [default = 2499]; + optional uint32 max_msgs_in_resend_req = 220 [ default = 2499 ]; - optional uint32 msg_buffer_sz = 230 [default = 10000000]; - optional uint32 msg_high_water_mark = 240 [default = 2048]; - optional uint32 seconds_to_replay = 250 [default = 600]; - optional bool log_fix_stream = 260 [default=false]; - optional bool use_persisted_quote_ids = 270 [default=true]; - optional uint32 quote_id_reservation_size = 290 [default=100000]; - required uint32 cme_market_segment_id = 320; + optional uint32 msg_buffer_sz = 230 [ default = 10000000 ]; + optional uint32 msg_high_water_mark = 240 [ default = 2048 ]; + optional uint32 seconds_to_replay = 250 [ default = 600 ]; + optional bool log_fix_stream = 260 [ default = false ]; + optional bool use_persisted_quote_ids = 270 [ default = true ]; + optional uint32 quote_id_reservation_size = 290 [ default = 100000 ]; + required uint32 cme_market_segment_id = 320; - optional string trading_session_id = 330 [default=""]; - optional int32 udf_support_indicator = 340 [default=1]; - optional bool use_cme_secure_logon = 341 [default=true]; - optional bool auto_cert_mode = 342 [default=false]; - optional int32 price_encoding_precision = 343 [default=8]; - optional uint32 max_order_msgs_per_window = 344 [default=166]; // At the CME 166 ~= 500 / 3 - optional uint32 window_duration_msecs = 345 [default=1000]; // leave it alone + optional string trading_session_id = 330 [ default = "" ]; + optional int32 udf_support_indicator = 340 [ default = 1 ]; + optional bool use_cme_secure_logon = 341 [ default = true ]; + optional bool auto_cert_mode = 342 [ default = false ]; + optional int32 price_encoding_precision = 343 [ default = 8 ]; + optional uint32 max_order_msgs_per_window = 344 + [ default = 166 ]; // At the CME 166 ~= 500 / 3 + optional uint32 window_duration_msecs = 345 + [ default = 1000 ]; // leave it alone - optional uint32 max_connection_attempts = 346 [default=10]; - optional bool auto_fix_seq_num = 347 [default=false]; - optional bool use_ilink3 = 348 [default=false] ; - } + optional uint32 max_connection_attempts = 346 [ default = 10 ]; + optional bool auto_fix_seq_num = 347 [ default = false ]; + optional bool use_ilink3 = 348 [ default = false ]; + } repeated Connection connection = 10; } @@ -99,22 +103,46 @@ message JetFIXSimConnection { } message CannedCertSession { - required string name = 10 [default =""]; + required string name = 10 [ default = "" ]; } message CMECannedSecureLogon { - required string secure_logon_fil = 10 [ default = -"Session ID Access ID Secret Key Creation Date Expiration Date Environment \n" -"1U7 i9pLY5mVhWLXs7FWNb9X 8esbwiaHaqmR2rXZMkJRHt00fW6l_-ppCGoheWWuBZQ 2018-04-05 2019-04-05 CERT \n" -"1U7 ozXmORijPtJriTg6Wwny A1KOwrhH8GojNotjkCfVwHRSi_OS280xihaRZwJLFKo 2018-04-03 2018-05-03 CERT \n" -"ANS 6ogfYoF54g695tqaHsFC CtDkFnuDuStB1S05nC_pWvANb6FWsV2IMNKkmM3EcP4 2018-04-05 2019-04-05 NEWRELEASE \n" -"KTK IrUp518ekr8SzbfJGdPZ QmilC-cKgqlIiIBs_BV59fowbPfuBWn0QjeEc1dYj38 2018-04-05 2019-04-05 NEWRELEASE \n" -"M5Y bUFtyvZgPhZFCYa434ap rfZ2XLLwtHt26szWwMxYRw9uPb7jE4evEWaKuKf2uyU 2018-04-05 2019-04-05 CERT \n" -"MBX tbna9JLxT4Jlrzj0wtSS EcYqrLmR4ysSIT_NCBeC2AjDo7IAHsVZ0rOZ0cpAh_o 2018-04-05 2019-04-05 CERT \n" -"MC1 0N10hKkE2B2KUt86ewd8 dJ5I52JNA-6aZZ8hnO0byVKcyqA8Of6kkstfIF89AAM 2018-04-05 2019-04-05 CERT \n" -"MC5 e4uBmhQ1ebaXAeWHa7HK PNOM86eofsiCwzzKUsB5yAmrNoyZypnYD72pT2A8zgc 2018-04-05 2019-04-05 CERT \n" -"MC7 S6KfCnay5UJ67P55ibHd 5lSs1TbX7N0p6Duu63_JDMghPUqBAWacvkM91MUv1uM 2018-04-05 2019-04-05 CERT \n" -"MC8 AbEEtBn63WIAuItPDz1c n3ndjYb03Hx6wBO3me35HoONyDgO5TZKWk0tDSaX9KA 2018-04-05 2019-04-05 CERT \n" -"T39 UWggBgHWAe07aqW3ps2I tbb3it0rUQSSTa0TC9QcRwkrHEMDLWhaJH4VQ0FqGB4 2018-04-05 2019-04-05 NEWRELEASE \n" - ]; + required string secure_logon_fil = 10 + [ default = + "Session ID Access ID Secret Key " + " Creation Date " + "Expiration Date Environment \n" + "1U7 i9pLY5mVhWLXs7FWNb9X " + "8esbwiaHaqmR2rXZMkJRHt00fW6l_-ppCGoheWWuBZQ 2018-04-05 " + " 2019-04-05 CERT \n" + "1U7 ozXmORijPtJriTg6Wwny " + "A1KOwrhH8GojNotjkCfVwHRSi_OS280xihaRZwJLFKo 2018-04-03 " + " 2018-05-03 CERT \n" + "ANS 6ogfYoF54g695tqaHsFC " + "CtDkFnuDuStB1S05nC_pWvANb6FWsV2IMNKkmM3EcP4 2018-04-05 " + " 2019-04-05 NEWRELEASE \n" + "KTK IrUp518ekr8SzbfJGdPZ " + "QmilC-cKgqlIiIBs_BV59fowbPfuBWn0QjeEc1dYj38 2018-04-05 " + " 2019-04-05 NEWRELEASE \n" + "M5Y bUFtyvZgPhZFCYa434ap " + "rfZ2XLLwtHt26szWwMxYRw9uPb7jE4evEWaKuKf2uyU 2018-04-05 " + " 2019-04-05 CERT \n" + "MBX tbna9JLxT4Jlrzj0wtSS " + "EcYqrLmR4ysSIT_NCBeC2AjDo7IAHsVZ0rOZ0cpAh_o 2018-04-05 " + " 2019-04-05 CERT \n" + "MC1 0N10hKkE2B2KUt86ewd8 " + "dJ5I52JNA-6aZZ8hnO0byVKcyqA8Of6kkstfIF89AAM 2018-04-05 " + " 2019-04-05 CERT \n" + "MC5 e4uBmhQ1ebaXAeWHa7HK " + "PNOM86eofsiCwzzKUsB5yAmrNoyZypnYD72pT2A8zgc 2018-04-05 " + " 2019-04-05 CERT \n" + "MC7 S6KfCnay5UJ67P55ibHd " + "5lSs1TbX7N0p6Duu63_JDMghPUqBAWacvkM91MUv1uM 2018-04-05 " + " 2019-04-05 CERT \n" + "MC8 AbEEtBn63WIAuItPDz1c " + "n3ndjYb03Hx6wBO3me35HoONyDgO5TZKWk0tDSaX9KA 2018-04-05 " + " 2019-04-05 CERT \n" + "T39 UWggBgHWAe07aqW3ps2I " + "tbb3it0rUQSSTa0TC9QcRwkrHEMDLWhaJH4VQ0FqGB4 2018-04-05 " + " 2019-04-05 NEWRELEASE \n" ]; } diff --git a/src/lib/config/protos/keycode.proto b/src/lib/config/protos/keycode.proto index e4301a6df..a0c3d1fc1 100644 --- a/src/lib/config/protos/keycode.proto +++ b/src/lib/config/protos/keycode.proto @@ -1,23 +1,20 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; -message KeyCode -{ - optional uint32 nusers = 10; - optional uint64 expiration = 20; - optional uint64 generation_time = 30; - - optional string ip = 40; - optional string port = 50; - optional bool allow_concurrent = 60; +message KeyCode { + optional uint32 nusers = 10; + optional uint64 expiration = 20; + optional uint64 generation_time = 30; + + optional string ip = 40; + optional string port = 50; + optional bool allow_concurrent = 60; } -message EncryptedKeyCode -{ - optional string keycode = 10; +message EncryptedKeyCode { + optional string keycode = 10; } -message PublicKey -{ - optional string key = 10; +message PublicKey { + optional string key = 10; } \ No newline at end of file diff --git a/src/lib/config/protos/logging.proto b/src/lib/config/protos/logging.proto index cda4ccd1f..337a219a0 100644 --- a/src/lib/config/protos/logging.proto +++ b/src/lib/config/protos/logging.proto @@ -1,4 +1,4 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; @@ -7,14 +7,16 @@ message Logging { required string name = 1; required string level = 2; } + message SinkConfig { - optional string default_level = 2 [default="Info"]; + optional string default_level = 2 [ default = "Info" ]; repeated SubsystemConfig subsystem = 3; } + required SinkConfig console = 1; required SinkConfig syslog = 2; required SinkConfig file = 5; - optional uint32 initial_queue_size = 3 [default=120001]; - optional uint32 max_queue_growth = 4 [default=4]; + optional uint32 initial_queue_size = 3 [ default = 120001 ]; + optional uint32 max_queue_growth = 4 [ default = 4 ]; } diff --git a/src/lib/config/protos/market_data.proto b/src/lib/config/protos/market_data.proto new file mode 100644 index 000000000..e84c36e93 --- /dev/null +++ b/src/lib/config/protos/market_data.proto @@ -0,0 +1,254 @@ +syntax = 'proto2'; +package bts.md; + +message MarketDataConfig { + // Allows you to turn off in-proc market data entirely + optional bool use_md = 1 [ default = true ]; + optional bool use_onixs = 2 [ default = true ]; + optional bool use_replay = 3 [ default = false ]; + optional bool use_sim = 4 [ default = true ]; +} + +message PlatformMap { + // PLATFORM_MDP3ONIXS + optional string glbx_platform = 1 [ default = "PLATFORM_SIM" ]; + // PLATFORM_ICEONIXS + optional string ice_platform = 2 [ default = "PLATFORM_ICEONIXS" ]; +} + +// LOCAL TIME +message MDBootDelayWindow { + message TimeSpan { + optional string start = 1 [ default = "16:30" ]; + optional string end = 2 [ default = "16:40" ]; + } + optional uint32 delay_seconds = 1 [ default = 120 ]; + optional TimeSpan standard = 2; + optional TimeSpan sunday = 3; +} + +// +// Options that apply to market data server +// + +message PublisherOptions { + // removed 2 + optional string network_interface = 3 [ default = "0.0.0.0" ]; + // Supply either network_interface -or- network_interface_[a,b] + optional string network_interface_a = 30; + optional string network_interface_b = 31; + // removed 4,5 + // removed 6,7,8 + optional string channel_prefix = 9 [ default = "" ]; + + // Co2 options + + // How old can the heartbeat be before it's considered dead + optional uint32 heartbeat_ms = 10 [ default = 5000 ]; + optional bool disable_heartbeat = 11 [ default = false ]; + optional uint32 heartbeat_boot_seconds = 12 + [ default = 60 ]; // 1 minute grace period from shm creation + + optional bool skip_options = 13 [ default = true ]; + + optional uint32 hot_initial = 20 [ default = 1024 ]; + optional uint32 hot_growth = 21 [ default = 1024 ]; + optional uint32 cold_initial = 22 [ default = 8192 ]; + optional uint32 cold_growth = 23 [ default = 2048 ]; +} + +message ICEPublisherOptions { + optional string network_interface = 3 [ default = "0.0.0.0" ]; + // Supply either network_interface -or- network_interface_[a,b] + optional string network_interface_a = 30; + optional string network_interface_b = 31; +} + +message PlatformConfig { + required string platform = 1; + optional string exchange = 2 [ default = "VENUE_UNSET" ]; + optional string type = 3 [ default = "SECURITYTYPE_UNSET" ]; +} + +message StreamOptions { + optional uint32 trade_log_stream_size = 2 [ default = 1024 ]; +} + +message PublisherNamespace { + optional string shared_memory_namespace = 1; +} + +// +// CME Options +// +message CMEOptions { + enum OnixSLogMode { + None = 0; + Important = 10; + Regular = 50; + Debug = 100; + } + message FeedEngineSettings { + optional string name = 1; + // If num_threads is set it will use that - otherwise it will use + // channels_per_thread and the number of threads configured for this channel + // to determine the number of threads + optional uint32 num_threads = 2 [ default = 1 ]; + // Defines amount of time Feed Engine spends on socket waiting for I/O while + // running master processing loop. + optional uint32 data_wait = 3 [ default = 10 ]; + // Defines amount of time Feed Engine keeps cycling before going to sleep + // when no useful activity can be done + optional uint32 spin_time = 4 [ default = 1 ]; + optional uint32 channels_per_thread = 5 [ default = 3 ]; + // rmem_max + optional uint32 udp_socket_buffer_size = 11 [ default = 268435456 ]; // 256mb + } + message CMEChannel { + repeated string id = 2; + optional string feed_engine = 3 [ default = "default" ]; + + // for re-orders + optional uint32 max_gap_recovery_cache_size = 11 [ default = 6 ]; + // for re-orders + optional uint32 lost_packet_wait_timeout_ms = 12 [ default = 10 ]; + + optional OnixSLogMode onixs_log_mode = 13 [ default = Important ]; + // If using both feeds prefer the B feed for snapshots + optional bool prefer_backup_feeds = 15 [ default = false ]; + + optional bool use_tcp_replay = 20 [ default = true ]; + optional string tcp_replay_username = 21 [ default = "MDPFFBLUE" ]; + optional string tcp_replay_password = 22 [ default = "password01" ]; + optional int32 tcp_replay_connect_attempts = 23 [ default = 3 ]; + optional int32 tcp_replay_reconnect_interval_ms = 24 [ default = 30000 ]; + optional int32 tcp_replay_timeout_s = 25 [ default = 10 ]; + + optional uint32 recovery_queue_size = 30 [ default = 640000 ]; + optional bool use_natural_refresh = 31 [ default = false ]; + optional bool join_snapshot_on_gap = 32 [ default = false ]; + + optional bool load_security_db = 33 [ default = true ]; + reserved 34; + // optional BookType book_type = 34 [default = BOOKTYPE_CONSOLIDATED]; + optional bool validate_mbo = 35 [ default = false ]; + } + // optional string onixs_license = 1 [default = "{default}"]; + reserved 1; + repeated CMEChannel channel = 3; + repeated FeedEngineSettings feed_engine = 5; + + // Prevents parsing trades/rfqs/doing anything not required for quoting + optional bool quoter_mode = 6; + optional bool verbose_ticker = 7 [ default = false ]; +} + +// +// ICE Options +// +message ICEOptions { + enum OnixSLogMode { + Fatal = 0; + Error = 1; + Warning = 2; + Info = 3; + Trace = 4; + Debug = 5; + } + + // A channel is one onixs-ice thread + message ICEChannel { + required string name = 1; + repeated uint32 market_type = 2; + repeated uint32 uds_market_type = 7; + optional uint32 udp_buffer_size = 3 [ default = 4194304 ]; // 4mb + optional uint32 heartbeat_interval = 4 [ default = 36000 ]; + optional uint32 sequence_gap_margin = 5 [ default = 10000 ]; + optional uint32 gap_timeout_in_ms = 6 [ default = 10000 ]; + + optional int32 snapshot_recovery_timeout_in_ms = 10 [ default = -1 ]; + optional int32 maximum_number_of_snapshot_recovery_attempts = 11 + [ default = -1 ]; + optional int32 maximum_size_of_snapshot_message_queue = 12 [ default = -1 ]; + optional int32 maximum_size_of_live_message_queue = 13 [ default = 200000 ]; + + optional string processing_thread_affinity = 20 [ default = "" ]; + optional bool track_top_of_the_book_only = 30 [ default = false ]; + optional bool receive_product_definitions_only = 31 [ default = false ]; + optional uint32 max_multicast_message_block_size = 32 [ default = 1400 ]; + optional string product_definition_cache_directory = 35 [ default = "" ]; + + optional OnixSLogMode onixs_log_mode = 40 [ default = Warning ]; + optional bool load_security_db = 41 [ default = true ]; + } + + // optional string onixs_license = 1 [default = "{default}"]; + reserved 1; + optional string ice_config_file = 2 + [ default = "ConnectivityConfiguration.Production.xml" ]; + repeated ICEChannel channel = 3; +} + +message OnixsOptions { + optional string onixs_license = 1 [ default = "{default}" ]; +} + +message RecordOptions { + // optional string output_path = 2 [default = "/home/bts/md/today"]; + optional bool enable_depth = 3 [ default = false ]; + optional bool enable_future_depth = 4 [ default = true ]; + optional bool record_sim = 5 [ default = false ]; +} + +// If starting on Sunday pre-load the selected symbols from disk +message SecurityPreload { + repeated string symbol = 1; +} + +// +// Replay options +// +message ReplayOptions { + // Tired of fighting with dns + optional string url = 1 + [ default = "http://10.96.18.45/spark/futures.coconut" ]; + + // 2.0 = double speed, 0.5 = half speed + optional double speed = 11 [ default = 1.0 ]; + + optional bool interactive = 12 [ default = false ]; + + optional string fallback = 20 [ default = "data_files/futures.coconut" ]; +} + +message RelayOptions { + optional uint32 naggle_ms = 1 [ default = 100 ]; + optional uint32 security_scan_interval = 2 [ default = 500 ]; + optional uint32 recovery_interval = 3 [ default = 30000 ]; +} + +message CMETradingSchedule { + // we can elaborate later, but for now it's very simple: + // this is "hours after midnight, in Central Time" + optional double gen_open_hour = 1 [ default = 8.5 ]; // 8:30 am CT +} + +message SecurityExpirationCutoff { + optional uint32 max_days_after_expiration = 1 [ default = 7 ]; +} + +message DisplayFactorOverride { + message Override { + required string symbol = 1; + required string exchange = 2; + optional string type = 3; + optional double price_multiplier = 10; + } + repeated Override override = 1; +} + +message FeedHandlerConfig { + repeated string channel = 1; + optional string network_interface_a = 3 [ default = "0.0.0.0" ]; + optional string network_interface_b = 4 [ default = "" ]; +} \ No newline at end of file diff --git a/src/lib/config/protos/mercury_cfg.proto b/src/lib/config/protos/mercury_cfg.proto index 444fab847..ac93a99c6 100644 --- a/src/lib/config/protos/mercury_cfg.proto +++ b/src/lib/config/protos/mercury_cfg.proto @@ -1,7 +1,7 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; -message Mercury { - optional uint32 queue_size = 1 [default=1000]; +message Mercury { + optional uint32 queue_size = 1 [ default = 1000 ]; } diff --git a/src/lib/config/protos/orderman_cfg.proto b/src/lib/config/protos/orderman_cfg.proto index aee3e0802..89b4575dc 100644 --- a/src/lib/config/protos/orderman_cfg.proto +++ b/src/lib/config/protos/orderman_cfg.proto @@ -1,13 +1,13 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; message OrdermanCfg { message Executor { required string thread_name = 1; - optional bool poll = 2 [ default = false]; + optional bool poll = 2 [ default = false ]; repeated string hosted_actor = 3; } repeated Executor executor = 1; - optional uint32 default_iceberg_pause_secs = 2 [default = 0]; - optional string fallback_cust_order_handling_inst = 3 [default = "Y"]; + optional uint32 default_iceberg_pause_secs = 2 [ default = 0 ]; + optional string fallback_cust_order_handling_inst = 3 [ default = "Y" ]; } diff --git a/src/lib/config/protos/orders_fills_cleanup.proto b/src/lib/config/protos/orders_fills_cleanup.proto index 7c15118c7..124b6fc15 100644 --- a/src/lib/config/protos/orders_fills_cleanup.proto +++ b/src/lib/config/protos/orders_fills_cleanup.proto @@ -1,12 +1,12 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; -message OrdersSoftCleanupCutoff{ - optional uint32 extra_days = 10 [default=1]; +message OrdersSoftCleanupCutoff { + optional uint32 extra_days = 10 [ default = 1 ]; } -message SODTime{ - // utc time - optional uint32 sod_hh = 20 [default=16]; - optional uint32 sod_mm = 30 [default=30]; +message SODTime { + // utc time + optional uint32 sod_hh = 20 [ default = 16 ]; + optional uint32 sod_mm = 30 [ default = 30 ]; } \ No newline at end of file diff --git a/src/lib/config/protos/perflog_cfg.proto b/src/lib/config/protos/perflog_cfg.proto index 353f370c5..e72809dde 100644 --- a/src/lib/config/protos/perflog_cfg.proto +++ b/src/lib/config/protos/perflog_cfg.proto @@ -1,8 +1,8 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; message PerfLogCfg { - optional bool active = 1 [default=true]; - optional uint32 max_rows = 3 [default=10000123]; - optional uint32 entry_batch_size = 4 [default=200]; + optional bool active = 1 [ default = true ]; + optional uint32 max_rows = 3 [ default = 10000123 ]; + optional uint32 entry_batch_size = 4 [ default = 200 ]; } diff --git a/src/lib/config/protos/ports.proto b/src/lib/config/protos/ports.proto new file mode 100644 index 000000000..275042ff9 --- /dev/null +++ b/src/lib/config/protos/ports.proto @@ -0,0 +1,11 @@ +syntax = 'proto2'; +package bts.config; + +message Ports { + // see ports.conf for actual defaults + optional int32 config_port = 1; + optional int32 qbus_port = 2; + optional int32 glbx_sim_fix_port = 3; + optional int32 ice_sim_fix_port = 5; + optional int32 replicator_port = 4; +} diff --git a/src/lib/config/protos/position_cfg.proto b/src/lib/config/protos/position_cfg.proto index bb077e8a0..908933430 100644 --- a/src/lib/config/protos/position_cfg.proto +++ b/src/lib/config/protos/position_cfg.proto @@ -1,23 +1,22 @@ -syntax='proto2'; +syntax = 'proto2'; import "lib/domain_model/Security.proto"; package bts.config; -message GMI_Import -{ - required string sftp_host = 10 ; - optional uint32 sftp_port = 11 ; - required string sftp_user = 12 ; - required string sftp_password = 2 ; +message GMI_Import { + required string sftp_host = 10; + optional uint32 sftp_port = 11; + required string sftp_user = 12; + required string sftp_password = 2; - required int32 pause_between_downloads_seconds = 4 [default = 30]; - required int32 download_timeout_seconds = 5 [default = 35]; - optional string download_window_begin = 6 [default = "22:00"]; - optional string download_window_end = 7 [default = "23:00"]; + required int32 pause_between_downloads_seconds = 4 [ default = 30 ]; + required int32 download_timeout_seconds = 5 [ default = 35 ]; + optional string download_window_begin = 6 [ default = "22:00" ]; + optional string download_window_end = 7 [ default = "23:00" ]; // These are just in case one we need to turn one of these off while - // the other remains on - optional bool disable_money_download = 8 [default = false]; - optional bool disable_position_download = 9 [default = false]; + // the other remains on + optional bool disable_money_download = 8 [ default = false ]; + optional bool disable_position_download = 9 [ default = false ]; } message GMI_SymbolMap { @@ -31,8 +30,7 @@ message GMI_SymbolMap { } message GMI_Parser { - optional bool map_glbx_to_sim = 1 [default = false]; - optional bool ignore_unknown_securities = 5 [ default = false]; - optional bool ignore_unsupported_security_types = 6 [ default = true]; + optional bool map_glbx_to_sim = 1 [ default = false ]; + optional bool ignore_unknown_securities = 5 [ default = false ]; + optional bool ignore_unsupported_security_types = 6 [ default = true ]; } - diff --git a/src/lib/config/protos/quickbus_cfg.proto b/src/lib/config/protos/quickbus_cfg.proto index bed2302ee..06e6b3d4f 100644 --- a/src/lib/config/protos/quickbus_cfg.proto +++ b/src/lib/config/protos/quickbus_cfg.proto @@ -1,23 +1,23 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; message QuickbusNodeCfg { - optional uint32 reconnect_period_secs = 1 [default=5]; - optional string parent_host = 2 [default=""]; - optional uint32 parent_port = 3 [default=0]; - optional uint32 my_port = 4 [default=0]; - optional uint32 hb_period_msecs = 5 [default=15000]; - optional uint32 max_missed_hbs = 6 [default=3]; + optional uint32 reconnect_period_secs = 1 [ default = 5 ]; + optional string parent_host = 2 [ default = "" ]; + optional uint32 parent_port = 3 [ default = 0 ]; + optional uint32 my_port = 4 [ default = 0 ]; + optional uint32 hb_period_msecs = 5 [ default = 15000 ]; + optional uint32 max_missed_hbs = 6 [ default = 3 ]; } message QuickbusCfg { - optional uint32 reconnect_period_secs = 1 [default=5]; - optional string qbus_host = 2 [default=""]; - optional uint32 qbus_port = 3 [default=0]; - optional uint32 hb_period_msecs = 5 [default=15000]; - optional uint32 max_missed_hbs = 6 [default=3]; + optional uint32 reconnect_period_secs = 1 [ default = 5 ]; + optional string qbus_host = 2 [ default = "" ]; + optional uint32 qbus_port = 3 [ default = 0 ]; + optional uint32 hb_period_msecs = 5 [ default = 15000 ]; + optional uint32 max_missed_hbs = 6 [ default = 3 ]; } message RPCConfig { - optional uint32 rpc_connect_timeout_seconds = 1 [default = 10]; + optional uint32 rpc_connect_timeout_seconds = 1 [ default = 10 ]; } \ No newline at end of file diff --git a/src/lib/config/protos/span.proto b/src/lib/config/protos/span.proto index 6d207757f..7bff099cf 100644 --- a/src/lib/config/protos/span.proto +++ b/src/lib/config/protos/span.proto @@ -1,10 +1,9 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; -message SpanMargin -{ - optional bool enabled = 10; - optional string login = 20; - optional string password = 30; - optional string url = 40; +message SpanMargin { + optional bool enabled = 10; + optional string login = 20; + optional string password = 30; + optional string url = 40; } diff --git a/src/lib/config/protos/spartan.proto b/src/lib/config/protos/spartan.proto index d0ae985a3..bae864c65 100644 --- a/src/lib/config/protos/spartan.proto +++ b/src/lib/config/protos/spartan.proto @@ -1,9 +1,9 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; message SpartanTASCfg { message TASSide { - required uint32 quantity = 2; + required uint32 quantity = 2; required int32 ticks_away = 3; } message TASTrigger { @@ -18,8 +18,8 @@ message SpartanTASCfg { repeated TASTrigger tas_trigger = 3; } -message SniperPlaceholderOrderPrices{ - message PriceEntry{ +message SniperPlaceholderOrderPrices { + message PriceEntry { required string security_desc = 1; required double buy_price = 2; required double sell_price = 3; @@ -27,17 +27,17 @@ message SniperPlaceholderOrderPrices{ repeated PriceEntry prices = 1; } -message MarketDataDownload{ - required bool write_books = 2 [default = true]; +message MarketDataDownload { + required bool write_books = 2 [ default = true ]; } -message PolygonDiscovery{ - // Only symbols in this list are included (ignored +message PolygonDiscovery { + // Only symbols in this list are included (ignored // if this list is left empty) - repeated string symbols = 1; - optional uint32 exp_n_months = 2 [default = 12]; - optional bool include_outright_futures = 3 [default = true]; - optional uint32 active_threshold_fills = 4 [default = 100]; - optional uint32 maximum_securities = 5 [default = 500]; - optional uint32 maximum_vertices = 6 [default = 4]; + repeated string symbols = 1; + optional uint32 exp_n_months = 2 [ default = 12 ]; + optional bool include_outright_futures = 3 [ default = true ]; + optional uint32 active_threshold_fills = 4 [ default = 100 ]; + optional uint32 maximum_securities = 5 [ default = 500 ]; + optional uint32 maximum_vertices = 6 [ default = 4 ]; } \ No newline at end of file diff --git a/src/lib/config/protos/spreader.proto b/src/lib/config/protos/spreader.proto index 9c1c80ac5..c86060b7c 100644 --- a/src/lib/config/protos/spreader.proto +++ b/src/lib/config/protos/spreader.proto @@ -1,16 +1,16 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; -message Spreader{ - optional uint32 n_failed_iocs = 10 [default=20]; - //if this is set to true, the spreader internally - //generates fake fills to keep the cache (data and - //instruction) warm - message CacheWarming{ - optional bool enable_fills = 10 [default=true]; - optional bool enable_child_order_activate = 15 [default=true]; - optional double fill_period_low = 20 [default=10]; - optional double fill_period_high = 30 [default=50]; - } - optional CacheWarming cache_warming = 20; +message Spreader { + optional uint32 n_failed_iocs = 10 [ default = 20 ]; + // if this is set to true, the spreader internally + // generates fake fills to keep the cache (data and + // instruction) warm + message CacheWarming { + optional bool enable_fills = 10 [ default = true ]; + optional bool enable_child_order_activate = 15 [ default = true ]; + optional double fill_period_low = 20 [ default = 10 ]; + optional double fill_period_high = 30 [ default = 50 ]; + } + optional CacheWarming cache_warming = 20; } \ No newline at end of file diff --git a/src/lib/config/protos/subprocess.proto b/src/lib/config/protos/subprocess.proto index b7c695c95..11a3e4649 100644 --- a/src/lib/config/protos/subprocess.proto +++ b/src/lib/config/protos/subprocess.proto @@ -1,16 +1,16 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.subprocess; message Process { - required string exe = 1; - repeated string args = 2; - message Variable { - required string name = 1; - optional string value = 2; - } - repeated Variable env = 3; + required string exe = 1; + repeated string args = 2; + message Variable { + required string name = 1; + optional string value = 2; + } + repeated Variable env = 3; } message SubProcessList { - repeated Process process = 1; + repeated Process process = 1; } diff --git a/src/lib/config/protos/Symbols.proto b/src/lib/config/protos/symbols.proto similarity index 95% rename from src/lib/config/protos/Symbols.proto rename to src/lib/config/protos/symbols.proto index 0d71ab37f..186a29db6 100644 --- a/src/lib/config/protos/Symbols.proto +++ b/src/lib/config/protos/symbols.proto @@ -1,10 +1,11 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config.system_symbols; message SymbolList { optional string key = 1; repeated string symbol = 2; } + message SymbolLists { repeated SymbolList list = 1; } @@ -21,4 +22,4 @@ message Symbols { optional SecurityExchangeList sim = 20; optional SecurityExchangeList ice = 30; optional SecurityExchangeList simice = 40; -} \ No newline at end of file +} diff --git a/src/lib/config/protos/system.proto b/src/lib/config/protos/system.proto index 3b9c1d4b2..e9e3627bd 100755 --- a/src/lib/config/protos/system.proto +++ b/src/lib/config/protos/system.proto @@ -1,40 +1,37 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; -message System -{ - required string host_name = 1; - required string process_name = 3; - required string directory = 4; - required string platform = 5; - required string qualifier = 6; - required bool unittest_environment = 7; - required string data_path = 8; - optional string version = 9 [default = "private"]; - repeated string cmd_args = 10; - // 11,12,13 - required string build_type = 14 [default = "release"]; - required string config_host = 15; - required string config_ip = 16 [default = "127.0.0.1"]; - optional bool is_remote_app = 17 [default = false]; - required string os_user = 18; - optional int32 dpi = 19 [default = 96]; - optional double dpi_ratio = 20 [default = 1.0]; - optional int32 num_cores = 21; - optional int32 config_port = 22 [default = 80]; +message System { + required string host_name = 1; + required string process_name = 3; + required string directory = 4; + required string platform = 5; + required string qualifier = 6; + required bool unittest_environment = 7; + required string data_path = 8; + optional string version = 9 [ default = "private" ]; + repeated string cmd_args = 10; + // 11,12,13 + required string build_type = 14 [ default = "release" ]; + required string config_host = 15; + required string config_ip = 16 [ default = "127.0.0.1" ]; + optional bool is_remote_app = 17 [ default = false ]; + required string os_user = 18; + optional int32 dpi = 19 [ default = 96 ]; + optional double dpi_ratio = 20 [ default = 1.0 ]; + optional int32 num_cores = 21; + optional int32 config_port = 22 [ default = 80 ]; } message ConfigIntrospection { - message ConfigProto { - required string name = 1; - repeated string type = 2; - } - repeated ConfigProto config = 1; + message ConfigProto { + required string name = 1; + repeated string type = 2; + } + repeated ConfigProto config = 1; } -message DeploymentType -{ - optional string type =1 [default="dev"]; +message DeploymentType { + optional string type = 1 [ default = "dev" ]; } - diff --git a/src/lib/config/protos/testkeys.proto b/src/lib/config/protos/testkeys.proto index 2f90f0c3a..77b7872d4 100755 --- a/src/lib/config/protos/testkeys.proto +++ b/src/lib/config/protos/testkeys.proto @@ -1,4 +1,4 @@ -syntax='proto2'; +syntax = 'proto2'; import "lib/config/extensions/extensions.proto"; @@ -6,77 +6,77 @@ package bts.config.test; // This is a comment about Foo message Foo { - option(doc_string) = "This is a test key. Don't use it for real data"; + option (doc_string) = "This is a test key. Don't use it for real data"; - optional string name = 1 [default = "Blue Foo"]; - optional int32 id = 2 [default = 1234]; - repeated string email = 3; - optional string url = 4; + optional string name = 1 [ default = "Blue Foo" ]; + optional int32 id = 2 [ default = 1234 ]; + repeated string email = 3; + optional string url = 4; } message FooGroup { - required string group = 1; - required Foo foo = 2; + required string group = 1; + required Foo foo = 2; } message NamedFoo { - optional string key = 1; - optional Foo foo = 2; - repeated Foo foox = 3; - optional string rule = 4; + optional string key = 1; + optional Foo foo = 2; + repeated Foo foox = 3; + optional string rule = 4; } message FooList { - repeated NamedFoo item = 1; - repeated Foo foo = 2; + repeated NamedFoo item = 1; + repeated Foo foo = 2; } message StringTable { - repeated string entries = 1; + repeated string entries = 1; } message RuleRef { - option(doc_string) = "This contains properties of various types which we can use as test cases for self-referenential rules"; + option (doc_string) = "This contains properties of various types which we " + "can use as test cases for self-referenential rules"; - optional string a_string = 1; - optional int32 a_int = 2; - repeated string list_string = 3; - repeated int32 list_int = 4; - repeated Foo foox = 6; + optional string a_string = 1; + optional int32 a_int = 2; + repeated string list_string = 3; + repeated int32 list_int = 4; + repeated Foo foox = 6; - optional RuleRef nested = 5; - + optional RuleRef nested = 5; } // For Config demo message ConsoleColor { - enum Colors { - DarkBlue = 1; - DarkGreen = 2; - DarkTeel = 3; - DarkRed = 4; - DarkPink = 5; - DarkYellow = 6; - Gray = 7; - DarkGray = 8; - Blue = 9; - Green = 10; - Teal = 11; - Red = 12; - Pink = 13; - Yellow = 14; - White = 15; - } - required Colors color = 1; + enum Colors { + DarkBlue = 1; + DarkGreen = 2; + DarkTeel = 3; + DarkRed = 4; + DarkPink = 5; + DarkYellow = 6; + Gray = 7; + DarkGray = 8; + Blue = 9; + Green = 10; + Teal = 11; + Red = 12; + Pink = 13; + Yellow = 14; + White = 15; + } + required Colors color = 1; } message ConsoleColors { - optional ConsoleColor.Colors color = 1; - repeated ConsoleColor.Colors colors = 2; + optional ConsoleColor.Colors color = 1; + repeated ConsoleColor.Colors colors = 2; } message TestSite { - required string name = 1 [default="NO NAME!"]; + required string name = 1 [ default = "NO NAME!" ]; } message TestPorts { diff --git a/src/lib/config/protos/threads.proto b/src/lib/config/protos/threads.proto index 9a9477f24..a5e782434 100644 --- a/src/lib/config/protos/threads.proto +++ b/src/lib/config/protos/threads.proto @@ -1,13 +1,12 @@ -syntax='proto2'; +syntax = 'proto2'; package bts.config; message ThreadGroupCfg { - required string name_rx = 1 [default = "*"]; - optional bool exclude = 2 [default = false]; - repeated uint32 core = 3; + required string name_rx = 1 [ default = "*" ]; + optional bool exclude = 2 [ default = false ]; + repeated uint32 core = 3; } - message Threads { - repeated ThreadGroupCfg thread_group = 1; + repeated ThreadGroupCfg thread_group = 1; } diff --git a/src/lib/config/protos/toggles.proto b/src/lib/config/protos/toggles.proto index 353066fe9..4905f450e 100644 --- a/src/lib/config/protos/toggles.proto +++ b/src/lib/config/protos/toggles.proto @@ -1,77 +1,81 @@ -syntax='proto2'; - /////////////////////////////////////////////////////// // Put all code enable/disable flags here. // - by keeping them in a separate package (namespace) // they'll be easy to find via text search ///////////////////////////////////////////////////// +syntax = 'proto2'; package bts.config.toggles; message FilterOrdersWithDanglingSecurities { - optional bool enabled = 1 [default = true]; + optional bool enabled = 1 [ default = true ]; } -message FillsSoftCleanup{ - optional bool enabled = 1 [default = true]; +message FillsSoftCleanup { + optional bool enabled = 1 [ default = true ]; } -message OrdersSoftCleanup{ - optional bool enabled = 1 [default = true]; +message OrdersSoftCleanup { + optional bool enabled = 1 [ default = true ]; } message ToastNotifications { - optional bool enabled = 1 [default = false]; + optional bool enabled = 1 [ default = false ]; } message SoundNotifications { - optional bool enabled = 1 [default = true]; + optional bool enabled = 1 [ default = true ]; } + message FilterExpiredFills { - optional bool enabled = 1 [default = true]; + optional bool enabled = 1 [ default = true ]; } -message VolumeAtPrice{ - optional bool enabled = 1 [default = true]; + +message VolumeAtPrice { + optional bool enabled = 1 [ default = true ]; } message MBOStats { - optional bool enabled = 1 [default = false]; + optional bool enabled = 1 [ default = false ]; } + message PlacementInQueue { - optional bool enabled = 1 [default = true]; + optional bool enabled = 1 [ default = true ]; } + message FixNestedScrolling { - optional bool enabled = 1 [default = true]; + optional bool enabled = 1 [ default = true ]; } message RejectStopAndStopLimitOrders { - optional bool enabled = 1 [default = true]; + optional bool enabled = 1 [ default = true ]; } message SOMTicksFix { - optional bool enabled = 1 [default = true]; + optional bool enabled = 1 [ default = true ]; } message EnsureOnScreenWithWorkAreaRect { - // Defaulting to false bc this is near the end of the cycle (04/27/2019), - // and the new ensure_onscreen code has only been tested with a single monitor arrangement. - // Should verify that the code works with every monitor arrangement before enabling by default. - optional bool enabled = 1 [default = false]; + // Defaulting to false bc this is near the end of the cycle (04/27/2019), and + // the new ensure_onscreen code has only been tested with a single monitor + // arrangement. Should verify that the code works with every monitor + // arrangement before enabling by default. + optional bool enabled = 1 [ default = false ]; } -message CustomFormatIceSecurities{ - optional bool enabled = 1 [default = true]; +message CustomFormatIceSecurities { + optional bool enabled = 1 [ default = true ]; } message IgnoreNansInDayPnL { - optional bool enabled = 1 [default = true]; + optional bool enabled = 1 [ default = true ]; } -message DynamicAlgos{ - optional bool enable_dorman = 1 [default = false]; - optional bool enable_pyramid = 2 [default = false]; - optional bool enable_tas = 3 [default = false]; - optional bool enable_tascounter = 4 [default = false]; - optional bool enable_limit_cover = 5 [default = false]; - optional bool enable_onsignal = 6 [default = false]; -} \ No newline at end of file +message DynamicAlgos { + optional bool enable_dorman = 1 [ default = false ]; + optional bool enable_pyramid = 2 [ default = false ]; + optional bool enable_tas = 3 [ default = false ]; + optional bool enable_tascounter = 4 [ default = false ]; + optional bool enable_limit_cover = 5 [ default = false ]; + optional bool enable_onsignal = 6 [ default = false ]; +} diff --git a/src/lib/config/protos/ui.proto b/src/lib/config/protos/ui.proto new file mode 100644 index 000000000..53104294b --- /dev/null +++ b/src/lib/config/protos/ui.proto @@ -0,0 +1,208 @@ +syntax = 'proto2'; +package bts.config; + +message Shell { + repeated string modules = 1; +} + +message ShellSettingsConfig { + // Save the UI state every 5 minutes by default + optional uint32 save_timer = 1 [ default = 300 ]; +} + +message ShellRenderMode { + optional bool software_only = 1 [ default = false ]; +} + +message IShellModuleProps { + message ModuleProps { + optional string name = 1; + optional bool visible = 2 [ default = true ]; + } + + repeated ModuleProps module = 1; +} + +message GridSettings { + optional string font_family = 1 [ default = "Calibri" ]; + optional float font_size = 2 [ default = 10 ]; + optional string locale = 3 [ default = "en-us" ]; + + optional uint32 row_height = 10 [ default = 16 ]; + optional uint32 col_width = 11 [ default = 75 ]; + + // Default grid colors + optional uint32 color_background = 20 [ default = 0xFFFFFF ]; // White + optional uint32 color_foreground = 21 [ default = 0 ]; // Black + optional uint32 color_grid_line = 22 [ default = 0x778899 ]; // LightSlateGray +} + +message ShellLimits { + optional bool kill_on_close = 1 [ default = true ]; + optional uint64 limit_memory_mb = 2; + optional uint64 limit_group_memory_mb = 3; +} + +message MultiThreadedWindows { + optional bool market_view = 1 [ default = true ]; + optional bool time_and_sales = 2 [ default = true ]; + optional bool order_book = 3 [ default = true ]; + optional bool fills = 4 [ default = true ]; + optional bool manual_fills = 9 [ default = true ]; + optional bool pnl = 5 [ default = true ]; + optional bool algo_studio = 6 [ default = true ]; + optional bool ladder = 7 [ default = true ]; + optional bool synthetic_management = 8 [ default = true ]; + optional bool vol_surface = 10 [ default = true ]; +} + +message LadderKnobs { + // Priorities (in ascending order): + // SystemIdle, ApplicationIdle, ContextIdle, Background, Input, Loaded, + // Render, DataBind, Normal, Send + // + // It seems like all priorities + // higher than ApplicationIdle choke the main thread. + optional string priority = 1 [ default = "ApplicationIdle" ]; + optional double interval_ms = 2 [ default = 100 ]; + optional uint32 seconds_to_recenter = 3 [ default = 300 ]; + optional uint32 max_open_ladders = 4 [ default = 75 ]; + optional uint32 security_timeout_secs = 5 [ default = 60 ]; + optional bool open_algo_popup_on_select = 6 [ default = false ]; + optional bool use_algo_param_grid = 7 [ default = true ]; + optional uint32 max_mbo_orders = 8 [ default = 200 ]; + optional bool show_scrollbar = 9 [ default = false ]; + // DJ wants bid/ask cells with markets (i.e., size > 0) to have a + // lighter background than those without markets. + optional bool lighten_market_cells = 10 [ default = true ]; + + // For market cell backgrounds, 0 means 'ignore this color setting' (i.e., + // employ the ladder's default behavior instead). + // + // Note that despite reserving the value 0 as a flag, the full range of colors + // can still be expressed. Zero is one of 2^24 representations of + // 'transparent.' + // + // The channels alpha, red, green, and blue are stored in the 1-4th bytes + // respectively. For example: + // Transparent: 0x00XXXXXX (any value with the first byte set to 0) + // Pure Red : 0xFFFF0000 + // Pure Blue : 0xFF00FF00 + // Pure Green : 0xFF0000FF + optional uint32 bid_market_cell_background = 11; + optional uint32 ask_market_cell_background = 12; + optional bool mimic_tt = 13 [ default = true ]; + // Defines the number of price rows rendered by the ladder. The smaller this + // window is, the cheaper it is to render the ladder grid (redraw prices, + // sizes, etc.). However, if the window is too small, scrolling may appear + // choppy. + optional uint32 scrollable_tick_window_size = 14 [ default = 256 ]; +} + +message OrderBookOptions { + optional bool animate_child_order_rows = 1 [ default = false ]; + optional double status_color_opacity_when_selected = 2 [ default = 0.35 ]; + optional bool can_edit_specific_algo_params = 3 [ default = false ]; +} + +message OrderTicketOptions { + optional bool close_on_send = 1 [ default = true ]; +} + +message OrderAlerts { + // When the client sees an order for the first time, this time period is used + // to determine if the order is actually new, or [presumably]just arrived bc + // shell is still initializing, or the server restarted. + optional int32 stale_order_threshold_seconds = 1 [ default = 60 ]; +} + +message ShellPingOptions { + optional bool shell_ping_is_enabled = 1 [ default = true ]; + optional int32 workloop_milliseconds_interval = 2 [ default = 5000 ]; + // 4000 is default Windows ping timeout as specified here: + // https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490968(v=technet.10) + optional int32 timeout_milliseconds_threshold = 3 [ default = 4000 ]; + optional int32 logging_milliseconds_threshold = 4 [ default = 50 ]; + optional int32 maximum_backoff_milliseconds = 5 [ default = 60000 ]; +} + +message PNLOptions { + optional bool show_new_pnl = 1 [ default = true ]; + optional bool show_old_pnl = 2 [ default = false ]; + optional bool show_pause_resume = 3 [ default = false ]; + optional bool enable_animations = 4 [ default = false ]; +} + +message TimeAndSalesOptions { + // Adds a 'pause/resume updates' toggle button to the spark menu if set to + // true. This may be helpful when debugging, or diagnosing problems. + optional bool can_pause_updates = 1 [ default = false ]; +} + +message AlgoStudioOptions { + enum ModelType { + FlatDefinitions = 0; + DefinitionsAndTemplates = 1; + } + + optional bool can_modify_definition_name = 1 [ default = true ]; + optional bool can_modify_definition_values = 2 [ default = true ]; + optional bool can_modify_definition_structure = 3 [ default = true ]; + optional bool can_save_specific = 4 [ default = false ]; + optional bool can_undo_redo = 5 [ default = false ]; + + // Props below are vestiges from the algo 'template' model in the original + // spec (as opposed to the 'flat' definition model used now). + // ------------------------------------------------------------------- + // optional bool include_custom_templates = 6 [default = true]; + // optional bool include_legacy_custom_templates = 7 [default = true]; + // optional bool show_badges_in_tree_view = 8 [default = false]; + // optional AddTemplateButton add_template_button = 9 [default = None]; + // optional ModelType model_type = 10 [default = FlatDefinitions]; + // ------------------------------------------------------------------- + + optional bool show_algo_toolbar_rename = 11 [ default = false ]; + optional bool show_algo_toolbar_revert = 12 [ default = false ]; + optional bool show_algo_toolbar_save = 13 [ default = false ]; + optional bool show_algo_toolbar_undo_redo = 14 [ default = false ]; +} + +// TODO: The following algo-type specific attach ui messages should be +// consolidated into a single location, along with other algo-type metadata. +message CoverAttachUIOptions { + optional bool show_price = 1 [ default = false ]; + optional bool show_quantity = 2 [ default = false ]; +} + +message JoinAttachUIOptions { + optional bool show_price = 1 [ default = false ]; + optional bool show_quantity = 2 [ default = false ]; +} + +message LeanAttachUIOptions { + optional bool show_price = 1 [ default = false ]; + optional bool show_quantity = 2 [ default = false ]; +} + +message TopAttachUIOptions { + optional bool show_price = 1 [ default = false ]; + optional bool show_quantity = 2 [ default = false ]; +} + +message OffsetAttachUIOptions { + optional bool show_price = 1 [ default = false ]; + optional bool show_quantity = 2 [ default = false ]; +} + +message ManualFillsOptions { + optional bool modal_transactions = 1 [ default = true ]; +} + +message SymbolUIConfigurationItem { + optional string symbol = 1 [ default = "" ]; + optional uint32 display_quantity_divisor = 2 [ default = 1 ]; +} + +message SymbolUIConfiguration { + repeated SymbolUIConfigurationItem items = 1; +} diff --git a/src/lib/md/MDConsumer.cpp b/src/lib/md/MDConsumer.cpp index 04ddc4537..61b052fc8 100644 --- a/src/lib/md/MDConsumer.cpp +++ b/src/lib/md/MDConsumer.cpp @@ -11,7 +11,7 @@ #include "lib/utils/WaitFreeQueue.h" #include "lib/utils/bts_chrono.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/utils/sane_algorithm.h" #include diff --git a/src/lib/md/MemorySegmentUtils.cpp b/src/lib/md/MemorySegmentUtils.cpp index 9d1a609fd..91a5b4e79 100644 --- a/src/lib/md/MemorySegmentUtils.cpp +++ b/src/lib/md/MemorySegmentUtils.cpp @@ -1,7 +1,7 @@ #ifndef NO_CPP0X #include "MemorySegmentUtils.h" #include "lib/config/config.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" using namespace std; diff --git a/src/lib/md/PlatformLoader.cpp b/src/lib/md/PlatformLoader.cpp index 9ca9423e8..71a1c6eee 100644 --- a/src/lib/md/PlatformLoader.cpp +++ b/src/lib/md/PlatformLoader.cpp @@ -6,7 +6,7 @@ #include "MemorySegmentUtils.h" #include "lib/utils/SharedList.h" // for cleanup_shared_memory -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/config/protos/Symbols.pb.h" #include diff --git a/src/lib/md/PlatformLoader.h b/src/lib/md/PlatformLoader.h index 6c4edf26d..c5ce31acc 100644 --- a/src/lib/md/PlatformLoader.h +++ b/src/lib/md/PlatformLoader.h @@ -5,7 +5,7 @@ #include "get_symbols.h" #include "lib/utils/bts_no_copy.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include #include diff --git a/src/lib/md/SecurityDB.cpp b/src/lib/md/SecurityDB.cpp index 9308447ba..b2c2e51d3 100644 --- a/src/lib/md/SecurityDB.cpp +++ b/src/lib/md/SecurityDB.cpp @@ -6,7 +6,7 @@ #include #include "lib/config/config.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/config/protos/system.pb.h" #include "lib/domain_model/Security.h" #include "lib/md/Shm/FixedSecurity.h" diff --git a/src/lib/md/SecurityIDRecorder.cpp b/src/lib/md/SecurityIDRecorder.cpp index 50f5e091d..249551049 100644 --- a/src/lib/md/SecurityIDRecorder.cpp +++ b/src/lib/md/SecurityIDRecorder.cpp @@ -8,7 +8,7 @@ #include #include -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/config/protos/system.pb.h" #include diff --git a/src/lib/md/SecurityMapper.cpp b/src/lib/md/SecurityMapper.cpp index 2c69f44b5..22b196e77 100644 --- a/src/lib/md/SecurityMapper.cpp +++ b/src/lib/md/SecurityMapper.cpp @@ -3,7 +3,7 @@ #include "PriceSize.h" #include "UserSymbol.h" #include "lib/config/config.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/config/protos/cme_reference_data.pb.h" #include "lib/domain_model/Security.h" #include "lib/utils/parse_enum.h" diff --git a/src/lib/md/Shm/MDStructure.h b/src/lib/md/Shm/MDStructure.h index 5d0330bdd..d4fa490ef 100644 --- a/src/lib/md/Shm/MDStructure.h +++ b/src/lib/md/Shm/MDStructure.h @@ -5,7 +5,7 @@ #include "lib/config/config.h" #include "lib/utils/TimeStamp.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include #include diff --git a/src/lib/md/cme/MDP3Utils.cpp b/src/lib/md/cme/MDP3Utils.cpp index 966f362ea..ff7ae4f39 100644 --- a/src/lib/md/cme/MDP3Utils.cpp +++ b/src/lib/md/cme/MDP3Utils.cpp @@ -8,7 +8,7 @@ #include "lib/utils/datetime.h" #include "lib/utils/download.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/config/protos/system.pb.h" #include diff --git a/src/lib/md/common.cpp b/src/lib/md/common.cpp index 61f91b2c7..94d79cfba 100644 --- a/src/lib/md/common.cpp +++ b/src/lib/md/common.cpp @@ -4,7 +4,7 @@ #include "lib/config/config.h" #include "PriceSize.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include #include diff --git a/src/lib/md/get_symbols.h b/src/lib/md/get_symbols.h index 6cccfe2a4..f1b0ba9a5 100644 --- a/src/lib/md/get_symbols.h +++ b/src/lib/md/get_symbols.h @@ -1,6 +1,6 @@ #pragma once #include "UserSymbol.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/utils/bts_export.h" #include diff --git a/src/lib/md/ice/ICEUtils.cpp b/src/lib/md/ice/ICEUtils.cpp index bf67543be..aa1f0ba64 100644 --- a/src/lib/md/ice/ICEUtils.cpp +++ b/src/lib/md/ice/ICEUtils.cpp @@ -8,7 +8,7 @@ #include "lib/utils/datetime.h" #include "lib/utils/download.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/config/protos/system.pb.h" #include diff --git a/src/lib/md/relay/RelayClient.cpp b/src/lib/md/relay/RelayClient.cpp index aef481c9a..a48cc24c7 100644 --- a/src/lib/md/relay/RelayClient.cpp +++ b/src/lib/md/relay/RelayClient.cpp @@ -12,7 +12,7 @@ #include "lib/api/public/ServiceContext.h" #include "lib/api/services/MarketDataRelay.client.pb.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/config/protos/system.pb.h" #include "lib/md/protos/co2.pb.h" #include "lib/utils/base64.hpp" diff --git a/src/lib/md/relay/RelayRecorder.cpp b/src/lib/md/relay/RelayRecorder.cpp index 89c64a919..2ecfea27b 100644 --- a/src/lib/md/relay/RelayRecorder.cpp +++ b/src/lib/md/relay/RelayRecorder.cpp @@ -7,7 +7,7 @@ #include "lib/utils/bts_chrono.h" #include "lib/utils/datetime.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/config/protos/system.pb.h" #include "lib/md/SecurityIDRecorder.h" #include "lib/md/common.h" diff --git a/src/lib/md/test/md2_tests.cpp b/src/lib/md/test/md2_tests.cpp index fdc20aa90..a6655a103 100644 --- a/src/lib/md/test/md2_tests.cpp +++ b/src/lib/md/test/md2_tests.cpp @@ -14,7 +14,7 @@ #include "lib/utils/defer.h" #include "lib/utils/warn_ctrl.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/utils/Sqlite_utils.h" #include "md_test_utils.h" diff --git a/src/lib/md/vendor/OnixsUtils.cpp b/src/lib/md/vendor/OnixsUtils.cpp index 2664fc754..4295fa3bc 100644 --- a/src/lib/md/vendor/OnixsUtils.cpp +++ b/src/lib/md/vendor/OnixsUtils.cpp @@ -1,7 +1,7 @@ #ifndef WIN32 #include "OnixsUtils.h" #include "lib/config/config.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/logging/logging.h" namespace bts { diff --git a/src/lib/orderman/orderman_utils/Book.h b/src/lib/orderman/orderman_utils/Book.h index 5a698881f..d59f8f85b 100644 --- a/src/lib/orderman/orderman_utils/Book.h +++ b/src/lib/orderman/orderman_utils/Book.h @@ -1,6 +1,6 @@ #pragma once -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/domain_model/common.h" #include "lib/md/PriceSize.h" #include diff --git a/src/lib/orderman/orderman_utils/BookUtils.h b/src/lib/orderman/orderman_utils/BookUtils.h index 0eeb04fdd..d9f2735be 100644 --- a/src/lib/orderman/orderman_utils/BookUtils.h +++ b/src/lib/orderman/orderman_utils/BookUtils.h @@ -1,6 +1,6 @@ #pragma once #include "lib/api/services/OrderService.pb.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/domain_model/Security.h" #include "lib/domain_model/common.h" #include "lib/orderman/orderman_utils/Book.h" diff --git a/src/lib/orderman/orderman_utils/Formatter.h b/src/lib/orderman/orderman_utils/Formatter.h index b17d8b0fa..5ad778c5f 100644 --- a/src/lib/orderman/orderman_utils/Formatter.h +++ b/src/lib/orderman/orderman_utils/Formatter.h @@ -1,6 +1,6 @@ #pragma once #include "lib/api/services/OrderService.pb.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/domain_model/common.h" #include "lib/md/PriceSize.h" #include "lib/orderman/orderman_utils/Book.h" diff --git a/src/lib/utils/AuthSessionManager.cpp b/src/lib/utils/AuthSessionManager.cpp index 616fddd7d..fb8e9807d 100644 --- a/src/lib/utils/AuthSessionManager.cpp +++ b/src/lib/utils/AuthSessionManager.cpp @@ -8,7 +8,7 @@ #include "lib/utils/datetime.h" #include "lib/config/config.h" -#include "lib/config/protos/Ports.pb.h" +#include "lib/config/protos/ports.pb.h" #include "lib/config/protos/keycode.pb.h" #include "lib/logging/logging.h" #include "lib/utils/bts_assert.h" @@ -147,4 +147,4 @@ void AuthSessionManager::clear_sessions() { _map.clear(); } } // namespace auth } // namespace api } // namespace bts -#endif \ No newline at end of file +#endif diff --git a/src/server/sparkd/cmds/Run.cpp b/src/server/sparkd/cmds/Run.cpp index bd09470ed..c24258fd2 100644 --- a/src/server/sparkd/cmds/Run.cpp +++ b/src/server/sparkd/cmds/Run.cpp @@ -1,7 +1,7 @@ #include "Run.h" #include "lib/api/public/ServiceContext.h" #include "lib/config/config.h" -#include "lib/config/protos/Ports.pb.h" +#include "lib/config/protos/ports.pb.h" #include "lib/config/protos/quickbus_cfg.pb.h" #include "lib/config/protos/toggles.pb.h" #include "lib/logging/logging.h" diff --git a/src/server/sparkd/cmds/Web.cpp b/src/server/sparkd/cmds/Web.cpp index 8deb5b400..78ddc7a8b 100644 --- a/src/server/sparkd/cmds/Web.cpp +++ b/src/server/sparkd/cmds/Web.cpp @@ -3,8 +3,8 @@ #include "lib/api/services/MarketDataService.pb.h" #include "lib/api/services/SyntheticSecurityService.pb.h" #include "lib/config/config.h" -#include "lib/config/protos/MarketData.pb.h" -#include "lib/config/protos/Ports.pb.h" +#include "lib/config/protos/market_data.pb.h" +#include "lib/config/protos/ports.pb.h" #include "lib/config/protos/quickbus_cfg.pb.h" #include "lib/md/MBOProcessor.h" #include "lib/md/MDClient.h" diff --git a/src/server/sparkd/cmds/md/cmds/Cleanup.cpp b/src/server/sparkd/cmds/md/cmds/Cleanup.cpp index 82d4e9f74..43abf88b8 100644 --- a/src/server/sparkd/cmds/md/cmds/Cleanup.cpp +++ b/src/server/sparkd/cmds/md/cmds/Cleanup.cpp @@ -1,6 +1,6 @@ #include "Cleanup.h" #include "lib/config/config.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/logging/logging.h" #include "lib/md/protos/co2.pb.h" #include diff --git a/src/server/sparkd/cmds/md/cmds/Dump.cpp b/src/server/sparkd/cmds/md/cmds/Dump.cpp index 05bbdca97..6b786768d 100644 --- a/src/server/sparkd/cmds/md/cmds/Dump.cpp +++ b/src/server/sparkd/cmds/md/cmds/Dump.cpp @@ -3,7 +3,7 @@ #include "../common/SecurityTypeOption.h" #include "../common/VenueOption.h" #include "lib/config/config.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/domain_model/Security.pb.h" #include "lib/md/Diag/ShmDumper.h" #include "lib/md/protos/co2.pb.h" diff --git a/src/server/sparkd/cmds/md/cmds/Run.cpp b/src/server/sparkd/cmds/md/cmds/Run.cpp index 557c30ea5..3b70822ad 100644 --- a/src/server/sparkd/cmds/md/cmds/Run.cpp +++ b/src/server/sparkd/cmds/md/cmds/Run.cpp @@ -1,6 +1,6 @@ #include "Run.h" #include "Cleanup.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/logging/logging.h" #include "lib/md/UserSymbol.h" #include "lib/md/relay/RelayRecorder.h" diff --git a/src/server/sparkd/cmds/md/cmds/Tail.cpp b/src/server/sparkd/cmds/md/cmds/Tail.cpp index 11a97fee4..68af6e155 100644 --- a/src/server/sparkd/cmds/md/cmds/Tail.cpp +++ b/src/server/sparkd/cmds/md/cmds/Tail.cpp @@ -1,5 +1,5 @@ #include "Tail.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/md/Diag/MDPeriodicDumper.h" #include "lib/md/Diag/ShmDumper.h" #include "lib/md/PlatformLoader.h" diff --git a/src/server/sparkd/exchange_sim/ExchangeSim.cpp b/src/server/sparkd/exchange_sim/ExchangeSim.cpp index 32811b268..3c4a0d775 100644 --- a/src/server/sparkd/exchange_sim/ExchangeSim.cpp +++ b/src/server/sparkd/exchange_sim/ExchangeSim.cpp @@ -11,8 +11,8 @@ #include #include "lib/config/config.h" -#include "lib/config/protos/ExchangeSimCfg.pb.h" -#include "lib/config/protos/Ports.pb.h" +#include "lib/config/protos/exchange_sim_cfg.pb.h" +#include "lib/config/protos/ports.pb.h" #include "lib/domain_model/Security.pb.h" #include "lib/logging/logging.h" diff --git a/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp b/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp index 214fce8bb..2221fed1e 100644 --- a/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp +++ b/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp @@ -3,7 +3,7 @@ #include "IDGenerator.h" #include "lib/config/config.h" -#include "lib/config/protos/ExchangeSimCfg.pb.h" +#include "lib/config/protos/exchange_sim_cfg.pb.h" #include "lib/domain_model/Security.h" #include "lib/logging/logging.h" #include "lib/md/MBOProcessor.h" diff --git a/src/server/sparkd/exchange_sim/book/OrderMatcher.cpp b/src/server/sparkd/exchange_sim/book/OrderMatcher.cpp index 672ece3bc..094cc12ce 100644 --- a/src/server/sparkd/exchange_sim/book/OrderMatcher.cpp +++ b/src/server/sparkd/exchange_sim/book/OrderMatcher.cpp @@ -1,6 +1,6 @@ #include "OrderMatcher.h" #include "lib/config/config.h" -#include "lib/config/protos/ExchangeSimCfg.pb.h" +#include "lib/config/protos/exchange_sim_cfg.pb.h" #include "lib/utils/bts_assert.h" #include "server/sparkd/exchange_sim/book/Book.h" #include "server/sparkd/exchange_sim/book/Order.h" diff --git a/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp b/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp index 782b689df..a16f530e9 100644 --- a/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp +++ b/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp @@ -1,5 +1,5 @@ #include "ICEListener.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/md/protos/co2.pb.h" #include "lib/utils/datetime.h" #include "lib/utils/helper_macros.h" diff --git a/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp b/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp index 12b0a5438..541a4a86e 100644 --- a/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp +++ b/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp @@ -12,7 +12,7 @@ #include "lib/utils/helper_macros.h" #include "lib/utils/proto_helper.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/config/protos/system.pb.h" #include "lib/utils/thread_manager.h" diff --git a/src/server/sparkd/md/platforms/ice_onixs/tests/ice_tests.cpp b/src/server/sparkd/md/platforms/ice_onixs/tests/ice_tests.cpp index 1eb7e3b06..f25b58bb7 100644 --- a/src/server/sparkd/md/platforms/ice_onixs/tests/ice_tests.cpp +++ b/src/server/sparkd/md/platforms/ice_onixs/tests/ice_tests.cpp @@ -1,7 +1,7 @@ // #include "catch/catch.hpp" // #include "lib/config/config.h" -// #include "lib/config/protos/MarketData.pb.h" +// #include "lib/config/protos/market_data.pb.h" // #include // #include diff --git a/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Listener.cpp b/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Listener.cpp index fd313a8e8..f56a59409 100644 --- a/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Listener.cpp +++ b/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Listener.cpp @@ -1,5 +1,5 @@ #include "MDP3Listener.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/md/protos/co2.pb.h" #include "lib/utils/datetime.h" #include "lib/utils/helper_macros.h" diff --git a/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Main.cpp b/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Main.cpp index d3eebca8e..d00726545 100644 --- a/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Main.cpp +++ b/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Main.cpp @@ -11,7 +11,7 @@ #include "lib/utils/Dispatcher.h" #include "lib/utils/proto_helper.h" -#include "lib/config/protos/MarketData.pb.h" +#include "lib/config/protos/market_data.pb.h" #include "lib/config/protos/system.pb.h" #include "lib/utils/thread_manager.h" diff --git a/src/server/sparkd/md/platforms/mdp3_onixs/tests/mdp3_tests.cpp b/src/server/sparkd/md/platforms/mdp3_onixs/tests/mdp3_tests.cpp index 1eb7e3b06..f25b58bb7 100644 --- a/src/server/sparkd/md/platforms/mdp3_onixs/tests/mdp3_tests.cpp +++ b/src/server/sparkd/md/platforms/mdp3_onixs/tests/mdp3_tests.cpp @@ -1,7 +1,7 @@ // #include "catch/catch.hpp" // #include "lib/config/config.h" -// #include "lib/config/protos/MarketData.pb.h" +// #include "lib/config/protos/market_data.pb.h" // #include // #include