Files
spark/src/lib/orderman/events/TickerUpdateEvent.h
T

38 lines
855 B
C++

#pragma once
#include <memory>
#include "lib/mercury/events/Event.h"
#include "lib/orderman/orderman_utils/orderman_common.h"
#include "lib/utils/bts_chrono.h"
#include "lib/md/protos/co2.pb.h"
#include "boost/container/small_vector.hpp"
namespace bts {
namespace orderman {
class TickerUpdateEvent : public mercury::Event<TickerUpdateEvent> {
SecurityKey _key;
public:
using SynopsisPolicy = mercury::NoSynopsis;
SecurityKey key() const {return _key;};
struct Trade {
TimeStamp ts;
Price price;
Quantity quantity;
Quantity total_volume;
co2::AggressorSide aggressor_side;
};
boost::container::small_vector<TickerUpdateEvent::Trade,5> trades;
TickerUpdateEvent(SecurityKey key) : _key(key), trades() {}
};
typedef boost::container::small_vector<TickerUpdateEvent::Trade,5> TradeVector;
}
}