Accounts API

Overview

The Transaction APIs provide information about transactions for the selected brokerage account.

Description

Get all transactions for the specified account.

HTTP Method: GET

Live URL

                    https://api.etrade.com/v1/accounts/{accountIdKey}/transactions
                

Sandbox URL

                    https://apisb.etrade.com/v1/accounts/{accountIdKey}/transactions
                

Request

Property Type Required? Description Allowable Values
Accept header no Format in which transactions can be returned application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/json, application/xml
accountIdKey path yes The unique account key. Retrievable by calling the List Accounts API.
startDate query no The earliest date to include in the date range, formatted as MMDDYYYY. History is available for two years.
endDate query no The latest date to include in the date range, formatted as MMDDYYYY
sortOrder query no The sort order request ASC, DESC
marker query no Specifies the desired starting point of the set of items to return. Used for paging as described in the Notes below.
count query no Number of transactions to return in the response. If not specified, defaults to 50. Used for paging as described in the Notes below.

Response

Status Code Reason Response Model Error Code
200 Successful Operation. TransactionDetailsResponse
204 There are no results for this search query. 53
400 Account key does not belong to user. 100
400 Invalid Marker. Both PageMarker and Marker passed. 2008
400 Invalid SortOrder. SortOrder should be ASC or DESC. 2007
400 Please enter valid account key. 102
400 Invalid SortColumn. 2006
400 Invalid count. Count value should be between 1 and 50. 2005
400 Invalid date format. Format must be MMDDYYYY; for example, 07112018. 2004
400 Invalid Date. Date should fall within the last three years. 2003
400 Invalid Date Range. Both fromDate & toDate should be provided, toDate should be greater than fromDate and fromDate should fall within last three years. 2002
400 Invalid account type. Only brokerage accounts are available. 2001
404 Invalid Request. Too many parameters in the request URI. 1011
404 Invalid Request. Multiple transaction types provided. 1010
404 Invalid Request. Security Type is not a valid request field for this account. 1008
404 Invalid Request. Symbol is not a valid request field for this account. 1007
404 Invalid Order Id. 1005
404 The security type is not supported for the specified transaction group or multiple security types were provided, which is not permitted. 1004
404 Invalid Amount. Amount value is not numeric 1015
404 Invalid Transaction Group. 1003
404 Invalid Amount. StartAmount should be less than EndAmount 1014
404 Invalid Transaction Type. Transaction type is not supported for the specified transaction group. 1002
404 Invalid Request. Transaction type is not a valid request field for this account. 1013
404 Invalid Transaction Id. The Id passed does not exist for the specified account. 1001
404 Invalid Request. Transaction group is not a valid request field for this account. 1012
404 Invalid Request. Order Id is not a valid request field for this account. 1009
500 Transaction service is not available. Please try again later. 300
500 Due to technical difficulties, we are unable to obtain your account information. Please try again later. We apologize for the inconvenience. 301

Description

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.

HTTP Method: GET

Live URL

                    https://api.etrade.com/v1/accounts/{accountIdKey}/transactions/{tranid}
                

Sandbox URL

                    https://apisb.etrade.com/v1/accounts/{accountIdKey}/transactions/{tranid}
                

Request

Property Type Required? Description Allowable Values
Accept header no Format in which transaction detail can be returned application/pdf, application/json, application/xml
accountIdKey path yes The unique account key. Retrievable by calling the List Accounts API.
tranid path yes transactionId
storeId query no storage location for older transactions

Response

