final RequestBuilder builder = createRequestBuilder();
return builder.toBytes();
}
private RequestBuilder createRequestBuilder() {
final RequestBuilder builder = new ByteArrayRequestBuilder();
builder.append(OutgoingMessageId.HISTORICAL_DATA_SUBSCRIPTION_REQUEST.getId());
builder.append(VERSION);
builder.append(toInternalId(getId()));
appendContract(builder);
builder.append(endDateTime);
builder.append(barSize.getFormattedBarSize());
builder.append(duration.getFormattedDuration());
builder.append(useRegularTradingHours);
builder.append(historicalDataType.getLabel());
builder.append(dateFormat.getValue());
appendComboLegs(builder);
return builder;
}