IConnector
The main interface providing the connection to the trading systems.
Implements: IMessageTransport, IPersistable, ILogReceiver, ILogSource, IDisposable, IMarketDataProvider, ITransactionProvider, ISecurityProvider, ISecurityMessageProvider, ISubscriptionProvider, ITimeProvider, IPortfolioProvider, IPositionProvider
Properties
public bool CanConnect { get; }
value = iConnector.CanConnect
Determines this connector is ready for establish connection.
public ConnectionStates ConnectionState { get; }
value = iConnector.ConnectionState
Connection state.
public IEnumerable<ExchangeBoard> ExchangeBoards { get; }
value = iConnector.ExchangeBoards
List of all exchange boards, for which instruments are loaded Securities.
public IMessageAdapter MarketDataAdapter { get; }
value = iConnector.MarketDataAdapter
Market-data adapter.
public IEnumerable<Security> Securities { get; }
value = iConnector.Securities
List of all loaded instruments. It should be called after event SecurityReceived arisen. Otherwise the empty set will be returned.
public IMessageAdapter TransactionAdapter { get; }
value = iConnector.TransactionAdapter
Transactional adapter.
Methods
public Security GetSecurity(SecurityId securityId)
result = iConnector.GetSecurity(securityId)
Get security by identifier.
- securityId
- Security ID.
Returns: Security.
public ValueTask<Security> GetSecurityAsync(SecurityId securityId, CancellationToken cancellationToken)
result = iConnector.GetSecurityAsync(securityId, cancellationToken)
Get security by identifier.
- securityId
- Security ID.
- cancellationToken
- CancellationToken
Returns: Security.
public SecurityId GetSecurityId(Security security)
result = iConnector.GetSecurityId(security)
Get SecurityId.
- security
- Security.
Returns: Security ID.
public void SendOutMessage(Message message)
iConnector.SendOutMessage(message)
Send outgoing message.
- message
- Message.
public ValueTask SendOutMessageAsync(Message message, CancellationToken cancellationToken)
result = iConnector.SendOutMessageAsync(message, cancellationToken)
Send outgoing message.
- message
- Message.
- cancellationToken
- CancellationToken
Events
public event Action<long, Exception> ChangePasswordResult
iConnector.ChangePasswordResult += handler
Change password result.
public event Action<IMessageAdapter> ConnectedEx
iConnector.ConnectedEx += handler
Connected.
public event Action<Exception> ConnectionError
iConnector.ConnectionError += handler
Connection error (for example, the connection was aborted by server).
public event Action<IMessageAdapter, Exception> ConnectionErrorEx
iConnector.ConnectionErrorEx += handler
Connection error (for example, the connection was aborted by server).
public event Action<IMessageAdapter> ConnectionLost
iConnector.ConnectionLost += handler
Connection lost.
public event Action<IMessageAdapter> ConnectionRestored
iConnector.ConnectionRestored += handler
Connection restored.
public event Action<IMessageAdapter> DisconnectedEx
iConnector.DisconnectedEx += handler
Disconnected.