You can create another object to set it however a simpler approach is to do
MyNestedInterface mni = event.getObject();
mni.setTrade(price);
otherwise you can do the following if the interface didn't extend Byteable.
MyNestedInterface mni = DataValueClasses.newHeapInstance(MyNestedInterface.class);
mni.setTrade(price);
event.setObject(mni);
At the moment we don't guarentee that the one byte will be the first one.
If you are going to use the byte as a message type I suggest doing this seperately.
appender.startExcerpt();
appender.writeUnsignedByte(MyNestedInterface.CODE);
((Byteable) mni).bytes(appender, appender.position());
mni.setTrade(price);
appender.skip(8);
appender.finish();
You might it is simpler to not use the intermediate data type in this case.
public void writeTrade(double price) {
appender.startExcerpt();
appender.writeUnsignedByte(MessageTypes.TRADE);
appender.writeDouble(price);
appender.finish();
}