private static async Task Account_ListTransactionDetails() { var accountIdKey = m_Accounts.account[0].accountIdKey; var parameters = new TransactionDetailsParameters(); var result = await m_ETrade10.ListTransactionDetailsAsync(accountIdKey, m_TestTransactionID, parameters); m_Results.Verify("04.0", result != null, "Transaction details received."); m_Results.Verify("04.1", result?.accountId != null, "Transaction id received."); m_Results.Verify("04.2", result?.description != null, "Transaction description received."); m_Results.Verify("04.3", result?.transactionDate != null, "Transaction time received."); }
/// <summary> /// Get transaction details for the specified transaction (transactionId). /// If a transactionId is provided, no additional path params should be specified in the URI. /// API should fail with 404 if any path param is specified after activityId. /// In order to make requests around the specific break out transaction types within the Transaction API, /// simply append the title of the Transaction Category to the end of the path. This will provide you with /// only transactions of that type so that you can build functionality and interact with subsets of data. /// Possible transaction sub-types include: Trades, Withdrawals, Cash. /// https://apisb.etrade.com/docs/api/account/api-transaction-v1.html#/definition/getTransactionDetails /// </summary> /// <param name="accountIdKey">summary will be retrieved for this account id</param> /// <param name="tranId">the transaction identifier</param> /// <returns>the transaction details for the specified transaction (transactionId)</returns> public async Task <TransactionDetailsResponse> ListTransactionDetailsAsync(string accountIdKey, long tranId, TransactionDetailsParameters parameters) { string uri = ServerUri(EServer.Accounts) + $"{accountIdKey}/transactions/{tranId}"; var requestParams = ConvertToDictionary(parameters); var response = await MakeRequestAsync <TransactionDetailsErrorResponse>(uri, requestParams : requestParams); return(response.TransactionDetailsResponse); }