OandaRestClient

StockSharp.Oanda.Native

Methods

GetAccountDetailsAsync
public Task<AccountDetails> GetAccountDetailsAsync(string accountId, CancellationToken cancellationToken)
result = oandaRestClient.GetAccountDetailsAsync(accountId, cancellationToken)

Gets account specific details for the given account.

accountId
the ID of the account to retrieve.
cancellationToken
Cancellation token.

Returns: the AccountDetails for the account.

GetInstrumentsAsync
public Task<IEnumerable<Instrument>> GetInstrumentsAsync(string accountId, IEnumerable<string> instruments, CancellationToken cancellationToken)
result = oandaRestClient.GetInstrumentsAsync(accountId, instruments, cancellationToken)

Gets the list of instruments that are available.

accountId
Account ID.
instruments
Instruments.
cancellationToken
Cancellation token.

Returns: a list of the available instruments.

GetPositionsAsync
public Task<IEnumerable<Position>> GetPositionsAsync(string accountId, CancellationToken cancellationToken)
result = oandaRestClient.GetPositionsAsync(accountId, cancellationToken)

Get the current open positions for the account specified.

accountId
the ID of the account.
cancellationToken
Cancellation token.

Returns: list of positions (or empty list if there are none).