Table of Contents

Interface IDataFeedConnector

Namespace
ATAS.DataFeedsCore
Assembly
ATAS.DataFeedsCore.dll

A connection to a broker or a data feed: connects and reconnects, provides securities, portfolios, positions, orders and own trades, places orders and streams market data through its events.
A connector is normally built on BaseConnector<TMessage, TPortfolioKey, TSecurityKey, TSecurityPositionManager> or AsyncConnector<TPortfolioKey, TSecurityKey>, which implement this contract. The events are raised on the connector's threads (the thread that processes its data, a thread-pool thread for the connection state), not on the UI thread; a handler must not block them.

public interface IDataFeedConnector : ILoggerSource
Inherited Members
Extension Methods

Properties

AllowUpdatePositionsPnL

Whether the best bid/ask updates recalculate the open PnL of the positions in the security. Set from the connection settings; true by default.

bool AllowUpdatePositionsPnL { get; set; }

Property Value

bool

ConnectionState

Current connection state of the connector.

ConnectionStates ConnectionState { get; }

Property Value

ConnectionStates

DataPath

The folder for the connector's own files (on the platform, a folder per connector type in the connectors data folder), set when the connector is created.

string DataPath { get; set; }

Property Value

string

DefaultTimeSyncManager

Default ITimeSyncManager to get time difference with NTP server.

ITimeSyncManager? DefaultTimeSyncManager { get; set; }

Property Value

ITimeSyncManager

ExchangeInfoProvider

Gets or sets the provider used to retrieve exchange information for the securities.

Added in ATAS 8.0.15.

IConnectorExchangeInfoProvider ExchangeInfoProvider { get; set; }

Property Value

IConnectorExchangeInfoProvider

Factory

Factory used to create Security, Portfolio, and other entity objects.

IEntityFactory Factory { get; set; }

Property Value

IEntityFactory

HasPendingActions

Whether an order action (register, modify, cancel) has been waiting for the broker's answer for more than a second. The platform asks the user before closing positions while it is true.

bool HasPendingActions { get; }

Property Value

bool

Id

Unique id of the connector instance, created with it.

Guid Id { get; }

Property Value

Guid

IsConnected

Whether the connection is established: set right before Connected and cleared right before Disconnected. Order and market data requests fail or are only counted while it is false.

bool IsConnected { get; }

Property Value

bool

IsFullLicense

License type

bool IsFullLicense { get; set; }

Property Value

bool

IsSupportedAmericanFutures

Indicates whether the connector supports American futures.

bool IsSupportedAmericanFutures { get; }

Property Value

bool

IsSupportedAmericanStocks

Indicates whether the connector supports American stocks.

bool IsSupportedAmericanStocks { get; }

Property Value

bool

IsSupportedCfd

Indicates whether the connector supports CFD instruments.

Added in ATAS 8.0.15.

bool IsSupportedCfd { get; }

Property Value

bool

IsSupportedCrypto

Indicates whether the connector supports crypto instruments.

bool IsSupportedCrypto { get; }

Property Value

bool

IsSupportedGoFlat

Indicates whether the connector supports atomic go-flat (cancel all orders and liquidate all positions).

Not in ATAS 8.0.15 yet: available from the next version.

bool IsSupportedGoFlat { get; }

Property Value

bool

IsSupportedMaxOrderCalculation

Does connector support max order calculation for the instrument
This feature enables percentage slider under the volume input box
Affects CalcMaxOrderVolume(OrderTypes, Security, Portfolio, OrderDirections, decimal?) and CalcOrderCost(OrderTypes, Security, Portfolio, OrderDirections, decimal?, decimal, out object?, bool) methods

bool IsSupportedMaxOrderCalculation { get; }

Property Value

bool

IsSupportedRussianMarket

Indicates whether the connector supports Russian market instruments.

bool IsSupportedRussianMarket { get; }

Property Value

bool

IsSupportedServerOCO

Indicates whether the connector supports server-side OCO orders.

bool IsSupportedServerOCO { get; }

