Table of Contents

Class DefaultFixDialect

Namespace
StockSharp.Fix.Dialects
Assembly
StockSharp.Fix.Core.dll

The default implementation of IFixDialect.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Default")]
[MediaIcon("Fix_logo.svg")]
public class DefaultFixDialect : BaseFixDialect, IFixDialect, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable, IDemoAdapter
Inheritance
DefaultFixDialect
Implements
ICloneable<IMessageChannel>
IPersistable
Derived
Inherited Members
Extension Methods

Constructors

DefaultFixDialect(IdGenerator)

Initializes a new instance of the DefaultFixDialect.

public DefaultFixDialect(IdGenerator transactionIdGenerator)

Parameters

transactionIdGenerator IdGenerator

Transaction id generator.

Properties

CheckTimeFrameByRequest

Check possible time-frame by request.

public override bool CheckTimeFrameByRequest { get; }

Property Value

bool

ConvertToLatin

Convert all non-latin text messages to latin.

public bool ConvertToLatin { get; set; }

Property Value

bool

IsAutoReplyOnTransactonalUnsubscription

Send auto response for OrderStatusMessage and PortfolioLookupMessage unsubscribes.

public override bool IsAutoReplyOnTransactonalUnsubscription { get; }

Property Value

bool

IsSupportCandlesUpdates

Support candles subscription and live updates.

public override bool IsSupportCandlesUpdates { get; }

Property Value

bool

IsSupportMarketDataResponse

Support market-data response.

protected override bool IsSupportMarketDataResponse { get; }

Property Value

bool

PossibleSupportedMessages

Possible supported by adapter message types.

public override IEnumerable<MessageTypeInfo> PossibleSupportedMessages { get; }

Property Value

IEnumerable<MessageTypeInfo>

SupportLicensing

Support of licensing features.

public override bool SupportLicensing { get; }

Property Value

bool

SupportedResultMessages

Supported by adapter result message types.

public override IEnumerable<MessageTypes> SupportedResultMessages { get; set; }

Property Value

IEnumerable<MessageTypes>

TimeFrames

Possible time-frames.

protected override IEnumerable<TimeSpan> TimeFrames { get; }

Property Value

IEnumerable<TimeSpan>

Methods

GetHistoryStepSize(SecurityId, DataType, out TimeSpan)

Get maximum size step allowed for historical download.

public override TimeSpan GetHistoryStepSize(SecurityId securityId, DataType dataType, out TimeSpan iterationInterval)

Parameters

securityId SecurityId

SecurityId

dataType DataType

Data type info.

iterationInterval TimeSpan

Interval between iterations.

Returns

TimeSpan

Step.

OnRead(IFixReader, string, Action<Message>)

Read next message from FIX protocol.

protected override bool? OnRead(IFixReader reader, string msgType, Action<Message> messageHandler)

Parameters

reader IFixReader

The reader of data recorded in the FIX protocol format.

msgType string

Message type.

messageHandler Action<Message>

Message handler.

Returns

bool?

true, if the messages was read successfully, false to skip unknown message, null to break connection.

OnWrite(IFixWriter, Message)

Write the specified message into FIX protocol.

protected override string OnWrite(IFixWriter writer, Message message)

Parameters

writer IFixWriter

The recorder of data in the FIX protocol format.

message Message

The message.

Returns

string

FixMessages value.

ReadOrderCondition(IFixReader, FixTags, Func<OrderCondition>)

To read the order condition OrderCondition.

protected virtual bool ReadOrderCondition(IFixReader reader, FixTags tag, Func<OrderCondition> getCondition)

Parameters

reader IFixReader

Data reader.

tag FixTags

Tag.

getCondition Func<OrderCondition>

The function returning the order condition.

Returns

bool

Whether the data was successfully processed.

RegisterCandleType(char, Type)

Register new candle type.

public static void RegisterCandleType(char code, Type messageType)

Parameters

code char

MDEntryType value.

messageType Type

Message type.

WriteOrderCondition(IFixWriter, OrderCondition)

To record data by the order condition.

protected virtual void WriteOrderCondition(IFixWriter writer, OrderCondition condition)

Parameters

writer IFixWriter

FIX data writer.

condition OrderCondition

Order condition (e.g., stop- and algo- orders parameters).