snaptrade 2.0.190 → 2.0.191

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: 8e352acd0740f2e8fb6c04619c0e804cbbabc7e4c2207d445e97d656a2e6ac76
4
- data.tar.gz: 76bfbb478457e60bb028696b34e411f11cbe53334bbb4d091c2165caaccb9c5d
3
+ metadata.gz: 93ecd88f7f7bb7f1f5585242e2221a0f831813438652cca5bb792a62eef34a08
4
+ data.tar.gz: 2e9abe12eead3eeaa1e8a0b0cff22db5537d4daf531dcca15c974d755755a2b7
5
5
  SHA512:
6
- metadata.gz: c374e44dde407b58c6cdbd8941111c8758b69315cb6cb88dd9581879b7f8a6813702d7a428c539042c38c463d63dde33745c559f5403dc6ac6df3dd3ba6a6e24
7
- data.tar.gz: f7aa6f52e779272cf83b8ae84e37657c7e73c209d097aeab688e5251b0527d30c16374bde100b625ed654cf091e476082e63525c243b3ba6926e1bcedbe3f169
6
+ metadata.gz: 891ae577616deb3841a32a2788bc6d5832615b745249f9cb826fb4e7d2ce35429db41c1945fcea59496b9f1c96bdd1f8a8f8a07b471d500ba750fe77fb061ea6
7
+ data.tar.gz: c2f91e665080bbe6b374d64be1af1b6f97cd195c4fdda81bd3006fb9cc1bd210798dba19ec2cf2eb0ed02b955f7162387feb7db2c8afc2fa0273ceb6a5c72a04
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.190)
4
+ snaptrade (2.0.191)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Connect brokerage accounts to your app for live positions and trading
8
8
 
