snaptrade 2.0.216 → 2.0.217
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 +3 -3
- data/lib/snaptrade/api/account_information_api.rb +4 -4
- data/lib/snaptrade/models/holdings_status.rb +15 -5
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +1 -1
- data/spec/models/holdings_status_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9b12d3207e97475d1d855d8adb86c139d4abc8cdab5d64220158a8a6686df327
|
|
4
|
+
data.tar.gz: 9316e9b555efed30ceb1ebaf72162878e8a9c387212b6ed6ad224b2580497dd7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad6a49682812402cfdfc0f95ba5ee652277d2b373c4a0961bde7d0b217a0044080209fe81f80e4298ef5faf211741699aed5eb1c8816ac41e291b9a535a73ebb
|
|
7
|
+
data.tar.gz: 12ca9e303d15c7d59d906e2bfebc3878100fbdbc863e06020535e640912b50f916049e4ead2b8ba996b3906cc6cb314f58f13b5562f61fee8af7640fd584979e
|
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.217)
|
|
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.217'
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -264,7 +264,7 @@ Returns a list of all positions in the specified account.
|
|
|
264
264
|
|
|
265
265
|
The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
266
266
|
|
|
267
|
-
`mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account.
|
|
267
|
+
`mutualfund` positions may also include `cash_equivalent`. `stock`, `etf`, and `mutualfund` positions may include `tax_lots` when tax lot data is enabled for the account.
|
|
268
268
|
|
|
269
269
|
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.
|
|
270
270
|
|
|
@@ -292,7 +292,7 @@ module SnapTrade
|
|
|
292
292
|
#
|
|
293
293
|
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
294
294
|
#
|
|
295
|
-
# `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account.
|
|
295
|
+
# `mutualfund` positions may also include `cash_equivalent`. `stock`, `etf`, and `mutualfund` positions may include `tax_lots` when tax lot data is enabled for the account.
|
|
296
296
|
#
|
|
297
297
|
# 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.
|
|
298
298
|
#
|
|
@@ -311,7 +311,7 @@ module SnapTrade
|
|
|
311
311
|
#
|
|
312
312
|
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
313
313
|
#
|
|
314
|
-
# `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account.
|
|
314
|
+
# `mutualfund` positions may also include `cash_equivalent`. `stock`, `etf`, and `mutualfund` positions may include `tax_lots` when tax lot data is enabled for the account.
|
|
315
315
|
#
|
|
316
316
|
# 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.
|
|
317
317
|
#
|
|
@@ -324,7 +324,7 @@ module SnapTrade
|
|
|
324
324
|
end
|
|
325
325
|
|
|
326
326
|
# List all account positions
|
|
327
|
-
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. 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.
|
|
327
|
+
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock`, `etf`, and `mutualfund` positions may include `tax_lots` when tax lot data is enabled for the account. 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.
|
|
328
328
|
# @param user_id [String]
|
|
329
329
|
# @param user_secret [String]
|
|
330
330
|
# @param account_id [String]
|
|
@@ -336,7 +336,7 @@ module SnapTrade
|
|
|
336
336
|
end
|
|
337
337
|
|
|
338
338
|
# List all account positions
|
|
339
|
-
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. 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.
|
|
339
|
+
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock`, `etf`, and `mutualfund` positions may include `tax_lots` when tax lot data is enabled for the account. 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.
|
|
340
340
|
# @param user_id [String]
|
|
341
341
|
# @param user_secret [String]
|
|
342
342
|
# @param account_id [String]
|
|
@@ -19,11 +19,15 @@ module SnapTrade
|
|
|
19
19
|
# The last time holdings were successfully synced by SnapTrade.
|
|
20
20
|
attr_accessor :last_successful_sync
|
|
21
21
|
|
|
22
|
+
# Indicates that the brokerage does not expose this account's holdings to SnapTrade, so the empty positions and balances reported for it do not mean the account is empty. This is set for accounts served by a separate brokerage system that we cannot read, such as Vanguard employer-sponsored retirement plans. When this is `true`, prefer the account's total value over the sum of its positions and cash, and note that `initial_sync_completed` and `last_successful_sync` may still reflect an earlier sync.
|
|
23
|
+
attr_accessor :holdings_unavailable
|
|
24
|
+
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
26
|
def self.attribute_map
|
|
24
27
|
{
|
|
25
28
|
:'initial_sync_completed' => :'initial_sync_completed',
|
|
26
|
-
:'last_successful_sync' => :'last_successful_sync'
|
|
29
|
+
:'last_successful_sync' => :'last_successful_sync',
|
|
30
|
+
:'holdings_unavailable' => :'holdings_unavailable'
|
|
27
31
|
}
|
|
28
32
|
end
|
|
29
33
|
|
|
@@ -36,14 +40,15 @@ module SnapTrade
|
|
|
36
40
|
def self.openapi_types
|
|
37
41
|
{
|
|
38
42
|
:'initial_sync_completed' => :'Boolean',
|
|
39
|
-
:'last_successful_sync' => :'Time'
|
|
43
|
+
:'last_successful_sync' => :'Time',
|
|
44
|
+
:'holdings_unavailable' => :'Boolean'
|
|
40
45
|
}
|
|
41
46
|
end
|
|
42
47
|
|
|
43
48
|
# List of attributes with nullable: true
|
|
44
49
|
def self.openapi_nullable
|
|
45
50
|
Set.new([
|
|
46
|
-
:'last_successful_sync'
|
|
51
|
+
:'last_successful_sync',
|
|
47
52
|
])
|
|
48
53
|
end
|
|
49
54
|
|
|
@@ -69,6 +74,10 @@ module SnapTrade
|
|
|
69
74
|
if attributes.key?(:'last_successful_sync')
|
|
70
75
|
self.last_successful_sync = attributes[:'last_successful_sync']
|
|
71
76
|
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'holdings_unavailable')
|
|
79
|
+
self.holdings_unavailable = attributes[:'holdings_unavailable']
|
|
80
|
+
end
|
|
72
81
|
end
|
|
73
82
|
|
|
74
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -90,7 +99,8 @@ module SnapTrade
|
|
|
90
99
|
return true if self.equal?(o)
|
|
91
100
|
self.class == o.class &&
|
|
92
101
|
initial_sync_completed == o.initial_sync_completed &&
|
|
93
|
-
last_successful_sync == o.last_successful_sync
|
|
102
|
+
last_successful_sync == o.last_successful_sync &&
|
|
103
|
+
holdings_unavailable == o.holdings_unavailable
|
|
94
104
|
end
|
|
95
105
|
|
|
96
106
|
# @see the `==` method
|
|
@@ -102,7 +112,7 @@ module SnapTrade
|
|
|
102
112
|
# Calculates hash code according to all attributes.
|
|
103
113
|
# @return [Integer] Hash code
|
|
104
114
|
def hash
|
|
105
|
-
[initial_sync_completed, last_successful_sync].hash
|
|
115
|
+
[initial_sync_completed, last_successful_sync, holdings_unavailable].hash
|
|
106
116
|
end
|
|
107
117
|
|
|
108
118
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
|
@@ -62,7 +62,7 @@ describe 'AccountInformationApi' do
|
|
|
62
62
|
|
|
63
63
|
# unit tests for get_all_account_positions
|
|
64
64
|
# List all account positions
|
|
65
|
-
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. 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.
|
|
65
|
+
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock`, `etf`, and `mutualfund` positions may include `tax_lots` when tax lot data is enabled for the account. 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.
|
|
66
66
|
# @param user_id
|
|
67
67
|
# @param user_secret
|
|
68
68
|
# @param account_id
|