snaptrade 2.0.28 โ 2.0.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +14 -44
- data/lib/snaptrade/api/account_information_api.rb +10 -6
- data/lib/snaptrade/api/authentication_api.rb +10 -107
- data/lib/snaptrade/api/connections_api.rb +4 -4
- data/lib/snaptrade/api/trading_api.rb +4 -4
- data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +2 -2
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +1 -1
- data/spec/api/authentication_api_spec.rb +1 -14
- data/spec/api/connections_api_spec.rb +1 -1
- data/spec/api/trading_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: 90d2830fdcb3a1406af0db439f7cdec6d02b895b715c4a90093dca06c4a5e787
|
4
|
+
data.tar.gz: 67b0d298c28363d224e26a59cd559de0a0330498da7877e81cc3d95f03660460
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a5af9e47b615b7eee91ec656eda1acb7a8006066df7519c2e7947371fbc09e085f1ed31e8644318033664a64d09e91eab57d468987730b9f9e28a7f6393c05d
|
7
|
+
data.tar.gz: 3a282337bbcad359000d485fb143dbcf9598e8a3a10fcc5b6d4844893f8aeb8d2ac57e69df4504e5d2f982252554aa2ee5ddf54f402bb1511a19c6f3b0e63f94
|
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
|
-
[![npm](https://img.shields.io/badge/gem-v2.0.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v2.0.30-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.30)
|
10
10
|
[![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
|
11
11
|
|
12
12
|
</div>
|
@@ -29,7 +29,6 @@ Connect brokerage accounts to your app for live positions and trading
|
|
29
29
|
* [`snaptrade.account_information.update_user_account`](#snaptradeaccount_informationupdate_user_account)
|
30
30
|
* [`snaptrade.api_status.check`](#snaptradeapi_statuscheck)
|
31
31
|
* [`snaptrade.authentication.delete_snap_trade_user`](#snaptradeauthenticationdelete_snap_trade_user)
|
32
|
-
* [`snaptrade.authentication.get_user_jwt`](#snaptradeauthenticationget_user_jwt)
|
33
32
|
* [`snaptrade.authentication.list_snap_trade_users`](#snaptradeauthenticationlist_snap_trade_users)
|
34
33
|
* [`snaptrade.authentication.login_snap_trade_user`](#snaptradeauthenticationlogin_snap_trade_user)
|
35
34
|
* [`snaptrade.authentication.register_snap_trade_user`](#snaptradeauthenticationregister_snap_trade_user)
|
@@ -71,7 +70,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
71
70
|
Add to Gemfile:
|
72
71
|
|
73
72
|
```ruby
|
74
|
-
gem 'snaptrade', '~> 2.0.
|
73
|
+
gem 'snaptrade', '~> 2.0.30'
|
75
74
|
```
|
76
75
|
|
77
76
|
## Getting Started<a id="getting-started"></a>
|
@@ -113,8 +112,10 @@ p.result[3] # [Faraday::Response] Raw HTTP response
|
|
113
112
|
### `snaptrade.account_information.get_all_user_holdings`<a id="snaptradeaccount_informationget_all_user_holdings"></a>
|
114
113
|
![Deprecated](https://img.shields.io/badge/deprecated-yellow)
|
115
114
|
|
116
|
-
|
117
|
-
|
115
|
+
**Deprecated, please use the account-specific holdings endpoint instead.**
|
116
|
+
|
117
|
+
List all accounts for the user, plus balances, positions, and orders for each
|
118
|
+
account.
|
118
119
|
|
119
120
|
|
120
121
|
#### ๐ ๏ธ Usage<a id="๐ ๏ธ-usage"></a>
|
@@ -457,39 +458,6 @@ p result
|
|
457
458
|
---
|
458
459
|
|
459
460
|
|
460
|
-
### `snaptrade.authentication.get_user_jwt`<a id="snaptradeauthenticationget_user_jwt"></a>
|
461
|
-
|
462
|
-
This API is available to ClientIDs which have opted to use encrypted
|
463
|
-
JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
|
464
|
-
|
465
|
-
|
466
|
-
#### ๐ ๏ธ Usage<a id="๐ ๏ธ-usage"></a>
|
467
|
-
|
468
|
-
```ruby
|
469
|
-
result = snaptrade.authentication.get_user_jwt(
|
470
|
-
user_id: "snaptrade-user-123",
|
471
|
-
user_secret: "USERSECRET123",
|
472
|
-
)
|
473
|
-
p result
|
474
|
-
```
|
475
|
-
|
476
|
-
#### โ๏ธ Parameters<a id="โ๏ธ-parameters"></a>
|
477
|
-
|
478
|
-
##### user_id: `String`<a id="user_id-string"></a>
|
479
|
-
##### user_secret: `String`<a id="user_secret-string"></a>
|
480
|
-
#### ๐ Return<a id="๐-return"></a>
|
481
|
-
|
482
|
-
[EncryptedResponse](./lib/snaptrade/models/encrypted_response.rb)
|
483
|
-
|
484
|
-
#### ๐ Endpoint<a id="๐-endpoint"></a>
|
485
|
-
|
486
|
-
`/snapTrade/encryptedJWT` `GET`
|
487
|
-
|
488
|
-
[๐ **Back to Table of Contents**](#table-of-contents)
|
489
|
-
|
490
|
-
---
|
491
|
-
|
492
|
-
|
493
461
|
### `snaptrade.authentication.list_snap_trade_users`<a id="snaptradeauthenticationlist_snap_trade_users"></a>
|
494
462
|
|
495
463
|
Returns a list of users you've registered over the SnapTrade API.
|
@@ -535,7 +503,9 @@ p result
|
|
535
503
|
##### user_id: `String`<a id="user_id-string"></a>
|
536
504
|
##### user_secret: `String`<a id="user_secret-string"></a>
|
537
505
|
##### broker: `String`<a id="broker-string"></a>
|
538
|
-
Slug of the brokerage to connect the user to
|
506
|
+
Slug of the brokerage to connect the user to. See [this
|
507
|
+
document](https://snaptrade.notion.site/SnapTrade-Brokerage-Integrations-f83946a714a84c3caf599f6a945f0ead)
|
508
|
+
for a list of supported brokerages and their slugs.
|
539
509
|
|
540
510
|
##### immediateRedirect: `Boolean`<a id="immediateredirect-boolean"></a>
|
541
511
|
When set to True, user will be redirected back to the partner's site instead of
|
@@ -553,7 +523,7 @@ Accountsโ for more information.
|
|
553
523
|
Sets whether the connection should be read or trade
|
554
524
|
|
555
525
|
##### connectionPortalVersion: [`ConnectionPortalVersion`](./lib/snaptrade/models/connection_portal_version.rb)<a id="connectionportalversion-connectionportalversionlibsnaptrademodelsconnection_portal_versionrb"></a>
|
556
|
-
Sets the version of the connection portal to render, with a default to '
|
526
|
+
Sets the version of the connection portal to render, with a default to 'v3'
|
557
527
|
|
558
528
|
#### ๐ Return<a id="๐-return"></a>
|
559
529
|
|
@@ -570,8 +540,8 @@ Sets the version of the connection portal to render, with a default to 'v2'
|
|
570
540
|
|
571
541
|
### `snaptrade.authentication.register_snap_trade_user`<a id="snaptradeauthenticationregister_snap_trade_user"></a>
|
572
542
|
|
573
|
-
Registers a new SnapTrade user under your ClientID.
|
574
|
-
Most SnapTrade operations require a user to be passed as a parameter.
|
543
|
+
Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database.
|
544
|
+
Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
|
575
545
|
|
576
546
|
|
577
547
|
#### ๐ ๏ธ Usage<a id="๐ ๏ธ-usage"></a>
|
@@ -748,7 +718,7 @@ p result
|
|
748
718
|
|
749
719
|
### `snaptrade.connections.refresh_brokerage_authorization`<a id="snaptradeconnectionsrefresh_brokerage_authorization"></a>
|
750
720
|
|
751
|
-
Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes
|
721
|
+
Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes. Please contact support for access as this endpoint is not enabled by default
|
752
722
|
|
753
723
|
#### ๐ ๏ธ Usage<a id="๐ ๏ธ-usage"></a>
|
754
724
|
|
@@ -1475,7 +1445,7 @@ Canceled
|
|
1475
1445
|
|
1476
1446
|
### `snaptrade.trading.get_user_account_quotes`<a id="snaptradetradingget_user_account_quotes"></a>
|
1477
1447
|
|
1478
|
-
Returns
|
1448
|
+
Returns quote(s) from the brokerage for the specified symbol(s).
|
1479
1449
|
|
1480
1450
|
#### ๐ ๏ธ Usage<a id="๐ ๏ธ-usage"></a>
|
1481
1451
|
|
@@ -19,8 +19,10 @@ module SnapTrade
|
|
19
19
|
|
20
20
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
21
21
|
#
|
22
|
-
#
|
23
|
-
#
|
22
|
+
# **Deprecated, please use the account-specific holdings endpoint instead.**
|
23
|
+
#
|
24
|
+
# List all accounts for the user, plus balances, positions, and orders for each
|
25
|
+
# account.
|
24
26
|
#
|
25
27
|
# @param user_id [String]
|
26
28
|
# @param user_secret [String]
|
@@ -34,8 +36,10 @@ module SnapTrade
|
|
34
36
|
|
35
37
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
36
38
|
#
|
37
|
-
#
|
38
|
-
#
|
39
|
+
# **Deprecated, please use the account-specific holdings endpoint instead.**
|
40
|
+
#
|
41
|
+
# List all accounts for the user, plus balances, positions, and orders for each
|
42
|
+
# account.
|
39
43
|
#
|
40
44
|
# @param user_id [String]
|
41
45
|
# @param user_secret [String]
|
@@ -47,7 +51,7 @@ module SnapTrade
|
|
47
51
|
end
|
48
52
|
|
49
53
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
50
|
-
#
|
54
|
+
# **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account.
|
51
55
|
# @param user_id [String]
|
52
56
|
# @param user_secret [String]
|
53
57
|
# @param [Hash] opts the optional parameters
|
@@ -59,7 +63,7 @@ module SnapTrade
|
|
59
63
|
end
|
60
64
|
|
61
65
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
62
|
-
#
|
66
|
+
# **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account.
|
63
67
|
# @param user_id [String]
|
64
68
|
# @param user_secret [String]
|
65
69
|
# @param [Hash] opts the optional parameters
|
@@ -103,103 +103,6 @@ module SnapTrade
|
|
103
103
|
end
|
104
104
|
|
105
105
|
|
106
|
-
# Generate encrypted JWT token
|
107
|
-
#
|
108
|
-
# This API is available to ClientIDs which have opted to use encrypted
|
109
|
-
# JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
|
110
|
-
#
|
111
|
-
# @param user_id [String]
|
112
|
-
# @param user_secret [String]
|
113
|
-
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
114
|
-
def get_user_jwt(user_id:, user_secret:, extra: {})
|
115
|
-
data, _status_code, _headers = get_user_jwt_with_http_info_impl(user_id, user_secret, extra)
|
116
|
-
data
|
117
|
-
end
|
118
|
-
|
119
|
-
# Generate encrypted JWT token
|
120
|
-
#
|
121
|
-
# This API is available to ClientIDs which have opted to use encrypted
|
122
|
-
# JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
|
123
|
-
#
|
124
|
-
# @param user_id [String]
|
125
|
-
# @param user_secret [String]
|
126
|
-
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
127
|
-
def get_user_jwt_with_http_info(user_id:, user_secret:, extra: {})
|
128
|
-
get_user_jwt_with_http_info_impl(user_id, user_secret, extra)
|
129
|
-
end
|
130
|
-
|
131
|
-
# Generate encrypted JWT token
|
132
|
-
# This API is available to ClientIDs which have opted to use encrypted JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
|
133
|
-
# @param user_id [String]
|
134
|
-
# @param user_secret [String]
|
135
|
-
# @param [Hash] opts the optional parameters
|
136
|
-
# @return [EncryptedResponse]
|
137
|
-
private def get_user_jwt_impl(user_id, user_secret, opts = {})
|
138
|
-
data, _status_code, _headers = get_user_jwt_with_http_info(user_id, user_secret, opts)
|
139
|
-
data
|
140
|
-
end
|
141
|
-
|
142
|
-
# Generate encrypted JWT token
|
143
|
-
# This API is available to ClientIDs which have opted to use encrypted JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
|
144
|
-
# @param user_id [String]
|
145
|
-
# @param user_secret [String]
|
146
|
-
# @param [Hash] opts the optional parameters
|
147
|
-
# @return [Array<(EncryptedResponse, Integer, Hash)>] EncryptedResponse data, response status code and response headers
|
148
|
-
private def get_user_jwt_with_http_info_impl(user_id, user_secret, opts = {})
|
149
|
-
if @api_client.config.debugging
|
150
|
-
@api_client.config.logger.debug 'Calling API: AuthenticationApi.get_user_jwt ...'
|
151
|
-
end
|
152
|
-
# verify the required parameter 'user_id' is set
|
153
|
-
if @api_client.config.client_side_validation && user_id.nil?
|
154
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling AuthenticationApi.get_user_jwt"
|
155
|
-
end
|
156
|
-
# verify the required parameter 'user_secret' is set
|
157
|
-
if @api_client.config.client_side_validation && user_secret.nil?
|
158
|
-
fail ArgumentError, "Missing the required parameter 'user_secret' when calling AuthenticationApi.get_user_jwt"
|
159
|
-
end
|
160
|
-
# resource path
|
161
|
-
local_var_path = '/snapTrade/encryptedJWT'
|
162
|
-
|
163
|
-
# query parameters
|
164
|
-
query_params = opts[:query_params] || {}
|
165
|
-
query_params[:'userId'] = user_id
|
166
|
-
query_params[:'userSecret'] = user_secret
|
167
|
-
|
168
|
-
# header parameters
|
169
|
-
header_params = opts[:header_params] || {}
|
170
|
-
# HTTP header 'Accept' (if needed)
|
171
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
172
|
-
|
173
|
-
# form parameters
|
174
|
-
form_params = opts[:form_params] || {}
|
175
|
-
|
176
|
-
# http body (model)
|
177
|
-
post_body = opts[:debug_body]
|
178
|
-
|
179
|
-
# return_type
|
180
|
-
return_type = opts[:debug_return_type] || 'EncryptedResponse'
|
181
|
-
|
182
|
-
# auth_names
|
183
|
-
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
184
|
-
|
185
|
-
new_options = opts.merge(
|
186
|
-
:operation => :"AuthenticationApi.get_user_jwt",
|
187
|
-
:header_params => header_params,
|
188
|
-
:query_params => query_params,
|
189
|
-
:form_params => form_params,
|
190
|
-
:body => post_body,
|
191
|
-
:auth_names => auth_names,
|
192
|
-
:return_type => return_type
|
193
|
-
)
|
194
|
-
|
195
|
-
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
196
|
-
if @api_client.config.debugging
|
197
|
-
@api_client.config.logger.debug "API called: AuthenticationApi#get_user_jwt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
198
|
-
end
|
199
|
-
return data, status_code, headers, response
|
200
|
-
end
|
201
|
-
|
202
|
-
|
203
106
|
# List SnapTrade users
|
204
107
|
#
|
205
108
|
# Returns a list of users you've registered over the SnapTrade API.
|
@@ -283,12 +186,12 @@ module SnapTrade
|
|
283
186
|
#
|
284
187
|
# @param user_id [String]
|
285
188
|
# @param user_secret [String]
|
286
|
-
# @param broker [String] Slug of the brokerage to connect the user to
|
189
|
+
# @param broker [String] Slug of the brokerage to connect the user to. See [this document](https://snaptrade.notion.site/SnapTrade-Brokerage-Integrations-f83946a714a84c3caf599f6a945f0ead) for a list of supported brokerages and their slugs.
|
287
190
|
# @param immediate_redirect [Boolean] When set to True, user will be redirected back to the partner's site instead of the connection portal
|
288
191
|
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account
|
289
192
|
# @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See โReconnecting Accountsโ for more information.
|
290
193
|
# @param connection_type [ConnectionType] Sets whether the connection should be read or trade
|
291
|
-
# @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render, with a default to '
|
194
|
+
# @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render, with a default to 'v3'
|
292
195
|
# @param body [SnapTradeLoginUserRequestBody]
|
293
196
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
294
197
|
def login_snap_trade_user(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: SENTINEL, connection_portal_version: SENTINEL, extra: {})
|
@@ -310,12 +213,12 @@ module SnapTrade
|
|
310
213
|
#
|
311
214
|
# @param user_id [String]
|
312
215
|
# @param user_secret [String]
|
313
|
-
# @param broker [String] Slug of the brokerage to connect the user to
|
216
|
+
# @param broker [String] Slug of the brokerage to connect the user to. See [this document](https://snaptrade.notion.site/SnapTrade-Brokerage-Integrations-f83946a714a84c3caf599f6a945f0ead) for a list of supported brokerages and their slugs.
|
314
217
|
# @param immediate_redirect [Boolean] When set to True, user will be redirected back to the partner's site instead of the connection portal
|
315
218
|
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account
|
316
219
|
# @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See โReconnecting Accountsโ for more information.
|
317
220
|
# @param connection_type [ConnectionType] Sets whether the connection should be read or trade
|
318
|
-
# @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render, with a default to '
|
221
|
+
# @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render, with a default to 'v3'
|
319
222
|
# @param body [SnapTradeLoginUserRequestBody]
|
320
223
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
321
224
|
def login_snap_trade_user_with_http_info(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: SENTINEL, connection_portal_version: SENTINEL, extra: {})
|
@@ -411,8 +314,8 @@ module SnapTrade
|
|
411
314
|
|
412
315
|
# Create SnapTrade user
|
413
316
|
#
|
414
|
-
# Registers a new SnapTrade user under your ClientID.
|
415
|
-
# Most SnapTrade operations require a user to be passed as a parameter.
|
317
|
+
# Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database.
|
318
|
+
# Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
|
416
319
|
#
|
417
320
|
# @param user_id [String] SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.
|
418
321
|
# @param body [SnapTradeRegisterUserRequestBody]
|
@@ -427,8 +330,8 @@ module SnapTrade
|
|
427
330
|
|
428
331
|
# Create SnapTrade user
|
429
332
|
#
|
430
|
-
# Registers a new SnapTrade user under your ClientID.
|
431
|
-
# Most SnapTrade operations require a user to be passed as a parameter.
|
333
|
+
# Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database.
|
334
|
+
# Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
|
432
335
|
#
|
433
336
|
# @param user_id [String] SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.
|
434
337
|
# @param body [SnapTradeRegisterUserRequestBody]
|
@@ -441,7 +344,7 @@ module SnapTrade
|
|
441
344
|
end
|
442
345
|
|
443
346
|
# Create SnapTrade user
|
444
|
-
# Registers a new SnapTrade user under your ClientID. Most SnapTrade operations require a user to be passed as a parameter.
|
347
|
+
# Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database. Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
|
445
348
|
# @param snap_trade_register_user_request_body [SnapTradeRegisterUserRequestBody]
|
446
349
|
# @param [Hash] opts the optional parameters
|
447
350
|
# @return [UserIDandSecret]
|
@@ -451,7 +354,7 @@ module SnapTrade
|
|
451
354
|
end
|
452
355
|
|
453
356
|
# Create SnapTrade user
|
454
|
-
# Registers a new SnapTrade user under your ClientID. Most SnapTrade operations require a user to be passed as a parameter.
|
357
|
+
# Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database. Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
|
455
358
|
# @param snap_trade_register_user_request_body [SnapTradeRegisterUserRequestBody]
|
456
359
|
# @param [Hash] opts the optional parameters
|
457
360
|
# @return [Array<(UserIDandSecret, Integer, Hash)>] UserIDandSecret data, response status code and response headers
|
@@ -320,7 +320,7 @@ module SnapTrade
|
|
320
320
|
|
321
321
|
# Refresh holdings for a connection
|
322
322
|
#
|
323
|
-
# Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes
|
323
|
+
# Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes. Please contact support for access as this endpoint is not enabled by default
|
324
324
|
#
|
325
325
|
# @param authorization_id [String] The ID of a brokerage authorization object.
|
326
326
|
# @param user_id [String]
|
@@ -333,7 +333,7 @@ module SnapTrade
|
|
333
333
|
|
334
334
|
# Refresh holdings for a connection
|
335
335
|
#
|
336
|
-
# Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes
|
336
|
+
# Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes. Please contact support for access as this endpoint is not enabled by default
|
337
337
|
#
|
338
338
|
# @param authorization_id [String] The ID of a brokerage authorization object.
|
339
339
|
# @param user_id [String]
|
@@ -344,7 +344,7 @@ module SnapTrade
|
|
344
344
|
end
|
345
345
|
|
346
346
|
# Refresh holdings for a connection
|
347
|
-
# Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes
|
347
|
+
# Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes. Please contact support for access as this endpoint is not enabled by default
|
348
348
|
# @param authorization_id [String] The ID of a brokerage authorization object.
|
349
349
|
# @param user_id [String]
|
350
350
|
# @param user_secret [String]
|
@@ -356,7 +356,7 @@ module SnapTrade
|
|
356
356
|
end
|
357
357
|
|
358
358
|
# Refresh holdings for a connection
|
359
|
-
# Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes
|
359
|
+
# Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes. Please contact support for access as this endpoint is not enabled by default
|
360
360
|
# @param authorization_id [String] The ID of a brokerage authorization object.
|
361
361
|
# @param user_id [String]
|
362
362
|
# @param user_secret [String]
|
@@ -293,7 +293,7 @@ module SnapTrade
|
|
293
293
|
|
294
294
|
# Get symbol quotes
|
295
295
|
#
|
296
|
-
# Returns
|
296
|
+
# Returns quote(s) from the brokerage for the specified symbol(s).
|
297
297
|
#
|
298
298
|
# @param user_id [String]
|
299
299
|
# @param user_secret [String]
|
@@ -309,7 +309,7 @@ module SnapTrade
|
|
309
309
|
|
310
310
|
# Get symbol quotes
|
311
311
|
#
|
312
|
-
# Returns
|
312
|
+
# Returns quote(s) from the brokerage for the specified symbol(s).
|
313
313
|
#
|
314
314
|
# @param user_id [String]
|
315
315
|
# @param user_secret [String]
|
@@ -323,7 +323,7 @@ module SnapTrade
|
|
323
323
|
end
|
324
324
|
|
325
325
|
# Get symbol quotes
|
326
|
-
# Returns
|
326
|
+
# Returns quote(s) from the brokerage for the specified symbol(s).
|
327
327
|
# @param user_id [String]
|
328
328
|
# @param user_secret [String]
|
329
329
|
# @param symbols [String] List of universal_symbol_id or tickers to get quotes for.
|
@@ -337,7 +337,7 @@ module SnapTrade
|
|
337
337
|
end
|
338
338
|
|
339
339
|
# Get symbol quotes
|
340
|
-
# Returns
|
340
|
+
# Returns quote(s) from the brokerage for the specified symbol(s).
|
341
341
|
# @param user_id [String]
|
342
342
|
# @param user_secret [String]
|
343
343
|
# @param symbols [String] List of universal_symbol_id or tickers to get quotes for.
|
@@ -13,7 +13,7 @@ require 'time'
|
|
13
13
|
module SnapTrade
|
14
14
|
# Data to login a user via SnapTrade Partner
|
15
15
|
class SnapTradeLoginUserRequestBody
|
16
|
-
# Slug of the brokerage to connect the user to
|
16
|
+
# Slug of the brokerage to connect the user to. See [this document](https://snaptrade.notion.site/SnapTrade-Brokerage-Integrations-f83946a714a84c3caf599f6a945f0ead) for a list of supported brokerages and their slugs.
|
17
17
|
attr_accessor :broker
|
18
18
|
|
19
19
|
# When set to True, user will be redirected back to the partner's site instead of the connection portal
|
@@ -28,7 +28,7 @@ module SnapTrade
|
|
28
28
|
# Sets whether the connection should be read or trade
|
29
29
|
attr_accessor :connection_type
|
30
30
|
|
31
|
-
# Sets the version of the connection portal to render, with a default to '
|
31
|
+
# Sets the version of the connection portal to render, with a default to 'v3'
|
32
32
|
attr_accessor :connection_portal_version
|
33
33
|
|
34
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/snaptrade/version.rb
CHANGED
@@ -29,7 +29,7 @@ describe 'AccountInformationApi' do
|
|
29
29
|
|
30
30
|
# unit tests for get_all_user_holdings
|
31
31
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
32
|
-
#
|
32
|
+
# **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account.
|
33
33
|
# @param user_id
|
34
34
|
# @param user_secret
|
35
35
|
# @param [Hash] opts the optional parameters
|
@@ -39,19 +39,6 @@ describe 'AuthenticationApi' do
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
# unit tests for get_user_jwt
|
43
|
-
# Generate encrypted JWT token
|
44
|
-
# This API is available to ClientIDs which have opted to use encrypted JWTs (JSON Web Tokens) instead of standard SnapTrade signature verification.
|
45
|
-
# @param user_id
|
46
|
-
# @param user_secret
|
47
|
-
# @param [Hash] opts the optional parameters
|
48
|
-
# @return [EncryptedResponse]
|
49
|
-
describe 'get_user_jwt test' do
|
50
|
-
it 'should work' do
|
51
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
42
|
# unit tests for list_snap_trade_users
|
56
43
|
# List SnapTrade users
|
57
44
|
# Returns a list of users you've registered over the SnapTrade API.
|
@@ -79,7 +66,7 @@ describe 'AuthenticationApi' do
|
|
79
66
|
|
80
67
|
# unit tests for register_snap_trade_user
|
81
68
|
# Create SnapTrade user
|
82
|
-
# Registers a new SnapTrade user under your ClientID. Most SnapTrade operations require a user to be passed as a parameter.
|
69
|
+
# Registers a new SnapTrade user under your ClientID. A user secret will be automatically generated for you and must be properly stored in your database. Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
|
83
70
|
# @param snap_trade_register_user_request_body
|
84
71
|
# @param [Hash] opts the optional parameters
|
85
72
|
# @return [UserIDandSecret]
|
@@ -70,7 +70,7 @@ describe 'ConnectionsApi' do
|
|
70
70
|
|
71
71
|
# unit tests for refresh_brokerage_authorization
|
72
72
|
# Refresh holdings for a connection
|
73
|
-
# Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes
|
73
|
+
# Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes. Please contact support for access as this endpoint is not enabled by default
|
74
74
|
# @param authorization_id The ID of a brokerage authorization object.
|
75
75
|
# @param user_id
|
76
76
|
# @param user_secret
|
@@ -58,7 +58,7 @@ describe 'TradingApi' do
|
|
58
58
|
|
59
59
|
# unit tests for get_user_account_quotes
|
60
60
|
# Get symbol quotes
|
61
|
-
# Returns
|
61
|
+
# Returns quote(s) from the brokerage for the specified symbol(s).
|
62
62
|
# @param user_id
|
63
63
|
# @param user_secret
|
64
64
|
# @param symbols List of universal_symbol_id or tickers to get quotes for.
|
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.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|