Miscelaenous improvements.
This commit is contained in:
1 parent
52bc0f1a17
commit
78bc14348d
5 files changed
+63
-25
No files matched your search
@@ -64,26 +64,23 @@ void dump_snapshots() {
|
||||
}
|
||||
|
||||
int QuickTest::execute(std::vector<std::string> const &) {
|
||||
//dump_snapshots();
|
||||
|
||||
// dump_snapshots();
|
||||
|
||||
using namespace bts::spartan::mdp3;
|
||||
|
||||
struct Obs : IChannelObserver {
|
||||
void on_recovery_complete(
|
||||
std::vector<InstrumentSnapshot const *> const &snaps) override {
|
||||
std::cout << "Initial Snapshot\n";
|
||||
for (auto is : snaps) {
|
||||
if (is->security_id() == MDP3SecurityID{12181})
|
||||
std::cout << *is << "\n";
|
||||
}
|
||||
}
|
||||
std::vector<InstrumentSnapshot const *> const &) override {}
|
||||
|
||||
void on_real_time_event(MDP3Event const &ev) override {
|
||||
for (auto is : ev.affected_securities) {
|
||||
if (is->security_id() == MDP3SecurityID{12181}) {
|
||||
std::cout << "Seq numbers: " << ev.first_packet_sn << " to "
|
||||
<< ev.last_packet_sn << "\n";
|
||||
std::cout << *is << "\n";
|
||||
for (auto s : ev.affected_securities) {
|
||||
if (s->order_changes().size() || s->fills().size()) {
|
||||
std::cout << "symbol: " << s->definition().symbol() << "\n"
|
||||
<< "seq_num: " << ev.first_packet_sn << " to "
|
||||
<< ev.last_packet_sn << "\n"
|
||||
<< "changes:\n"
|
||||
<< s->order_changes() << "Fills:\n"
|
||||
<< s->fills();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user