Status Code Reason Response Model Error Code
200 Successful Operation. TransactionDetailsResponse
204 There are no results for this search query. 53
400 Account key does not belong to user. 100
400 Invalid Marker. Both PageMarker and Marker passed. 2008
400 Invalid SortOrder. SortOrder should be ASC or DESC. 2007
400 Please enter valid account key. 102
400 Invalid SortColumn. 2006
400 Invalid count. Count value should be between 1 and 50. 2005
400 Invalid date format. Format must be MMDDYYYY; for example, 07112018. 2004
400 Invalid Date. Date should fall within the last two years. 2003
400 Invalid date range. Both fromDate and toDate should be provided. toDate should be greater than fromDate, and fromDate should fall within the last two years. 2002
400 Invalid account type. Only brokerage accounts are available. 2001
404 Invalid Request. Too many parameters in the request URI. 1011
404 Invalid Request. Multiple transaction types provided. 1010
404 Invalid Request. Security Type is not a valid request field for this account. 1008
404 Invalid Request. Symbol is not a valid request field for this account. 1007
404 Invalid Order Id. 1005
404 The security type is not supported for the specified transaction group or multiple security types were provided, which is not permitted. 1004
404 Invalid Amount. Amount value is not numeric 1015
404 Invalid Transaction Group. 1003
404 Invalid Amount. StartAmount should be less than EndAmount 1014
404 Invalid Transaction Type. Transaction type is not supported for the specified transaction group. 1002
404 Invalid Request. Transaction type is not a valid request field for this account. 1013
404 Invalid Transaction Id. The Id passed does not exist for the specified account. 1001
404 Invalid Request. Transaction group is not a valid request field for this account. 1012
404 Invalid Request. Order Id is not a valid request field for this account. 1009
500 Transaction service is not available. Please try again later. 300
500 Due to technical difficulties, we are unable to obtain your account information. Please try again later. We apologize for the inconvenience. 301
Property Type Description Possible Values
transactionType string Type of transaction (deposit, dividend, and so on). Possible values are listed in the Transaction types table below.
product Product The specific brokerage product
quantity number (double) Item count; for example, share count
price number (double) Price per item if applicable; for example, price per share
settlementCurrency string Settlement currency
paymentCurrency string Payment currency
fee number (double) The brokerage fee
memo string The memo field
checkNo string The check number
orderNo string The order number
Property Type Description Possible Values
categoryId string The category ID
parentId string The parent ID
categoryName string The category name
parentName string The parent category name
Property Type Description Possible Values
symbol string The symbol for which the quote details are being accessed
securityType string The type code to identify the order or leg request BOND, EQ, INDX, MF, MMF, OPTN, INVALID
securitySubType string The subtype of the security
callPut string The option type - either CALL or PUT CALL, PUT
expiryYear integer (int32) The four-digit year the option will expire
expiryMonth integer (int32) The month (1-12) the option will expire
expiryDay integer (int32) The day (1-31) the option will expire
strikePrice number The strike price for the option
expiryType string The expiration type for the option
productId ProductId ProductId
Property Type Description Possible Values
symbol string The market symbol for the security being bought or sold
typeCode string Product Type Code EQUITY, OPTION, MUTUAL_FUND, INDEX, MONEY_MARKET_FUND, BOND, UNKNOWN, WILDCARD, MOVE, ETF, EQUITY_OPTION_ETF, EQUITY_ETF, CLOSED_END_FUND, PREFERRED, EQUITY_OPTN, EXCHANGE_TRADED_FUND, MUTUAL_FUND_MONEY_MARKET_FUND
Property Type Description Possible Values
transactionId integer (int64) Numeric transaction ID
accountId string Numeric account ID
transactionDate integer (int64) Date of the specified transaction
postDate integer (int64) The post date
amount number Total cost of transaction, including commission if any
description string The transaction description
category Category User-defined category
brokerage Brokerage The brokerage involved in the transaction

Notes

To page through a large number of items, use the count property to specify how many items to return in a group (the default is 50), and the marker property to specify the starting point. A request with no count and no marker retrieves the most recent 50 transactions. The next URL provided in the response retrieves the next set of transactions in the series, using the transaction ID of the last transaction as the marker. To page through all the items, repeat the request with the marker from each previous response until you receive a response with a count less than the one you specified, indicating that there are no more items.

The API does not explicitly provide for bi-directional paging. Your application can support paging backward and forward either by saving and re-using markers within the series (that is, re-issuing the requests for pages that are earlier in the series), or saving the items returned and re-displaying them from the local copy if desired.

Example

