Odds and Ends with replay
This commit is contained in:
1 parent
ab9fab13d9
commit
8ce3ef69d0
6 files changed
+25
-4
No files matched your search
@@ -107,6 +107,10 @@ value{
|
||||
option_name: "BTC"
|
||||
vs_name: "BTC_moneyness"
|
||||
}
|
||||
vol_surface_usage{
|
||||
option_name: "ES"
|
||||
vs_name: "ES_moneyness"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,22 @@ class SecurityCommon {
|
||||
return bts::api::domain::Venue::NONE;
|
||||
}
|
||||
|
||||
static bts::api::Venue convert(api::domain::Venue venue) {
|
||||
switch (venue) {
|
||||
case api::domain::Venue::DERIBIT:
|
||||
return api::VENUE_DERIBIT;
|
||||
case api::domain::Venue::BTS:
|
||||
return api::VENUE_BTS;
|
||||
case api::domain::Venue::GLBX:
|
||||
return api::VENUE_GLBX;
|
||||
default: {
|
||||
LOG(md, Error, "convert unknown venue: {}", static_cast<int>(venue));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return api::VENUE_UNSET;
|
||||
}
|
||||
|
||||
static bts::api::domain::SecurityType convert(
|
||||
bts::api::SecurityType sec_type) {
|
||||
switch (sec_type) {
|
||||
|
||||
@@ -363,7 +363,8 @@ void CCMarketDataListener::_copy_security_common(
|
||||
auto symbol = from.security_common.symbol;
|
||||
to.symbol(symbol);
|
||||
to.security_desc(from.security_common.desc);
|
||||
to.exchange = Venue::VENUE_DERIBIT; // TODO: hc'ing to SIM
|
||||
to.exchange =
|
||||
bts::domain::SecurityCommon::convert(from.security_common.venue);
|
||||
to.display_factor = 0.0;
|
||||
double min_tick = from.security_common.min_price_increment.to_double();
|
||||
to.low_tick = to.high_tick = min_tick;
|
||||
|
||||
@@ -72,7 +72,7 @@ void MDReplayer::_replay_file_once() {
|
||||
LOG(md, Info, "MDReplayer::_replay_once no of decoded msgs: {}", i);
|
||||
};
|
||||
std::string file_name = "/home/taha/sparkdata/data/md_recording/"
|
||||
"marketdata-20230112-1114.recording";
|
||||
"marketdata-20230117-1141.recording";
|
||||
LOG(md, Info, "MDReplayer::_replay_file_once replaying file: {}", file_name);
|
||||
std::fstream in(file_name, std::ios::binary | std::ios::in);
|
||||
co2::RecordedMDMessage rec_msg;
|
||||
|
||||
@@ -108,7 +108,7 @@ static void execute() {
|
||||
position::MarginServiceServer margin_service(sc, mdclient);
|
||||
metrics::ShellLatencyServer shell_latency_service(
|
||||
sc, stats, utils::Dispatcher::background());
|
||||
// bts::md::recording::MDRecorder md_recorder(sc, mdclient);
|
||||
// bts::md::recording::MDRecorder md_recorder(mdclient);
|
||||
|
||||
auto bg_health =
|
||||
std::make_shared<metrics::IntCounterMetric>("spark_background_thread");
|
||||
|
||||
@@ -155,7 +155,7 @@ void Run::run(
|
||||
if (is_run_emumba) {
|
||||
threading::make_thread("Emumba", []() { run_emumba(); }).detach();
|
||||
}
|
||||
bool is_run_replay_new = false;
|
||||
bool is_run_replay_new = true;
|
||||
if (is_run_replay_new) {
|
||||
threading::make_thread("MDReplay", []() {
|
||||
run_replay_new();
|
||||
|
||||
Reference in new issue
Block a user