snaptrade 2.0.33 → 2.0.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +81 -54
  4. data/lib/snaptrade/api/account_information_api.rb +74 -56
  5. data/lib/snaptrade/api/authentication_api.rb +44 -46
  6. data/lib/snaptrade/api/connections_api.rb +8 -8
  7. data/lib/snaptrade/api/options_api.rb +16 -12
  8. data/lib/snaptrade/api/transactions_and_reporting_api.rb +36 -28
  9. data/lib/snaptrade/models/account.rb +11 -2
  10. data/lib/snaptrade/models/account_balance_total.rb +1 -8
  11. data/lib/snaptrade/models/account_holdings_account.rb +1 -1
  12. data/lib/snaptrade/models/account_order_record.rb +1 -1
  13. data/lib/snaptrade/models/account_order_record_universal_symbol.rb +2 -2
  14. data/lib/snaptrade/models/account_simple.rb +4 -1
  15. data/lib/snaptrade/models/account_sync_status.rb +1 -1
  16. data/lib/snaptrade/models/balance.rb +1 -1
  17. data/lib/snaptrade/models/{snap_trade_holdings_account_account_id_balance.rb → balance_currency.rb} +33 -12
  18. data/lib/snaptrade/models/delete_user_response.rb +12 -3
  19. data/lib/snaptrade/models/holdings_status.rb +4 -4
  20. data/lib/snaptrade/models/login_redirect_uri.rb +3 -2
  21. data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +10 -6
  22. data/lib/snaptrade/models/symbol.rb +16 -10
  23. data/lib/snaptrade/models/{universal_symbol_currency.rb → symbol_currency.rb} +3 -3
  24. data/lib/snaptrade/models/{universal_symbol_exchange.rb → symbol_exchange.rb} +3 -3
  25. data/lib/snaptrade/models/transactions_status.rb +4 -5
  26. data/lib/snaptrade/models/underlying_symbol.rb +1 -1
  27. data/lib/snaptrade/models/universal_activity.rb +91 -81
  28. data/lib/snaptrade/models/{amount.rb → universal_activity_currency.rb} +36 -19
  29. data/lib/snaptrade/models/{snap_trade_holdings_account_account_id.rb → universal_activity_option_symbol.rb} +83 -82
  30. data/lib/snaptrade/models/universal_activity_symbol.rb +304 -0
  31. data/lib/snaptrade/models/universal_symbol.rb +2 -2
  32. data/lib/snaptrade/models/user_i_dand_secret.rb +1 -1
  33. data/lib/snaptrade/version.rb +1 -1
  34. data/lib/snaptrade.rb +6 -5
  35. data/spec/api/account_information_api_spec.rb +13 -13
  36. data/spec/api/authentication_api_spec.rb +7 -7
  37. data/spec/api/connections_api_spec.rb +2 -2
  38. data/spec/api/options_api_spec.rb +3 -3
  39. data/spec/api/transactions_and_reporting_api_spec.rb +7 -7
  40. data/spec/models/{universal_symbol_currency_spec.rb → balance_currency_spec.rb} +6 -6
  41. data/spec/models/delete_user_response_spec.rb +6 -0
  42. data/spec/models/symbol_currency_spec.rb +41 -0
  43. data/spec/models/{universal_symbol_exchange_spec.rb → symbol_exchange_spec.rb} +6 -6
  44. data/spec/models/symbol_spec.rb +1 -1
  45. data/spec/models/universal_activity_currency_spec.rb +41 -0
  46. data/spec/models/universal_activity_option_symbol_spec.rb +65 -0
  47. data/spec/models/universal_activity_spec.rb +15 -15
  48. data/spec/models/{snap_trade_holdings_account_account_id_spec.rb → universal_activity_symbol_spec.rb} +14 -20
  49. metadata +20 -17
  50. data/spec/models/amount_spec.rb +0 -35
  51. 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 seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
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 seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
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 seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
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 seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
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
- # A list of account balances for the specified account (one per currency that the account holds).
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] The ID of the account to get balances.
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
- # A list of account balances for the specified account (one per currency that the account holds).
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] The ID of the account to get balances.
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
- # A list of account balances for the specified account (one per currency that the account holds).
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] The ID of the account to get balances.
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
- # A list of account balances for the specified account (one per currency that the account holds).
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&#x3D;d16c4c97b8d5438bbb2d8581ac53b11e) and look for \&quot;Cache Expiry Time\&quot; 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] The ID of the account to get balances.
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
- # Return details of a specific investment account
235
+ # Get account detail
232
236
  #
233
- # Returns an account object with details for the specified account,
234
- # including the total account market value.
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] The ID of the account to get detail of.
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
- # Return details of a specific investment account
250
+ # Get account detail
246
251
  #