Transaction Request URL

                    https://api.etrade.com/v1/accounts/vSnhtF7d5jXBy6HyaAC4vQ/transactions/{tranid}
                

Response

                   
<?xml version="1.0" encoding="UTF-8"?>
<TransactionDetailsResponse>
   <transactionId>18144100000861</transactionId>
   <accountId>835649790</accountId>
   <transactionDate>1527134400000</transactionDate>
   <amount>-2.0</amount>
   <description>ACH WITHDRAWL REFID:77521276;</description>
   <Category>
      <categoryId>0</categoryId>
      <parentId>0</parentId>
      <categoryName />
      <parentName />
   </Category>
   <Brokerage>
      <transactionType>Transfer</transactionType>
      <Product />
      <quantity>0.0</quantity>
      <price>0.0</price>
      <settlementCurrency>USD</settlementCurrency>
      <paymentCurrency>USD</paymentCurrency>
      <fee>0.0</fee>
      <memo />
      <orderNo>0</orderNo>
   </Brokerage>
</TransactionDetailsResponse>
                  
                

Transaction Detail Request URL

https://api.etrade.com/v1/accounts/vSnhtF7d5jXBy6HyaAC4vQ/transactions
                

Response

                   
<?xml version="1.0" encoding="UTF-8"?>
<TransactionListResponse>
   <Transaction>
      <transactionId>18165100001766</transactionId>
      <accountId>835649790</accountId>
      <transactionDate>1528948800000</transactionDate>
      <postDate>1528948800000</postDate>
      <amount>-2</amount>
      <description>ACH WITHDRAWL REFID:109187276;</description>
      <description2>109187276</description2>
      <transactionType>Transfer</transactionType>
      <memo />
      <imageFlag>false</imageFlag>
      <instType>BROKERAGE</instType>
      <brokerage>
         <product />
         <quantity>0</quantity>
         <price>0</price>
         <settlementCurrency>USD</settlementCurrency>
         <paymentCurrency>USD</paymentCurrency>
         <fee>0</fee>
         <settlementDate>1528948800000</settlementDate>
      </brokerage>
      <detailsURI>https://api.etrade.com/v1/accounts/yIFaUoJ81qyAhgxLWRQ42g/transactions/18165100001766</detailsURI>
   </Transaction>
   <Transaction>
      <transactionId>18158100000983</transactionId>
      <accountId>835649790</accountId>
      <transactionDate>1528344000000</transactionDate>
      <postDate>1528344000000</postDate>
      <amount>-2</amount>
      <description>ACH WITHDRAWL REFID:98655276;</description>
      <description2>98655276</description2>
      <transactionType>Transfer</transactionType>
      <memo />
      <imageFlag>false</imageFlag>
      <instType>BROKERAGE</instType>
      <brokerage>
         <product />
         <quantity>0</quantity>
         <price>0</price>
         <settlementCurrency>USD</settlementCurrency>
         <paymentCurrency>USD</paymentCurrency>
         <fee>0</fee>
         <settlementDate>1528344000000</settlementDate>
      </brokerage>
      <detailsURI>https://api.etrade.com/v1/accounts/yIFaUoJ81qyAhgxLWRQ42g/transactions/18158100000983</detailsURI>
   </Transaction>
   <pageMarkers>eNpTsAlITE91zi%2FNK%2FHMc04syi8tTs2xM7TRxybMpWATkl%2BSmBOUmpxflAKWtTO10ccQg6mDmwEyEE0EqAbE8SvNTUotCk4tLE3NS061M9Ax0DEEYgOIA9BkuRQgmjxTfDKLQUYoQAV8E4uyU4vsDC0MzUwNDYDA0NzMrKamBmIKVJYLphpiKsyTUB7IbH1kwwFa7F0D</pageMarkers>
   <moreTransactions>false</moreTransactions>
   <transactionCount>5</transactionCount>
   <totalCount>5</totalCount>
</TransactionListResponse>
                  
                

Transaction Detail Request URL

https://api.etrade.com/v1/accounts/vSnhtF7d5jXBy6HyaAC4vQ/transactions?count=3
                