Property Value

bool

IsSupportedServerTime

Does connector supports getting exchange server time.

bool IsSupportedServerTime { get; }

Property Value

bool

IsSupportedStopOrders

Indicates whether the connector supports stop orders.

bool IsSupportedStopOrders { get; }

Property Value

bool

IsSupportedTradingFunctions

Indicates whether the connector supports trading functions.

bool IsSupportedTradingFunctions { get; }

Property Value

bool

LatencyManager

Latency manager.

IConnectorLatencyManager LatencyManager { get; }

Property Value

IConnectorLatencyManager

MarketDataDelayPeriod

Gets or sets delay period for market data.

MarketDataDelayPeriods MarketDataDelayPeriod { get; set; }

Property Value

MarketDataDelayPeriods

MarketDataStreamEnabled

Indicates whether to raise market data through BestBidAskUpdates, MarketDepthsUpdate, and NewTrades events.

bool MarketDataStreamEnabled { get; set; }

Property Value

bool

MyTrades

The own trades received by the connector.

IEnumerable<MyTrade> MyTrades { get; }

Property Value

IEnumerable<MyTrade>

NeedRebatesCheck

Has rebate check feature

bool NeedRebatesCheck { get; set; }

Property Value

bool

Orders

The orders known to the connector.

IEnumerable<Order> Orders { get; }

Property Value

IEnumerable<Order>

Portfolios

The portfolios (accounts) known to the connector.

IEnumerable<Portfolio> Portfolios { get; }

Property Value

IEnumerable<Portfolio>

Positions

The positions known to the connector.

IEnumerable<Position> Positions { get; }

Property Value

IEnumerable<Position>

ReconnectOnFirstConnect

Reconnect after a failed first connect instead of failing ConnectAsync(). Set only by the unattended server hosts (DataSender, DataRepeater), and it means more than the name says: the host has nobody to fix the settings, so a connection refusal (see ConnectionRefusalReason) keeps reconnecting too instead of stopping and reporting to the user as it does on the platform.

bool ReconnectOnFirstConnect { get; set; }

Property Value

bool

RefreshSecuritiesTime

Local time of day of the daily refresh of the security list while connected: the securities the refresh does not report again are removed (RemoveSecurities). null turns the refresh off. Set from the connection settings.

TimeOnly? RefreshSecuritiesTime { get; set; }

Property Value

TimeOnly?

Securities

The securities known to the connector.

IEnumerable<Security> Securities { get; }

Property Value

IEnumerable<Security>

ServerMode

Set when the connector runs inside a server that relays orders of its own clients (the emulation server): the connector does not subscribe to market data, keeps the external ids of the orders as given and ignores the updates of the done or failed orders and of the own trades that its entity factory already had. false on the platform.

bool ServerMode { get; set; }

Property Value

bool

SubscriptionStatistics

Market data subscription load of the connector: subscribed instruments by security type and the number of subscribe/unsubscribe requests sent to the broker. null for connector wrappers that do not own the subscriptions themselves.

Added in ATAS 8.0.15.

SubscriptionStatistics? SubscriptionStatistics { get; }

Property Value

SubscriptionStatistics

Methods

CalcIsolatedMarginChangeRange(Position)

Calculates possible changes of the isolated margin of a position (only for leveraged trading)

(decimal? maxAddable, decimal? maxRemovable) CalcIsolatedMarginChangeRange(Position position)

Parameters

position Position

Returns

(decimal? maxAddable, decimal? maxRemovable)

CalcLiquidationPrice(Position, decimal)

Allows to estimate Liquidation Price change for a margin

decimal? CalcLiquidationPrice(Position position, decimal margin)

Parameters

position Position

Position to calculate for

margin decimal

Absolute margin for calculation

Returns

decimal?

null if calculation is not supported

CalcMaxOrderVolume(OrderTypes, Security, Portfolio, OrderDirections, decimal?)

Gets max possible volume for the order
This function is always return null if IsSupportedMaxOrderCalculation is false

