Example #1
0
        /// <summary>
        /// List Positions List all Positions for an Account. The Positions returned are for every instrument that has had a position during the lifetime of an the Account.
        /// </summary>
        /// <exception cref="GeriRemenyi.Oanda.V20.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="accountID">Account identifier</param>
        /// <returns>Task of PositionsResponse</returns>
        public async System.Threading.Tasks.Task <PositionsResponse> GetPositionsAsync(string accountID)
        {
            GeriRemenyi.Oanda.V20.Client.Client.ApiResponse <PositionsResponse> localVarResponse = await GetPositionsAsyncWithHttpInfo(accountID);

            return(localVarResponse.Data);
        }
        /// <summary>
        /// Current Account Prices Get pricing information for a specified list of Instruments within an Account.
        /// </summary>
        /// <exception cref="GeriRemenyi.Oanda.V20.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="accountID">Account identifier</param>
        /// <param name="instruments">List of Instruments to get pricing for.</param>
        /// <param name="acceptDatetimeFormat">Format of DateTime fields in the request and response. (optional)</param>
        /// <param name="since">Date/Time filter to apply to the response. Only prices and home conversions (if requested) with a time later than this filter (i.e. the price has changed after the since time) will be provided, and are filtered independently. (optional)</param>
        /// <param name="includeUnitsAvailable">Flag that enables the inclusion of the unitsAvailable field in the returned Price objects. (optional)</param>
        /// <param name="includeHomeConversions">Flag that enables the inclusion of the homeConversions field in the returned response. An entry will be returned for each currency in the set of all base and quote currencies present in the requested instruments list. (optional)</param>
        /// <returns>Task of PricingResponse</returns>
        public async System.Threading.Tasks.Task <PricingResponse> GetPricingAsync(string accountID, List <InstrumentName> instruments, DateTimeFormat?acceptDatetimeFormat = default(DateTimeFormat?), string since = default(string), bool?includeUnitsAvailable = default(bool?), bool?includeHomeConversions = default(bool?))
        {
            GeriRemenyi.Oanda.V20.Client.Client.ApiResponse <PricingResponse> localVarResponse = await GetPricingAsyncWithHttpInfo(accountID, instruments, acceptDatetimeFormat, since, includeUnitsAvailable, includeHomeConversions);

            return(localVarResponse.Data);
        }
Example #3
0
 /// <summary>
 /// List Positions List all Positions for an Account. The Positions returned are for every instrument that has had a position during the lifetime of an the Account.
 /// </summary>
 /// <exception cref="GeriRemenyi.Oanda.V20.Client.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="accountID">Account identifier</param>
 /// <returns>PositionsResponse</returns>
 public PositionsResponse GetPositions(string accountID)
 {
     GeriRemenyi.Oanda.V20.Client.Client.ApiResponse <PositionsResponse> localVarResponse = GetPositionsWithHttpInfo(accountID);
     return(localVarResponse.Data);
 }
Example #4
0
        /// <summary>
        /// Instrument Position Get the details of a single Instrument&#39;s Position in an Account. The Position may by open or not.
        /// </summary>
        /// <exception cref="GeriRemenyi.Oanda.V20.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="accountID">Account identifier</param>
        /// <param name="instrument">Instrument name</param>
        /// <returns>Task of InstrumentPositionResponse</returns>
        public async System.Threading.Tasks.Task <InstrumentPositionResponse> GetInstrumentPositionAsync(string accountID, InstrumentName instrument)
        {
            GeriRemenyi.Oanda.V20.Client.Client.ApiResponse <InstrumentPositionResponse> localVarResponse = await GetInstrumentPositionAsyncWithHttpInfo(accountID, instrument);

            return(localVarResponse.Data);
        }
Example #5
0
 /// <summary>
 /// Instrument Position Get the details of a single Instrument&#39;s Position in an Account. The Position may by open or not.
 /// </summary>
 /// <exception cref="GeriRemenyi.Oanda.V20.Client.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="accountID">Account identifier</param>
 /// <param name="instrument">Instrument name</param>
 /// <returns>InstrumentPositionResponse</returns>
 public InstrumentPositionResponse GetInstrumentPosition(string accountID, InstrumentName instrument)
 {
     GeriRemenyi.Oanda.V20.Client.Client.ApiResponse <InstrumentPositionResponse> localVarResponse = GetInstrumentPositionWithHttpInfo(accountID, instrument);
     return(localVarResponse.Data);
 }
Example #6
0
        /// <summary>
        /// Close Position Closeout the open Position for a specific instrument in an Account.
        /// </summary>
        /// <exception cref="GeriRemenyi.Oanda.V20.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="accountID">Account identifier</param>
        /// <param name="instrument">Instrument name</param>
        /// <param name="closePositionRequest">Representation of how to close the position</param>
        /// <param name="acceptDatetimeFormat">Format of DateTime fields in the request and response. (optional)</param>
        /// <returns>Task of ClosePositionResponse</returns>
        public async System.Threading.Tasks.Task <ClosePositionResponse> ClosePositionAsync(string accountID, InstrumentName instrument, ClosePositionRequest closePositionRequest, DateTimeFormat?acceptDatetimeFormat = default(DateTimeFormat?))
        {
            GeriRemenyi.Oanda.V20.Client.Client.ApiResponse <ClosePositionResponse> localVarResponse = await ClosePositionAsyncWithHttpInfo(accountID, instrument, closePositionRequest, acceptDatetimeFormat);

            return(localVarResponse.Data);
        }
Example #7
0
 /// <summary>
 /// Close Position Closeout the open Position for a specific instrument in an Account.
 /// </summary>
 /// <exception cref="GeriRemenyi.Oanda.V20.Client.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="accountID">Account identifier</param>
 /// <param name="instrument">Instrument name</param>
 /// <param name="closePositionRequest">Representation of how to close the position</param>
 /// <param name="acceptDatetimeFormat">Format of DateTime fields in the request and response. (optional)</param>
 /// <returns>ClosePositionResponse</returns>
 public ClosePositionResponse ClosePosition(string accountID, InstrumentName instrument, ClosePositionRequest closePositionRequest, DateTimeFormat?acceptDatetimeFormat = default(DateTimeFormat?))
 {
     GeriRemenyi.Oanda.V20.Client.Client.ApiResponse <ClosePositionResponse> localVarResponse = ClosePositionWithHttpInfo(accountID, instrument, closePositionRequest, acceptDatetimeFormat);
     return(localVarResponse.Data);
 }