247
- # Returns an account object with details for the specified account,
248
- # including the total account market value.
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] The ID of the account to get detail of.
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
- # Return details of a specific investment account
259
- # Returns an account object with details for the specified account, including the total account market value.
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] The ID of the account to get detail of.
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
- # Return details of a specific investment account
271
- # Returns an account object with details for the specified account, including the total account market value.
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] The ID of the account to get detail of.
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
- # Fetch all recent orders from a user's account.
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] The ID of the account to get orders.
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
- # Fetch all recent orders from a user's account.
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] The ID of the account to get orders.
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
- # Fetch all recent orders from a user's account.
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] The ID of the account to get orders.
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
- # Fetch all recent orders from a user&#39;s account.
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&#x3D;d16c4c97b8d5438bbb2d8581ac53b11e) and look for \&quot;Cache Expiry Time\&quot; 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] The ID of the account to get orders.
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] The ID of the account to get positions.
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] The ID of the account to get positions.
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] The ID of the account to get positions.
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&#x3D;d16c4c97b8d5438bbb2d8581ac53b11e) and look for \&quot;Cache Expiry Time\&quot; 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] The ID of the account to get positions.
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
- # Lists balances, positions, option 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.__
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
- # Lists balances, positions, option 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.__
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
- # Lists balances, positions, option 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**.
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
- # Lists balances, positions, option 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&#x3D;d16c4c97b8d5438bbb2d8581ac53b11e) and look for \&quot;Cache Expiry Time\&quot; 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**.
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&#x3D;d16c4c97b8d5438bbb2d8581ac53b11e) and look for \&quot;Cache Expiry Time\&quot; 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
- # Get a list of all Account objects for the authenticated SnapTrade user.
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
- # Get a list of all Account objects for the authenticated SnapTrade user.
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
- # Get a list of all Account objects for the authenticated SnapTrade user.
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
- # Get a list of all Account objects for the authenticated SnapTrade user.
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 SnapTrade user
20
+ # Delete user
21
21
  #
22
- # Deletes a user you've registered over the SnapTrade API, and any data associated with them or their investment accounts.
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 SnapTrade user
31
+ # Delete user
32
32
  #
33
- # Deletes a user you've registered over the SnapTrade API, and any data associated with them or their investment accounts.
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 SnapTrade user
42
- # Deletes a user you've registered over the SnapTrade API, and any data associated with them or their investment accounts.
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 SnapTrade user
52
- # Deletes a user you&#39;ve registered over the SnapTrade API, and any data associated with them or their investment accounts.
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 &#x60;USER_DELETED&#x60; 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 SnapTrade users
106
+ # List all users
107
107
  #
108
- # Returns a list of users you've registered over the SnapTrade API.
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 SnapTrade users
116
+ # List all users
117
117
  #
118
- # Returns a list of users you've registered over the SnapTrade API.
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 SnapTrade users
126
- # Returns a list of users you've registered over the SnapTrade API.
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 SnapTrade users
135
- # Returns a list of users you&#39;ve registered over the SnapTrade API.
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 [this document](https://snaptrade.notion.site/SnapTrade-Brokerage-Integrations-f83946a714a84c3caf599f6a945f0ead) 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
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 ‘Reconnecting Accounts’ for more information.
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, with a default to 'v3'
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: SENTINEL, connection_portal_version: SENTINEL, extra: {})
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 [this document](https://snaptrade.notion.site/SnapTrade-Brokerage-Integrations-f83946a714a84c3caf599f6a945f0ead) 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
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 ‘Reconnecting Accounts’ for more information.
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, with a default to 'v3'
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: SENTINEL, connection_portal_version: SENTINEL, extra: {})
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
- # Create SnapTrade user
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
- # Create SnapTrade user
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
- # Create SnapTrade user
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
- # Create SnapTrade user
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
- # Obtain a new user secret for a user
415
+ # Rotate user secret
416
416
  #
417
- # This API is used to rotate the secret for a SnapTrade user. You might use this if a userSecret
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 SnapTrade API.
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
- # Obtain a new user secret for a user
432
+ # Rotate user secret
434
433
  #
435
- # This API is used to rotate the secret for a SnapTrade user. You might use this if a userSecret
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 SnapTrade API.
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
- # Obtain a new user secret for a user
451
- # This API is used to rotate the secret for a SnapTrade user. You might use this if a 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.
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
- # Obtain a new user secret for a user
461
- # This API is used to rotate the secret for a SnapTrade user. You might use this if a userSecret is compromised. Please note that if you call this endpoint and fail to save the new secret, you&#39;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.
458
+ # Rotate user secret
459
+ # Rotates the secret for a SnapTrade user. You might use this if &#x60;userSecret&#x60; is compromised. Please note that if you call this endpoint and fail to save the new secret, you&#39;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