Interface IOrderInterceptorContext
- Namespace
- ATAS.Indicators.Trading
- Assembly
- ATAS.Indicators.dll
What the platform gives an OrderInterceptor (its Context): the current state of the accounts,
read at call time as snapshots, and the platform log. Safe to call from any method of the interceptor.
Not in ATAS 8.0.15 yet: available from the next version.
public interface IOrderInterceptorContext
- Extension Methods
Properties
DisplayName
The name the platform shows for the interceptor.
string DisplayName { get; }
Property Value
- string
Methods
GetAccounts()
The trading accounts of the connected connections.
IReadOnlyList<AccountSnapshot> GetAccounts()
Returns
- IReadOnlyList<AccountSnapshot>
GetActiveOrders(string)
The working orders of an account; empty for an unknown account.
IReadOnlyList<OrderSnapshot> GetActiveOrders(string accountId)
Parameters
accountIdstringThe account (AccountId).
Returns
- IReadOnlyList<OrderSnapshot>
GetPositions(string)
The open positions of an account; empty for an unknown account.
IReadOnlyList<PositionSnapshot> GetPositions(string accountId)
Parameters
accountIdstringThe account (AccountId).
Returns
- IReadOnlyList<PositionSnapshot>
GetTrades(string, DateTime)
The fills of an account since a moment, oldest first, as far as the connection reported them in this session; empty for an unknown account. Fills carry no profit or loss (see TradeSnapshot).
IReadOnlyList<TradeSnapshot> GetTrades(string accountId, DateTime fromUtc)
Parameters
accountIdstringThe account (AccountId).
fromUtcDateTimeThe earliest fill time to return (UTC).
Returns
- IReadOnlyList<TradeSnapshot>
Log(string)
Writes a line to the platform log under the interceptor's name.
void Log(string message)
Parameters
messagestringThe text.