From 9ae8b92ba549ab916c88e9004a95c1ed0cd16059 Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Wed, 19 Jan 2022 10:48:57 +0000
Subject: [PATCH] Added loop to click trader and hit self for perf testing

---
 json.hpp |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/json.hpp b/json.hpp
index 9da1381..bfe2c50 100644
--- a/json.hpp
+++ b/json.hpp
@@ -29,7 +29,7 @@
 	NONE
 };
 
-enum TradeTypeEnum { BUY_AGGRESSOR, SELL_AGGRESSOR };
+enum TradeTypeEnum { BUY_AGGRESSOR, SELL_AGGRESSOR, BROKER_TRADE };
 
 struct Message {
 	MessageTypes type;
@@ -82,6 +82,7 @@
 	                std::chrono::nanoseconds expiry, double aggFee,
 	                double pasFee, double broFee, uint64_t sequence,
 	                double timestamp);
+    std::string as_string();
 };
 
 struct SettleMessage : public FromExchange {
@@ -91,6 +92,7 @@
 	SettleMessage(MessageTypes type, std::string product,
 	              std::string stationName, std::chrono::nanoseconds expiry,
 	              double price, uint64_t sequence, double timestamp);
+    std::string as_string();
 };
 
 struct AddMessage : public ToExchange {
@@ -108,9 +110,10 @@
 	double price;
 	uint64_t filled;
 	uint64_t resting;
+    std::string owner;
 	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);
+	             uint64_t resting, std::string owner, uint64_t sequence, double timestamp);
 	std::string as_string();
 };
 
@@ -149,12 +152,14 @@
 	             TradeTypeEnum tradeType, std::string passiveOrder,
 	             uint64_t passiveOrderRemaining, uint64_t sequence,
 	             double timestamp);
+	std::string as_string();
 };
 
 struct BrokerRequest : public Broker {
 	BrokerRequest(MessageTypes type, std::string product, double price,
 	              book::OrderSideEnum side, uint64_t volume,
 	              std::string counterparty);
+	std::string as_string();
 };
 
 struct BrokerAck : public Broker {
@@ -165,6 +170,7 @@
 	          book::OrderSideEnum side, uint64_t volume,
 	          std::string counterparty, std::string id,
 	          std::string brokerTradeStatus, std::string owner);
+	std::string as_string();
 };
 
 struct BrokerConfirm : public Broker {
@@ -172,6 +178,7 @@
 	BrokerConfirm(MessageTypes type, std::string product, double price,
 	              book::OrderSideEnum side, uint64_t volume,
 	              std::string counterparty, std::string id);
+	std::string as_string();
 };
 
 std::queue<Message*> parse(std::string& str);

--
Gitblit v1.9.3