Table of Contents

Interface IConnector

Namespace
StockSharp.BusinessEntities
Assembly
StockSharp.BusinessEntities.dll

The main interface providing the connection to the trading systems.

public interface IConnector : IPersistable, ILogReceiver, IMarketDataProvider, ITransactionProvider, IPositionProvider, IPortfolioProvider, ISecurityProvider, ISecurityMessageProvider, INewsProvider, ISubscriptionProvider, ITimeProvider, ILogSource, IMessageChannel, IDisposable, ICloneable<IMessageChannel>, ICloneable
Inherited Members
Extension Methods

Properties

CanConnect

Determines this connector is ready for establish connection.

bool CanConnect { get; }

Property Value

bool

ConnectionState

Connection state.

ConnectionStates ConnectionState { get; }

Property Value

ConnectionStates

ExchangeBoards

List of all exchange boards, for which instruments are loaded Securities.

IEnumerable<ExchangeBoard> ExchangeBoards { get; }

Property Value

IEnumerable<ExchangeBoard>

MarketDataAdapter

Market-data adapter.

IMessageAdapter MarketDataAdapter { get; }

Property Value

IMessageAdapter

Securities

List of all loaded instruments. It should be called after event SecurityReceived arisen. Otherwise the empty set will be returned.

IEnumerable<Security> Securities { get; }

Property Value

IEnumerable<Security>

TransactionAdapter

Transactional adapter.

IMessageAdapter TransactionAdapter { get; }

Property Value

IMessageAdapter

Methods

Connect()

Connect to trading system.

void Connect()

Disconnect()

Disconnect from trading system.

void Disconnect()

GetSecurity(SecurityId)

Get security by identifier.

Security GetSecurity(SecurityId securityId)

Parameters

securityId SecurityId

Security ID.

Returns

Security

Security.

GetSecurityId(Security)

SecurityId GetSecurityId(Security security)

Parameters

security Security

Security.

Returns

SecurityId

Security ID.

SendOutMessage(Message)

Send outgoing message.

void SendOutMessage(Message message)

Parameters

message Message

Message.

Events

ChangePasswordResult

Change password result.

event Action<long, Exception> ChangePasswordResult

Event Type

Action<long, Exception>

Connected

Connected.

event Action Connected

Event Type

Action

ConnectedEx

Connected.

event Action<IMessageAdapter> ConnectedEx

Event Type

Action<IMessageAdapter>

ConnectionError

Connection error (for example, the connection was aborted by server).

event Action<Exception> ConnectionError

Event Type

Action<Exception>

ConnectionErrorEx

Connection error (for example, the connection was aborted by server).

event Action<IMessageAdapter, Exception> ConnectionErrorEx

Event Type

Action<IMessageAdapter, Exception>

ConnectionLost

Connection lost.

event Action<IMessageAdapter> ConnectionLost

Event Type

Action<IMessageAdapter>

ConnectionRestored

Connection restored.

event Action<IMessageAdapter> ConnectionRestored

Event Type

Action<IMessageAdapter>

Disconnected

Disconnected.

event Action Disconnected

Event Type

Action

DisconnectedEx

Disconnected.

event Action<IMessageAdapter> DisconnectedEx

Event Type

Action<IMessageAdapter>

Error

Data process error.

event Action<Exception> Error

Event Type

Action<Exception>

MarketTimeChanged

Server time changed CurrentTime. It passed the time difference since the last call of the event. The first time the event passes the value Zero.

[Obsolete("Use ITimeProvider.CurrentTimeChanged event.")]
event Action<TimeSpan> MarketTimeChanged

Event Type

Action<TimeSpan>

NewMessage

Message processed Message.

event Action<Message> NewMessage

Event Type

Action<Message>