snaptrade 2.0.143 → 2.0.144
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 +3 -3
- data/README.md +6 -5
- data/lib/snaptrade/api/account_information_api.rb +4 -4
- data/lib/snaptrade/models/account_order_record.rb +1 -1
- data/lib/snaptrade/models/account_universal_activity.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_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: bcacc5a8b46727ebbe777a619976cbb2eef197fbb696a6efad1f160eab6c33da
|
|
4
|
+
data.tar.gz: a3564374de2c0264546a55bb63690447e61a6aa7663539ef65767004cc363833
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9db5425f966f3586627ed6b4aedb9d390a563837136355cd23ff5c85afbe45759c50d668fd1d4ec40187d461d7b8b5b77e4afa74ced7b52cd4fc3b642e4c13a
|
|
7
|
+
data.tar.gz: 76f88da0eeea86e7d041fdc6b5de63ed357ce17c272695224f19ca8b582e3cae07c8933ef3e0d9019263cdc558fde7943e6a43e8545ad5644f03454d59eabc5f
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
snaptrade (2.0.
|
|
4
|
+
snaptrade (2.0.144)
|
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
|
7
7
|
|
|
@@ -29,7 +29,7 @@ GEM
|
|
|
29
29
|
method_source (1.1.0)
|
|
30
30
|
multipart-post (2.4.1)
|
|
31
31
|
parallel (1.27.0)
|
|
32
|
-
parser (3.3.
|
|
32
|
+
parser (3.3.10.0)
|
|
33
33
|
ast (~> 2.4.1)
|
|
34
34
|
racc
|
|
35
35
|
prism (1.6.0)
|
|
@@ -55,7 +55,7 @@ GEM
|
|
|
55
55
|
rspec-expectations (3.13.5)
|
|
56
56
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
57
57
|
rspec-support (~> 3.13.0)
|
|
58
|
-
rspec-mocks (3.13.
|
|
58
|
+
rspec-mocks (3.13.7)
|
|
59
59
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
60
60
|
rspec-support (~> 3.13.0)
|
|
61
61
|
rspec-support (3.13.6)
|
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.144)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -81,7 +81,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
81
81
|
Add to Gemfile:
|
|
82
82
|
|
|
83
83
|
```ruby
|
|
84
|
-
gem 'snaptrade', '~> 2.0.
|
|
84
|
+
gem 'snaptrade', '~> 2.0.144'
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -190,9 +190,10 @@ values. Here are some of the most popular values: - `BUY` - Asset bought. -
|
|
|
190
190
|
contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment.
|
|
191
191
|
- `STOCK_DIVIDEND` - A type of dividend where a company distributes shares
|
|
192
192
|
instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` -
|
|
193
|
-
Fee withdrawn from the account. - `
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
Fee withdrawn from the account. - `TAX`` - A tax related fee. -
|
|
194
|
+
`OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option
|
|
195
|
+
assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` -
|
|
196
|
+
Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
196
197
|
|
|
197
198
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
198
199
|
|
|
@@ -36,7 +36,7 @@ module SnapTrade
|
|
|
36
36
|
# @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
37
|
# @param offset [Integer] An integer that specifies the starting point of the paginated results. Default is 0.
|
|
38
38
|
# @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. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
|
|
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.
|
|
40
40
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
41
41
|
def get_account_activities(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {})
|
|
42
42
|
extra[:start_date] = start_date if start_date != SENTINEL
|
|
@@ -67,7 +67,7 @@ module SnapTrade
|
|
|
67
67
|
# @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
68
|
# @param offset [Integer] An integer that specifies the starting point of the paginated results. Default is 0.
|
|
69
69
|
# @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. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
|
|
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.
|
|
71
71
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
72
72
|
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
73
|
extra[:start_date] = start_date if start_date != SENTINEL
|
|
@@ -88,7 +88,7 @@ module SnapTrade
|
|
|
88
88
|
# @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
89
|
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0.
|
|
90
90
|
# @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. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
|
|
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.
|
|
92
92
|
# @return [PaginatedUniversalActivity]
|
|
93
93
|
private def get_account_activities_impl(account_id, user_id, user_secret, opts = {})
|
|
94
94
|
data, _status_code, _headers = get_account_activities_with_http_info(account_id, user_id, user_secret, opts)
|
|
@@ -105,7 +105,7 @@ module SnapTrade
|
|
|
105
105
|
# @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
106
|
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0.
|
|
107
107
|
# @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. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
|
|
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.
|
|
109
109
|
# @return [Array<(PaginatedUniversalActivity, Integer, Hash)>] PaginatedUniversalActivity data, response status code and response headers
|
|
110
110
|
private def get_account_activities_with_http_info_impl(account_id, user_id, user_secret, opts = {})
|
|
111
111
|
if @api_client.config.debugging
|
|
@@ -16,7 +16,7 @@ module SnapTrade
|
|
|
16
16
|
# Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
|
|
17
17
|
attr_accessor :brokerage_order_id
|
|
18
18
|
|
|
19
|
-
# Indicates the status of an order. SnapTrade does a best effort to map brokerage statuses to statuses in this enum.
|
|
19
|
+
# Indicates the status of an order. SnapTrade does a best effort to map brokerage statuses to statuses in this enum. Possible values include: - NONE - PENDING - ACCEPTED - FAILED - REJECTED - CANCELED - PARTIAL_CANCELED - CANCEL_PENDING - EXECUTED - PARTIAL - REPLACE_PENDING - REPLACED - EXPIRED - QUEUED - TRIGGERED - ACTIVATED
|
|
20
20
|
attr_accessor :status
|
|
21
21
|
|
|
22
22
|
attr_accessor :universal_symbol
|
|
@@ -31,7 +31,7 @@ module SnapTrade
|
|
|
31
31
|
|
|
32
32
|
attr_accessor :currency
|
|
33
33
|
|
|
34
|
-
# 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. - `
|
|
34
|
+
# 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 assets from one account to another. - `SPLIT` - A stock share split.
|
|
35
35
|
attr_accessor :type
|
|
36
36
|
|
|
37
37
|
# 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
|
@@ -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. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
|
|
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.
|
|
42
42
|
# @return [PaginatedUniversalActivity]
|
|
43
43
|
describe 'get_account_activities test' do
|
|
44
44
|
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.144
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|