Class FixMessageAdapter
- Namespace
- StockSharp.Fix
- Assembly
- StockSharp.Fix.dll
FIX message adapter.
[MediaIcon("Fix_logo.svg")]
[Display(ResourceType = typeof(LocalizedStrings), Name = "FIX", Description = "FixConnector")]
[MessageAdapterCategory(MessageAdapterCategories.Stock|MessageAdapterCategories.FX|MessageAdapterCategories.RealTime|MessageAdapterCategories.Paid|MessageAdapterCategories.Ticks|MessageAdapterCategories.Candles|MessageAdapterCategories.Level1|MessageAdapterCategories.OrderLog|MessageAdapterCategories.Transactions|MessageAdapterCategories.Futures|MessageAdapterCategories.Options)]
public class FixMessageAdapter : MessageAdapter, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable, INotifyPropertyChanged, ILoginPasswordAdapter, IAddressAdapter<EndPoint>, ISenderTargetAdapter, IDemoAdapter
- Inheritance
-
FixMessageAdapter
- Implements
-
ICloneable<IMessageChannel>IPersistable
- Derived
- Inherited Members
- Extension Methods
Constructors
FixMessageAdapter(IdGenerator)
Initializes a new instance of the FixMessageAdapter.
public FixMessageAdapter(IdGenerator transactionIdGenerator)
Parameters
transactionIdGenerator
IdGeneratorTransaction id generator.
Properties
Accounts
Accounts associated with FIX login.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Portfolios", GroupName = "Session", Order = 27)]
public string Accounts { get; set; }
Property Value
Address
Server address.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Address", Description = "AddressDot", GroupName = "Session", Order = 0)]
public EndPoint Address { get; set; }
Property Value
AssociatedBoards
The adapter can process subscription only with instruments associated with the specified board.
public override string[] AssociatedBoards { get; }
Property Value
- string[]
CancelOnDisconnect
Cancel On Disconnect.
[Display(ResourceType = typeof(LocalizedStrings), Name = "CancelOnDisconnect", Description = "CancelOnDisconnectDot", GroupName = "Session", Order = 24)]
public bool CancelOnDisconnect { get; set; }
Property Value
CandlesBuildFrom
Possible options for candles building.
public override IEnumerable<Level1Fields> CandlesBuildFrom { get; }
Property Value
Categories
Message adapter categories.
public override MessageAdapterCategories Categories { get; }
Property Value
CheckCertificateRevocation
Check certificate revocation.
[Display(ResourceType = typeof(LocalizedStrings), Name = "CheckCertificateRevocation", Description = "CheckCertificateRevocationDesc", GroupName = "Ssl", Order = 204)]
public bool CheckCertificateRevocation { get; set; }
Property Value
CheckTimeFrameByRequest
Check possible time-frame by request.
public override bool CheckTimeFrameByRequest { get; }
Property Value
ClientCode
Client code assigned by the broker.
[Display(ResourceType = typeof(LocalizedStrings), Name = "ClientCode", Description = "ClientCodeDesc", GroupName = "Session", Order = 21)]
public string ClientCode { get; set; }
Property Value
ClientVersion
[Display(ResourceType = typeof(LocalizedStrings), Name = "Version", Description = "ClientVersion", GroupName = "Session", Order = 27)]
public string ClientVersion { get; set; }
Property Value
DateFormat
Date format.
[Display(ResourceType = typeof(LocalizedStrings), Name = "DatesFormat", Description = "DatesFormatDot", GroupName = "Session", Order = 16)]
public string DateFormat { get; set; }
Property Value
Dialect
The FIX dialect. The default is DefaultFixDialect.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Dialect", Description = "FixDialectProtocol", GroupName = "Session", Order = 1)]
public Type Dialect { get; set; }
Property Value
DoNotSendAccount
Do not send Account.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Account", Description = "DoNotSendAccount", GroupName = "Session", Order = 25)]
public bool DoNotSendAccount { get; set; }
Property Value
Encoding
The encoding used for data transmission.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Encoding", Description = "EncodingDesc", GroupName = "Session", Order = 11)]
public Encoding Encoding { get; set; }
Property Value
EnqueueSubscriptions
Enqueue subscriptions.
public override bool EnqueueSubscriptions { get; set; }
Property Value
Remarks
Do not send new request before received confirmation for previous.
ExchangeBoard
Board, where securities are traded.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Board", Description = "FixConnectorBoard", GroupName = "Session", Order = 21)]
public string ExchangeBoard { get; set; }
Property Value
ExtraSetup
The adapter requires extra setup.
public override bool ExtraSetup { get; }
Property Value
FeatureName
Feature name.
public override string FeatureName { get; }
Property Value
FixDialect
The FIX dialect.
[Browsable(false)]
public IFixDialect FixDialect { get; }
Property Value
GenerateOrderBookFromLevel1
Generate QuoteChangeMessage from Level1ChangeMessage.
public override bool GenerateOrderBookFromLevel1 { get; set; }
Property Value
Icon
Icon.
public override Uri Icon { get; }
Property Value
IsAutoReplyOnTransactonalUnsubscription
Send auto response for OrderStatusMessage and PortfolioLookupMessage unsubscribes.
public override bool IsAutoReplyOnTransactonalUnsubscription { get; }
Property Value
IsDemo
Connect to demo trading instead of real trading server.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Demo", Description = "DemoTradingConnect", GroupName = "Session", Order = 8)]
public bool IsDemo { get; set; }
Property Value
IsFullCandlesOnly
Translates CandleMessage as only fully filled.
public override bool IsFullCandlesOnly { get; }
Property Value
IsNativeIdentifiers
Identify security in messages by native identifier Native.
public override bool IsNativeIdentifiers { get; }
Property Value
IsNativeIdentifiersPersistable
Native identifier can be stored.
public override bool IsNativeIdentifiersPersistable { get; }
Property Value
IsPositionsEmulationRequired
Adapter required emulation PositionChangeMessage.
public override bool? IsPositionsEmulationRequired { get; }
Property Value
- bool?
Remarks
IsReplaceCommandEditCurrent
Is the OrderReplaceMessage command edit a current order.
public override bool IsReplaceCommandEditCurrent { get; }
Property Value
IsResetCounter
Should the sequence counter be reset.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Counter", Description = "ResetCounter", GroupName = "Session", Order = 12)]
public bool IsResetCounter { get; set; }
Property Value
IsSecurityNewsOnly
Adapter provides news related with specified security.
public override bool IsSecurityNewsOnly { get; }
Property Value
IsSupportExecutionsPnL
Adapter fills PnL.
public override bool IsSupportExecutionsPnL { get; }
Property Value
IsSupportOrderBookIncrements
Adapter translates incremental order books.
public override bool IsSupportOrderBookIncrements { get; }
Property Value
IsSupportPartialDownloading
Support partial downloading.
public override bool IsSupportPartialDownloading { get; }
Property Value
IsSupportSubscriptions
Support any subscriptions (ticks, order books etc.).
public override bool IsSupportSubscriptions { get; }
Property Value
IsSupportTransactionLog
Adapter translates orders changes on reply of OrderStatusMessage.
public override bool IsSupportTransactionLog { get; }
Property Value
IterationInterval
Interval between iterations.
public override TimeSpan IterationInterval { get; }
Property Value
Login
Login.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Login", Description = "LoginDot", GroupName = "Session", Order = 4)]
public string Login { get; set; }
Property Value
OrderConditionType
Type of OrderCondition.
public override Type OrderConditionType { get; }
Property Value
Remarks
If the connection does not support the order type Conditional, it will be returned null.
OverrideExecIdByNative
Override exec id by native identifier (if present in FIX message).
[Display(ResourceType = typeof(LocalizedStrings), Name = "ExecId", Description = "OverrideExecIdByNative", GroupName = "Session", Order = 26)]
public bool OverrideExecIdByNative { get; set; }
Property Value
Password
Password.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Password", Description = "PasswordDot", GroupName = "Session", Order = 5)]
public SecureString Password { get; set; }
Property Value
PossibleSupportedMessages
Possible supported by adapter message types.
public override IEnumerable<MessageTypeInfo> PossibleSupportedMessages { get; }
Property Value
ReadTimeout
The timeout of reading data. The default value is Zero.
[Display(ResourceType = typeof(LocalizedStrings), Name = "ReadTimeOut", Description = "ReadTimeOutDesc", GroupName = "Session", Order = 19)]
public TimeSpan ReadTimeout { get; set; }
Property Value
SecurityExtendedFields
Names of extended security fields in SecurityMessage.
public override IEnumerable<Tuple<string, Type>> SecurityExtendedFields { get; }
Property Value
SenderCompId
Sender ID.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Sender", Description = "SenderCompId", GroupName = "Session", Order = 2)]
public string SenderCompId { get; set; }
Property Value
SslCertificate
SSL certificate.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Certificate", Description = "SslCertificate", GroupName = "Ssl", Order = 202)]
public string SslCertificate { get; set; }
Property Value
SslCertificatePassword
SSL certificate password.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Password", Description = "SslCertificatePassword", GroupName = "Ssl", Order = 203)]
public SecureString SslCertificatePassword { get; set; }
Property Value
SslProtocol
SSL protocol to establish connect.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Protocol", Description = "SslProtocol", GroupName = "Ssl", Order = 201)]
public SslProtocols SslProtocol { get; set; }
Property Value
StorageName
The storage name, associated with the adapter.
public override string StorageName { get; }
Property Value
SupportUnknownExecutions
Support executions processing, generated by third-party software.
[Display(ResourceType = typeof(LocalizedStrings), Name = "UnknownTransactions", Description = "UnknownTransactionsDesc", GroupName = "Session", Order = 23)]
public bool SupportUnknownExecutions { get; set; }
Property Value
SupportedInMessages
Supported by adapter message types.
public override IEnumerable<MessageTypes> SupportedInMessages { get; set; }
Property Value
SupportedMarketDataTypes
Supported by adapter market data types.
public override IEnumerable<DataType> SupportedMarketDataTypes { get; }
Property Value
SupportedOrderBookDepths
Available options for MaxDepth.
public override IEnumerable<int> SupportedOrderBookDepths { get; }
Property Value
SupportedResultMessages
Supported by adapter result message types.
public override IEnumerable<MessageTypes> SupportedResultMessages { get; }
Property Value
TargetCompId
Target ID.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Target", Description = "TargetCompId", GroupName = "Session", Order = 3)]
public string TargetCompId { get; set; }
Property Value
TargetHost
The name of the server that shares SSL connection.
[Display(ResourceType = typeof(LocalizedStrings), Name = "TargetHost", Description = "TargetHostDesc", GroupName = "Ssl", Order = 206)]
public string TargetHost { get; set; }
Property Value
TimeFormat
Time format.
[Display(ResourceType = typeof(LocalizedStrings), Name = "TimeFormat", Description = "TimeFormatDot", GroupName = "Session", Order = 18)]
public string TimeFormat { get; set; }
Property Value
TimeStampFormat
Timestamp format.
[Display(ResourceType = typeof(LocalizedStrings), Name = "DateTimeFormat", Description = "DateTimeFormatDot", GroupName = "Session", Order = 17)]
public string TimeStampFormat { get; set; }
Property Value
UseChannels
Use channels for in and out messages.
public override bool UseChannels { get; }
Property Value
ValidateRemoteCertificates
Validate remove certificates.
[Display(ResourceType = typeof(LocalizedStrings), Name = "ValidateRemoteCertificates", Description = "ValidateRemoteCertificatesDesc", GroupName = "Ssl", Order = 205)]
public bool ValidateRemoteCertificates { get; set; }
Property Value
WriteTimeout
The timeout of sending data. The default value is Zero.
[Display(ResourceType = typeof(LocalizedStrings), Name = "WriteTimeOut", Description = "WriteTimeOutDesc", GroupName = "Session", Order = 20)]
public TimeSpan WriteTimeout { get; set; }
Property Value
YearMonthFormat
Year month format.
[Display(ResourceType = typeof(LocalizedStrings), Name = "YearMonth", Description = "YearMonthFormat", GroupName = "Session", Order = 18)]
public string YearMonthFormat { get; set; }
Property Value
Methods
CreateOrderLogMarketDepthBuilder(SecurityId)
Create market depth builder.
public override IOrderLogMarketDepthBuilder CreateOrderLogMarketDepthBuilder(SecurityId securityId)
Parameters
securityId
SecurityIdSecurity ID.
Returns
- IOrderLogMarketDepthBuilder
Order log to market depth builder.
GetCandleArgs(Type, SecurityId, DateTimeOffset?, DateTimeOffset?)
Get possible args for the specified candle type and instrument.
public override IEnumerable<object> GetCandleArgs(Type candleType, SecurityId securityId, DateTimeOffset? from, DateTimeOffset? to)
Parameters
candleType
TypeThe type of the message CandleMessage.
securityId
SecurityIdSecurity ID.
from
DateTimeOffset?The initial date from which you need to get data.
to
DateTimeOffset?The final date by which you need to get data.
Returns
- IEnumerable<object>
Possible args.
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.
GetMaxCount(DataType)
Get maximum possible items count per single subscription request.
public override int? GetMaxCount(DataType dataType)
Parameters
dataType
DataTypeData type info.
Returns
- int?
Max items count.
GetSupportedDataTypes(SecurityId)
Get supported data types for the specified SecurityId.
public override IEnumerable<DataType> GetSupportedDataTypes(SecurityId securityId)
Parameters
securityId
SecurityId
Returns
- IEnumerable<DataType>
Supported data types.
IsAllDownloadingSupported(DataType)
Is for the specified dataType
all securities downloading enabled.
public override bool IsAllDownloadingSupported(DataType dataType)
Parameters
dataType
DataTypeData type info.
Returns
- bool
Check result.
IsSecurityRequired(DataType)
Support filtering subscriptions (subscribe/unsubscribe for specified security).
public override bool IsSecurityRequired(DataType dataType)
Parameters
dataType
DataTypeData type info.
Returns
- bool
Check result.
IsSupportCandlesPriceLevels(MarketDataMessage)
Support candles PriceLevels.
public override bool IsSupportCandlesPriceLevels(MarketDataMessage subscription)
Parameters
subscription
MarketDataMessage
Returns
- bool
Check result.
IsSupportCandlesUpdates(MarketDataMessage)
Support candles subscription and live updates.
public override bool IsSupportCandlesUpdates(MarketDataMessage subscription)
Parameters
subscription
MarketDataMessage
Returns
- bool
Check result.
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnSendInMessage(Message)
Send message.
protected override bool OnSendInMessage(Message message)
Parameters
message
MessageMessage.
Returns
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
ToString()
public override string ToString()