Files
spark/src/lib/config/protos/MarketData.proto
T
2018-10-23 09:01:37 -04:00

158 lines
5.3 KiB
Protocol Buffer
Executable File

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_replay = 2 [default=false];
}
message PlatformMap
{
// PLATFORM_MDP3ONIXS
optional string glbx_platform = 1 [default = "PLATFORM_SIM"];
}
//
// 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];
}
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];
optional string thread_group = 10 [default=""]; // if present this will be used to retrieve affinity settings from Threads config key
optional uint32 udp_socket_buffer_size = 11 [default = 33554432]; //32mb
}
message CMEChannel {
repeated string id = 2;
optional string feed_engine = 3 [default = "default"];
optional uint32 max_gap_recovery_cache_size = 11 [default = 6];
optional uint32 lost_packet_wait_timeout_ms = 12 [default = 10];
optional OnixSLogMode onixs_log_mode = 13 [default = Important];
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 string onixs_license = 1 [default = "{default}"];
repeated CMEChannel channel = 3;
repeated FeedEngineSettings feed_engine = 5;
// Prevents parsing trades/rfqs/doing anything not required for quoting
optional bool quoter_mode = 6;
}
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];
}
//
// Replay options
//
message ReplayOptions {
optional string host = 1 [default = "mdreplay"];
optional string base_path = 2 [default = "/md"];
optional string file_name = 3 [default = "options.coconut"];
// 2.0 = double speed, 0.5 = half speed
optional double speed = 11 [default = 1.0];
optional bool interactive = 12 [default = false];
}
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 SimSource {
oneof source {
string replay_url = 1 [default = "http://mdreplay.bluetradesys.local/spark/futures.coconut"];
string replay_file = 2 [default = "futures.coconut"];
bool local_relay = 3;
}
}
message SecurityExpirationCutoff {
optional uint32 max_days_after_expiration =1 [default = 7];
}