snaptrade 3.0.28 → 3.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 174419089f2cdd83be8a87fca34e072ba05b47762b758125e2ebfa90899f0501
4
- data.tar.gz: ea2dc82ed218be148f55b20494586f3e2e71b9397b4b61c56b72681c678b7b68
3
+ metadata.gz: aa858a86d922e9a3c017b09530fdccbb3c39505f9f7086d04c49b858ec56dc95
4
+ data.tar.gz: 866202c7c7be9671c1ccbbc7396532abed2e35d08c1de5e67eb868f3779a1a05
5
5
  SHA512:
6
- metadata.gz: 36788c744dba274f8e2d7cf51f0058c47574fcac5a2a2eacb14d32f5261c55823a5c4206883606b45f6eca09ad28fe34a87a50e859eed498bd9464858f6af975
7
- data.tar.gz: 677d9353a437f1a341427c5b1a500b7bbc6885b848c16c23c90cbaa4985ca7334382643d8149ce8f21ecda58d28532769eba6c4c1f4ef550f5e5ff3ba41f2f9c
6
+ metadata.gz: a3f566995ffbde9eae7b27ce4bd22dd76b6b311777431b93bdd064a2d7406e3be58d506657176dc0bbf5005bf7a9ce030f8b863602958c01975ebed8f35cad0b
7
+ data.tar.gz: 3e763c0a88ae31270037b1117a40ae9aa3992659705dc805e14835b4938fc16263832bba8d0e61d9536731249eabf35583325460da903fb1b3f865747eb23d51
data/README.md CHANGED
@@ -63,7 +63,7 @@ backoff with jitter rather than from the headers.
63
63
  See https://docs.snaptrade.com/docs/ratelimiting.
64
64
 
65
65
 