Response

                   
<?xml version="1.0" encoding="UTF-8"?>
<TransactionListResponse>
   <Transaction>
      <transactionId>18165100001766</transactionId>
      <accountId>835649790</accountId>
      <transactionDate>1528948800000</transactionDate>
      <postDate>1528948800000</postDate>
      <amount>-2</amount>
      <description>ACH WITHDRAWL REFID:109187276;</description>
      <description2>109187276</description2>
      <transactionType>Transfer</transactionType>
      <memo />
      <imageFlag>false</imageFlag>
      <instType>BROKERAGE</instType>
      <brokerage>
         <product />
         <quantity>0</quantity>
         <price>0</price>
         <settlementCurrency>USD</settlementCurrency>
         <paymentCurrency>USD</paymentCurrency>
         <fee>0</fee>
         <settlementDate>1528948800000</settlementDate>
      </brokerage>
      <detailsURI>https://api.etrade.com/v1/accounts/yIFaUoJ81qyAhgxLWRQ42g/transactions/18165100001766</detailsURI>
   </Transaction>
   <Transaction>
      <transactionId>18158100000983</transactionId>
      <accountId>835649790</accountId>
      <transactionDate>1528344000000</transactionDate>
      <postDate>1528344000000</postDate>
      <amount>-2</amount>
      <description>ACH WITHDRAWL REFID:98655276;</description>
      <description2>98655276</description2>
      <transactionType>Transfer</transactionType>
      <memo />
      <imageFlag>false</imageFlag>
      <instType>BROKERAGE</instType>
      <brokerage>
         <product />
         <quantity>0</quantity>
         <price>0</price>
         <settlementCurrency>USD</settlementCurrency>
         <paymentCurrency>USD</paymentCurrency>
         <fee>0</fee>
         <settlementDate>1528344000000</settlementDate>
      </brokerage>
      <detailsURI>https://api.etrade.com/v1/accounts/yIFaUoJ81qyAhgxLWRQ42g/transactions/18158100000983</detailsURI>
   </Transaction>
   <Transaction>
      <transactionId>18151100002634</transactionId>
      <accountId>835649790</accountId>
      <transactionDate>1527739200000</transactionDate>
      <postDate>1527739200000</postDate>
      <amount>-2</amount>
      <description>ACH WITHDRAWL REFID:87756276;</description>
      <description2>87756276</description2>
      <transactionType>Transfer</transactionType>
      <memo />
      <imageFlag>false</imageFlag>
      <instType>BROKERAGE</instType>
      <brokerage>
         <product />
         <quantity>0</quantity>
         <price>0</price>
         <settlementCurrency>USD</settlementCurrency>
         <paymentCurrency>USD</paymentCurrency>
         <fee>0</fee>
         <settlementDate>1527739200000</settlementDate>
      </brokerage>
      <detailsURI>https://api.etrade.com/v1/accounts/yIFaUoJ81qyAhgxLWRQ42g/transactions/18151100002634</detailsURI>
   </Transaction>
   <next>https://api.etrade.com/v1/accounts/yIFaUoJ81qyAhgxLWRQ42g/transactions?count=3&amp;marker=18151100002634_1527739200</next>
   <marker>18151100002634_1527739200</marker>
   <pageMarkers>eNptjkEOgjAQRfecogcgoYNSJGm6YUWixqgXqDAxRqSx0B2Ht1AwWuiiSf%2F8vjeEn%2BQdc2WarmhyqZVpsRYxj9bigPCr6mR9xlLpapyKhEeLbO59GQPQS2xneBzN64b6gm%2BDTYmChjSEMLY3dSt484C4b0W1f7QDhEzBQeonagE7YAlQeyBlrO97R5mmwdx2VAG%2FjpEdefCFzLdtM2sDlmabZM32p4t9nef7AOzdfmc%3D</pageMarkers>
   <moreTransactions>false</moreTransactions>
   <transactionCount>3</transactionCount>
   <totalCount>5</totalCount>
</TransactionListResponse>