OnixS C++ ICE Binary Order Entry Handler 1.0.0
API Documentation
Loading...
Searching...
No Matches
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 fieldName(..).

Setting Optional Fields

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

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::ICE::BOE;
typedef MessageHolder<NewOrderRequest> NewOrderSingle;
NewOrderSingle order;
// Set fields:
order->side(SideEnum::Buy)
.clOrdId(123)
.timeInForce(TimeInForceEnum::Day)
.orderQty(1000)
.price(10);
// Set an optional field to the `null` value:
order->manualOrderIndicator(nullOpt);
// Get required fields:
const auto side = order->side();
const auto clOrdId = order->clOrdId();
const auto orderQty = order->orderQty();
// Get an optional field:
if (const auto price = order->price())
std::cerr << *price;
// Alternatively
if (nullOpt == order->price())
std::cerr << "no price";