• Version 1.7.1
Show / Hide Table of Contents

Session Initialization and Binding

The Handler supports all three types of Initialization and Binding operations.

Beginning of Week Initialization and Binding

"Beginning of Week initialization and Binding" takes place during the very first connection establishment for the week.

To reset the inbound and outbound sequence numbers to 1 as well as to generate a unique Universally Unique Identifier (UUID), use the following sequence of calls:

if (session.Negotiated)
    session.Reset(true);

session.Connect(CounterpartyHost, CounterpartyPort);

Mid-Week Initialization and Binding

"Mid Week initialization and Binding" takes place when a new session with a new globally unique UUID is created during the week.

To reset the inbound and outbound sequence numbers to 1 as well as to generate a unique UUID, use the following sequence of calls:

if (session.Negotiated)
    session.Reset(false);

session.Connect(CounterpartyHost, CounterpartyPort);

Intra-Session Binding (Binding without Initialization)

"Intra-Session Binding" takes place when the session is connected again after a successful [Beginning of Week Initialization and Binding] (session-initialization-and-binding.md#beginning-of-week-initialization-and-binding) or Mid-Week Initialization and Binding. In this case, the same UUID is used, and the sequence number series is continued from the previous connection.

For example:

// "Beginning of Week Initialization and Binding" or "Mid-Week Initialization and Binding".
// ...

session.Disconnect();

if (!session.Negotiated)
    throw new Exception("Session is not negotiated");

session.Connect(CounterpartyHost, CounterpartyPort);

See Also

  • Automated Downloading of GTC and GTD Orders
  • Universally Unique Identifier (UUID)
  • The GettingStarted sample from the distribution package
In this article
Back to top Copyright © Onix Solutions.
Generated by DocFX