snaptrade 2.0.215 → 2.0.216
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +20 -16
- data/lib/snaptrade/api/account_information_api.rb +10 -6
- data/lib/snaptrade/api/transactions_and_reporting_api.rb +4 -4
- data/lib/snaptrade/models/account_universal_activity.rb +1 -1
- data/lib/snaptrade/models/universal_activity.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +2 -2
- data/spec/api/transactions_and_reporting_api_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0414ddb4679c61852aebde968aae4c30b35257734fb9b3206453a838c03fb7f
|
|
4
|
+
data.tar.gz: bed437e25bab641c574e1da0e876a04e8cdfb6873cf18447e068ae449823305f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25eeb551572ba574c9be3522fa90d5c7a0252fa343aa87e71475551702825eea03c567c05e45798f264b07671211356de0a34b0bc48478b673d4ed09227a651f
|
|
7
|
+
data.tar.gz: a8b2676106a3307b5b060efd1414cdef8ac1caee96a80339b2e4b1336484d3ce98b3fa833aedda82adf6442157d5bdd16d30bbc4b3a03599b108c82bda80135b
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.216)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -94,7 +94,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
94
94
|
Add to Gemfile:
|
|
95
95
|
|
|
96
96
|
```ruby
|
|
97
|
-
gem 'snaptrade', '~> 2.0.
|
|
97
|
+
gem 'snaptrade', '~> 2.0.216'
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -145,6 +145,8 @@ p.result[3] # [Faraday::Response] Raw HTTP response
|
|
|
145
145
|
|
|
146
146
|
### `snaptrade.account_information.get_account_activities`<a id="snaptradeaccount_informationget_account_activities"></a>
|
|
147
147
|
|
|
148
|
+
This endpoint is not deprecated and has no planned sunset. Responses to requests using the legacy `/api/v1` path prefix include `Deprecation: @1781222400` (June 12, 2026); that header applies only to the path prefix. Use the canonical root path `/accounts/{accountId}/activities`.
|
|
149
|
+
|
|
148
150
|
Returns all historical transactions for the specified account.
|
|
149
151
|
|
|
150
152
|
This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options.
|
|
@@ -199,14 +201,15 @@ of 1000.
|
|
|
199
201
|
Optional comma separated list of transaction types to filter by. SnapTrade does
|
|
200
202
|
a best effort to categorize brokerage transaction types into a common set of
|
|
201
203
|
values. Here are some of the most popular values: - `BUY` - Asset bought. -
|
|
202
|
-
`SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
`
|
|
208
|
-
|
|
209
|
-
|
|
204
|
+
`SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` -
|
|
205
|
+
Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. -
|
|
206
|
+
`WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. -
|
|
207
|
+
`STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead
|
|
208
|
+
of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee
|
|
209
|
+
withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` -
|
|
210
|
+
Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. -
|
|
211
|
+
`OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from
|
|
212
|
+
one account to another. - `SPLIT` - A stock share split.
|
|
210
213
|
|
|
211
214
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
212
215
|
|
|
@@ -3039,12 +3042,13 @@ parameter takes precedence over the `accounts` parameter.
|
|
|
3039
3042
|
Optional comma separated list of transaction types to filter by. SnapTrade does
|
|
3040
3043
|
a best effort to categorize brokerage transaction types into a common set of
|
|
3041
3044
|
values. Here are some of the most popular values: - `BUY` - Asset bought. -
|
|
3042
|
-
`SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
the account. - `
|
|
3046
|
-
`
|
|
3047
|
-
|
|
3045
|
+
`SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` -
|
|
3046
|
+
Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. -
|
|
3047
|
+
`WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` -
|
|
3048
|
+
Interest deposited into the account. - `FEE` - Fee withdrawn from the account. -
|
|
3049
|
+
`OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option
|
|
3050
|
+
assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` -
|
|
3051
|
+
Transfer of assets from one account to another
|
|
3048
3052
|
|
|
3049
3053
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
3050
3054
|
|
|
@@ -19,6 +19,8 @@ module SnapTrade
|
|
|
19
19
|
|
|
20
20
|
# List account activities
|
|
21
21
|
#
|
|
22
|
+
# This endpoint is not deprecated and has no planned sunset. Responses to requests using the legacy `/api/v1` path prefix include `Deprecation: @1781222400` (June 12, 2026); that header applies only to the path prefix. Use the canonical root path `/accounts/{accountId}/activities`.
|
|
23
|
+
#
|
|
22
24
|
# Returns all historical transactions for the specified account.
|
|
23
25
|
#
|
|
24
26
|
# This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options.
|
|
@@ -36,7 +38,7 @@ module SnapTrade
|
|
|
36
38
|
# @param end_date [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`.
|
|
37
39
|
# @param offset [Integer] An integer that specifies the starting point of the paginated results. Default is 0.
|
|
38
40
|
# @param limit [Integer] An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
39
|
-
# @param type [String] 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. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
41
|
+
# @param type [String] 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
40
42
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
41
43
|
def get_account_activities(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {})
|
|
42
44
|
extra[:start_date] = start_date if start_date != SENTINEL
|
|
@@ -50,6 +52,8 @@ module SnapTrade
|
|
|
50
52
|
|
|
51
53
|
# List account activities
|
|
52
54
|
#
|
|
55
|
+
# This endpoint is not deprecated and has no planned sunset. Responses to requests using the legacy `/api/v1` path prefix include `Deprecation: @1781222400` (June 12, 2026); that header applies only to the path prefix. Use the canonical root path `/accounts/{accountId}/activities`.
|
|
56
|
+
#
|
|
53
57
|
# Returns all historical transactions for the specified account.
|
|
54
58
|
#
|
|
55
59
|
# This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options.
|
|
@@ -67,7 +71,7 @@ module SnapTrade
|
|
|
67
71
|
# @param end_date [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`.
|
|
68
72
|
# @param offset [Integer] An integer that specifies the starting point of the paginated results. Default is 0.
|
|
69
73
|
# @param limit [Integer] An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
70
|
-
# @param type [String] 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. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
74
|
+
# @param type [String] 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
71
75
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
72
76
|
def get_account_activities_with_http_info(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {})
|
|
73
77
|
extra[:start_date] = start_date if start_date != SENTINEL
|
|
@@ -79,7 +83,7 @@ module SnapTrade
|
|
|
79
83
|
end
|
|
80
84
|
|
|
81
85
|
# List account activities
|
|
82
|
-
# Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
86
|
+
# This endpoint is not deprecated and has no planned sunset. Responses to requests using the legacy `/api/v1` path prefix include `Deprecation: @1781222400` (June 12, 2026); that header applies only to the path prefix. Use the canonical root path `/accounts/{accountId}/activities`. Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
83
87
|
# @param account_id [String]
|
|
84
88
|
# @param user_id [String]
|
|
85
89
|
# @param user_secret [String]
|
|
@@ -88,7 +92,7 @@ module SnapTrade
|
|
|
88
92
|
# @option opts [Date] :end_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`.
|
|
89
93
|
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0.
|
|
90
94
|
# @option opts [Integer] :limit An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
91
|
-
# @option opts [String] :type 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. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
95
|
+
# @option opts [String] :type 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
92
96
|
# @return [PaginatedUniversalActivity]
|
|
93
97
|
private def get_account_activities_impl(account_id, user_id, user_secret, opts = {})
|
|
94
98
|
data, _status_code, _headers = get_account_activities_with_http_info(account_id, user_id, user_secret, opts)
|
|
@@ -96,7 +100,7 @@ module SnapTrade
|
|
|
96
100
|
end
|
|
97
101
|
|
|
98
102
|
# List account activities
|
|
99
|
-
# Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
103
|
+
# This endpoint is not deprecated and has no planned sunset. Responses to requests using the legacy `/api/v1` path prefix include `Deprecation: @1781222400` (June 12, 2026); that header applies only to the path prefix. Use the canonical root path `/accounts/{accountId}/activities`. Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
100
104
|
# @param account_id [String]
|
|
101
105
|
# @param user_id [String]
|
|
102
106
|
# @param user_secret [String]
|
|
@@ -105,7 +109,7 @@ module SnapTrade
|
|
|
105
109
|
# @option opts [Date] :end_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`.
|
|
106
110
|
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0.
|
|
107
111
|
# @option opts [Integer] :limit An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
108
|
-
# @option opts [String] :type 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. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
112
|
+
# @option opts [String] :type 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
109
113
|
# @return [Array<(PaginatedUniversalActivity, Integer, Hash)>] PaginatedUniversalActivity data, response status code and response headers
|
|
110
114
|
private def get_account_activities_with_http_info_impl(account_id, user_id, user_secret, opts = {})
|
|
111
115
|
if @api_client.config.debugging
|
|
@@ -35,7 +35,7 @@ module SnapTrade
|
|
|
35
35
|
# @param end_date [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`.
|
|
36
36
|
# @param accounts [String] 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.
|
|
37
37
|
# @param brokerage_authorizations [String] 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.
|
|
38
|
-
# @param type [String] 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. - `TRANSFER` - Transfer of assets from one account to another
|
|
38
|
+
# @param type [String] 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `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. - `TRANSFER` - Transfer of assets from one account to another
|
|
39
39
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
40
40
|
def get_activities(user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, accounts: SENTINEL, brokerage_authorizations: SENTINEL, type: SENTINEL, extra: {})
|
|
41
41
|
extra[:start_date] = start_date if start_date != SENTINEL
|
|
@@ -65,7 +65,7 @@ module SnapTrade
|
|
|
65
65
|
# @param end_date [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`.
|
|
66
66
|
# @param accounts [String] 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.
|
|
67
67
|
# @param brokerage_authorizations [String] 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.
|
|
68
|
-
# @param type [String] 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. - `TRANSFER` - Transfer of assets from one account to another
|
|
68
|
+
# @param type [String] 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `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. - `TRANSFER` - Transfer of assets from one account to another
|
|
69
69
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
70
70
|
def get_activities_with_http_info(user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, accounts: SENTINEL, brokerage_authorizations: SENTINEL, type: SENTINEL, extra: {})
|
|
71
71
|
extra[:start_date] = start_date if start_date != SENTINEL
|
|
@@ -85,7 +85,7 @@ module SnapTrade
|
|
|
85
85
|
# @option opts [Date] :end_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`.
|
|
86
86
|
# @option opts [String] :accounts 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.
|
|
87
87
|
# @option opts [String] :brokerage_authorizations 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.
|
|
88
|
-
# @option opts [String] :type 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. - `TRANSFER` - Transfer of assets from one account to another
|
|
88
|
+
# @option opts [String] :type 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `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. - `TRANSFER` - Transfer of assets from one account to another
|
|
89
89
|
# @return [Array<UniversalActivity>]
|
|
90
90
|
private def get_activities_impl(user_id, user_secret, opts = {})
|
|
91
91
|
data, _status_code, _headers = get_activities_with_http_info(user_id, user_secret, opts)
|
|
@@ -101,7 +101,7 @@ module SnapTrade
|
|
|
101
101
|
# @option opts [Date] :end_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`.
|
|
102
102
|
# @option opts [String] :accounts 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.
|
|
103
103
|
# @option opts [String] :brokerage_authorizations 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.
|
|
104
|
-
# @option opts [String] :type 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. - `TRANSFER` - Transfer of assets from one account to another
|
|
104
|
+
# @option opts [String] :type 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `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. - `TRANSFER` - Transfer of assets from one account to another
|
|
105
105
|
# @return [Array<(Array<UniversalActivity>, Integer, Hash)>] Array<UniversalActivity> data, response status code and response headers
|
|
106
106
|
private def get_activities_with_http_info_impl(user_id, user_secret, opts = {})
|
|
107
107
|
if @api_client.config.debugging
|
|
@@ -33,7 +33,7 @@ module SnapTrade
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :currency
|
|
35
35
|
|
|
36
|
-
# A string representing the type of transaction. SnapTrade does a best effort to categorize the 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. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of asset(s) from one account to another. - `EXTERNAL_ASSET_TRANSFER_IN` - Incoming transfer of an asset from an external account to this account. - `EXTERNAL_ASSET_TRANSFER_OUT` - Outgoing transfer of an asset from this account to an external account. - `SPLIT` - A stock share split. - `ADJUSTMENT` - A one time adjustment of the account's cash balance or shares of an asset
|
|
36
|
+
# A string representing the type of transaction. SnapTrade does a best effort to categorize the 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of asset(s) from one account to another. - `EXTERNAL_ASSET_TRANSFER_IN` - Incoming transfer of an asset from an external account to this account. - `EXTERNAL_ASSET_TRANSFER_OUT` - Outgoing transfer of an asset from this account to an external account. - `SPLIT` - A stock share split. - `ADJUSTMENT` - A one time adjustment of the account's cash balance or shares of an asset
|
|
37
37
|
attr_accessor :type
|
|
38
38
|
|
|
39
39
|
# If an option `BUY` or `SELL` transaction, this further specifies the type of action. The possible values are: - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE
|
|
@@ -35,7 +35,7 @@ module SnapTrade
|
|
|
35
35
|
|
|
36
36
|
attr_accessor :currency
|
|
37
37
|
|
|
38
|
-
# A string representing the type of transaction. SnapTrade does a best effort to categorize the 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. `option_symbol` contains the related option contract info. - `OPTIONASSIGNMENT` - Option assignment event. `option_symbol` contains the related option contract info. - `OPTIONEXERCISE` - Option exercise event. `option_symbol` contains the related option contract info.
|
|
38
|
+
# A string representing the type of transaction. SnapTrade does a best effort to categorize the 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `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. `option_symbol` contains the related option contract info. - `OPTIONASSIGNMENT` - Option assignment event. `option_symbol` contains the related option contract info. - `OPTIONEXERCISE` - Option exercise event. `option_symbol` contains the related option contract info.
|
|
39
39
|
attr_accessor :type
|
|
40
40
|
|
|
41
41
|
# If an option `BUY` or `SELL` transaction, this further specifies the type of action. The possible values are: - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE
|
data/lib/snaptrade/version.rb
CHANGED
|
@@ -29,7 +29,7 @@ describe 'AccountInformationApi' do
|
|
|
29
29
|
|
|
30
30
|
# unit tests for get_account_activities
|
|
31
31
|
# List account activities
|
|
32
|
-
# Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
32
|
+
# This endpoint is not deprecated and has no planned sunset. Responses to requests using the legacy `/api/v1` path prefix include `Deprecation: @1781222400` (June 12, 2026); that header applies only to the path prefix. Use the canonical root path `/accounts/{accountId}/activities`. Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
33
33
|
# @param account_id
|
|
34
34
|
# @param user_id
|
|
35
35
|
# @param user_secret
|
|
@@ -38,7 +38,7 @@ describe 'AccountInformationApi' do
|
|
|
38
38
|
# @option opts [Date] :end_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`.
|
|
39
39
|
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0.
|
|
40
40
|
# @option opts [Integer] :limit An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
41
|
-
# @option opts [String] :type 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. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
41
|
+
# @option opts [String] :type 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
42
42
|
# @return [PaginatedUniversalActivity]
|
|
43
43
|
describe 'get_account_activities test' do
|
|
44
44
|
it 'should work' do
|
|
@@ -37,7 +37,7 @@ describe 'TransactionsAndReportingApi' do
|
|
|
37
37
|
# @option opts [Date] :end_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`.
|
|
38
38
|
# @option opts [String] :accounts 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.
|
|
39
39
|
# @option opts [String] :brokerage_authorizations 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.
|
|
40
|
-
# @option opts [String] :type 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. - `TRANSFER` - Transfer of assets from one account to another
|
|
40
|
+
# @option opts [String] :type 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. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `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. - `TRANSFER` - Transfer of assets from one account to another
|
|
41
41
|
# @return [Array<UniversalActivity>]
|
|
42
42
|
describe 'get_activities test' do
|
|
43
43
|
it 'should work' do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: snaptrade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.216
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|