decimal? CalcMaxOrderVolume(OrderTypes orderType, Security security, Portfolio portfolio, OrderDirections direction, decimal? limitPrice = null)

Parameters

orderType OrderTypes
security Security

The security to calculate the volume for.

portfolio Portfolio

The portfolio to calculate the volume for.

direction OrderDirections
limitPrice decimal?

optional limit price to calculate volume at. If null market price will be used

Returns

decimal?

CalcOrderCost(OrderTypes, Security, Portfolio, OrderDirections, decimal?, decimal, out object?, bool)

Calculates total order cost including commissions and initial margin and everything else
This function is always return null if IsSupportedMaxOrderCalculation is false

decimal? CalcOrderCost(OrderTypes orderType, Security security, Portfolio portfolio, OrderDirections direction, decimal? limitPrice, decimal volume, out object? detailing, bool giveDetailing = false)

Parameters

orderType OrderTypes
security Security

The security of the order.

portfolio Portfolio

The portfolio the order is placed from.

direction OrderDirections
limitPrice decimal?

pass null to use market price for calculation

volume decimal

Desired volume of contracts to make order

detailing object

An object explaining each item which builds up the final price

giveDetailing bool

true for request detailing

Returns

decimal?

Complete order cost including requested volume and all commissions and margins

CancelOrder(Order)

Starts CancelOrderAsync(Order) without waiting for it.

[Obsolete]
void CancelOrder(Order order)

Parameters

order Order

The order.

CancelOrderAsync(Order)

Cancels an active order.

Task CancelOrderAsync(Order order)

Parameters

order Order

The order.

Returns

Task

A task that completes when the order is done (cancelled or filled) and faults when the cancellation fails, after OrdersCancelFailed.

ChangeIsolatedMarginAsync(Position, decimal)

Adds or removes to isolated margin of a position. This method does not apply for crossed margin mode
This method works only if Risk property is not null

Task ChangeIsolatedMarginAsync(Position position, decimal value)

Parameters

position Position
value decimal

Use positive value to add margin and negative to reduce

Returns

Task

ChangeMarginParametersAsync(Position, bool?, decimal?)

Switches position margin mode (isolated/cross) and/or trading leverage for it

Pass null if parameter should not be changed

This method works only if Risk property is not null

Task ChangeMarginParametersAsync(Position position, bool? isolated = null, decimal? leverage = null)

Parameters

position Position
isolated bool?

True for isolated, False for crossed mode

leverage decimal?

Returns

Task

ClosePositionAsync(Position)

Closes a position; does nothing for a flat one. By default a market order of the opposite direction is placed.

Task ClosePositionAsync(Position position)

Parameters

position Position

The position.

Returns

Task

A task that completes when the closing order is confirmed.

ClosePositionsAsync(Portfolio)

Closes all open positions of a portfolio; by default one by one, as ClosePositionAsync(Position).

Task ClosePositionsAsync(Portfolio portfolio)

Parameters

portfolio Portfolio

The portfolio.

Returns

Task

A task that completes when the positions have been closed.

Connect()

Starts ConnectAsync() without waiting for it; the fault of its task is swallowed.

[Obsolete("Use ConnectAsync instead.")]
void Connect()

ConnectAsync()

Connects. The state goes to Connecting and to Connected when the connection is established; after a later connection loss the connector reconnects by itself (Reconnecting) until DisconnectAsync() is called or the connection is refused.

Task ConnectAsync()

Returns

Task

A task that completes when the connector is connected. It faults with the error of a failed connect attempt (a System.TimeoutException when the attempt takes too long) unless ReconnectOnFirstConnect is set, and is cancelled when a disconnect cancels the connect.

Exceptions

InvalidOperationException

The connector is not in the Disconnected state (through the task).

ConvertCurrency(Security, string, string, decimal, decimal?, bool)

Converts volume from one currency to another Used for Notional value calculation

decimal ConvertCurrency(Security security, string currencyFrom, string currencyTo, decimal volume, decimal? limitPrice = null, bool roundToLotSize = true)

