BaseFixDialect

StockSharp.Fix.Dialects

Base class describing the dialect of the FIX protocol.

継承元: BaseLogReceiver

実装: IFixDialect, IMessageAdapter, IMessageTransport, IPersistable, ILogReceiver, ILogSource, IDisposable, ICloneable<IMessageAdapter>, ICloneable, IDemoAdapter

コンストラクター

BaseFixDialect(IdGenerator, Encoding, string)

Initialize BaseFixDialect.

transactionIdGenerator
Transaction id generator.
encoding
Encoding.
version
FIX version.

プロパティ

Accounts : string

Accounts associated with FIX login.

Address : EndPoint

Server address.

AssociatedBoards : string[]

The adapter can process subscription only with instruments associated with the specified board.

CancelOnDisconnect : bool

Cancel On Disconnect.

CandlesBuildFrom : IEnumerable<Level1Fields>

Possible options for candles building.

Categories : MessageAdapterCategories

Message adapter categories.

CheckTimeFrameByRequest : bool

Check possible time-frame by request.

ClientCode : string

Client code assigned by the broker.

ClientVersion : string

Client app version.

CurrentCounter : long

Counter.

DateParser : FastDateTimeParser

Date parser.

DisconnectTimeout : TimeSpan

Gets the timeout to wait for a graceful disconnect.

DoNotSendAccount : bool

Do not send Account.

Encoding : Encoding

Text encoding.

EnqueueSubscriptions : bool

Enqueue subscriptions.

ExchangeBoard : string

Board, where securities are traded.

ExtraSetup : bool

The adapter requires extra setup.

FaultDelay : TimeSpan

Gets or sets the delay applied between faulted iterations.

FeatureName : string

Feature name.

HeartbeatBeforeConnect : bool

Start sending TimeMessage before connection established.

HeartbeatInterval : TimeSpan

Server check interval for track the connection alive. The value is Zero turned off tracking.

Icon : Uri

Icon.

IsAutoReplyOnTransactonalUnsubscription : bool

Send auto response for OrderStatusMessage and PortfolioLookupMessage unsubscribes.

IsDemo : bool

Connect to demo trading instead of real trading server.

IsFullCandlesOnly : bool

Translates CandleMessage as only fully filled.

IsNativeIdentifiers : bool

Identify security in messages by native identifier Native.

IsNativeIdentifiersPersistable : bool

Native identifier can be stored.

IsPositionsEmulationRequired : bool?

Adapter required emulation PositionChangeMessage.

IsReplaceCommandEditCurrent : bool

Is the OrderReplaceMessage command edit a current order.

IsResetCounter : bool

Should the sequence counter be reset.

IsSecurityNewsOnly : bool

Adapter provides news related with specified security.

IsSupportExecutionsPnL : bool

Adapter fills PnL.

IsSupportMarketDataResponse : bool

Support market-data response.

IsSupportOrderBookIncrements : bool

Adapter translates incremental order books.

IsSupportSubscriptions : bool

Support any subscriptions (ticks, order books etc.).

IsSupportTransactionLog : bool

Adapter translates orders changes on reply of OrderStatusMessage.

IterationInterval : TimeSpan

Interval between iterations.

Login : string

Login.

LoginAsPortfolioName : bool

Use Login as portfolio name.

LookupTimeout : TimeSpan?

Lookup timeout.

MaxParallelMessages : int

Gets or sets the maximum number of parallel (non-control) messages that can be processed. Must be greater than or equal to1.

NewOrderSingleErrorsAsReject : bool

Reply errors for messages of type NewOrderSingle transfers via Reject.

NotSupportedResultMessages : IEnumerable<MessageTypes>

Not supported by adapter result message types.

OrderConditionType : Type

Type of OrderCondition.

OverrideExecIdByNative : bool

Override ExecId by native identifier (if present in FIX message).

Password : SecureString

Password.

PossibleSupportedMessages : IEnumerable<MessageTypeInfo>

Possible supported message types.

QuotesAsLevel1 : bool

Translate quote data as Level1ChangeMessage or QuoteChangeMessage.

ReConnectionSettings : ReConnectionSettings

Connection tracking settings IMessageAdapter with a server.

SecurityExtendedFields : IEnumerable<ValueTuple<string, Type>>

Names of extended security fields in SecurityMessage.

SenderCompId : string

Sender ID.

StorageName : string

Storage name.

SupportedInMessages : IEnumerable<MessageTypes>

Supported by adapter message types.

SupportedOrderBookDepths : IEnumerable<int>

Available options for MaxDepth.

SupportLicensing : bool

Support of licensing features.

SupportUnknownExecutions : bool

Support executions processing, generated by third-party software.

TargetCompId : string

Target ID.

TickAsLevel1 : bool

Translate tick data as Level1ChangeMessage or ExecutionMessage.

