diff --git sumzero-api/sumzero-broker-api/src/main/java/com/sumzerotrading/broker/order/TradeOrder.java sumzero-api/sumzero-broker-api/src/main/java/com/sumzerotrading/broker/order/TradeOrder.java index 652fafb..a7b8109 100644 --- sumzero-api/sumzero-broker-api/src/main/java/com/sumzerotrading/broker/order/TradeOrder.java +++ sumzero-api/sumzero-broker-api/src/main/java/com/sumzerotrading/broker/order/TradeOrder.java @@ -69,7 +69,9 @@ public class TradeOrder implements Serializable { protected double filledPrice = 0; protected double commission = 0; protected Status currentStatus = Status.NEW; - + + protected String account = null; + public TradeOrder() {} public TradeOrder(String orderId, Ticker ticker, int size, TradeDirection tradeDirection) { @@ -231,6 +233,12 @@ public class TradeOrder implements Serializable { return reference; } + public String getAccount() { + return account; + } + public void setAccount(String account) { + this.account = account; + } public void setReference(String reference) { this.reference = reference; } @@ -326,6 +334,7 @@ public class TradeOrder implements Serializable { hash = 71 * hash + Objects.hashCode(this.childOrders); hash = 71 * hash + Objects.hashCode(this.comboOrder); hash = 71 * hash + Objects.hashCode(this.reference); + hash = 71 * hash + Objects.hashCode(this.account); hash = 71 * hash + (this.submitted ? 1 : 0); hash = 71 * hash + (this.submitChildOrdersFirst ? 1 : 0); hash = 71 * hash + Objects.hashCode(this.orderEntryTime); @@ -430,7 +439,7 @@ public class TradeOrder implements Serializable { @Override public String toString() { - return "TradeOrder{" + "ticker=" + ticker + ", direction=" + direction + ", type=" + type + ", goodAfterTime=" + goodAfterTime + ", goodUntilTime=" + goodUntilTime + ", limitPrice=" + limitPrice + ", stopPrice=" + stopPrice + ", duration=" + duration + ", size=" + size + ", orderId=" + orderId + ", parentOrderId=" + parentOrderId + ", ocaGroup=" + ocaGroup + ", positionId=" + positionId + ", childOrders=" + childOrders + ", comboOrder=" + comboOrder + ", reference=" + reference + ", submitted=" + submitted + ", submitChildOrdersFirst=" + submitChildOrdersFirst + ", orderEntryTime=" + orderEntryTime + ", orderFilledTime=" + orderFilledTime + ", orderTimeInForceMinutes=" + orderTimeInForceMinutes + ", filledSize=" + filledSize + ", filledPrice=" + filledPrice + ", commission=" + commission + ", currentStatus=" + currentStatus + '}'; + return "TradeOrder{" + "ticker=" + ticker + ", direction=" + direction + ", type=" + type + ", goodAfterTime=" + goodAfterTime + ", goodUntilTime=" + goodUntilTime + ", limitPrice=" + limitPrice + ", stopPrice=" + stopPrice + ", duration=" + duration + ", size=" + size + ", orderId=" + orderId + ", parentOrderId=" + parentOrderId + ", ocaGroup=" + ocaGroup + ", positionId=" + positionId + ", childOrders=" + childOrders + ", comboOrder=" + comboOrder + ", reference=" + reference+ ", account=" + account + ", submitted=" + submitted + ", submitChildOrdersFirst=" + submitChildOrdersFirst + ", orderEntryTime=" + orderEntryTime + ", orderFilledTime=" + orderFilledTime + ", orderTimeInForceMinutes=" + orderTimeInForceMinutes + ", filledSize=" + filledSize + ", filledPrice=" + filledPrice + ", commission=" + commission + ", currentStatus=" + currentStatus + '}'; }