Parameters

security Security
currencyFrom string
currencyTo string
volume decimal
limitPrice decimal?

optional value in QuoteCurrency

roundToLotSize bool

Round result to LotSize/Precision

Returns

decimal

Exceptions

ArgumentNullException
ArgumentException

Disconnect()

Starts DisconnectAsync() without waiting for it; the fault of its task is swallowed.

[Obsolete("Use DisconnectAsync instead.")]
void Disconnect()

DisconnectAsync()

Disconnects and stops the automatic reconnection. The state goes to Disconnecting and then to Disconnected.

Task DisconnectAsync()

Returns

Task

A task that completes when the connector is disconnected; an error of the disconnect is logged and reported through Error, not through the task.

Exceptions

InvalidOperationException

The connector is not connected, connecting or reconnecting (through the task).

GetMyTradesAsync(Portfolio, Security, DateTime, DateTime)

Get a list of my trades.

Task<IEnumerable<MyTrade>> GetMyTradesAsync(Portfolio portfolio, Security security, DateTime from, DateTime to)

Parameters

portfolio Portfolio

Portfolio.

security Security

Security.

from DateTime

From date.

to DateTime

To date.

Returns

Task<IEnumerable<MyTrade>>

GetPortfolios(Security)

Gets the portfolios that can trade a security.

IEnumerable<Portfolio> GetPortfolios(Security security)

Parameters

security Security

The security.

Returns

IEnumerable<Portfolio>

The portfolios; by default all of Portfolios.

GetPosition(Portfolio, Security, TPlusLimits?)

Returns the connector's position of a portfolio in a security, creating an empty one (without raising NewPositions) when the connector has none.

Position GetPosition(Portfolio portfolio, Security security, TPlusLimits? tPlusLimit)

Parameters

portfolio Portfolio

The portfolio.

security Security

The security.

tPlusLimit TPlusLimits?

The settlement (T+) limit of the position; null for an ordinary position.

Returns

Position

The position.

GetRoutes(Security)

Gets the order routes the broker offers for a security.

IEnumerable<string> GetRoutes(Security security)

Parameters

security Security

The security.

Returns

IEnumerable<string>

The names of the routes; empty when the connector has no routes.

GetSecurityTradingOptions(Security)

Gets possible TimeInForce for order and optional flags that may be passed when order is created
If null default behaviour is expected:
TimeInForce = DAY, GTC, FOK
No order flags

ISecurityTradingOptions? GetSecurityTradingOptions(Security security)

Parameters

security Security

Returns

ISecurityTradingOptions

GetTradingPortfolio(Portfolio, Security)

Resolves the portfolio that actually holds orders and positions for the specified security. Some connectors (e.g. CQG) route trading data to a currency-specific sub-portfolio of the selected account portfolio; for such connectors this method returns that sub-portfolio. For all other connectors the same portfolio is returned.

Added in ATAS 8.0.15.

Portfolio GetTradingPortfolio(Portfolio portfolio, Security security)

Parameters

portfolio Portfolio

The portfolio selected by the user.

security Security

The security to be traded.

Returns

Portfolio

The portfolio that receives order and position updates for the security.

GoFlatAsync(Portfolio)

Cancels all active orders and liquidates all open positions for the portfolio in a single atomic operation.

Not in ATAS 8.0.15 yet: available from the next version.

Task GoFlatAsync(Portfolio portfolio)

Parameters

portfolio Portfolio

Returns

Task

IsMarketDataSubscribed(Security, SubscriptionType)

Whether the connector currently counts a market data subscription of the type for the security. Counted subscriptions are restored by the connector after a reconnect; a subscription the broker rejected is no longer counted. null for connectors that do not track their subscriptions.

Not in ATAS 8.0.15 yet: available from the next version.

bool? IsMarketDataSubscribed(Security security, SubscriptionType subscriptionType)

Parameters

security Security
subscriptionType SubscriptionType

Returns