TimeParser : FastTimeSpanParser

Time parser.

TimeStampParser : FastDateTimeParser

Time stamp parser.

TimeZone : TimeZoneInfo

Local time zone for all DateTime values conversion.

TransactionIdGenerator : IdGenerator

Transaction id generator used for internal child subscription routing. Must be kept in sync with the parent adapter's generator.

UseInChannel : bool

Use channels for in messages.

UseOutChannel : bool

Use channels for out messages.

Version : string

Version of data format.

YearMonthParser : FastDateTimeParser

Year and month parser.

メソッド

ApplyTimeInForce(ExecutionReport, ExecutionMessage, bool) : bool

Apply time in force.

report
msg
throwInvalid
CheckState()

Check state before connect.

Clone() : IMessageAdapter

Creates a deep copy of a DataSeries

CreateOrderLogMarketDepthBuilder(SecurityId) : IOrderLogMarketDepthBuilder

Create market depth builder.

securityId
Security ID.

戻り値: Order log to market depth builder.

DisposeManaged()

Release resources.

FromSecurityTradingStatus(int?) : SecurityStates?

Convert SecurityTradingStatus to SecurityStates value.

status
SecurityTradingStatus value.

戻り値: SecurityStates value.

GetBoardCode(string, string, string) : string

Get board code.

destination
ExDestination.
exchange
SecurityGroup.
tradingSession
TradingSessionID.

戻り値: Board code.

GetExecutionTime(ExecutionReport) : DateTime

Get execution time.

GetOrderState(ExecutionReport) : OrderStates?

Convert OrdStatus to OrderStates value.

report
ExecutionReport value.

戻り値: OrderStates value.

GetOrderStringId(string) : string

Get OrderStringId.

orderId
OrderStringId value.

戻り値: OrderStringId value.

GetOrderType(ExecutionReport, OrderCondition) : OrderTypes

Get order type.

report
Execution report.
condition
Base order condition (for example, for stop order algo orders).

戻り値: Order type.

GetSecurityType(string) : SecurityTypes?

Convert String to SecurityTypes value.

type
String value.

戻り値: SecurityTypes value.

GetSupportedMarketDataTypesAsync(SecurityId, DateTime?, DateTime?) : IAsyncEnumerable<DataType>

Get supported by adapter message types.

securityId
SecurityId
from
Start date for request. If , then all available messages will be returned.
to
End date for request. If , then all available messages will be returned.

戻り値: Supported by adapter market data types.

GetSyntheticPortfolioName() : string

Get synthetic portfolio name for LoginAsPortfolioName mode.

戻り値: Portfolio code name.

InitSecId(SecurityMessage, string, string, string, string)

Init security id information.

message
A message containing info about the security.
symbol
Symbol.
securityExchange
Security exchange.
idSource
Id source.
idValue
Id value.
IsAllDownloadingSupported(DataType) : bool

Is for the specified all securities downloading enabled.

dataType
Data type info.

戻り値: Check result.

IsLogoutError(string) : bool

Check Logout contains error message.

text
Text message.

戻り値: if the specified text contains error message, otherwise, .

IsSecurityRequired(DataType) : bool

Support filtering subscriptions (subscribe/unsubscribe for specified security).

dataType
Data type info.

戻り値: Check result.

IsSupportCandlesPriceLevels(MarketDataMessage) : bool

Support candles PriceLevels.

subscription
MarketDataMessage

戻り値: Check result.

IsSupportCandlesUpdates(MarketDataMessage) : bool

Support candles subscription and live updates.

subscription
MarketDataMessage

戻り値: Check result.

IsSyntheticPortfolioName(string) : bool

Is the specified portfolio name generated by GetSyntheticPortfolioName.

portfolioName
Portfolio code name.

戻り値: Check result.

OnReadAsync(IFixReader, string, CancellationToken) : IAsyncEnumerable<Message>

Read next message from FIX protocol.

reader
The reader of data recorded in the FIX protocol format.
msgType
Message type.
cancellationToken
CancellationToken

戻り値: The sequence of messages.

OnReset()

Reset state.

OnWriteAsync(IFixWriter, Message, CancellationToken) : ValueTask<string>

Write the specified message into FIX protocol.

writer
The recorder of data in the FIX protocol format.
message
The message.
cancellationToken
Cancellation token.

戻り値: FixMessages value.

ProcessExecutionReportAsync(ExecutionReport, Func<ExecutionReport, ExecutionMessage, CancellationToken, IAsyncEnumerable<ExecutionMessage>>, CancellationToken) : IAsyncEnumerable<Message>

Process ExecutionReport instance.

report
ExecutionReport instance.
processExecMsg
Post handle an ExecutionMessage instance.
cancellationToken
CancellationToken
ProcessExecutionReportAsync(ExecutionReport, ExecutionMessage, CancellationToken) : IAsyncEnumerable<Message>