66
- [![npm](https://img.shields.io/badge/gem-v3.0.28-blue)](https://rubygems.org/gems/snaptrade/versions/3.0.28)
66
+ [![npm](https://img.shields.io/badge/gem-v3.0.30-blue)](https://rubygems.org/gems/snaptrade/versions/3.0.30)
67
67
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
68
68
 
69
69
  </div>
@@ -105,9 +105,11 @@ See https://docs.snaptrade.com/docs/ratelimiting.
105
105
  * [`snaptrade.connections.sync_brokerage_authorization_transactions`](#snaptradeconnectionssync_brokerage_authorization_transactions)
106
106
  * [`snaptrade.experimental_endpoints.add_subscription`](#snaptradeexperimental_endpointsadd_subscription)
107
107
  * [`snaptrade.experimental_endpoints.cancel_subscription`](#snaptradeexperimental_endpointscancel_subscription)
108
+ * [`snaptrade.experimental_endpoints.get_account_details`](#snaptradeexperimental_endpointsget_account_details)
108
109
  * [`snaptrade.experimental_endpoints.get_user_account_order_detail_v2`](#snaptradeexperimental_endpointsget_user_account_order_detail_v2)
109
110
  * [`snaptrade.experimental_endpoints.get_user_account_orders_v2`](#snaptradeexperimental_endpointsget_user_account_orders_v2)
110
111
  * [`snaptrade.experimental_endpoints.get_user_account_recent_orders_v2`](#snaptradeexperimental_endpointsget_user_account_recent_orders_v2)
112
+ * [`snaptrade.experimental_endpoints.list_all_user_accounts`](#snaptradeexperimental_endpointslist_all_user_accounts)
111
113
  * [`snaptrade.experimental_endpoints.list_subscriptions`](#snaptradeexperimental_endpointslist_subscriptions)
112
114
  * [`snaptrade.reference_data.get_partner_info`](#snaptradereference_dataget_partner_info)
113
115
  * [`snaptrade.reference_data.get_stock_exchanges`](#snaptradereference_dataget_stock_exchanges)
@@ -140,7 +142,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
140
142
  Add to Gemfile:
141
143
 
142
144
  ```ruby
143
- gem 'snaptrade', '~> 3.0.28'
145
+ gem 'snaptrade', '~> 3.0.30'
144
146
  ```
145
147
 
146
148
  ## Getting Started<a id="getting-started"></a>
@@ -1369,6 +1371,50 @@ reference the account in SnapTrade.
1369
1371
  ---
1370
1372
 
1371
1373
 
1374
+ ### `snaptrade.experimental_endpoints.get_account_details`<a id="snaptradeexperimental_endpointsget_account_details"></a>
1375
+
1376
+ Experimental and subject to change without notice.
1377
+
1378
+ Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account.
1379
+
1380
+ On Pay as you Go / Real-time, this endpoint refreshes the account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts.
1381
+
1382
+ On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1383
+
1384
+ Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
1385
+
1386
+ If the connection has become disabled, it can no longer access the latest data from the institution, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1387
+
1388
+
1389
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
1390
+
1391
+ ```ruby
1392
+ result = snaptrade.experimental_endpoints.get_account_details(
1393
+ user_id: "snaptrade-user-123",
1394
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1395
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1396
+ )
1397
+ p result
1398
+ ```
1399
+
1400
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1401
+
1402
+ ##### user_id: `String`<a id="user_id-string"></a>
1403
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1404
+ ##### account_id: `String`<a id="account_id-string"></a>
1405
+ #### 🔄 Return<a id="🔄-return"></a>
1406
+
1407
+ [ConnectionAccount](./lib/snaptrade/models/connection_account.rb)
1408
+
1409
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1410
+
1411
+ `/accounts/{accountId}/details` `GET`
1412
+
1413
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1414
+
1415
+ ---
1416
+
1417
+
1372
1418
  ### `snaptrade.experimental_endpoints.get_user_account_order_detail_v2`<a id="snaptradeexperimental_endpointsget_user_account_order_detail_v2"></a>
1373
1419
 
1374
1420
  Returns the detail of a single order using the brokerage order ID provided as a path parameter.
@@ -1502,6 +1548,44 @@ false to retrieve non executed orders as well
1502
1548
  ---
1503
1549
 
1504
1550
 
1551
+ ### `snaptrade.experimental_endpoints.list_all_user_accounts`<a id="snaptradeexperimental_endpointslist_all_user_accounts"></a>
1552
+
1553
+ Experimental and subject to change without notice.
1554
+
1555
+ Returns all accounts across all connections known to SnapTrade for the authenticated user.
1556
+
1557
+ The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account.
1558
+
1559
+ This endpoint returns Daily data regardless of the customer's plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user's connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1560
+
1561
+
1562
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
1563
+
1564
+ ```ruby
1565
+ result = snaptrade.experimental_endpoints.list_all_user_accounts(
1566
+ user_id: "snaptrade-user-123",
1567
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1568
+ )
1569
+ p result
1570
+ ```
1571
+
1572
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1573
+
1574
+ ##### user_id: `String`<a id="user_id-string"></a>
1575
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1576
+ #### 🔄 Return<a id="🔄-return"></a>
1577
+
1578
+ [AllUserAccountsResponse](./lib/snaptrade/models/all_user_accounts_response.rb)
1579
+
1580
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1581
+
1582
+ `/accounts/all` `GET`
1583
+
1584
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1585
+
1586
+ ---
1587
+
1588
+
1505
1589
  ### `snaptrade.experimental_endpoints.list_subscriptions`<a id="snaptradeexperimental_endpointslist_subscriptions"></a>
1506
1590
 
1507
1591
  Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
@@ -2019,11 +2103,11 @@ The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
2019
2103
  ### `snaptrade.trading.get_user_account_option_quotes`<a id="snaptradetradingget_user_account_option_quotes"></a>
2020
2104
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
2021
2105
 
2106
+ **Deprecated.** This endpoint was sunset on October 1, 2026 and now always returns `410 Gone`.
2107
+
2022
2108
  Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format)
2023
2109
  **Note:** These are derived values and are not suitable for trading purposes.
2024
2110
 
2025
- **This Endpoint is deprecated and will cease to return data as of October 1, 2026**
2026
-
2027
2111
 
2028
2112
  #### 🛠️ Usage<a id="🛠️-usage"></a>
2029
2113
 
@@ -239,6 +239,129 @@ module SnapTrade
239
239
  end
240
240
 
241
241
 
242
+ # Get account details
243
+ #
244
+ # Experimental and subject to change without notice.
245
+ #
246
+ # Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account.
247
+ #
248
+ # On Pay as you Go / Real-time, this endpoint refreshes the account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts.
249
+ #
250
+ # On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
251
+ #
252
+ # Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
253
+ #
254
+ # If the connection has become disabled, it can no longer access the latest data from the institution, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
255
+ #
256
+ # @param user_id [String]
257
+ # @param user_secret [String]
258
+ # @param account_id [String]
259
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
260
+ def get_account_details(user_id:, user_secret:, account_id:, extra: {})
261
+ data, _status_code, _headers = get_account_details_with_http_info_impl(user_id, user_secret, account_id, extra)
262
+ data
263
+ end
264
+
265
+ # Get account details
266
+ #
267
+ # Experimental and subject to change without notice.
268
+ #
269
+ # Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account.
270
+ #
271
+ # On Pay as you Go / Real-time, this endpoint refreshes the account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts.
272
+ #
273
+ # On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
274
+ #
275
+ # Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
276
+ #
277
+ # If the connection has become disabled, it can no longer access the latest data from the institution, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
278
+ #
279
+ # @param user_id [String]
280
+ # @param user_secret [String]
281
+ # @param account_id [String]
282
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
283
+ def get_account_details_with_http_info(user_id:, user_secret:, account_id:, extra: {})
284
+ get_account_details_with_http_info_impl(user_id, user_secret, account_id, extra)
285
+ end
286
+
287
+ # Get account details
288
+ # Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the `kind`-discriminated account shape. Use the `kind` discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
289
+ # @param user_id [String]
290
+ # @param user_secret [String]
291
+ # @param account_id [String]
292
+ # @param [Hash] opts the optional parameters
293
+ # @return [ConnectionAccount]
294
+ private def get_account_details_impl(user_id, user_secret, account_id, opts = {})
295
+ data, _status_code, _headers = get_account_details_with_http_info(user_id, user_secret, account_id, opts)
296
+ data
297
+ end
298
+
299
+ # Get account details
300
+ # Experimental and subject to change without notice. Returns the specified account for the authenticated user, using the &#x60;kind&#x60;-discriminated account shape. Use the &#x60;kind&#x60; discriminator to determine the shape of the account, which can be an investment, deposit, or line of credit account. On Pay as you Go / Real-time, this endpoint refreshes the account&#39;s opening date and total net value (&#x60;net_value&#x60;) live from the institution on each call, along with funding date for &#x60;investment&#x60; accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
301
+ # @param user_id [String]
302
+ # @param user_secret [String]
303
+ # @param account_id [String]
304
+ # @param [Hash] opts the optional parameters
305
+ # @return [Array<(ConnectionAccount, Integer, Hash)>] ConnectionAccount data, response status code and response headers
306
+ private def get_account_details_with_http_info_impl(user_id, user_secret, account_id, opts = {})
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug 'Calling API: ExperimentalEndpointsApi.get_account_details ...'
309
+ end
310
+ # verify the required parameter 'user_id' is set
311
+ if @api_client.config.client_side_validation && user_id.nil?
312
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling ExperimentalEndpointsApi.get_account_details"
313
+ end
314
+ # verify the required parameter 'user_secret' is set
315
+ if @api_client.config.client_side_validation && user_secret.nil?
316
+ fail ArgumentError, "Missing the required parameter 'user_secret' when calling ExperimentalEndpointsApi.get_account_details"
317
+ end
318
+ # verify the required parameter 'account_id' is set
319
+ if @api_client.config.client_side_validation && account_id.nil?
320
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling ExperimentalEndpointsApi.get_account_details"
321
+ end
322
+ # resource path
323
+ local_var_path = '/accounts/{accountId}/details'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
324
+
325
+ # query parameters
326
+ query_params = opts[:query_params] || {}
327
+ query_params[:'userId'] = user_id
328
+ query_params[:'userSecret'] = user_secret
329
+
330
+ # header parameters
331
+ header_params = opts[:header_params] || {}
332
+ # HTTP header 'Accept' (if needed)
333
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
334
+
335
+ # form parameters
336
+ form_params = opts[:form_params] || {}
337
+
338
+ # http body (model)
339
+ post_body = opts[:debug_body]
340
+
341
+ # return_type
342
+ return_type = opts[:debug_return_type] || 'ConnectionAccount'
343
+
344
+ # auth_names
345
+ auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
346
+
347
+ new_options = opts.merge(
348
+ :operation => :"ExperimentalEndpointsApi.get_account_details",
349
+ :header_params => header_params,
350
+ :query_params => query_params,
351
+ :form_params => form_params,
352
+ :body => post_body,
353
+ :auth_names => auth_names,
354
+ :return_type => return_type
355
+ )
356
+
357
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
358
+ if @api_client.config.debugging
359
+ @api_client.config.logger.debug "API called: ExperimentalEndpointsApi#get_account_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
360
+ end
361
+ return data, status_code, headers, response
362
+ end
363
+
364
+
242
365
  # Get account order detail (V2)
243
366
  #
244
367
  # Returns the detail of a single order using the brokerage order ID provided as a path parameter.
@@ -619,6 +742,113 @@ module SnapTrade
619
742
  end
620
743
 
621
744
 
745
+ # List all user accounts
746
+ #
747
+ # Experimental and subject to change without notice.
748
+ #
749
+ # Returns all accounts across all connections known to SnapTrade for the authenticated user.
750
+ #
751
+ # The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account.
752
+ #
753
+ # This endpoint returns Daily data regardless of the customer's plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user's connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
754
+ #
755
+ # @param user_id [String]
756
+ # @param user_secret [String]
757
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
758
+ def list_all_user_accounts(user_id:, user_secret:, extra: {})
759
+ data, _status_code, _headers = list_all_user_accounts_with_http_info_impl(user_id, user_secret, extra)
760
+ data
761
+ end
762
+
763
+ # List all user accounts
764
+ #
765
+ # Experimental and subject to change without notice.
766
+ #
767
+ # Returns all accounts across all connections known to SnapTrade for the authenticated user.
768
+ #
769
+ # The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account.
770
+ #
771
+ # This endpoint returns Daily data regardless of the customer's plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user's connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
772
+ #
773
+ # @param user_id [String]
774
+ # @param user_secret [String]
775
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
776
+ def list_all_user_accounts_with_http_info(user_id:, user_secret:, extra: {})
777
+ list_all_user_accounts_with_http_info_impl(user_id, user_secret, extra)
778
+ end
779
+
780
+ # List all user accounts
781
+ # Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer's plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user's connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
782
+ # @param user_id [String]
783
+ # @param user_secret [String]
784
+ # @param [Hash] opts the optional parameters
785
+ # @return [AllUserAccountsResponse]
786
+ private def list_all_user_accounts_impl(user_id, user_secret, opts = {})
787
+ data, _status_code, _headers = list_all_user_accounts_with_http_info(user_id, user_secret, opts)
788
+ data
789
+ end
790
+
791
+ # List all user accounts
792
+ # Experimental and subject to change without notice. Returns all accounts across all connections known to SnapTrade for the authenticated user. The &#x60;results&#x60; list can contain multiple account kinds in the same response, including investment, deposit, and line of credit accounts. Use the &#x60;kind&#x60; discriminator to determine the shape for each account. This endpoint returns Daily data regardless of the customer&#39;s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user&#39;s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
793
+ # @param user_id [String]
794
+ # @param user_secret [String]
795
+ # @param [Hash] opts the optional parameters
796
+ # @return [Array<(AllUserAccountsResponse, Integer, Hash)>] AllUserAccountsResponse data, response status code and response headers
797
+ private def list_all_user_accounts_with_http_info_impl(user_id, user_secret, opts = {})
798
+ if @api_client.config.debugging
799
+ @api_client.config.logger.debug 'Calling API: ExperimentalEndpointsApi.list_all_user_accounts ...'
800
+ end
801
+ # verify the required parameter 'user_id' is set
802
+ if @api_client.config.client_side_validation && user_id.nil?
803
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling ExperimentalEndpointsApi.list_all_user_accounts"
804
+ end
805
+ # verify the required parameter 'user_secret' is set
806
+ if @api_client.config.client_side_validation && user_secret.nil?
807
+ fail ArgumentError, "Missing the required parameter 'user_secret' when calling ExperimentalEndpointsApi.list_all_user_accounts"
808
+ end
809
+ # resource path
810
+ local_var_path = '/accounts/all'
811
+
812
+ # query parameters
813
+ query_params = opts[:query_params] || {}
814
+ query_params[:'userId'] = user_id
815
+ query_params[:'userSecret'] = user_secret
816
+
817
+ # header parameters
818
+ header_params = opts[:header_params] || {}
819
+ # HTTP header 'Accept' (if needed)
820
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
821
+
822
+ # form parameters
823
+ form_params = opts[:form_params] || {}
824
+
825
+ # http body (model)
826
+ post_body = opts[:debug_body]
827
+
828
+ # return_type
829
+ return_type = opts[:debug_return_type] || 'AllUserAccountsResponse'
830
+
831
+ # auth_names
832
+ auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
833
+
834
+ new_options = opts.merge(
835
+ :operation => :"ExperimentalEndpointsApi.list_all_user_accounts",
836
+ :header_params => header_params,
837
+ :query_params => query_params,
838
+ :form_params => form_params,
839
+ :body => post_body,
840
+ :auth_names => auth_names,
841
+ :return_type => return_type
842
+ )
843
+
844
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
845
+ if @api_client.config.debugging
846
+ @api_client.config.logger.debug "API called: ExperimentalEndpointsApi#list_all_user_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
847
+ end
848
+ return data, status_code, headers, response
849
+ end
850
+
851
+
622
852
  # List active Trade Detection subscriptions
623
853
  #
624
854
  # Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
@@ -548,10 +548,10 @@ module SnapTrade
548
548
 
549
549
  # Get option quote
550
550
  #
551
+ # **Deprecated.** This endpoint was sunset on October 1, 2026 and now always returns `410 Gone`.
552
+ #
551
553
  # Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format)
552
554
  # **Note:** These are derived values and are not suitable for trading purposes.
553
- #
554
- # **This Endpoint is deprecated and will cease to return data as of October 1, 2026**
555
555
  #
556
556
  # @param user_id [String]
557
557
  # @param user_secret [String]
@@ -565,10 +565,10 @@ module SnapTrade
565
565
 
566
566
  # Get option quote
567
567
  #
568
+ # **Deprecated.** This endpoint was sunset on October 1, 2026 and now always returns `410 Gone`.
569
+ #
568
570
  # Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format)
569
571
  # **Note:** These are derived values and are not suitable for trading purposes.
570
- #
571
- # **This Endpoint is deprecated and will cease to return data as of October 1, 2026**
572
572
  #
573
573
  # @param user_id [String]
574
574
  # @param user_secret [String]
@@ -580,7 +580,7 @@ module SnapTrade
580
580
  end
581
581
 
582
582
  # Get option quote
583
- # Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes. **This Endpoint is deprecated and will cease to return data as of October 1, 2026**
583
+ # **Deprecated.** This endpoint was sunset on October 1, 2026 and now always returns `410 Gone`. Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
584
584
  # @param user_id [String]
585
585
  # @param user_secret [String]
586
586
  # @param account_id [String]
@@ -593,7 +593,7 @@ module SnapTrade
593
593
  end
594
594
 
595
595
  # Get option quote
596
- # Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example &#x60;AAPL 251114C00240000&#x60; represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes. **This Endpoint is deprecated and will cease to return data as of October 1, 2026**
596
+ # **Deprecated.** This endpoint was sunset on October 1, 2026 and now always returns &#x60;410 Gone&#x60;. Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example &#x60;AAPL 251114C00240000&#x60; represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
597
597
  # @param user_id [String]
598
598
  # @param user_secret [String]
599
599
  # @param account_id [String]
@@ -0,0 +1,38 @@
1
+ =begin
2
+ #SnapTrade
3
+
4
+ #Connect brokerage accounts to your app for live positions and trading. ## Rate limiting Two limits apply to requests signed with your `clientId`. The stricter one wins, and exceeding either returns `429 Too Many Requests`. - **Customer-level** — 250 requests/minute by default, scoped to your `clientId` and applied across all endpoints. Reported in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. - **Account-level** — 10 requests/minute per account, scoped to (`clientId`, `accountId`). All covered operations for one account draw on the same bucket — reading balances and reading positions share it — and enforcement does not depend on the HTTP method, so updating an account consumes the same bucket as reading it. Only enforced for Personal users, and only for integrations it has been rolled out to — it is not yet in force for every Personal integration. It also does not apply on every operation that documents a 429 below. Where it applies it is reported in `X-RateLimit-Account-Limit`, `X-RateLimit-Account-Remaining` and `X-RateLimit-Account-Reset`. Do not read the absence of those headers as proof the limit is off — some configurations omit the rate limit headers while still enforcing the limit, so header absence tells you nothing about your allowance. On a 429, `X-RateLimit-Remaining: 0` means you hit the customer-level limit and `X-RateLimit-Account-Remaining: 0` means the account-level one. Wait for the corresponding `*-Reset` value (seconds) before retrying, or fall back to exponential backoff with jitter. Not every 429 is explained by those headers. A separate per-authenticated-user limit, reported in no `X-RateLimit-*` header, covers OAuth-authenticated requests and signed requests in configurations where the customer-level limit is not in effect — on the operations that use the default throttles. A few operations override those and are governed by the customer-level limit alone. The two do not stack: a signed request governed by the customer-level limit above is not additionally subject to the per-user one. If a 429 arrives with no header at zero — or with no `X-RateLimit-*` headers at all — honour `Retry-After` and back off. Treat the remaining counts as a hint, not a guarantee that the next request will succeed. Because the customer-level limit applies everywhere, any signed request can return 429. **OAuth-authenticated requests are an exception.** They are not subject to the customer-level limit and do not receive `X-RateLimit-Limit`, `X-RateLimit-Remaining` or `X-RateLimit-Reset` — do not wait on those headers or design around a customer-level allowance on this path. The account-level limit still applies to them on the account-data endpoints above, reported in the `X-RateLimit-Account-*` headers. On operations using the default throttles the per-user limit above applies to them as well, so an OAuth request can be rejected while the account headers still show capacity; on the few operations that override those throttles, OAuth callers have no per-user ceiling at all. Drive retries from `Retry-After` and exponential backoff with jitter rather than from the headers. See https://docs.snaptrade.com/docs/ratelimiting.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: api@snaptrade.com
8
+ =end
9
+
10
+ require 'date'
11
+ require 'time'
12
+
13
+ module SnapTrade
14
+ class AccountType
15
+ CASH = "cash".freeze
16
+ MARGIN = "margin".freeze
17
+ UNKNOWN = "unknown".freeze
18
+
19
+ def self.all_vars
20
+ @all_vars ||= [CASH, MARGIN, UNKNOWN].freeze
21
+ end
22
+
23
+ # Builds the enum from string
24
+ # @param [String] The enum value in the form of the string
25
+ # @return [String] The enum value
26
+ def self.build_from_hash(value)
27
+ new.build_from_hash(value)
28
+ end
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ return value if AccountType.all_vars.include?(value)
35
+ raise "Invalid ENUM value #{value} for class #AccountType"
36
+ end
37
+ end
38
+ end