public Builder mergeFrom(com.activequant.messages.AQMessages.PositionReport other) { if (other == com.activequant.messages.AQMessages.PositionReport.getDefaultInstance()) return this; if (other.hasOpenDate()) { setOpenDate(other.getOpenDate()); } if (other.hasEntryPrice()) { setEntryPrice(other.getEntryPrice()); } if (other.hasQuantity()) { setQuantity(other.getQuantity()); } if (other.hasTradInstId()) { setTradInstId(other.getTradInstId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * converts a position report to google protocol buffers. * * @param pe * @return */ public BaseMessage convert(PositionEvent pe) { // AQMessages.PositionReport l = AQMessages.PositionReport.newBuilder() .setEntryPrice(pe.getPrice()).setOpenDate("") .setQuantity(pe.getQuantity()) .setTradInstId(pe.getTradInstId()).build(); return wrap(BaseMessage.CommandType.POSITION_REPORT, AQMessages.PositionReport.cmd, l); }
public BaseMessage OrderCancelRejected(String mdiId, String entryDate, Double entryPrice, Double quantity) { AQMessages.PositionReport l = AQMessages.PositionReport.newBuilder() .setTradInstId(mdiId).setOpenDate(entryDate) .setEntryPrice(entryPrice).setQuantity(quantity).build(); return wrap(BaseMessage.CommandType.POSITION_REPORT, AQMessages.PositionReport.cmd, l); }
public BaseMessage OrderCancelReplaceReq(String mdiId, String entryDate, Double entryPrice, Double quantity) { AQMessages.PositionReport l = AQMessages.PositionReport.newBuilder() .setTradInstId(mdiId).setOpenDate(entryDate) .setEntryPrice(entryPrice).setQuantity(quantity).build(); return wrap(BaseMessage.CommandType.POSITION_REPORT, AQMessages.PositionReport.cmd, l); }
public BaseMessage buildPositionReport(String mdiId, String entryDate, Double entryPrice, Double quantity) { AQMessages.PositionReport l = AQMessages.PositionReport.newBuilder() .setTradInstId(mdiId).setOpenDate(entryDate) .setEntryPrice(entryPrice).setQuantity(quantity).build(); return wrap(BaseMessage.CommandType.POSITION_REPORT, AQMessages.PositionReport.cmd, l); }