OnixS C++ B3 BOE Binary Order Entry  1.2.0
API Documentation
Message Fields

An SBE message provides access to message fields via its methods.

To get/set a field value, use the corresponding method of the strongly typed message class.

Setters

The naming convention for setters is setFieldName(..).

Setting Optional Fields

To set the value of the optional field to null, use the setFieldNameToNull() method.

It is also possible to use NullFieldType constants (OnixS::B3::BOE::Messaging::NullUInt32, OnixS::B3::BOE::Messaging::NullAllocID, OnixS::B3::BOE::Messaging::NullAllocReportID, OnixS::B3::BOE::Messaging::NullBusinessRejectRefID, etc.).

Getters

The naming convention for getters is fieldName().

Getting Optional Fields

Getters for optional fields return true if the value is present, otherwise - false.

Example

using namespace OnixS::B3::BOE;
using namespace OnixS::B3::BOE::Messaging;
typedef MessageHolder<NewOrderSingle102> NewOrderSingle;
NewOrderSingle order;
// Set fields:
order->setOrdTagId(100)
.setMmProtectionReset(Boolean::FalseValue)
.setClOrdId(1)
.setAccount(10101)
.setSenderLocation("DMA")
.setEnteringTrader("TADA")
.setSelfTradePreventionInstruction(SelfTradePreventionInstruction::None)
.setSide(Side::Buy)
.setOrdType(OrdType::Limit)
.setTimeInForce(TimeInForce::Day)
.setOrderQty(100)
.setSecurityId(100000140035)
.setMemo("VALE3 1714479423613")
.setPrice(PriceOptional(10100))
.setDeskId("1");
// Set an optional field to the `null` value:
order->setRoutingInstructionToNull();
// Get required fields:
const Quantity orderQty = order->orderQty();
const Side::Enum side = order->side();
// Get an optional field:
if (order->maxFloor(maxFloor))
{
}