bool?

ModifyOrder(Order, Order)

Modifies the price of an order.

[Obsolete]
void ModifyOrder(Order order, Order neworder)

Parameters

order Order

The order to modify.

neworder Order

The new order with the updated parameters.

ModifyOrderAsync(Order, Order)

Replaces an active order with a new one (price, volume and so on). A market order cannot be modified. A connector whose broker cannot modify orders cancels the order and places the new one after the cancellation.

Task ModifyOrderAsync(Order order, Order newOrder)

Parameters

order Order

The active order to modify.

newOrder Order

The order with the new parameters.

Returns

Task

A task that completes when the new order is confirmed and faults when the modification fails, after OrderModifyFailed.

RegisterOrder(Order)

Starts RegisterOrderAsync(Order) without waiting for it.

[Obsolete]
void RegisterOrder(Order order)

Parameters

order Order

The order.

RegisterOrderAsync(Order)

Places an order. The order needs Security and Portfolio and no broker id yet; the connector assigns its external id (ExtId) when it is 0.

Task RegisterOrderAsync(Order order)

Parameters

order Order

The order.

Returns

Task

A task that completes when the broker confirms the order (NewOrders) and faults when the order is rejected or cannot be sent (not connected, invalid, already being processed), after OrdersRegisterFailed.

SearchSecurities(SecurityFilter)

Searches for securities matching the specified filter.

void SearchSecurities(SecurityFilter filter)

Parameters

filter SecurityFilter

SearchSecuritiesAsync(SecurityFilter)

Searches for securities matching the filter; the result is also raised through SearchSecuritiesResult. A filter without a request id gets one.

Task<IEnumerable<Security>> SearchSecuritiesAsync(SecurityFilter filter)

Parameters

filter SecurityFilter

The search filter.

Returns

Task<IEnumerable<Security>>

A task with the securities found. It faults with the error of the search, e.g. when the connector is not connected or disconnects before the answer.

SubscribeToMarketData(Security, SubscriptionType)

Subscribes to market data for a security.

void SubscribeToMarketData(Security security, SubscriptionType subscriptionTypes)

Parameters

security Security

The security to subscribe to.

subscriptionTypes SubscriptionType

The subscription type flags.

SubscribeToMarketData(IEnumerable<Security>, SubscriptionType)

Subscribes to market data for securities. Subscriptions are counted per security and type: only the types nobody holds yet are requested from the broker, and while the connector is disconnected they are only counted and requested on the next connect. The counted subscriptions are restored after a reconnect. The outcome is reported through SubscribeMarketDataResult of IMarketDataPublisher.

void SubscribeToMarketData(IEnumerable<Security> securities, SubscriptionType subscriptionTypes)

Parameters

securities IEnumerable<Security>

The securities.

subscriptionTypes SubscriptionType

The subscription type flags.

TryGetOrder(long)

Finds an order by its external (ATAS) id.

Order TryGetOrder(long extId)

Parameters

extId long

The external id of the order, or of a cancel request of the order.

Returns

Order

The order, or null when the connector does not know the id.

UnsubscribeFromMarketData(Security, SubscriptionType)

Unsubscribes from market data for a security.

void UnsubscribeFromMarketData(Security security, SubscriptionType subscriptionTypes)

Parameters

security Security

The security to unsubscribe from.

subscriptionTypes SubscriptionType

The subscription type flags.

UnsubscribeFromMarketData(IEnumerable<Security>, SubscriptionType)

Releases market data subscriptions of securities: the counts are decreased and the broker is asked to unsubscribe only the types nobody holds anymore. A failure is reported through UnsubscribeMarketDataResult of IMarketDataPublisher.

void UnsubscribeFromMarketData(IEnumerable<Security> securities, SubscriptionType subscriptionTypes)

Parameters

securities IEnumerable<Security>

The securities.

subscriptionTypes SubscriptionType

The subscription type flags.

Events

BestBidAskUpdates

Raised for a best bid or best ask update of a security subscribed to Best, while MarketDataStreamEnabled is on.