Process ExecutionReport instance.

report
ExecutionReport instance.
message
ExecutionMessage
cancellationToken
CancellationToken
ProcessExecutionReportExtraTagAsync(FixTags, IFixReader, ExecutionReport, CancellationToken) : ValueTask<bool>

Process extra tags for ExecutionReport.

tag
Tag.
reader
The reader of data recorded in the FIX protocol format.
report
Execution report.
cancellationToken
CancellationToken

戻り値: Result.

ProcessParties(ExecutionReport)

Process Parties.

report
Execution report.
ProcessSecurityDefinitionAsync(FixTags, IFixReader, SecurityMessage, CancellationToken) : ValueTask<bool>

Process SecurityDefinition message.

tag
Tag.
reader
The reader of data recorded in the FIX protocol format.
message
A message containing info about the security.
cancellationToken
CancellationToken

戻り値: Processing result.

ProcessSequenceResetExtraTagAsync(FixTags, IFixReader, FixSeqResetMessage, CancellationToken) : ValueTask<bool>

Process extra tags for FixSeqResetMessage.

tag
Tag.
reader
The reader of data recorded in the FIX protocol format.
message
Sequence reset message.
cancellationToken
CancellationToken

戻り値: Result.

RaiseNewOutMessageAsync(Message, CancellationToken) : ValueTask

Raise NewOutMessageAsync

message
Message.
cancellationToken
CancellationToken
ReadExecutionReportAsync(IFixReader, ExecutionReport, FastDateTimeParser, Func<FixTags, IFixReader, ExecutionReport, CancellationToken, ValueTask<bool>>, CancellationToken) : ValueTask<bool>

Read the ExecutionReport message.

reader
The reader of data recorded in the FIX protocol format.
report
ExecutionReport instance.
transactTimeParser
Parser for TransactTime field.
extraTagProcess
cancellationToken
CancellationToken

戻り値: , if the messages was read successfully, to skip unknown message, null to break connection.

SendInMessageAsync(Message, CancellationToken) : ValueTask

Processes a generic message asynchronously.

message
The message to process.
cancellationToken
CancellationToken
ToString() : string

Преобразовать к строковому представлению.

戻り値: Строковое представление.

TryParseNextMsqSeqNum(string) : long?

Try extract expected MsgSeqNum from the specified error message.

errorMessage
Error message.

戻り値: MsgSeqNum or .

WriteAccountAsync(IFixWriter, IPortfolioNameMessage, CancellationToken) : ValueTask

Write Account value.

writer
Writer.
message
Message.
cancellationToken
Cancellation token.
WriteClOrdIdAsync(IFixWriter, long, CancellationToken) : ValueTask

Write ClOrdID.

writer
Writer.
transactionId
Transaction ID.
cancellationToken
Cancellation token.
WriteLogonRequestAsync(IFixWriter, ConnectMessage, CancellationToken, Func<IFixWriter, CancellationToken, ValueTask>) : ValueTask<string>

To record the Logon message (request).

writer
The recorder of data in the FIX protocol format.
message
ConnectMessage.
cancellationToken
Cancellation token.
extra
Write extra parameters for Logon message.

戻り値: FixMessages value.

WriteLogoutRequestAsync(IFixWriter, CancellationToken, string) : ValueTask<string>

To record the Logout message (request).

writer
The recorder of data in the FIX protocol format.
cancellationToken
Cancellation token.
text
The text of reason.

戻り値: FixMessages value.

WriteResendRequestAsync(IFixWriter, long, long, CancellationToken) : ValueTask<string>

To record the ResendRequest message.

writer
The recorder of data in the FIX protocol format.
beginSeqNo
The original message identifier.
endSeqNo
The last message identifier.
cancellationToken
Cancellation token.

戻り値: FixMessages value.

WriteSequenceResetAsync(IFixWriter, bool, long, CancellationToken) : ValueTask<string>

To record the SequenceReset message (request).

writer
The recorder of data in the FIX protocol format.
gapFill
Gap fill.
newSeqNo
New sequence number.
cancellationToken
Cancellation token.

戻り値: FixMessages value.

WriteTimeMessageAsync(IFixWriter, TimeMessage, CancellationToken) : ValueTask<string>

To record the Heartbeat or TestRequest message.

writer
The recorder of data in the FIX protocol format.
timeMsg
Heartbeat message.
cancellationToken
Cancellation token.

戻り値: FixMessages value.

WriteUserRequestChangePasswordAsync(IFixWriter, ChangePasswordMessage, CancellationToken, string, string) : ValueTask<string>

To record the UserRequest message.

writer
The recorder of data in the FIX protocol format.
message
Password change message.
cancellationToken
Cancellation token.
userName
Current user name.
password
Current password.

戻り値: FixMessages value.