Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
343ec38a1f | ||
|
|
0e7ecffd98 | ||
|
|
9ebbe5b4d4 |
No files matched your search
@@ -234,6 +234,14 @@ void DatabentoDatahandler::run(
|
||||
|
||||
switch (sec_type) {
|
||||
case SEC_TYPE(FUTURE):
|
||||
if (sec.venue() == api::domain::VENUE_GLBX && sec.security_common.symbol =="ES") {
|
||||
sec.security_common.min_quantity_increment = 1;
|
||||
sec.security_common.min_quantity = 1;
|
||||
sec.security_common.price_ticks.push_back(10);
|
||||
sec.security_common.price_ticks.push_back(0.25);
|
||||
sec.security_common.price_ticks.push_back(0.25);
|
||||
sec.security_common.cash_per_point = 50;
|
||||
}
|
||||
sec.security.emplace<bts::domain::FutureSecurity>(expiration_time);
|
||||
break;
|
||||
case SEC_TYPE(OPTION): {
|
||||
|
||||
@@ -210,7 +210,7 @@ struct MDRecorder::PImpl {
|
||||
const bts::api::md::MarketDataRecordingConfig &recording_config)
|
||||
: venue(venue),
|
||||
settings(MDRecordingSettings{
|
||||
recording_config.n_book_levels(),
|
||||
10,
|
||||
static_cast<uint64_t>(std::max(recording_config.num_of_seconds_to_run_db_writer(),recording_config.num_of_seconds_to_run_file_writer())) *
|
||||
1000 * 1000 * 1000,
|
||||
static_cast<uint64_t>(recording_config.num_of_seconds_to_run_file_writer()) *
|
||||
@@ -220,8 +220,8 @@ struct MDRecorder::PImpl {
|
||||
100000, 1000000000,recording_config.batch_size(),
|
||||
|
||||
// Read recording toggles from config
|
||||
recording_config.enable_book_recording(),
|
||||
recording_config.enable_trade_recording(),
|
||||
true,
|
||||
true,
|
||||
recording_config.enable_bbo_recording(),
|
||||
recording_config.enable_tbbo_recording(),
|
||||
recording_config.enable_misc_recording()}),
|
||||
|
||||
@@ -160,11 +160,12 @@ void MDReplayer::_replay_file_once(const std::string &file_name) {
|
||||
} else {
|
||||
bts_assert(last_msg_ts != 0);
|
||||
int64_t this_msg_ts = rec_msg.timestamp();
|
||||
bts_assert(this_msg_ts >= last_msg_ts);
|
||||
if(this_msg_ts >= last_msg_ts){
|
||||
int64_t ts_diff = this_msg_ts - last_msg_ts;
|
||||
int64_t adjusted_ts = ts_diff / replay_speed;
|
||||
last_msg_ts = this_msg_ts;
|
||||
std::this_thread::sleep_for(std::chrono::nanoseconds(adjusted_ts));
|
||||
}
|
||||
_replay_message(rec_msg);
|
||||
}
|
||||
log_progress(i);
|
||||
|
||||
Reference in new issue
Block a user