event ConnectorEventHandler<MarketDepth>? BestBidAskUpdates

Event Type

ConnectorEventHandler<MarketDepth>

Connected

Raised when the connection is established (also after a reconnect), before ConnectionState becomes Connected. An exception of a handler is logged and does not fail the connect.

event ConnectorEventHandler? Connected

Event Type

ConnectorEventHandler

ConnectionStateChanged

Raised on every actual change of ConnectionState; the arguments carry the old and the new state and the error that caused the change, if any. Right after it, PortfoliosChanged is raised for every portfolio, whose connection state follows the connector's.

event ConnectorEventHandler<ConnectionStateEventArgs>? ConnectionStateChanged

Event Type

ConnectorEventHandler<ConnectionStateEventArgs>

Disconnected

Raised when an established connection ends (lost or closed), before the state changes to Reconnecting or Disconnected. Not raised for a connect attempt that failed.

event ConnectorEventHandler? Disconnected

Event Type

ConnectorEventHandler

Error

Raised when an error occurs.

event ConnectorEventHandler<Exception>? Error

Event Type

ConnectorEventHandler<Exception>

MarketByOrderChanged

Raised for an order-by-order (MBO) book update of a security subscribed to MarketByOrder, while MarketDataStreamEnabled is on.

event ConnectorEventHandler<MarketByOrder> MarketByOrderChanged

Event Type

ConnectorEventHandler<MarketByOrder>

MarketByOrdersReset

Raised when the connector's by-order book for the security is rebuilt from scratch (a fresh image after a reconnect or on subscription). Consumers must drop every order they hold for the security before applying the updates that follow: deletes for orders of the previous book generation are never sent. Independent of MarketDepthsReset, so a market-by-order-only subscription gets it too.

Not in ATAS 8.0.15 yet: available from the next version.

event ConnectorEventHandler<Security>? MarketByOrdersReset

Event Type

ConnectorEventHandler<Security>

MarketDepthsReset

Raised when the connector's order book for the security is rebuilt from scratch (e.g. a fresh snapshot after a reconnect). Consumers must drop all accumulated depth state for the security before applying the updates that follow, because removals for levels of the previous book generation are never sent.

Added in ATAS 8.0.15.

event ConnectorEventHandler<Security>? MarketDepthsReset

Event Type

ConnectorEventHandler<Security>

MarketDepthsUpdate

Raised for a batch of order book updates of one security subscribed to Quotes, while MarketDataStreamEnabled is on. A level with zero volume is removed from the book.

event ConnectorEventHandler<IEnumerable<MarketDepth>>? MarketDepthsUpdate

Event Type

ConnectorEventHandler<IEnumerable<MarketDepth>>

NewMboTrade

Raised for every trade of a security with an active market-by-order subscription, carrying the passive/aggressor exchange order ids and the match event id when the connector could attribute the trade to its book fill. Unlike NewTrades, delivery may lag the tape by the connector's attribution hold.

Not in ATAS 8.0.15 yet: available from the next version.

event ConnectorEventHandler<Trade>? NewMboTrade

Event Type

ConnectorEventHandler<Trade>

NewMyTrades

Raised for each new own trade (fill) of an order, with a single trade. A trade with an id seen already is not raised again.

event ConnectorEventHandler<IEnumerable<MyTrade>>? NewMyTrades

Event Type

ConnectorEventHandler<IEnumerable<MyTrade>>

NewNews

Raised for a news message of the broker.

event ConnectorEventHandler<News>? NewNews

Event Type

ConnectorEventHandler<News>

NewOrders

Raised when an order appears: an order placed by the platform is confirmed by the broker, or the broker reports an order the connector did not know (placed elsewhere or loaded on connect).

event ConnectorEventHandler<IEnumerable<Order>>? NewOrders

Event Type

ConnectorEventHandler<IEnumerable<Order>>

NewPortfolios

Raised when a portfolio (account) is created.

