snaptrade 2.0.164 → 2.0.165
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 +6 -4
- data/lib/snaptrade/api/account_information_api.rb +10 -6
- data/lib/snaptrade/models/account.rb +12 -1
- data/lib/snaptrade/models/account_simple.rb +12 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +1 -1
- data/spec/models/account_simple_spec.rb +6 -0
- data/spec/models/account_spec.rb +6 -0
- 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: c43da3d7462a69a3748073633401c27d86966de0a9ad26d08df6a0d9e6a67629
|
|
4
|
+
data.tar.gz: f53b10e5602aff84b922f3d037a164a10dd2a626a97429cb02038886bf69c4f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: efcc1995284cbb50446a316a393cb0ec3fd080326ff25a0a07dd3eea5e88c0ab83cac919f4e80dc2e7b5c805d2bc839e6ea8a83d35e7c8daeae7843a5e24ed69
|
|
7
|
+
data.tar.gz: e7c8cfe1df4d635bfc5839cc37044a8ff61199d4b69828a9758c8a9ed29ff4151fa80e9fcc5093162b66e7c00d5b3960e67d3504581c16b7e1fca8f149115a1e
|
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.165)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -86,7 +86,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
86
86
|
Add to Gemfile:
|
|
87
87
|
|
|
88
88
|
```ruby
|
|
89
|
-
gem 'snaptrade', '~> 2.0.
|
|
89
|
+
gem 'snaptrade', '~> 2.0.165'
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -588,9 +588,11 @@ p result
|
|
|
588
588
|
|
|
589
589
|
Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
590
590
|
|
|
591
|
+
Please note that this data is cached and only refreshed once a day.
|
|
592
|
+
|
|
591
593
|
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
592
|
-
- If you do,
|
|
593
|
-
- If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization)
|
|
594
|
+
- If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails).
|
|
595
|
+
- If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
594
596
|
|
|
595
597
|
|
|
596
598
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -1243,9 +1243,11 @@ module SnapTrade
|
|
|
1243
1243
|
#
|
|
1244
1244
|
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
1245
1245
|
#
|
|
1246
|
+
# Please note that this data is cached and only refreshed once a day.
|
|
1247
|
+
#
|
|
1246
1248
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
1247
|
-
# - If you do,
|
|
1248
|
-
# - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization)
|
|
1249
|
+
# - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails).
|
|
1250
|
+
# - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
1249
1251
|
#
|
|
1250
1252
|
# @param user_id [String]
|
|
1251
1253
|
# @param user_secret [String]
|
|
@@ -1259,9 +1261,11 @@ module SnapTrade
|
|
|
1259
1261
|
#
|
|
1260
1262
|
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
1261
1263
|
#
|
|
1264
|
+
# Please note that this data is cached and only refreshed once a day.
|
|
1265
|
+
#
|
|
1262
1266
|
# Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
1263
|
-
# - If you do,
|
|
1264
|
-
# - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization)
|
|
1267
|
+
# - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails).
|
|
1268
|
+
# - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
1265
1269
|
#
|
|
1266
1270
|
# @param user_id [String]
|
|
1267
1271
|
# @param user_secret [String]
|
|
@@ -1271,7 +1275,7 @@ module SnapTrade
|
|
|
1271
1275
|
end
|
|
1272
1276
|
|
|
1273
1277
|
# List accounts
|
|
1274
|
-
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
1278
|
+
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
1275
1279
|
# @param user_id [String]
|
|
1276
1280
|
# @param user_secret [String]
|
|
1277
1281
|
# @param [Hash] opts the optional parameters
|
|
@@ -1282,7 +1286,7 @@ module SnapTrade
|
|
|
1282
1286
|
end
|
|
1283
1287
|
|
|
1284
1288
|
# List accounts
|
|
1285
|
-
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
1289
|
+
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
1286
1290
|
# @param user_id [String]
|
|
1287
1291
|
# @param user_secret [String]
|
|
1288
1292
|
# @param [Hash] opts the optional parameters
|
|
@@ -25,6 +25,9 @@ module SnapTrade
|
|
|
25
25
|
# The account number assigned by the brokerage. For some brokerages, this field may be masked for security reasons.
|
|
26
26
|
attr_accessor :number
|
|
27
27
|
|
|
28
|
+
# A stable and unique account identifier provided by the institution. Will be set to null if not provided. When present, can be used to check if a user has connected the same brokerage account across multiple connections.
|
|
29
|
+
attr_accessor :institution_account_id
|
|
30
|
+
|
|
28
31
|
# The name of the brokerage that holds the account.
|
|
29
32
|
attr_accessor :institution_name
|
|
30
33
|
|
|
@@ -66,6 +69,7 @@ module SnapTrade
|
|
|
66
69
|
:'brokerage_authorization' => :'brokerage_authorization',
|
|
67
70
|
:'name' => :'name',
|
|
68
71
|
:'number' => :'number',
|
|
72
|
+
:'institution_account_id' => :'institution_account_id',
|
|
69
73
|
:'institution_name' => :'institution_name',
|
|
70
74
|
:'created_date' => :'created_date',
|
|
71
75
|
:'funding_date' => :'funding_date',
|
|
@@ -93,6 +97,7 @@ module SnapTrade
|
|
|
93
97
|
:'brokerage_authorization' => :'String',
|
|
94
98
|
:'name' => :'String',
|
|
95
99
|
:'number' => :'String',
|
|
100
|
+
:'institution_account_id' => :'String',
|
|
96
101
|
:'institution_name' => :'String',
|
|
97
102
|
:'created_date' => :'Time',
|
|
98
103
|
:'funding_date' => :'Time',
|
|
@@ -112,6 +117,7 @@ module SnapTrade
|
|
|
112
117
|
def self.openapi_nullable
|
|
113
118
|
Set.new([
|
|
114
119
|
:'name',
|
|
120
|
+
:'institution_account_id',
|
|
115
121
|
:'funding_date',
|
|
116
122
|
:'opening_date',
|
|
117
123
|
:'status',
|
|
@@ -150,6 +156,10 @@ module SnapTrade
|
|
|
150
156
|
self.number = attributes[:'number']
|
|
151
157
|
end
|
|
152
158
|
|
|
159
|
+
if attributes.key?(:'institution_account_id')
|
|
160
|
+
self.institution_account_id = attributes[:'institution_account_id']
|
|
161
|
+
end
|
|
162
|
+
|
|
153
163
|
if attributes.key?(:'institution_name')
|
|
154
164
|
self.institution_name = attributes[:'institution_name']
|
|
155
165
|
end
|
|
@@ -265,6 +275,7 @@ module SnapTrade
|
|
|
265
275
|
brokerage_authorization == o.brokerage_authorization &&
|
|
266
276
|
name == o.name &&
|
|
267
277
|
number == o.number &&
|
|
278
|
+
institution_account_id == o.institution_account_id &&
|
|
268
279
|
institution_name == o.institution_name &&
|
|
269
280
|
created_date == o.created_date &&
|
|
270
281
|
funding_date == o.funding_date &&
|
|
@@ -288,7 +299,7 @@ module SnapTrade
|
|
|
288
299
|
# Calculates hash code according to all attributes.
|
|
289
300
|
# @return [Integer] Hash code
|
|
290
301
|
def hash
|
|
291
|
-
[id, brokerage_authorization, name, number, institution_name, created_date, funding_date, opening_date, sync_status, balance, status, raw_type, meta, portfolio_group, cash_restrictions, is_paper].hash
|
|
302
|
+
[id, brokerage_authorization, name, number, institution_account_id, institution_name, created_date, funding_date, opening_date, sync_status, balance, status, raw_type, meta, portfolio_group, cash_restrictions, is_paper].hash
|
|
292
303
|
end
|
|
293
304
|
|
|
294
305
|
# Builds the object from hash
|
|
@@ -22,6 +22,9 @@ module SnapTrade
|
|
|
22
22
|
# The account number assigned by the brokerage. For some brokerages, this field may be masked for security reasons.
|
|
23
23
|
attr_accessor :number
|
|
24
24
|
|
|
25
|
+
# A stable and unique account identifier provided by the institution. Will be set to null if not provided. When present, can be used to check if a user has connected the same brokerage account across multiple connections.
|
|
26
|
+
attr_accessor :institution_account_id
|
|
27
|
+
|
|
25
28
|
attr_accessor :sync_status
|
|
26
29
|
|
|
27
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -30,6 +33,7 @@ module SnapTrade
|
|
|
30
33
|
:'id' => :'id',
|
|
31
34
|
:'name' => :'name',
|
|
32
35
|
:'number' => :'number',
|
|
36
|
+
:'institution_account_id' => :'institution_account_id',
|
|
33
37
|
:'sync_status' => :'sync_status'
|
|
34
38
|
}
|
|
35
39
|
end
|
|
@@ -45,6 +49,7 @@ module SnapTrade
|
|
|
45
49
|
:'id' => :'String',
|
|
46
50
|
:'name' => :'String',
|
|
47
51
|
:'number' => :'String',
|
|
52
|
+
:'institution_account_id' => :'String',
|
|
48
53
|
:'sync_status' => :'AccountSyncStatus'
|
|
49
54
|
}
|
|
50
55
|
end
|
|
@@ -52,6 +57,7 @@ module SnapTrade
|
|
|
52
57
|
# List of attributes with nullable: true
|
|
53
58
|
def self.openapi_nullable
|
|
54
59
|
Set.new([
|
|
60
|
+
:'institution_account_id',
|
|
55
61
|
])
|
|
56
62
|
end
|
|
57
63
|
|
|
@@ -82,6 +88,10 @@ module SnapTrade
|
|
|
82
88
|
self.number = attributes[:'number']
|
|
83
89
|
end
|
|
84
90
|
|
|
91
|
+
if attributes.key?(:'institution_account_id')
|
|
92
|
+
self.institution_account_id = attributes[:'institution_account_id']
|
|
93
|
+
end
|
|
94
|
+
|
|
85
95
|
if attributes.key?(:'sync_status')
|
|
86
96
|
self.sync_status = attributes[:'sync_status']
|
|
87
97
|
end
|
|
@@ -108,6 +118,7 @@ module SnapTrade
|
|
|
108
118
|
id == o.id &&
|
|
109
119
|
name == o.name &&
|
|
110
120
|
number == o.number &&
|
|
121
|
+
institution_account_id == o.institution_account_id &&
|
|
111
122
|
sync_status == o.sync_status
|
|
112
123
|
end
|
|
113
124
|
|
|
@@ -120,7 +131,7 @@ module SnapTrade
|
|
|
120
131
|
# Calculates hash code according to all attributes.
|
|
121
132
|
# @return [Integer] Hash code
|
|
122
133
|
def hash
|
|
123
|
-
[id, name, number, sync_status].hash
|
|
134
|
+
[id, name, number, institution_account_id, sync_status].hash
|
|
124
135
|
end
|
|
125
136
|
|
|
126
137
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
|
@@ -178,7 +178,7 @@ describe 'AccountInformationApi' do
|
|
|
178
178
|
|
|
179
179
|
# unit tests for list_user_accounts
|
|
180
180
|
# List accounts
|
|
181
|
-
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do,
|
|
181
|
+
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. Please note that this data is cached and only refreshed once a day. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails). - If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
182
182
|
# @param user_id
|
|
183
183
|
# @param user_secret
|
|
184
184
|
# @param [Hash] opts the optional parameters
|
|
@@ -38,6 +38,12 @@ describe SnapTrade::AccountSimple do
|
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
describe 'test attribute "institution_account_id"' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
41
47
|
describe 'test attribute "sync_status"' do
|
|
42
48
|
it 'should work' do
|
|
43
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
data/spec/models/account_spec.rb
CHANGED
|
@@ -44,6 +44,12 @@ describe SnapTrade::Account do
|
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
describe 'test attribute "institution_account_id"' do
|
|
48
|
+
it 'should work' do
|
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
47
53
|
describe 'test attribute "institution_name"' do
|
|
48
54
|
it 'should work' do
|
|
49
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
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.165
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|