Table of Contents

Class MdClientSession

Namespace
Tooq.Tech.FH.ClientLib
Assembly
Tooq.Tech.FH.ClientLib.dll

Class that encapsulates the Market Data Session. This class is the main entry point for the client library. The events exposed by this class use a special delegate (EventHandlerByRef) to reduce allocations when passing the protocol message (struct) to the client.

public class MdClientSession : IDisposable
Inheritance
MdClientSession
Implements
Inherited Members

Constructors

MdClientSession(SessionConfiguration, ILogger?)

Constructor

Properties

Id

The unique identifier of the session.

IsConnected

Boolean indicating if the session is connected

SessionConfiguration

The configuration of the session.

Methods

Connect()

Connects to the server and starts the session.

Disconnect()

Disconnects from the server and stops the session.

Dispose()

Dispose method

GetBrokerList(string, TimeSpan?)

Request a list of brokers from the connected feed handler instance

GetLastPrice(List<ulong>, TimeSpan?)

Request the last price for a list of securities

GetOrderbookSnapshot(ref InstrumentId, TimeSpan?)

Gets an instant full orderbook snapshot from a given instrument.

GetSecurityList(TimeSpan?)

Request the security list from the connected feed handler instance

GetTopOfBook(List<ulong>, TimeSpan?)

Request the top of book data for a list of securities

Login(string, string, string, TimeSpan?)

Initial request that will authenticate the client. Only after a successful login the client will be able to request and receive data updates.

RequestAuctionUpdatesSubscription(string, TimeSpan?)

Subscribe to auction updates from the feed handler instance. This subscription will raise events with AuctionEventData objects whenever any security from the feed handler enters/leaves auction state. Expect a large number of events during market open or market close.

RequestCancelSubscription(Guid, TimeSpan?)

Cancel a subscription.

RequestChangeSubscription(Guid, SubscriptionType, ChangeType, TimeSpan?)

Change the subscription type of a subscription. Since the subscription type is a bitwise flag, flags from the parameter subscriptionType will be added or removed to the subscription given the changeType parameter value. Be aware that invalid flag combinations will trigger an error and the subscription will not be changed.

RequestMultipleSubscription(List<ulong>, SubscriptionType, uint?, TimeSpan?)

Request a subscription to multiple securities at the same time.

RequestNewsSubscription(string, TimeSpan?)

Subscribe to market news updates from the feed handler instance.

RequestSubscription(ref InstrumentId, SubscriptionType, uint?, TimeSpan?)

Request a subscription to a security to receive updates.

SendHeartbeat(TimeSpan?)

Sends a heartbeat to server to keep conenction alive.

Events

AuctionEventDataReceived

Event that is fired whenever there are status updates for instruments regarding auctions.

AuctionImbalanceEventDataReceived

Event that is fired whenever there are auction imbalance updates for a given instrument. This message replicates the corresponding SBE message. Consider utilizing AuctionEventData for simplified auction updates.

ChannelResetEventDataReceived

Event that is fired whenever a channel is reset. Clients must be able to retrieve all instruments from a given channel and clear the orderbook, as well as other data. See UMDF Binary Docs .

ClosingPriceEventDataReceived
Connected

Event that is fired when the session is connected to the server.

Connecting

Event that is fired when the session is connecting to the server.

Disconnected

Event that is fired when the session is disconnected from the server.

Disconnecting

Event that is fired when the session is disconnecting from the server.

EmptyBookEventDataReceived

Event that is fired when all bid orders, ask orders, or orders from both sides for a given instrument have been deleted.

ErrorDetected

Event that is fired when the session has detected a connection error.

ExecutionStatisticsEventDataReceived

Event that is fired whenever a trade occurs for a given instrument. This message replicates the corresponding SBE message.

ExecutionSummaryEventDataReceived

Event that is fired whenever a trade occurs for a given instrument. This message replicates the corresponding SBE message.

ForwardTradeEventDataReceived

Event that is fired whenever a forward trade occurs for a given instrument. This message replicates the corresponding SBE message.

FullMarketByOrderSnapshotEventDataReceived

Event that is fired whenever a client subscribes to a full market by orderbook for a given instrument.

HighPriceEventDataReceived

Event that is fired whenever there are high price updates for a given instrument. This message replicates the corresponding SBE message.

IncrementalUpdateEventDataReceived

Event that is fired whenever there are incremental changes to the orderbook for a given instrument. Received only for realtime, full market by order subscriptions.

InstrumentSnapshotEventDataReceived

Event that is fired whenever a subscription is made for an instrument, bringing in reference data for the instrument as well as trading status and statistics.

L10MarketByPriceSnapshotEventDataReceived

Event that is fired whenever there are changes to the top 10 levels of the price aggregated orderbook for a given instrument.

L2MarketByPriceSnapshotEventDataReceived

Event that is fired whenever there are changes to the top 2 levels of the price aggregated orderbook for a given instrument.

L5MarketByOrderSnapshotEventDataReceived

Event that is fired whenever there are changes to the top 5 levels of the orderbook for a given instrument.

L5MarketByPriceSnapshotEventDataReceived

Event that is fired whenever there are changes to the top 5 levels of the price aggregated orderbook for a given instrument.

LastTradePriceEventDataReceived

Event that is fired whenever a trade occurs for a given instrument. This message replicates the corresponding SBE message.

LowPriceEventDataReceived

Event that is fired whenever there are low price updates for a given instrument. This message replicates the corresponding SBE message.

NewsEventDataReceived

Event that is fired whenever news are broadcast.

OpeningPriceEventDataReceived

Event that is fired whenever there are opening price updates for a given instrument. This message replicates the corresponding SBE message.

PriceBandEventDataReceived
QuantityBandEventDataReceived

Event that is fired whenever there are quantity band updates for a given instrument. This message replicates the corresponding SBE message.

SecurityDefinitionEventDataReceived

Event that is fired whenever securities are created or modified during the trading period. This message replicates the corresponding SBE message.

SecurityGroupPhaseEventDataReceived
SecurityStatusEventDataReceived
TheoreticalOpeningPriceEventDataReceived

Event that is fired whenever there are theoretical opening price updates (auction) for a given instrument. This message replicates the corresponding SBE message. Consider utilizing AuctionEventData for simplified auction updates.

TopOfBookEventDataReceived

Event that is fired whenever there are changes to the top of the book for a given instrument.

TradeBustEventDataReceived

Event that is fired whenever a trade bust for a given instrument. This message replicates the corresponding SBE message.

TradeEventDataReceived

Event that is fired whenever a trade occurs for a given instrument. This message replicates the corresponding SBE message.

TradeWithAggressorEventDataReceived

Event that is fired for any trade received to a subscribed instrument. The message carries the aggressor side of the trade.