9
- [![npm](https://img.shields.io/badge/gem-v2.0.190-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.190)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.191-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.191)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -21,6 +21,7 @@ Connect brokerage accounts to your app for live positions and trading
21
21
  - [Reference](#reference)
22
22
  * [`snaptrade.account_information.get_account_activities`](#snaptradeaccount_informationget_account_activities)
23
23
  * [`snaptrade.account_information.get_account_balance_history`](#snaptradeaccount_informationget_account_balance_history)
24
+ * [`snaptrade.account_information.get_all_account_positions`](#snaptradeaccount_informationget_all_account_positions)
24
25
  * [`snaptrade.account_information.get_all_user_holdings`](#snaptradeaccount_informationget_all_user_holdings)
25
26
  * [`snaptrade.account_information.get_user_account_balance`](#snaptradeaccount_informationget_user_account_balance)
26
27
  * [`snaptrade.account_information.get_user_account_details`](#snaptradeaccount_informationget_user_account_details)
@@ -47,7 +48,6 @@ Connect brokerage accounts to your app for live positions and trading
47
48
  * [`snaptrade.connections.remove_brokerage_authorization`](#snaptradeconnectionsremove_brokerage_authorization)
48
49
  * [`snaptrade.connections.return_rates`](#snaptradeconnectionsreturn_rates)
49
50
  * [`snaptrade.connections.session_events`](#snaptradeconnectionssession_events)
50
- * [`snaptrade.experimental_endpoints.get_all_account_positions`](#snaptradeexperimental_endpointsget_all_account_positions)
51
51
  * [`snaptrade.experimental_endpoints.get_user_account_order_detail_v2`](#snaptradeexperimental_endpointsget_user_account_order_detail_v2)
52
52
  * [`snaptrade.experimental_endpoints.get_user_account_orders_v2`](#snaptradeexperimental_endpointsget_user_account_orders_v2)
53
53
  * [`snaptrade.experimental_endpoints.get_user_account_recent_orders_v2`](#snaptradeexperimental_endpointsget_user_account_recent_orders_v2)
@@ -91,7 +91,7 @@ Connect brokerage accounts to your app for live positions and trading
91
91
  Add to Gemfile:
92
92
 
93
93
  ```ruby
94
- gem 'snaptrade', '~> 2.0.190'
94
+ gem 'snaptrade', '~> 2.0.191'
95
95
  ```
96
96
 
97
97
  ## Getting Started<a id="getting-started"></a>
@@ -252,6 +252,46 @@ p result
252
252
  ---
253
253
 
254
254
 
255
+ ### `snaptrade.account_information.get_all_account_positions`<a id="snaptradeaccount_informationget_all_account_positions"></a>
256
+
257
+ Returns a list of all positions in the specified account.
258
+
259
+ The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
260
+
261
+ Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account.
262
+
263
+ If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
264
+
265
+
266
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
267
+
268
+ ```ruby
269
+ result = snaptrade.account_information.get_all_account_positions(
270
+ user_id: "snaptrade-user-123",
271
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
272
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
273
+ )
274
+ p result
275
+ ```
276
+
277
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
278
+
279
+ ##### user_id: `String`<a id="user_id-string"></a>
280
+ ##### user_secret: `String`<a id="user_secret-string"></a>
281
+ ##### account_id: `String`<a id="account_id-string"></a>
282
+ #### 🔄 Return<a id="🔄-return"></a>
283
+
284
+ [AllAccountPositionsResponse](./lib/snaptrade/models/all_account_positions_response.rb)
285
+
286
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
287
+
288
+ `/accounts/{accountId}/positions/all` `GET`
289
+
290
+ [🔙 **Back to Table of Contents**](#table-of-contents)
291
+
292
+ ---
293
+
294
+
255
295
  ### `snaptrade.account_information.get_all_user_holdings`<a id="snaptradeaccount_informationget_all_user_holdings"></a>
256
296
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
257
297
 
@@ -473,6 +513,8 @@ Number of days in the past to fetch the most recent orders. Defaults to the last
473
513
 
474
514
  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).
475
515
 
516
+ Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
517
+
476
518
  Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
477
519
  - If you do, this endpoint returns real-time data.
478
520
  - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
@@ -1042,7 +1084,7 @@ p result
1042
1084
 
1043
1085
  Returns all brokerage accounts that belong to the specified connection for the authenticated user.
1044
1086
 
1045
- On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
1087
+ On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
1046
1088
 
1047
1089
  On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1048
1090
 
@@ -1259,46 +1301,6 @@ specific users
1259
1301
  ---
1260
1302
 
1261
1303
 
1262
- ### `snaptrade.experimental_endpoints.get_all_account_positions`<a id="snaptradeexperimental_endpointsget_all_account_positions"></a>
1263
-
1264
- Returns a list of all positions in the specified account.
1265
-
1266
- The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
1267
-
1268
- Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account.
1269
-
1270
- If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
1271
-
1272
-
1273
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1274
-
1275
- ```ruby
1276
- result = snaptrade.experimental_endpoints.get_all_account_positions(
1277
- user_id: "snaptrade-user-123",
1278
- user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1279
- account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1280
- )
1281
- p result
1282
- ```
1283
-
1284
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1285
-
1286
- ##### user_id: `String`<a id="user_id-string"></a>
1287
- ##### user_secret: `String`<a id="user_secret-string"></a>
1288
- ##### account_id: `String`<a id="account_id-string"></a>
1289
- #### 🔄 Return<a id="🔄-return"></a>
1290
-
1291
- [AllAccountPositionsResponse](./lib/snaptrade/models/all_account_positions_response.rb)
1292
-
1293
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1294
-
1295
- `/accounts/{accountId}/positions/all` `GET`
1296
-
1297
- [🔙 **Back to Table of Contents**](#table-of-contents)
1298
-
1299
- ---
1300
-
1301
-
1302
1304
  ### `snaptrade.experimental_endpoints.get_user_account_order_detail_v2`<a id="snaptradeexperimental_endpointsget_user_account_order_detail_v2"></a>
1303
1305
 
1304
1306
  Returns the detail of a single order using the brokerage order ID provided as a path parameter.
@@ -1470,6 +1472,8 @@ p result
1470
1472
 
1471
1473
  Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions).
1472
1474
 
1475
+ Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
1476
+
1473
1477
  Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
1474
1478
  - If you do, this endpoint returns real-time data.
1475
1479
  - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
@@ -282,6 +282,121 @@ module SnapTrade
282
282
  end
283
283
 
284
284
 
285
+ # List all account positions
286
+ #
287
+ # Returns a list of all positions in the specified account.
288
+ #
289
+ # The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
290
+ #
291
+ # Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account.
292
+ #
293
+ # If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
294
+ #
295
+ # @param user_id [String]
296
+ # @param user_secret [String]
297
+ # @param account_id [String]
298
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
299
+ def get_all_account_positions(user_id:, user_secret:, account_id:, extra: {})
300
+ data, _status_code, _headers = get_all_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra)
301
+ data
302
+ end
303
+
304
+ # List all account positions
305
+ #
306
+ # Returns a list of all positions in the specified account.
307
+ #
308
+ # The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
309
+ #
310
+ # Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account.
311
+ #
312
+ # If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
313
+ #
314
+ # @param user_id [String]
315
+ # @param user_secret [String]
316
+ # @param account_id [String]
317
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
318
+ def get_all_account_positions_with_http_info(user_id:, user_secret:, account_id:, extra: {})
319
+ get_all_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra)
320
+ end
321
+
322
+ # List all account positions
323
+ # Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
324
+ # @param user_id [String]
325
+ # @param user_secret [String]
326
+ # @param account_id [String]
327
+ # @param [Hash] opts the optional parameters
328
+ # @return [AllAccountPositionsResponse]
329
+ private def get_all_account_positions_impl(user_id, user_secret, account_id, opts = {})
330
+ data, _status_code, _headers = get_all_account_positions_with_http_info(user_id, user_secret, account_id, opts)
331
+ data
332
+ end
333
+
334
+ # List all account positions
335
+ # Returns a list of all positions in the specified account. The &#x60;results&#x60; list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the &#x60;instrument.kind&#x60; discriminator to determine the schema for each position&#39;s &#x60;instrument&#x60;. Stock positions may also include &#x60;cash_equivalent&#x60;, and may include &#x60;tax_lots&#x60; when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
336
+ # @param user_id [String]
337
+ # @param user_secret [String]
338
+ # @param account_id [String]
339
+ # @param [Hash] opts the optional parameters
340
+ # @return [Array<(AllAccountPositionsResponse, Integer, Hash)>] AllAccountPositionsResponse data, response status code and response headers
341
+ private def get_all_account_positions_with_http_info_impl(user_id, user_secret, account_id, opts = {})
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug 'Calling API: AccountInformationApi.get_all_account_positions ...'
344
+ end
345
+ # verify the required parameter 'user_id' is set
346
+ if @api_client.config.client_side_validation && user_id.nil?
347
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling AccountInformationApi.get_all_account_positions"
348
+ end
349
+ # verify the required parameter 'user_secret' is set
350
+ if @api_client.config.client_side_validation && user_secret.nil?
351
+ fail ArgumentError, "Missing the required parameter 'user_secret' when calling AccountInformationApi.get_all_account_positions"
352
+ end
353
+ # verify the required parameter 'account_id' is set
354
+ if @api_client.config.client_side_validation && account_id.nil?
355
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountInformationApi.get_all_account_positions"
356
+ end
357
+ # resource path
358
+ local_var_path = '/accounts/{accountId}/positions/all'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
359
+
360
+ # query parameters
361
+ query_params = opts[:query_params] || {}
362
+ query_params[:'userId'] = user_id
363
+ query_params[:'userSecret'] = user_secret
364
+
365
+ # header parameters
366
+ header_params = opts[:header_params] || {}
367
+ # HTTP header 'Accept' (if needed)
368
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
369
+
370
+ # form parameters
371
+ form_params = opts[:form_params] || {}
372
+
373
+ # http body (model)
374
+ post_body = opts[:debug_body]
375
+
376
+ # return_type
377
+ return_type = opts[:debug_return_type] || 'AllAccountPositionsResponse'
378
+
379
+ # auth_names
380
+ auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
381
+
382
+ new_options = opts.merge(
383
+ :operation => :"AccountInformationApi.get_all_account_positions",
384
+ :header_params => header_params,
385
+ :query_params => query_params,
386
+ :form_params => form_params,
387
+ :body => post_body,
388
+ :auth_names => auth_names,
389
+ :return_type => return_type
390
+ )
391
+
392
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
393
+ if @api_client.config.debugging
394
+ @api_client.config.logger.debug "API called: AccountInformationApi#get_all_account_positions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
395
+ end
396
+ return data, status_code, headers, response
397
+ end
398
+
399
+
285
400
  # List all accounts for the user, plus balances, positions, and orders for each account.
286
401
  #
287
402
  # **Deprecated, please use the account-specific holdings endpoint instead.**
@@ -905,6 +1020,8 @@ module SnapTrade
905
1020
  #
906
1021
  # 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).
907
1022
  #
1023
+ # Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
1024
+ #
908
1025
  # Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
909
1026
  # - If you do, this endpoint returns real-time data.
910
1027
  # - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
@@ -924,6 +1041,8 @@ module SnapTrade
924
1041
  #
925
1042
  # 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).
926
1043
  #
1044
+ # Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
1045
+ #
927
1046
  # Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
928
1047
  # - If you do, this endpoint returns real-time data.
929
1048
  # - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
@@ -939,7 +1058,7 @@ module SnapTrade
939
1058
  end
940
1059
 
941
1060
  # List account positions
942
- # 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). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
1061
+ # 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). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
943
1062
  # @param user_id [String]
944
1063
  # @param user_secret [String]
945
1064
  # @param account_id [String]
@@ -951,7 +1070,7 @@ module SnapTrade
951
1070
  end
952
1071
 
953
1072
  # List account positions
954
- # 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). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don&#39;t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?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, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
1073
+ # 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). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don&#39;t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?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, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
955
1074
  # @param user_id [String]
956
1075
  # @param user_secret [String]
957
1076
  # @param account_id [String]
@@ -336,7 +336,7 @@ module SnapTrade
336
336
  #
337
337
  # Returns all brokerage accounts that belong to the specified connection for the authenticated user.
338
338
  #
339
- # On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
339
+ # On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
340
340
  #
341
341
  # On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
342
342
  #
@@ -355,7 +355,7 @@ module SnapTrade
355
355
  #
356
356
  # Returns all brokerage accounts that belong to the specified connection for the authenticated user.
357
357
  #
358
- # On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
358
+ # On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
359
359
  #
360
360
  # On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
361
361
  #
@@ -370,7 +370,7 @@ module SnapTrade
370
370
  end
371
371
 
372
372
  # List accounts for a connection
373
- # Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. 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.
373
+ # Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. 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.
374
374
  # @param authorization_id [String]
375
375
  # @param user_id [String]
376
376
  # @param user_secret [String]
@@ -382,7 +382,7 @@ module SnapTrade
382
382
  end
383
383
 
384
384
  # List accounts for a connection
385
- # Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account&#39;s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. 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.
385
+ # Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account&#39;s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. 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.
386
386
  # @param authorization_id [String]
387
387
  # @param user_id [String]
388
388
  # @param user_secret [String]
@@ -17,121 +17,6 @@ module SnapTrade
17
17
  @api_client = api_client
18
18
  end
19
19
 
20
- # List all account positions
21
- #
22
- # Returns a list of all positions in the specified account.
23
- #
24
- # The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
25
- #
26
- # Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account.
27
- #
28
- # If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
29
- #
30
- # @param user_id [String]
31
- # @param user_secret [String]
32
- # @param account_id [String]
33
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
34
- def get_all_account_positions(user_id:, user_secret:, account_id:, extra: {})
35
- data, _status_code, _headers = get_all_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra)
36
- data
37
- end
38
-
39
- # List all account positions
40
- #
41
- # Returns a list of all positions in the specified account.
42
- #
43
- # The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
44
- #
45
- # Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account.
46
- #
47
- # If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
48
- #
49
- # @param user_id [String]
50
- # @param user_secret [String]
51
- # @param account_id [String]
52
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
53
- def get_all_account_positions_with_http_info(user_id:, user_secret:, account_id:, extra: {})
54
- get_all_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra)
55
- end
56
-
57
- # List all account positions
58
- # Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
59
- # @param user_id [String]
60
- # @param user_secret [String]
61
- # @param account_id [String]
62
- # @param [Hash] opts the optional parameters
63
- # @return [AllAccountPositionsResponse]
64
- private def get_all_account_positions_impl(user_id, user_secret, account_id, opts = {})
65
- data, _status_code, _headers = get_all_account_positions_with_http_info(user_id, user_secret, account_id, opts)
66
- data
67
- end
68
-
69
- # List all account positions
70
- # Returns a list of all positions in the specified account. The &#x60;results&#x60; list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the &#x60;instrument.kind&#x60; discriminator to determine the schema for each position&#39;s &#x60;instrument&#x60;. Stock positions may also include &#x60;cash_equivalent&#x60;, and may include &#x60;tax_lots&#x60; when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
71
- # @param user_id [String]
72
- # @param user_secret [String]
73
- # @param account_id [String]
74
- # @param [Hash] opts the optional parameters
75
- # @return [Array<(AllAccountPositionsResponse, Integer, Hash)>] AllAccountPositionsResponse data, response status code and response headers
76
- private def get_all_account_positions_with_http_info_impl(user_id, user_secret, account_id, opts = {})
77
- if @api_client.config.debugging
78
- @api_client.config.logger.debug 'Calling API: ExperimentalEndpointsApi.get_all_account_positions ...'
79
- end
80
- # verify the required parameter 'user_id' is set
81
- if @api_client.config.client_side_validation && user_id.nil?
82
- fail ArgumentError, "Missing the required parameter 'user_id' when calling ExperimentalEndpointsApi.get_all_account_positions"
83
- end
84
- # verify the required parameter 'user_secret' is set
85
- if @api_client.config.client_side_validation && user_secret.nil?
86
- fail ArgumentError, "Missing the required parameter 'user_secret' when calling ExperimentalEndpointsApi.get_all_account_positions"
87
- end
88
- # verify the required parameter 'account_id' is set
89
- if @api_client.config.client_side_validation && account_id.nil?
90
- fail ArgumentError, "Missing the required parameter 'account_id' when calling ExperimentalEndpointsApi.get_all_account_positions"
91
- end
92
- # resource path
93
- local_var_path = '/accounts/{accountId}/positions/all'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
94
-
95
- # query parameters
96
- query_params = opts[:query_params] || {}
97
- query_params[:'userId'] = user_id
98
- query_params[:'userSecret'] = user_secret
99
-
100
- # header parameters
101
- header_params = opts[:header_params] || {}
102
- # HTTP header 'Accept' (if needed)
103
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
104
-
105
- # form parameters
106
- form_params = opts[:form_params] || {}
107
-
108
- # http body (model)
109
- post_body = opts[:debug_body]
110
-
111
- # return_type
112
- return_type = opts[:debug_return_type] || 'AllAccountPositionsResponse'
113
-
114
- # auth_names
115
- auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
116
-
117
- new_options = opts.merge(
118
- :operation => :"ExperimentalEndpointsApi.get_all_account_positions",
119
- :header_params => header_params,
120
- :query_params => query_params,
121
- :form_params => form_params,
122
- :body => post_body,
123
- :auth_names => auth_names,
124
- :return_type => return_type
125
- )
126
-
127
- data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
128
- if @api_client.config.debugging
129
- @api_client.config.logger.debug "API called: ExperimentalEndpointsApi#get_all_account_positions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
- end
131
- return data, status_code, headers, response
132
- end
133
-
134
-
135
20
  # Get account order detail (V2)
136
21
  #
137
22
  # Returns the detail of a single order using the brokerage order ID provided as a path parameter.
@@ -21,6 +21,8 @@ module SnapTrade
21
21
  #
22
22
  # Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions).
23
23
  #
24
+ # Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
25
+ #
24
26
  # Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
25
27
  # - If you do, this endpoint returns real-time data.
26
28
  # - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
@@ -38,6 +40,8 @@ module SnapTrade
38
40
  #
39
41
  # Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions).
40
42
  #
43
+ # Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.
44
+ #
41
45
  # Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
42
46
  # - If you do, this endpoint returns real-time data.
43
47
  # - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
@@ -51,7 +55,7 @@ module SnapTrade
51
55
  end
52
56
 
53
57
  # List account option positions
54
- # Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
58
+ # Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
55
59
  # @param user_id [String]
56
60
  # @param user_secret [String]
57
61
  # @param account_id [String]
@@ -63,7 +67,7 @@ module SnapTrade
63
67
  end
64
68
 
65
69
  # List account option positions
66
- # Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don&#39;t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?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, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
70
+ # Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don&#39;t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?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, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
67
71
  # @param user_id [String]
68
72
  # @param user_secret [String]
69
73
  # @param account_id [String]
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.190'
11
+ VERSION = '2.0.191'
12
12
  end
@@ -60,6 +60,20 @@ describe 'AccountInformationApi' do
60
60
  end
61
61
  end
62
62
 
63
+ # unit tests for get_all_account_positions
64
+ # List all account positions
65
+ # Returns a list of all positions in the specified account. The &#x60;results&#x60; list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the &#x60;instrument.kind&#x60; discriminator to determine the schema for each position&#39;s &#x60;instrument&#x60;. Stock positions may also include &#x60;cash_equivalent&#x60;, and may include &#x60;tax_lots&#x60; when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
66
+ # @param user_id
67
+ # @param user_secret
68
+ # @param account_id
69
+ # @param [Hash] opts the optional parameters
70
+ # @return [AllAccountPositionsResponse]
71
+ describe 'get_all_account_positions test' do
72
+ it 'should work' do
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ end
75
+ end
76
+
63
77
  # unit tests for get_all_user_holdings
64
78
  # List all accounts for the user, plus balances, positions, and orders for each account.
65
79
  # **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
@@ -135,7 +149,7 @@ describe 'AccountInformationApi' do
135
149
 
136
150
  # unit tests for get_user_account_positions
137
151
  # List account positions
138
- # 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). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don&#39;t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?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, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
152
+ # 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). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don&#39;t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?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, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
139
153
  # @param user_id
140
154
  # @param user_secret
141
155
  # @param account_id
@@ -71,7 +71,7 @@ describe 'ConnectionsApi' do
71
71
 
72
72
  # unit tests for list_brokerage_authorization_accounts
73
73
  # List accounts for a connection
74
- # Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account&#39;s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. 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.
74
+ # Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account&#39;s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. 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.
75
75
  # @param authorization_id
76
76
  # @param user_id
77
77
  # @param user_secret
@@ -27,20 +27,6 @@ describe 'ExperimentalEndpointsApi' do
27
27
  end
28
28
  end
29
29
 
30
- # unit tests for get_all_account_positions
31
- # List all account positions
32
- # Returns a list of all positions in the specified account. The &#x60;results&#x60; list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the &#x60;instrument.kind&#x60; discriminator to determine the schema for each position&#39;s &#x60;instrument&#x60;. Stock positions may also include &#x60;cash_equivalent&#x60;, and may include &#x60;tax_lots&#x60; when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.
33
- # @param user_id
34
- # @param user_secret
35
- # @param account_id
36
- # @param [Hash] opts the optional parameters
37
- # @return [AllAccountPositionsResponse]
38
- describe 'get_all_account_positions test' do
39
- it 'should work' do
40
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
41
- end
42
- end
43
-
44
30
  # unit tests for get_user_account_order_detail_v2
45
31
  # Get account order detail (V2)
46
32
  # Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the &#x60;legs&#x60; list field. If the order is single legged, &#x60;legs&#x60; will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
@@ -29,7 +29,7 @@ describe 'OptionsApi' do
29
29
 
30
30
  # unit tests for list_option_holdings
31
31
  # List account option positions
32
- # Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don&#39;t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?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, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
32
+ # Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don&#39;t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?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, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
33
33
  # @param user_id
34
34
  # @param user_secret
35
35
  # @param account_id
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snaptrade
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.190
4
+ version: 2.0.191
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade