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
IdGeneratorTransaction id generator.
Properties
CheckTimeFrameByRequest
Check possible time-frame by request.
public override bool CheckTimeFrameByRequest { get; }
Property Value
ConvertToLatin
Convert all non-latin text messages to latin.
public bool ConvertToLatin { get; set; }
Property Value
IsAutoReplyOnTransactonalUnsubscription
Send auto response for OrderStatusMessage and PortfolioLookupMessage unsubscribes.
public override bool IsAutoReplyOnTransactonalUnsubscription { get; }
Property Value
IsSupportMarketDataResponse
Support market-data response.
protected override bool IsSupportMarketDataResponse { get; }
Property Value
PossibleSupportedMessages
Possible supported by adapter message types.
public override IEnumerable<MessageTypeInfo> PossibleSupportedMessages { get; }
Property Value
SupportLicensing
Support of licensing features.
public override bool SupportLicensing { get; }
Property Value
SupportedResultMessages
Supported by adapter result message types.
public override IEnumerable<MessageTypes> SupportedResultMessages { get; set; }
Property Value
TimeFrames
Possible time-frames.
protected override IEnumerable<TimeSpan> TimeFrames { get; }
Property Value
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
SecurityIddataType
DataTypeData type info.
iterationInterval
TimeSpanInterval between iterations.
Returns
- TimeSpan
Step.
IsSupportCandlesUpdates(MarketDataMessage)
Support candles subscription and live updates.
public override bool IsSupportCandlesUpdates(MarketDataMessage subscription)
Parameters
subscription
MarketDataMessage
Returns
- bool
Check result.
OnRead(IFixReader, string, Action<Message>)
Read next message from FIX protocol.
protected override bool? OnRead(IFixReader reader, string msgType, Action<Message> messageHandler)
Parameters
reader
IFixReaderThe reader of data recorded in the FIX protocol format.
msgType
stringMessage 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
IFixWriterThe recorder of data in the FIX protocol format.
message
MessageThe 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
IFixReaderData reader.
tag
FixTagsTag.
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
charMDEntryType value.
messageType
TypeMessage type.
WriteOrderCondition(IFixWriter, OrderCondition)
To record data by the order condition.
protected virtual void WriteOrderCondition(IFixWriter writer, OrderCondition condition)
Parameters
writer
IFixWriterFIX data writer.
condition
OrderConditionOrder condition (e.g., stop- and algo- orders parameters).