Table of Contents

Class SmartComMessageAdapter

Namespace
StockSharp.SmartCom
Assembly
StockSharp.SmartCom.dll

Адаптер сообщений для SmartCOM.

[OrderCondition(typeof(SmartComOrderCondition))]
[MediaIcon("ITInvest_logo.svg")]
[Display(ResourceType = typeof(LocalizedStrings), Name = "SmartCOM", Description = "StockConnector", GroupName = "Russia")]
[MessageAdapterCategory(MessageAdapterCategories.Russia|MessageAdapterCategories.Stock|MessageAdapterCategories.RealTime|MessageAdapterCategories.Free|MessageAdapterCategories.Ticks|MessageAdapterCategories.Candles|MessageAdapterCategories.MarketDepth|MessageAdapterCategories.Level1|MessageAdapterCategories.Transactions|MessageAdapterCategories.Futures|MessageAdapterCategories.Options)]
public class SmartComMessageAdapter : MessageAdapter, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable, INotifyPropertyChanged, ILoginPasswordAdapter, IDemoAdapter, IAddressAdapter<EndPoint>
Inheritance
SmartComMessageAdapter
Implements
ICloneable<IMessageChannel>
IPersistable
Inherited Members
Extension Methods

Constructors

SmartComMessageAdapter(IdGenerator)

Создать SmartComMessageAdapter.

public SmartComMessageAdapter(IdGenerator transactionIdGenerator)

Parameters

transactionIdGenerator IdGenerator

Генератор идентификаторов транзакций.

Properties

Address

Server address.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Address", Description = "ServerAddressDot", GroupName = "Connection", Order = 0)]
public EndPoint Address { get; set; }

Property Value

EndPoint

AllTimeFrames

Возможные тайм-фреймы.

public static IEnumerable<TimeSpan> AllTimeFrames { get; }

Property Value

IEnumerable<TimeSpan>

ClientSettings

Настройки конфигурации клиентской части SmartCOM.

[Display(ResourceType = typeof(LocalizedStrings), Name = "ClientSettings", Description = "ClientSettingsPath", GroupName = "General", Order = 1)]
public string ClientSettings { get; set; }

Property Value

string

FeatureName

Feature name.

public override string FeatureName { get; }

Property Value

string

IsNativeIdentifiers

Identify security in messages by native identifier Native.

public override bool IsNativeIdentifiers { get; }

Property Value

bool

IsReplaceCommandEditCurrent

Is the OrderReplaceMessage command edit a current order.

public override bool IsReplaceCommandEditCurrent { get; }

Property Value

bool

Login

Login.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Login", Description = "LoginDot", GroupName = "Connection", Order = 1)]
public string Login { get; set; }

Property Value

string

Password

Password.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Password", Description = "PasswordDot", GroupName = "Connection", Order = 2)]
public SecureString Password { get; set; }

Property Value

SecureString

PortfolioBoardCodes

Ассоциация площадок и их кодами, для заполнения BoardCode.

[Browsable(false)]
public IDictionary<string, string> PortfolioBoardCodes { get; }

Property Value

IDictionary<string, string>

ServerSettings

Настройки конфигурации серверной части SmartCOM.

[Display(ResourceType = typeof(LocalizedStrings), Name = "ServerConfig", Description = "ServerConfigPath", GroupName = "General", Order = 2)]
public string ServerSettings { get; set; }

Property Value

string

Version

Версия API. По-умолчанию равна V4.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Version", Description = "VersionApi", GroupName = "General", Order = 0)]
public SmartComVersions Version { get; set; }

Property Value

SmartComVersions

Methods

GetHistoryStepSize(DataType, out TimeSpan)

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

Parameters

dataType DataType
iterationInterval TimeSpan

Returns

TimeSpan

GetTimeFrames(SecurityId, DateTimeOffset?, DateTimeOffset?)

Get possible time-frames for the specified instrument.

protected override IEnumerable<TimeSpan> GetTimeFrames(SecurityId securityId, DateTimeOffset? from, DateTimeOffset? to)

Parameters

securityId SecurityId

Security 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<TimeSpan>

Possible time-frames.

IsAllDownloadingSupported(DataType)

Is for the specified dataType all securities downloading enabled.

public override bool IsAllDownloadingSupported(DataType dataType)

Parameters

dataType DataType

Data type info.

Returns

bool

Check result.

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

OnSendInMessage(Message)

Send message.

protected override bool OnSendInMessage(Message message)

Parameters

message Message

Message.

Returns

bool

true if the specified message was processed successfully, otherwise, false.

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

ToString()

public override string ToString()

Returns

string