/** * 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 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 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 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); }