event ConnectorEventHandler<IEnumerable<Portfolio>>? NewPortfolios

Event Type

ConnectorEventHandler<IEnumerable<Portfolio>>

NewPositions

Raised when the connector reports a position of a portfolio in a security for the first time.

event ConnectorEventHandler<IEnumerable<Position>>? NewPositions

Event Type

ConnectorEventHandler<IEnumerable<Position>>

NewSecurities

Raised when a security becomes known to the connector.

event ConnectorEventHandler<IEnumerable<Security>>? NewSecurities

Event Type

ConnectorEventHandler<IEnumerable<Security>>

NewTrades

Raised for a trade (tick) of a security subscribed to Prints, while MarketDataStreamEnabled is on; the collection holds a single trade.

event ConnectorEventHandler<IEnumerable<Trade>>? NewTrades

Event Type

ConnectorEventHandler<IEnumerable<Trade>>

OrderChanged

Raised when a known order changes (state, fill, cancellation).

event ConnectorEventHandler<Order>? OrderChanged

Event Type

ConnectorEventHandler<Order>

OrderModifyFailed

Raised when a modification of an order fails; the arguments are the original order, the new order (in the Failed state) and the error message.

event ConnectorEventHandler<Order, Order, string>? OrderModifyFailed

Event Type

ConnectorEventHandler<Order, Order, string>

OrdersCancelFailed

Raised when a cancellation of an order fails; the arguments are the error message and the order.

event ConnectorEventHandler<string, Order>? OrdersCancelFailed

Event Type

ConnectorEventHandler<string, Order>

OrdersRegisterFailed

Raised when an order is rejected or fails to be placed; the arguments are the error message and the order, whose state is Failed.

event ConnectorEventHandler<string, Order>? OrdersRegisterFailed

Event Type

ConnectorEventHandler<string, Order>

PortfoliosChanged

Raised when a portfolio changes, and for every portfolio on each change of the connection state.

event ConnectorEventHandler<IEnumerable<Portfolio>>? PortfoliosChanged

Event Type

ConnectorEventHandler<IEnumerable<Portfolio>>

PositionsChanged

Raised when a position changes, including the changes of its open PnL by the market prices.

event ConnectorEventHandler<IEnumerable<Position>>? PositionsChanged

Event Type

ConnectorEventHandler<IEnumerable<Position>>

RebateReceived

Raised with the result of the check of the account's referral (rebate) program. On WrongRefCode the platform reports a license error for the connection.

event ConnectorEventHandler<RebateResult>? RebateReceived

Event Type

ConnectorEventHandler<RebateResult>

RegisterSecurityResult

Raised when the broker answers a market data subscription of a security; the error is null when the subscription is accepted. A rejected subscription is no longer counted.

event ConnectorEventHandler<Security, Exception?>? RegisterSecurityResult

Event Type

ConnectorEventHandler<Security, Exception>

RemoveSecurities

Raised when the daily refresh of the securities (RefreshSecuritiesTime) finds securities that are no longer listed; they are removed from Securities and unsubscribed.

Added in ATAS 8.0.15.

event ConnectorEventHandler<IEnumerable<Security>>? RemoveSecurities

Event Type

ConnectorEventHandler<IEnumerable<Security>>

SearchSecuritiesResult

Raised when a security search completes; the arguments are the filter of the request, the error (null on success) and the securities found (empty on an error).

event ConnectorEventHandler<SecurityFilter, Exception?, IEnumerable<Security>>? SearchSecuritiesResult

Event Type

ConnectorEventHandler<SecurityFilter, Exception, IEnumerable<Security>>

SecurityChanged

Raised when the connector reports a change of a known security's properties.

event ConnectorEventHandler<Security>? SecurityChanged

Event Type

ConnectorEventHandler<Security>

SecuritySummaryChanged

Raised when the summary (daily statistics) of a security subscribed to Summary changes.

event ConnectorEventHandler<SecuritySummary>? SecuritySummaryChanged

Event Type

ConnectorEventHandler<SecuritySummary>