• Programming Guide
  • Api Documentation
  • OnixS CME iLink3 Handler for .NET Core, version 1.4.2
Show / Hide Table of Contents
  • Introduction
  • System Requirements
  • Getting Started
    • Error Reporting
    • Licensing
    • SBE Message
      • Tag-based Messaging
      • Message Fields
      • Repeating Groups
    • iLink 3 Session
      • Universally Unique Identifier
      • Establishing iLink3 Connection
      • Exchanging Messages
      • Message Sequence Numbers
  • Configuring the Handler
    • Configuration File Examples (XML or JSON)
  • Logging
  • Session Storage
    • File-Based Session Storage
    • Memory-based Session Storage
    • Asynchronous File-Based Session Storage
    • Pluggable Session Storage
  • Advanced Programming
    • Thread Safety
    • Session Initialization and Binding
    • Session States
    • Listening to Session Events
    • Handling NotApplied Messages
    • Handling Business Reject Messages
    • Automated Downloading of GTC and GTD Orders
    • Reconnection
    • Fault Tolerance
    • Understanding Send Latency
    • Strongly Typed Messages
  • Best Practices
    • Low Latency Best Practices
  • Glossary
  • Support

SBE Message

The <xref:OnixS.SimpleBinaryEncoding.IMessage> represents a Simple Binary Encoding (SBE) message. The details about SBE can be found at the iLink 3 - Simple Binary Encoding page.

SBE Messages

The Handler exposes generic tag-based interface <xref:OnixS.SimpleBinaryEncoding.IFieldSet>, which provide interfaces to manipulate SBE message fields and repeating groups. For fast access to message fields, the Handler generates in-memory wrapper classes, which implements such an interface.

Constructing SBE Message

To create an SBE message object, there is a need to use the <xref:OnixS.SimpleBinaryEncoding.IEncoder> object provided by the session. It creates the underlying buffer and the message wrapper around it.

The following example demonstrates how SBE messages can be created.

const int NewOrderSingleTemplateId = 514;

IEncoder encoder = session.CreateEncoder();

IMessage message = encoder.Wrap(NewOrderSingleTemplateId);

message.SetUnsignedLong(Tag.PartyDetailsListReqID, partyDetailsListReqID);
message.SetByte(Tag.Side, (byte)Side.Buy);
message.SetString(Tag.SenderID, "GFP");
message.SetString(Tag.ClOrdID, "OrderId");
message.SetUnsignedLong(Tag.OrderRequestID, 1u);
message.SetString(Tag.Location, "UK");
message.SetChar(Tag.OrdType, (char)OrderType.Limit);
message.SetByte(Tag.TimeInForce, (byte)TimeInForce.Day);
message.SetInteger(Tag.SecurityID, securityId);
message.SetUnsignedInteger(Tag.OrderQty, 1);
message.SetDecimal(Tag.Price, price);
message.SetByte(Tag.ManualOrderIndicator, (byte)ManualOrdInd.Automated);
message.SetChar(Tag.ExecutionMode, (char)ExecMode.Aggressive);
message.SetByte(Tag.ExecInst, (byte)ExecInst.AON);

In This Article
Back to top Copyright © Onix Solutions.
Generated by DocFX