Transactions And Reporting

Get transaction history for a user

get
https://api.snaptrade.com/api/v1/activities

Returns all historical transactions for the specified user and filtering criteria. It's recommended to use startDate and endDate to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There's a max number of 10000 transactions returned per request.

There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the trade_date field if you need them in a specific order.

The data returned here is always cached and refreshed once a day. If you need real-time data, please use the manual refresh endpoint.

Execute an API Request

Query
userIdstringrequired

SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.

userSecretstringrequired

SnapTrade User Secret. This is a randomly generated string and should be stored securely. If compromised, please rotate it via the rotate user secret endpoint.

startDatestring (format: date)

The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on trade_date.

endDatestring (format: date)

The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on trade_date.

accountsstring

Optional comma separated list of SnapTrade Account IDs used to filter the request to specific accounts. If not provided, the default is all known brokerage accounts for the user. The brokerageAuthorizations parameter takes precedence over this parameter.

brokerageAuthorizationsstring

Optional comma separated list of SnapTrade Connection (Brokerage Authorization) IDs used to filter the request to only accounts that belong to those connections. If not provided, the default is all connections for the user. This parameter takes precedence over the accounts parameter.

typestring

Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values:

  • BUY - Asset bought.
  • SELL - Asset sold.
  • DIVIDEND - Dividend payout.
  • CONTRIBUTION - Cash contribution.
  • WITHDRAWAL - Cash withdrawal.
  • REI - Dividend reinvestment.
  • INTEREST - Interest deposited into the account.
  • FEE - Fee withdrawn from the account.
  • OPTIONEXPIRATION - Option expiration event.
  • OPTIONASSIGNMENT - Option assignment event.
  • OPTIONEXERCISE - Option exercise event.
Authorization
Request
Installation
$
npm install snaptrade-typescript-sdk
1
Loading...

Response fields

array of objects
object

A transaction or activity from an institution

1
[
2
{
3
"id": "2f7dc9b3-5c33-4668-3440-2b31e056ebe6",
4
"account": {
5
"id": "917c8734-8470-4a3e-a18f-57c3f2ee6631",
6
"name": "Robinhood Individual",
7
"number": "Q6542138443",
8
"sync_status": {
9
"transactions": {
10
"initial_sync_completed": true,
11
"last_successful_sync": "2022-01-24",
12
"first_transaction_date": "2022-01-24"
13
},
14
"holdings": {
15
"initial_sync_completed": true,
16
"last_successful_sync": "2024-06-28 18:42:46.561408+00:00"
17
}
18
}
19
},
20
"symbol": {
21
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
22
"symbol": "VAB.TO",
23
"raw_symbol": "VAB",
24
"description": "VANGUARD CDN AGGREGATE BOND INDEX ETF",
25
"currency": {
26
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
27
"code": "USD",
28
"name": "US Dollar"
29
},
30
"exchange": {
31
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
32
"code": "TSX",
33
"mic_code": "XTSE",
34
"name": "Toronto Stock Exchange",
35
"timezone": "America/New_York",
36
"start_time": "09:30:00",
37
"close_time": "16:00:00",
38
"suffix": ".TO"
39
},
40
"type": {
41
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
42
"code": "cs",
43
"description": "Common Stock",
44
"is_supported": true
45
},
46
"figi_code": "BBG000B9XRY4",
47
"figi_instrument": {
48
"figi_code": "BBG000B9Y5X2",
49
"figi_share_class": "BBG001S5N8V8"
50
}
51
},
52
"option_symbol": {
53
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
54
"ticker": "AAPL 261218C00240000",
55
"option_type": "CALL",
56
"strike_price": 240,
57
"expiration_date": "2026-12-18",
58
"is_mini_option": false,
59
"underlying_symbol": {
60
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
61
"symbol": "SPY",
62
"raw_symbol": "VAB",
63
"description": "SPDR S&P 500 ETF Trust",
64
"currency": {
65
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
66
"code": "USD",
67
"name": "US Dollar"
68
},
69
"exchange": {
70
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
71
"code": "ARCX",
72
"mic_code": "ARCA",
73
"name": "NYSE ARCA",
74
"timezone": "America/New_York",
75
"start_time": "09:30:00",
76
"close_time": "16:00:00",
77
"suffix": "None",
78
"allows_cryptocurrency_symbols": false
79
},
80
"type": {
81
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
82
"code": "cs",
83
"description": "Common Stock",
84
"is_supported": true
85
},
86
"figi_code": "BBG000B9XRY4",
87
"figi_instrument": {
88
"figi_code": "BBG000B9Y5X2",
89
"figi_share_class": "BBG001S5N8V8"
90
},
91
"currencies": [
92
{
93
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
94
"code": "USD",
95
"name": "US Dollar"
96
}
97
]
98
}
99
},
100
"price": 0.4,
101
"units": 5.2,
102
"amount": 263.82,
103
"currency": {
104
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
105
"code": "USD",
106
"name": "US Dollar"
107
},
108
"type": "BUY",
109
"option_type": "BUY_TO_OPEN",
110
"description": "WALT DISNEY UNIT DIST ON 21 SHS REC 12/31/21 PAY 01/06/22",
111
"trade_date": "2024-03-22T16:27:55.000Z",
112
"settlement_date": "2024-03-26T00:00:00.000Z",
113
"fee": 0,
114
"fx_rate": 1.032,
115
"institution": "Robinhood",
116
"external_reference_id": "2f7dc9b3-5c33-4668-3440-2b31e056ebe6"
117
}
118
]