Interface for populating Type 2 Record messages, adding fields by field name.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public interface IRecordType2Message : IRecordMessage, IMessage
Public Interface IRecordType2Message _ Implements IRecordMessage, IMessage
public interface class IRecordType2Message : IRecordMessage, IMessage
Members
All Members | Methods | Properties | |||
Icon | Member | Description |
---|---|---|
ClearFields()()() |
Removes all the fields
(Inherited from IRecordMessage.) | |
ContainsField(String) |
Determines whether the message contains the specified field
(Inherited from IRecordMessage.) | |
DeleteEntry |
Gets or sets a value indicating whether this type2 index should be deleted.
| |
Fields |
Gets the fields within this mesasge.
(Inherited from IRecordMessage.) | |
Image |
Gets or sets a boolean value indicating whether this IMessage represents an image or an update.
(Inherited from IMessage.) | |
InitialLatencyChainTime |
Sets the initial time for latency chaining.
(Inherited from IRecordMessage.) | |
Item[([(String])]) |
Gets or sets a specified field.
(Inherited from IRecordMessage.) | |
RemoveField(String) |
Removes the given field from this RecordMessage.
(Inherited from IRecordMessage.) | |
SetField(String, String) |
Sets the value of a specified field.
(Inherited from IRecordMessage.) | |
Subject |
Gets the subject of this message.
(Inherited from IMessage.) | |
Type2Index |
Gets the Type2 index value
| |
Type2IndexField |
Retrieves the fieldname that is used for the Type2 index
|
Remarks
Type 2 data represents market depth, and an instance of an IRecordType2Message represents a market maker or level with an order book. Note that a Record with a given Subject can contain Type 1, Type 2 and Type 3 data. For an illustration of how Type 2 data is structured see the DataSource Overview document supplied with DataSource.NET.
To construct an IRecordType2Message use the IMessageFactory obtained from the IPublisher interface; objects implementing IRecordType2Message cannot be instantiated directly.
Examples
The example below demonstrates sending a Type2 Record update.
CopyC#
using Caplin.DataSource; using Caplin.DataSource.Messaging; using Caplin.DataSource.Messaging.Record; using Caplin.DataSource.Publisher; namespace DataSourceExamples.Messaging.Record { class SendingARecordType2Update { void SendRecordType2Update(IPublisher publisher, string subject) { // Create a Type 2 record message. IRecordType2Message message = publisher.MessageFactory.CreateRecordType2Message(subject, "MarketMakerIndexField", "MarketMaker"); // Add an Ask field. message["Ask"] = "22.1"; // Send the message to subscribed peers. publisher.PublishToSubscribedPeers(message); } } }