@Override
public void set(Instrument instrument, DataDictionary dictionary,String msgType, FieldMap message) {
message.setString(Symbol.FIELD, instrument.getSymbol());
message.setString(SecurityType.FIELD,SecurityType.FOREIGN_EXCHANGE_CONTRACT);
if (dictionary.isMsgField(msgType, Product.FIELD)) {
message.setInt(Product.FIELD, Product.CURRENCY);
}
Currency currencyInstrument = (Currency) instrument;
if (dictionary.isMsgField(msgType, quickfix.field.Currency.FIELD) && currencyInstrument.getTradedCCY()!=null) {
message.setString(quickfix.field.Currency.FIELD,currencyInstrument.getTradedCCY());
}
if(MsgType.ORDER_CANCEL_REQUEST.equals(msgType)) {
message.removeField(FutSettDate.FIELD);
message.removeField(quickfix.field.OrdType.FIELD);
} else {
if(currencyInstrument.getNearTenor() !=null) {
message.setString(FutSettDate.FIELD,currencyInstrument.getNearTenor());
}
if (currencyInstrument.isSwap()) {
message.setString(FutSettDate2.FIELD,currencyInstrument.getFarTenor());
message.setChar(quickfix.field.OrdType.FIELD,quickfix.field.OrdType.FOREX_SWAP);
}
}
}
/**