| | |
| | | BROKER_REQUEST, |
| | | BROKER_ACK, |
| | | BROKER_CONFIRM, |
| | | ERROR, |
| | | NONE |
| | | }; |
| | | |
| | | enum TradeTypeEnum { BUY_AGGRESSOR, SELL_AGGRESSOR }; |
| | | enum TradeTypeEnum { BUY_AGGRESSOR, SELL_AGGRESSOR, BROKER_TRADE }; |
| | | |
| | | struct Message { |
| | | MessageTypes type; |
| | |
| | | Message(MessageTypes type, std::string product); |
| | | Message(); |
| | | virtual ~Message() = default; |
| | | }; |
| | | |
| | | struct ErrorMessage : public Message { |
| | | std::string message; |
| | | ErrorMessage(std::string message); |
| | | std::string as_string(); |
| | | }; |
| | | |
| | | struct FromExchange : public Message { |
| | |
| | | AddedMessage(MessageTypes type, std::string product, std::string id, |
| | | book::OrderSideEnum side, double price, uint64_t filled, |
| | | uint64_t resting, uint64_t sequence, double timestamp); |
| | | std::string as_string(); |
| | | }; |
| | | |
| | | struct DeleteMessage : public ToExchange { |
| | |
| | | DeletedMessage(MessageTypes type, std::string product, std::string id, |
| | | book::OrderSideEnum side, uint64_t sequence, |
| | | double timestamp); |
| | | std::string as_string(); |
| | | }; |
| | | |
| | | struct RejectMessage : public FromExchange { |
| | | std::string error; |
| | | RejectMessage(MessageTypes type, std::string product, std::string error, |
| | | uint64_t sequence, double timestamp); |
| | | std::string as_string(); |
| | | }; |
| | | |
| | | struct TradeMessage : public FromExchange { |