snaptrade 2.0.33 → 2.0.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +81 -54
- data/lib/snaptrade/api/account_information_api.rb +74 -56
- data/lib/snaptrade/api/authentication_api.rb +44 -46
- data/lib/snaptrade/api/connections_api.rb +8 -8
- data/lib/snaptrade/api/options_api.rb +16 -12
- data/lib/snaptrade/api/transactions_and_reporting_api.rb +36 -28
- data/lib/snaptrade/models/account.rb +11 -2
- data/lib/snaptrade/models/account_balance_total.rb +1 -8
- data/lib/snaptrade/models/account_holdings_account.rb +1 -1
- data/lib/snaptrade/models/account_order_record.rb +1 -1
- data/lib/snaptrade/models/account_order_record_universal_symbol.rb +2 -2
- data/lib/snaptrade/models/account_simple.rb +4 -1
- data/lib/snaptrade/models/account_sync_status.rb +1 -1
- data/lib/snaptrade/models/balance.rb +1 -1
- data/lib/snaptrade/models/{snap_trade_holdings_account_account_id_balance.rb → balance_currency.rb} +33 -12
- data/lib/snaptrade/models/delete_user_response.rb +12 -3
- data/lib/snaptrade/models/holdings_status.rb +4 -4
- data/lib/snaptrade/models/login_redirect_uri.rb +3 -2
- data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +10 -6
- data/lib/snaptrade/models/symbol.rb +16 -10
- data/lib/snaptrade/models/{universal_symbol_currency.rb → symbol_currency.rb} +3 -3
- data/lib/snaptrade/models/{universal_symbol_exchange.rb → symbol_exchange.rb} +3 -3
- data/lib/snaptrade/models/transactions_status.rb +4 -5
- data/lib/snaptrade/models/underlying_symbol.rb +1 -1
- data/lib/snaptrade/models/universal_activity.rb +91 -81
- data/lib/snaptrade/models/{amount.rb → universal_activity_currency.rb} +36 -19
- data/lib/snaptrade/models/{snap_trade_holdings_account_account_id.rb → universal_activity_option_symbol.rb} +83 -82
- data/lib/snaptrade/models/universal_activity_symbol.rb +304 -0
- data/lib/snaptrade/models/universal_symbol.rb +2 -2
- data/lib/snaptrade/models/user_i_dand_secret.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +6 -5
- data/spec/api/account_information_api_spec.rb +13 -13
- data/spec/api/authentication_api_spec.rb +7 -7
- data/spec/api/connections_api_spec.rb +2 -2
- data/spec/api/options_api_spec.rb +3 -3
- data/spec/api/transactions_and_reporting_api_spec.rb +7 -7
- data/spec/models/{universal_symbol_currency_spec.rb → balance_currency_spec.rb} +6 -6
- data/spec/models/delete_user_response_spec.rb +6 -0
- data/spec/models/symbol_currency_spec.rb +41 -0
- data/spec/models/{universal_symbol_exchange_spec.rb → symbol_exchange_spec.rb} +6 -6
- data/spec/models/symbol_spec.rb +1 -1
- data/spec/models/universal_activity_currency_spec.rb +41 -0
- data/spec/models/universal_activity_option_symbol_spec.rb +65 -0
- data/spec/models/universal_activity_spec.rb +15 -15
- data/spec/models/{snap_trade_holdings_account_account_id_spec.rb → universal_activity_symbol_spec.rb} +14 -20
- metadata +20 -17
- data/spec/models/amount_spec.rb +0 -35
- data/spec/models/snap_trade_holdings_account_account_id_balance_spec.rb +0 -29
@@ -26,7 +26,7 @@ module SnapTrade
|
|
26
26
|
#
|
27
27
|
# @param user_id [String]
|
28
28
|
# @param user_secret [String]
|
29
|
-
# @param brokerage_authorizations [String] Optional. Comma
|
29
|
+
# @param brokerage_authorizations [String] Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
30
30
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
31
31
|
def get_all_user_holdings(user_id:, user_secret:, brokerage_authorizations: SENTINEL, extra: {})
|
32
32
|
extra[:brokerage_authorizations] = brokerage_authorizations if brokerage_authorizations != SENTINEL
|
@@ -43,7 +43,7 @@ module SnapTrade
|
|
43
43
|
#
|
44
44
|
# @param user_id [String]
|
45
45
|
# @param user_secret [String]
|
46
|
-
# @param brokerage_authorizations [String] Optional. Comma
|
46
|
+
# @param brokerage_authorizations [String] Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
47
47
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
48
48
|
def get_all_user_holdings_with_http_info(user_id:, user_secret:, brokerage_authorizations: SENTINEL, extra: {})
|
49
49
|
extra[:brokerage_authorizations] = brokerage_authorizations if brokerage_authorizations != SENTINEL
|
@@ -55,7 +55,7 @@ module SnapTrade
|
|
55
55
|
# @param user_id [String]
|
56
56
|
# @param user_secret [String]
|
57
57
|
# @param [Hash] opts the optional parameters
|
58
|
-
# @option opts [String] :brokerage_authorizations Optional. Comma
|
58
|
+
# @option opts [String] :brokerage_authorizations Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
59
59
|
# @return [Array<AccountHoldings>]
|
60
60
|
private def get_all_user_holdings_impl(user_id, user_secret, opts = {})
|
61
61
|
data, _status_code, _headers = get_all_user_holdings_with_http_info(user_id, user_secret, opts)
|
@@ -67,7 +67,7 @@ module SnapTrade
|
|
67
67
|
# @param user_id [String]
|
68
68
|
# @param user_secret [String]
|
69
69
|
# @param [Hash] opts the optional parameters
|
70
|
-
# @option opts [String] :brokerage_authorizations Optional. Comma
|
70
|
+
# @option opts [String] :brokerage_authorizations Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
71
71
|
# @return [Array<(Array<AccountHoldings>, Integer, Hash)>] Array<AccountHoldings> data, response status code and response headers
|
72
72
|
private def get_all_user_holdings_with_http_info_impl(user_id, user_secret, opts = {})
|
73
73
|
if @api_client.config.debugging
|
@@ -127,11 +127,13 @@ module SnapTrade
|
|
127
127
|
|
128
128
|
# List account balances
|
129
129
|
#
|
130
|
-
#
|
130
|
+
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances).
|
131
|
+
#
|
132
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
131
133
|
#
|
132
134
|
# @param user_id [String]
|
133
135
|
# @param user_secret [String]
|
134
|
-
# @param account_id [String]
|
136
|
+
# @param account_id [String]
|
135
137
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
136
138
|
def get_user_account_balance(user_id:, user_secret:, account_id:, extra: {})
|
137
139
|
data, _status_code, _headers = get_user_account_balance_with_http_info_impl(user_id, user_secret, account_id, extra)
|
@@ -140,21 +142,23 @@ module SnapTrade
|
|
140
142
|
|
141
143
|
# List account balances
|
142
144
|
#
|
143
|
-
#
|
145
|
+
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances).
|
146
|
+
#
|
147
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
144
148
|
#
|
145
149
|
# @param user_id [String]
|
146
150
|
# @param user_secret [String]
|
147
|
-
# @param account_id [String]
|
151
|
+
# @param account_id [String]
|
148
152
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
149
153
|
def get_user_account_balance_with_http_info(user_id:, user_secret:, account_id:, extra: {})
|
150
154
|
get_user_account_balance_with_http_info_impl(user_id, user_secret, account_id, extra)
|
151
155
|
end
|
152
156
|
|
153
157
|
# List account balances
|
154
|
-
#
|
158
|
+
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
155
159
|
# @param user_id [String]
|
156
160
|
# @param user_secret [String]
|
157
|
-
# @param account_id [String]
|
161
|
+
# @param account_id [String]
|
158
162
|
# @param [Hash] opts the optional parameters
|
159
163
|
# @return [Array<Balance>]
|
160
164
|
private def get_user_account_balance_impl(user_id, user_secret, account_id, opts = {})
|
@@ -163,10 +167,10 @@ module SnapTrade
|
|
163
167
|
end
|
164
168
|
|
165
169
|
# List account balances
|
166
|
-
#
|
170
|
+
# Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
167
171
|
# @param user_id [String]
|
168
172
|
# @param user_secret [String]
|
169
|
-
# @param account_id [String]
|
173
|
+
# @param account_id [String]
|
170
174
|
# @param [Hash] opts the optional parameters
|
171
175
|
# @return [Array<(Array<Balance>, Integer, Hash)>] Array<Balance> data, response status code and response headers
|
172
176
|
private def get_user_account_balance_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
@@ -196,7 +200,7 @@ module SnapTrade
|
|
196
200
|
# header parameters
|
197
201
|
header_params = opts[:header_params] || {}
|
198
202
|
# HTTP header 'Accept' (if needed)
|
199
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
203
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
200
204
|
|
201
205
|
# form parameters
|
202
206
|
form_params = opts[:form_params] || {}
|
@@ -228,38 +232,40 @@ module SnapTrade
|
|
228
232
|
end
|
229
233
|
|
230
234
|
|
231
|
-
#
|
235
|
+
# Get account detail
|
232
236
|
#
|
233
|
-
# Returns
|
234
|
-
#
|
237
|
+
# Returns account detail known to SnapTrade for the specified account.
|
238
|
+
#
|
239
|
+
# The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
235
240
|
#
|
236
241
|
# @param user_id [String]
|
237
242
|
# @param user_secret [String]
|
238
|
-
# @param account_id [String]
|
243
|
+
# @param account_id [String]
|
239
244
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
240
245
|
def get_user_account_details(user_id:, user_secret:, account_id:, extra: {})
|
241
246
|
data, _status_code, _headers = get_user_account_details_with_http_info_impl(user_id, user_secret, account_id, extra)
|
242
247
|
data
|
243
248
|
end
|
244
249
|
|
245
|
-
#
|
250
|
+
# Get account detail
|
246
251
|
#
|
247
|
-
# Returns
|
248
|
-
#
|
252
|
+
# Returns account detail known to SnapTrade for the specified account.
|
253
|
+
#
|
254
|
+
# The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
249
255
|
#
|
250
256
|
# @param user_id [String]
|
251
257
|
# @param user_secret [String]
|
252
|
-
# @param account_id [String]
|
258
|
+
# @param account_id [String]
|
253
259
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
254
260
|
def get_user_account_details_with_http_info(user_id:, user_secret:, account_id:, extra: {})
|
255
261
|
get_user_account_details_with_http_info_impl(user_id, user_secret, account_id, extra)
|
256
262
|
end
|
257
263
|
|
258
|
-
#
|
259
|
-
# Returns
|
264
|
+
# Get account detail
|
265
|
+
# Returns account detail known to SnapTrade for the specified account. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
260
266
|
# @param user_id [String]
|
261
267
|
# @param user_secret [String]
|
262
|
-
# @param account_id [String]
|
268
|
+
# @param account_id [String]
|
263
269
|
# @param [Hash] opts the optional parameters
|
264
270
|
# @return [Account]
|
265
271
|
private def get_user_account_details_impl(user_id, user_secret, account_id, opts = {})
|
@@ -267,11 +273,11 @@ module SnapTrade
|
|
267
273
|
data
|
268
274
|
end
|
269
275
|
|
270
|
-
#
|
271
|
-
# Returns
|
276
|
+
# Get account detail
|
277
|
+
# Returns account detail known to SnapTrade for the specified account. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
272
278
|
# @param user_id [String]
|
273
279
|
# @param user_secret [String]
|
274
|
-
# @param account_id [String]
|
280
|
+
# @param account_id [String]
|
275
281
|
# @param [Hash] opts the optional parameters
|
276
282
|
# @return [Array<(Account, Integer, Hash)>] Account data, response status code and response headers
|
277
283
|
private def get_user_account_details_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
@@ -333,13 +339,15 @@ module SnapTrade
|
|
333
339
|
end
|
334
340
|
|
335
341
|
|
336
|
-
# List account orders
|
342
|
+
# List account recent orders
|
337
343
|
#
|
338
|
-
#
|
344
|
+
# Returns a list of recent orders in the specified account.
|
345
|
+
#
|
346
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
339
347
|
#
|
340
348
|
# @param user_id [String]
|
341
349
|
# @param user_secret [String]
|
342
|
-
# @param account_id [String]
|
350
|
+
# @param account_id [String]
|
343
351
|
# @param state [String] defaults value is set to \"all\"
|
344
352
|
# @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
345
353
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -350,13 +358,15 @@ module SnapTrade
|
|
350
358
|
data
|
351
359
|
end
|
352
360
|
|
353
|
-
# List account orders
|
361
|
+
# List account recent orders
|
354
362
|
#
|
355
|
-
#
|
363
|
+
# Returns a list of recent orders in the specified account.
|
364
|
+
#
|
365
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
356
366
|
#
|
357
367
|
# @param user_id [String]
|
358
368
|
# @param user_secret [String]
|
359
|
-
# @param account_id [String]
|
369
|
+
# @param account_id [String]
|
360
370
|
# @param state [String] defaults value is set to \"all\"
|
361
371
|
# @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
362
372
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -366,11 +376,11 @@ module SnapTrade
|
|
366
376
|
get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
|
367
377
|
end
|
368
378
|
|
369
|
-
# List account orders
|
370
|
-
#
|
379
|
+
# List account recent orders
|
380
|
+
# Returns a list of recent orders in the specified account. The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
371
381
|
# @param user_id [String]
|
372
382
|
# @param user_secret [String]
|
373
|
-
# @param account_id [String]
|
383
|
+
# @param account_id [String]
|
374
384
|
# @param [Hash] opts the optional parameters
|
375
385
|
# @option opts [String] :state defaults value is set to \"all\"
|
376
386
|
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
@@ -380,11 +390,11 @@ module SnapTrade
|
|
380
390
|
data
|
381
391
|
end
|
382
392
|
|
383
|
-
# List account orders
|
384
|
-
#
|
393
|
+
# List account recent orders
|
394
|
+
# Returns a list of recent orders in the specified account. The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
385
395
|
# @param user_id [String]
|
386
396
|
# @param user_secret [String]
|
387
|
-
# @param account_id [String]
|
397
|
+
# @param account_id [String]
|
388
398
|
# @param [Hash] opts the optional parameters
|
389
399
|
# @option opts [String] :state defaults value is set to \"all\"
|
390
400
|
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
@@ -460,11 +470,13 @@ module SnapTrade
|
|
460
470
|
|
461
471
|
# List account positions
|
462
472
|
#
|
463
|
-
# Returns a list of positions in the specified account.
|
473
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings).
|
474
|
+
#
|
475
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
464
476
|
#
|
465
477
|
# @param user_id [String]
|
466
478
|
# @param user_secret [String]
|
467
|
-
# @param account_id [String]
|
479
|
+
# @param account_id [String]
|
468
480
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
469
481
|
def get_user_account_positions(user_id:, user_secret:, account_id:, extra: {})
|
470
482
|
data, _status_code, _headers = get_user_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra)
|
@@ -473,21 +485,23 @@ module SnapTrade
|
|
473
485
|
|
474
486
|
# List account positions
|
475
487
|
#
|
476
|
-
# Returns a list of positions in the specified account.
|
488
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings).
|
489
|
+
#
|
490
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
477
491
|
#
|
478
492
|
# @param user_id [String]
|
479
493
|
# @param user_secret [String]
|
480
|
-
# @param account_id [String]
|
494
|
+
# @param account_id [String]
|
481
495
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
482
496
|
def get_user_account_positions_with_http_info(user_id:, user_secret:, account_id:, extra: {})
|
483
497
|
get_user_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra)
|
484
498
|
end
|
485
499
|
|
486
500
|
# List account positions
|
487
|
-
# Returns a list of positions in the specified account.
|
501
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
488
502
|
# @param user_id [String]
|
489
503
|
# @param user_secret [String]
|
490
|
-
# @param account_id [String]
|
504
|
+
# @param account_id [String]
|
491
505
|
# @param [Hash] opts the optional parameters
|
492
506
|
# @return [Array<Position>]
|
493
507
|
private def get_user_account_positions_impl(user_id, user_secret, account_id, opts = {})
|
@@ -496,10 +510,10 @@ module SnapTrade
|
|
496
510
|
end
|
497
511
|
|
498
512
|
# List account positions
|
499
|
-
# Returns a list of positions in the specified account.
|
513
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
500
514
|
# @param user_id [String]
|
501
515
|
# @param user_secret [String]
|
502
|
-
# @param account_id [String]
|
516
|
+
# @param account_id [String]
|
503
517
|
# @param [Hash] opts the optional parameters
|
504
518
|
# @return [Array<(Array<Position>, Integer, Hash)>] Array<Position> data, response status code and response headers
|
505
519
|
private def get_user_account_positions_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
@@ -529,7 +543,7 @@ module SnapTrade
|
|
529
543
|
# header parameters
|
530
544
|
header_params = opts[:header_params] || {}
|
531
545
|
# HTTP header 'Accept' (if needed)
|
532
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
546
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
533
547
|
|
534
548
|
# form parameters
|
535
549
|
form_params = opts[:form_params] || {}
|
@@ -563,7 +577,7 @@ module SnapTrade
|
|
563
577
|
|
564
578
|
# List account holdings
|
565
579
|
#
|
566
|
-
#
|
580
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__
|
567
581
|
#
|
568
582
|
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
569
583
|
#
|
@@ -578,7 +592,7 @@ module SnapTrade
|
|
578
592
|
|
579
593
|
# List account holdings
|
580
594
|
#
|
581
|
-
#
|
595
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__
|
582
596
|
#
|
583
597
|
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
584
598
|
#
|
@@ -591,7 +605,7 @@ module SnapTrade
|
|
591
605
|
end
|
592
606
|
|
593
607
|
# List account holdings
|
594
|
-
#
|
608
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
595
609
|
# @param account_id [String]
|
596
610
|
# @param user_id [String]
|
597
611
|
# @param user_secret [String]
|
@@ -603,7 +617,7 @@ module SnapTrade
|
|
603
617
|
end
|
604
618
|
|
605
619
|
# List account holdings
|
606
|
-
#
|
620
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
607
621
|
# @param account_id [String]
|
608
622
|
# @param user_id [String]
|
609
623
|
# @param user_secret [String]
|
@@ -670,7 +684,9 @@ module SnapTrade
|
|
670
684
|
|
671
685
|
# List accounts
|
672
686
|
#
|
673
|
-
#
|
687
|
+
# Returns all brokerage accounts known to SnapTrade for the authenticated user.
|
688
|
+
#
|
689
|
+
# The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
674
690
|
#
|
675
691
|
# @param user_id [String]
|
676
692
|
# @param user_secret [String]
|
@@ -682,7 +698,9 @@ module SnapTrade
|
|
682
698
|
|
683
699
|
# List accounts
|
684
700
|
#
|
685
|
-
#
|
701
|
+
# Returns all brokerage accounts known to SnapTrade for the authenticated user.
|
702
|
+
#
|
703
|
+
# The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
686
704
|
#
|
687
705
|
# @param user_id [String]
|
688
706
|
# @param user_secret [String]
|
@@ -692,7 +710,7 @@ module SnapTrade
|
|
692
710
|
end
|
693
711
|
|
694
712
|
# List accounts
|
695
|
-
#
|
713
|
+
# Returns all brokerage accounts known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
696
714
|
# @param user_id [String]
|
697
715
|
# @param user_secret [String]
|
698
716
|
# @param [Hash] opts the optional parameters
|
@@ -703,7 +721,7 @@ module SnapTrade
|
|
703
721
|
end
|
704
722
|
|
705
723
|
# List accounts
|
706
|
-
#
|
724
|
+
# Returns all brokerage accounts known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
707
725
|
# @param user_id [String]
|
708
726
|
# @param user_secret [String]
|
709
727
|
# @param [Hash] opts the optional parameters
|
@@ -17,9 +17,9 @@ module SnapTrade
|
|
17
17
|
@api_client = api_client
|
18
18
|
end
|
19
19
|
|
20
|
-
# Delete
|
20
|
+
# Delete user
|
21
21
|
#
|
22
|
-
# Deletes a user
|
22
|
+
# Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a `USER_DELETED` webhook will be sent.
|
23
23
|
#
|
24
24
|
# @param user_id [String]
|
25
25
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -28,9 +28,9 @@ module SnapTrade
|
|
28
28
|
data
|
29
29
|
end
|
30
30
|
|
31
|
-
# Delete
|
31
|
+
# Delete user
|
32
32
|
#
|
33
|
-
# Deletes a user
|
33
|
+
# Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a `USER_DELETED` webhook will be sent.
|
34
34
|
#
|
35
35
|
# @param user_id [String]
|
36
36
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -38,8 +38,8 @@ module SnapTrade
|
|
38
38
|
delete_snap_trade_user_with_http_info_impl(user_id, extra)
|
39
39
|
end
|
40
40
|
|
41
|
-
# Delete
|
42
|
-
# Deletes a user
|
41
|
+
# Delete user
|
42
|
+
# Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a `USER_DELETED` webhook will be sent.
|
43
43
|
# @param user_id [String]
|
44
44
|
# @param [Hash] opts the optional parameters
|
45
45
|
# @return [DeleteUserResponse]
|
@@ -48,8 +48,8 @@ module SnapTrade
|
|
48
48
|
data
|
49
49
|
end
|
50
50
|
|
51
|
-
# Delete
|
52
|
-
# Deletes a user
|
51
|
+
# Delete user
|
52
|
+
# Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a `USER_DELETED` webhook will be sent.
|
53
53
|
# @param user_id [String]
|
54
54
|
# @param [Hash] opts the optional parameters
|
55
55
|
# @return [Array<(DeleteUserResponse, Integer, Hash)>] DeleteUserResponse data, response status code and response headers
|
@@ -103,9 +103,9 @@ module SnapTrade
|
|
103
103
|
end
|
104
104
|
|
105
105
|
|
106
|
-
# List
|
106
|
+
# List all users
|
107
107
|
#
|
108
|
-
# Returns a list of
|
108
|
+
# Returns a list of all registered user IDs.
|
109
109
|
#
|
110
110
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
111
111
|
def list_snap_trade_users(extra: {})
|
@@ -113,17 +113,17 @@ module SnapTrade
|
|
113
113
|
data
|
114
114
|
end
|
115
115
|
|
116
|
-
# List
|
116
|
+
# List all users
|
117
117
|
#
|
118
|
-
# Returns a list of
|
118
|
+
# Returns a list of all registered user IDs.
|
119
119
|
#
|
120
120
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
121
121
|
def list_snap_trade_users_with_http_info(extra: {})
|
122
122
|
list_snap_trade_users_with_http_info_impl(extra)
|
123
123
|
end
|
124
124
|
|
125
|
-
# List
|
126
|
-
# Returns a list of
|
125
|
+
# List all users
|
126
|
+
# Returns a list of all registered user IDs.
|
127
127
|
# @param [Hash] opts the optional parameters
|
128
128
|
# @return [Array<String>]
|
129
129
|
private def list_snap_trade_users_impl(opts = {})
|
@@ -131,8 +131,8 @@ module SnapTrade
|
|
131
131
|
data
|
132
132
|
end
|
133
133
|
|
134
|
-
# List
|
135
|
-
# Returns a list of
|
134
|
+
# List all users
|
135
|
+
# Returns a list of all registered user IDs.
|
136
136
|
# @param [Hash] opts the optional parameters
|
137
137
|
# @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
|
138
138
|
private def list_snap_trade_users_with_http_info_impl(opts = {})
|
@@ -186,15 +186,15 @@ module SnapTrade
|
|
186
186
|
#
|
187
187
|
# @param user_id [String]
|
188
188
|
# @param user_secret [String]
|
189
|
-
# @param broker [String] Slug of the brokerage to connect the user to. See [
|
190
|
-
# @param immediate_redirect [Boolean] When set to
|
191
|
-
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account
|
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
|
193
|
-
# @param connection_type [ConnectionType] Sets whether the connection should be read or trade
|
194
|
-
# @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render
|
189
|
+
# @param broker [String] Slug of the brokerage to connect the user to. See [the integrations page](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=3cfea70ef4254afc89704e47275a7a9a&pvs=4) for a list of supported brokerages and their slugs.
|
190
|
+
# @param immediate_redirect [Boolean] When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more information.
|
191
|
+
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more information.
|
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 the [guide on fixing broken connections](https://docs.snaptrade.com/docs/fix-broken-connections) for more information.
|
193
|
+
# @param connection_type [ConnectionType] Sets whether the connection should be read-only or trade-enabled.
|
194
|
+
# @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render.
|
195
195
|
# @param body [SnapTradeLoginUserRequestBody]
|
196
196
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
197
|
-
def login_snap_trade_user(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type:
|
197
|
+
def login_snap_trade_user(user_id:, user_secret:, broker: SENTINEL, immediate_redirect: SENTINEL, custom_redirect: SENTINEL, reconnect: SENTINEL, connection_type: 'read', connection_portal_version: 'v3', extra: {})
|
198
198
|
_body = {}
|
199
199
|
_body[:broker] = broker if broker != SENTINEL
|
200
200
|
_body[:immediateRedirect] = immediate_redirect if immediate_redirect != SENTINEL
|
@@ -213,15 +213,15 @@ module SnapTrade
|
|
213
213
|
#
|
214
214
|
# @param user_id [String]
|
215
215
|
# @param user_secret [String]
|
216
|
-
# @param broker [String] Slug of the brokerage to connect the user to. See [
|
217
|
-
# @param immediate_redirect [Boolean] When set to
|
218
|
-
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account
|
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
|
220
|
-
# @param connection_type [ConnectionType] Sets whether the connection should be read or trade
|
221
|
-
# @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render
|
216
|
+
# @param broker [String] Slug of the brokerage to connect the user to. See [the integrations page](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=3cfea70ef4254afc89704e47275a7a9a&pvs=4) for a list of supported brokerages and their slugs.
|
217
|
+
# @param immediate_redirect [Boolean] When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more information.
|
218
|
+
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more information.
|
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 the [guide on fixing broken connections](https://docs.snaptrade.com/docs/fix-broken-connections) for more information.
|
220
|
+
# @param connection_type [ConnectionType] Sets whether the connection should be read-only or trade-enabled.
|
221
|
+
# @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render.
|
222
222
|
# @param body [SnapTradeLoginUserRequestBody]
|
223
223
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
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:
|
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: 'read', connection_portal_version: 'v3', extra: {})
|
225
225
|
_body = {}
|
226
226
|
_body[:broker] = broker if broker != SENTINEL
|
227
227
|
_body[:immediateRedirect] = immediate_redirect if immediate_redirect != SENTINEL
|
@@ -312,7 +312,7 @@ module SnapTrade
|
|
312
312
|
end
|
313
313
|
|
314
314
|
|
315
|
-
#
|
315
|
+
# Register user
|
316
316
|
#
|
317
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
318
|
# Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
|
@@ -328,7 +328,7 @@ module SnapTrade
|
|
328
328
|
data
|
329
329
|
end
|
330
330
|
|
331
|
-
#
|
331
|
+
# Register user
|
332
332
|
#
|
333
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
334
|
# Most SnapTrade operations require a user ID and user secret to be passed as a parameter.
|
@@ -343,7 +343,7 @@ module SnapTrade
|
|
343
343
|
register_snap_trade_user_with_http_info_impl(snap_trade_register_user_request_body, extra)
|
344
344
|
end
|
345
345
|
|
346
|
-
#
|
346
|
+
# Register user
|
347
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.
|
348
348
|
# @param snap_trade_register_user_request_body [SnapTradeRegisterUserRequestBody]
|
349
349
|
# @param [Hash] opts the optional parameters
|
@@ -353,7 +353,7 @@ module SnapTrade
|
|
353
353
|
data
|
354
354
|
end
|
355
355
|
|
356
|
-
#
|
356
|
+
# Register user
|
357
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.
|
358
358
|
# @param snap_trade_register_user_request_body [SnapTradeRegisterUserRequestBody]
|
359
359
|
# @param [Hash] opts the optional parameters
|
@@ -412,13 +412,12 @@ module SnapTrade
|
|
412
412
|
end
|
413
413
|
|
414
414
|
|
415
|
-
#
|
415
|
+
# Rotate user secret
|
416
416
|
#
|
417
|
-
#
|
418
|
-
# is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
|
417
|
+
# Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
|
419
418
|
#
|
420
419
|
# @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.
|
421
|
-
# @param user_secret [String] SnapTrade User Secret randomly generated by SnapTrade. This is privileged information and if compromised, should be rotated via the
|
420
|
+
# @param user_secret [String] SnapTrade User Secret randomly generated by SnapTrade. This is privileged information and if compromised, should be rotated via the [rotate user secret endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret)
|
422
421
|
# @param body [UserIDandSecret]
|
423
422
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
424
423
|
def reset_snap_trade_user_secret(user_id: SENTINEL, user_secret: SENTINEL, extra: {})
|
@@ -430,13 +429,12 @@ module SnapTrade
|
|
430
429
|
data
|
431
430
|
end
|
432
431
|
|
433
|
-
#
|
432
|
+
# Rotate user secret
|
434
433
|
#
|
435
|
-
#
|
436
|
-
# is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
|
434
|
+
# Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
|
437
435
|
#
|
438
436
|
# @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.
|
439
|
-
# @param user_secret [String] SnapTrade User Secret randomly generated by SnapTrade. This is privileged information and if compromised, should be rotated via the
|
437
|
+
# @param user_secret [String] SnapTrade User Secret randomly generated by SnapTrade. This is privileged information and if compromised, should be rotated via the [rotate user secret endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret)
|
440
438
|
# @param body [UserIDandSecret]
|
441
439
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
442
440
|
def reset_snap_trade_user_secret_with_http_info(user_id: SENTINEL, user_secret: SENTINEL, extra: {})
|
@@ -447,8 +445,8 @@ module SnapTrade
|
|
447
445
|
reset_snap_trade_user_secret_with_http_info_impl(user_i_dand_secret, extra)
|
448
446
|
end
|
449
447
|
|
450
|
-
#
|
451
|
-
#
|
448
|
+
# Rotate user secret
|
449
|
+
# Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
|
452
450
|
# @param user_i_dand_secret [UserIDandSecret]
|
453
451
|
# @param [Hash] opts the optional parameters
|
454
452
|
# @return [UserIDandSecret]
|
@@ -457,8 +455,8 @@ module SnapTrade
|
|
457
455
|
data
|
458
456
|
end
|
459
457
|
|
460
|
-
#
|
461
|
-
#
|
458
|
+
# Rotate user secret
|
459
|
+
# Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect.
|
462
460
|
# @param user_i_dand_secret [UserIDandSecret]
|
463
461
|
# @param [Hash] opts the optional parameters
|
464
462
|
# @return [Array<(UserIDandSecret, Integer, Hash)>] UserIDandSecret data, response status code and response headers
|