snaptrade 3.0.29 → 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 +4 -4
- data/README.md +86 -2
- data/lib/snaptrade/api/experimental_endpoints_api.rb +230 -0
- data/lib/snaptrade/models/all_user_accounts_response.rb +225 -0
- data/lib/snaptrade/models/connection_account.rb +1 -1
- data/lib/snaptrade/models/investment_account.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +1 -0
- data/spec/api/experimental_endpoints_api_spec.rb +27 -0
- data/spec/models/all_user_accounts_response_spec.rb +29 -0
- metadata +236 -233
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aa858a86d922e9a3c017b09530fdccbb3c39505f9f7086d04c49b858ec56dc95
|
|
4
|
+
data.tar.gz: 866202c7c7be9671c1ccbbc7396532abed2e35d08c1de5e67eb868f3779a1a05
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
[](https://rubygems.org/gems/snaptrade/versions/3.0.30)
|
|
67
67
|
[](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.
|
|
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.
|
|
@@ -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 `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.
|
|
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 `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).
|
|
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.
|
|
@@ -0,0 +1,225 @@
|
|
|
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
|
+
# Accounts across all of the user's connections.
|
|
15
|
+
class AllUserAccountsResponse
|
|
16
|
+
# Accounts returned for the request.
|
|
17
|
+
attr_accessor :results
|
|
18
|
+
|
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
|
+
def self.attribute_map
|
|
21
|
+
{
|
|
22
|
+
:'results' => :'results'
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Returns all the JSON keys this model knows about
|
|
27
|
+
def self.acceptable_attributes
|
|
28
|
+
attribute_map.values
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Attribute type mapping.
|
|
32
|
+
def self.openapi_types
|
|
33
|
+
{
|
|
34
|
+
:'results' => :'Array<ConnectionAccount>'
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# List of attributes with nullable: true
|
|
39
|
+
def self.openapi_nullable
|
|
40
|
+
Set.new([
|
|
41
|
+
])
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Initializes the object
|
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
46
|
+
def initialize(attributes = {})
|
|
47
|
+
if (!attributes.is_a?(Hash))
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::AllUserAccountsResponse` initialize method"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::AllUserAccountsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
55
|
+
end
|
|
56
|
+
h[k.to_sym] = v
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if attributes.key?(:'results')
|
|
60
|
+
if (value = attributes[:'results']).is_a?(Array)
|
|
61
|
+
self.results = value
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
67
|
+
# @return Array for valid properties with the reasons
|
|
68
|
+
def list_invalid_properties
|
|
69
|
+
invalid_properties = Array.new
|
|
70
|
+
if @results.nil?
|
|
71
|
+
invalid_properties.push('invalid value for "results", results cannot be nil.')
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
invalid_properties
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Check to see if the all the properties in the model are valid
|
|
78
|
+
# @return true if the model is valid
|
|
79
|
+
def valid?
|
|
80
|
+
return false if @results.nil?
|
|
81
|
+
true
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Checks equality by comparing each attribute.
|
|
85
|
+
# @param [Object] Object to be compared
|
|
86
|
+
def ==(o)
|
|
87
|
+
return true if self.equal?(o)
|
|
88
|
+
self.class == o.class &&
|
|
89
|
+
results == o.results
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# @see the `==` method
|
|
93
|
+
# @param [Object] Object to be compared
|
|
94
|
+
def eql?(o)
|
|
95
|
+
self == o
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Calculates hash code according to all attributes.
|
|
99
|
+
# @return [Integer] Hash code
|
|
100
|
+
def hash
|
|
101
|
+
[results].hash
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Builds the object from hash
|
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
|
+
# @return [Object] Returns the model itself
|
|
107
|
+
def self.build_from_hash(attributes)
|
|
108
|
+
new.build_from_hash(attributes)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Builds the object from hash
|
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
113
|
+
# @return [Object] Returns the model itself
|
|
114
|
+
def build_from_hash(attributes)
|
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
|
116
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
117
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
118
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
119
|
+
self.send("#{key}=", nil)
|
|
120
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
121
|
+
# check to ensure the input is an array given that the attribute
|
|
122
|
+
# is documented as an array but the input is not
|
|
123
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
124
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
125
|
+
end
|
|
126
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
127
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
self
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Deserializes the data based on type
|
|
135
|
+
# @param string type Data type
|
|
136
|
+
# @param string value Value to be deserialized
|
|
137
|
+
# @return [Object] Deserialized data
|
|
138
|
+
def _deserialize(type, value)
|
|
139
|
+
case type.to_sym
|
|
140
|
+
when :Time
|
|
141
|
+
Time.parse(value)
|
|
142
|
+
when :Date
|
|
143
|
+
Date.parse(value)
|
|
144
|
+
when :String
|
|
145
|
+
value.to_s
|
|
146
|
+
when :Integer
|
|
147
|
+
value.to_i
|
|
148
|
+
when :Float
|
|
149
|
+
value.to_f
|
|
150
|
+
when :Boolean
|
|
151
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
152
|
+
true
|
|
153
|
+
else
|
|
154
|
+
false
|
|
155
|
+
end
|
|
156
|
+
when :Object
|
|
157
|
+
# generic object (usually a Hash), return directly
|
|
158
|
+
value
|
|
159
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
160
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
161
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
162
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
163
|
+
k_type = Regexp.last_match[:k_type]
|
|
164
|
+
v_type = Regexp.last_match[:v_type]
|
|
165
|
+
{}.tap do |hash|
|
|
166
|
+
value.each do |k, v|
|
|
167
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
else # model
|
|
171
|
+
# models (e.g. Pet) or oneOf
|
|
172
|
+
klass = SnapTrade.const_get(type)
|
|
173
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns the string representation of the object
|
|
178
|
+
# @return [String] String presentation of the object
|
|
179
|
+
def to_s
|
|
180
|
+
to_hash.to_s
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_body
|
|
186
|
+
to_hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Returns the object in the form of hash
|
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
|
191
|
+
def to_hash
|
|
192
|
+
hash = {}
|
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
194
|
+
value = self.send(attr)
|
|
195
|
+
if value.nil?
|
|
196
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
197
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
hash[param] = _to_hash(value)
|
|
201
|
+
end
|
|
202
|
+
hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Outputs non-array value in the form of hash
|
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
207
|
+
# @param [Object] value Any valid value
|
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
|
209
|
+
def _to_hash(value)
|
|
210
|
+
if value.is_a?(Array)
|
|
211
|
+
value.compact.map { |v| _to_hash(v) }
|
|
212
|
+
elsif value.is_a?(Hash)
|
|
213
|
+
{}.tap do |hash|
|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
215
|
+
end
|
|
216
|
+
elsif value.respond_to? :to_hash
|
|
217
|
+
value.to_hash
|
|
218
|
+
else
|
|
219
|
+
value
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
end
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module SnapTrade
|
|
14
|
-
# A single account under a connection, from the `kind`-discriminated union used by `Connections_listConnectionAccounts`. Use `kind` to determine which schema is present. `investment`, `deposit`, and `line_of_credit` are implemented today.
|
|
14
|
+
# A single account under a connection, from the `kind`-discriminated union used by `Connections_listConnectionAccounts` and `AccountInformation_listAllUserAccounts`. Use `kind` to determine which schema is present. `investment`, `deposit`, and `line_of_credit` are implemented today.
|
|
15
15
|
module ConnectionAccount
|
|
16
16
|
class << self
|
|
17
17
|
# List of class defined in oneOf (OpenAPI v3)
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module SnapTrade
|
|
14
|
-
# An investment account under a connection. `opening_date`, `funding_date`, and `net_value` are real-time or cached depending on the caller's plan -- see `Connections_listConnectionAccounts`.
|
|
14
|
+
# An investment account under a connection. `opening_date`, `funding_date`, and `net_value` are real-time or cached depending on the caller's plan -- see `Connections_listConnectionAccounts` -- and always cached on `AccountInformation_listAllUserAccounts`.
|
|
15
15
|
class InvestmentAccount
|
|
16
16
|
# Discriminator for the account kind.
|
|
17
17
|
attr_accessor :kind
|
data/lib/snaptrade/version.rb
CHANGED
data/lib/snaptrade.rb
CHANGED
|
@@ -55,6 +55,7 @@ require 'snaptrade/models/adr_instrument'
|
|
|
55
55
|
require 'snaptrade/models/adr_instrument_kind'
|
|
56
56
|
require 'snaptrade/models/all_account_positions_response'
|
|
57
57
|
require 'snaptrade/models/all_account_positions_response_data_freshness'
|
|
58
|
+
require 'snaptrade/models/all_user_accounts_response'
|
|
58
59
|
require 'snaptrade/models/auth_type'
|
|
59
60
|
require 'snaptrade/models/authentication_login_snap_trade_user200_response'
|
|
60
61
|
require 'snaptrade/models/balance'
|
|
@@ -53,6 +53,20 @@ describe 'ExperimentalEndpointsApi' do
|
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
+
# unit tests for get_account_details
|
|
57
|
+
# Get account details
|
|
58
|
+
# 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.
|
|
59
|
+
# @param user_id
|
|
60
|
+
# @param user_secret
|
|
61
|
+
# @param account_id
|
|
62
|
+
# @param [Hash] opts the optional parameters
|
|
63
|
+
# @return [ConnectionAccount]
|
|
64
|
+
describe 'get_account_details test' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
56
70
|
# unit tests for get_user_account_order_detail_v2
|
|
57
71
|
# Get account order detail (V2)
|
|
58
72
|
# 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 `legs` list field. If the order is single legged, `legs` 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.
|
|
@@ -99,6 +113,19 @@ describe 'ExperimentalEndpointsApi' do
|
|
|
99
113
|
end
|
|
100
114
|
end
|
|
101
115
|
|
|
116
|
+
# unit tests for list_all_user_accounts
|
|
117
|
+
# List all user accounts
|
|
118
|
+
# 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).
|
|
119
|
+
# @param user_id
|
|
120
|
+
# @param user_secret
|
|
121
|
+
# @param [Hash] opts the optional parameters
|
|
122
|
+
# @return [AllUserAccountsResponse]
|
|
123
|
+
describe 'list_all_user_accounts test' do
|
|
124
|
+
it 'should work' do
|
|
125
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
102
129
|
# unit tests for list_subscriptions
|
|
103
130
|
# List active Trade Detection subscriptions
|
|
104
131
|
# Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
|
|
@@ -0,0 +1,29 @@
|
|
|
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 'spec_helper'
|
|
11
|
+
require 'json'
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
# Unit tests for SnapTrade::AllUserAccountsResponse
|
|
15
|
+
describe SnapTrade::AllUserAccountsResponse do
|
|
16
|
+
let(:instance) { SnapTrade::AllUserAccountsResponse.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of AllUserAccountsResponse' do
|
|
19
|
+
it 'should create an instance of AllUserAccountsResponse' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::AllUserAccountsResponse)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "results"' do
|
|
24
|
+
it 'should work' do
|
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: snaptrade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.30
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -169,6 +169,7 @@ files:
|
|
|
169
169
|
- lib/snaptrade/models/adr_instrument_kind.rb
|
|
170
170
|
- lib/snaptrade/models/all_account_positions_response.rb
|
|
171
171
|
- lib/snaptrade/models/all_account_positions_response_data_freshness.rb
|
|
172
|
+
- lib/snaptrade/models/all_user_accounts_response.rb
|
|
172
173
|
- lib/snaptrade/models/auth_type.rb
|
|
173
174
|
- lib/snaptrade/models/authentication_login_snap_trade_user200_response.rb
|
|
174
175
|
- lib/snaptrade/models/balance.rb
|
|
@@ -432,6 +433,7 @@ files:
|
|
|
432
433
|
- spec/models/adr_instrument_spec.rb
|
|
433
434
|
- spec/models/all_account_positions_response_data_freshness_spec.rb
|
|
434
435
|
- spec/models/all_account_positions_response_spec.rb
|
|
436
|
+
- spec/models/all_user_accounts_response_spec.rb
|
|
435
437
|
- spec/models/auth_type_spec.rb
|
|
436
438
|
- spec/models/authentication_login_snap_trade_user200_response_spec.rb
|
|
437
439
|
- spec/models/balance_currency_spec.rb
|
|
@@ -674,268 +676,269 @@ signing_key:
|
|
|
674
676
|
specification_version: 4
|
|
675
677
|
summary: SnapTrade Ruby Gem
|
|
676
678
|
test_files:
|
|
677
|
-
- spec/api/reference_data_api_spec.rb
|
|
678
679
|
- spec/api/experimental_endpoints_api_spec.rb
|
|
679
680
|
- spec/api/trading_api_spec.rb
|
|
680
|
-
- spec/api/authentication_api_spec.rb
|
|
681
681
|
- spec/api/account_information_api_spec.rb
|
|
682
682
|
- spec/api/connections_api_spec.rb
|
|
683
|
+
- spec/api/reference_data_api_spec.rb
|
|
684
|
+
- spec/api/authentication_api_spec.rb
|
|
683
685
|
- spec/api/api_status_api_spec.rb
|
|
684
686
|
- spec/api_client_spec.rb
|
|
685
687
|
- spec/configuration_spec.rb
|
|
686
688
|
- spec/getting_started_spec.rb
|
|
687
|
-
- spec/models/
|
|
688
|
-
- spec/models/
|
|
689
|
-
- spec/models/complex_order_response_type_spec.rb
|
|
690
|
-
- spec/models/order_type_strict_spec.rb
|
|
691
|
-
- spec/models/model500_unexpected_exception_response_spec.rb
|
|
692
|
-
- spec/models/model503_brokerage_request_response_spec.rb
|
|
693
|
-
- spec/models/balance_currency_spec.rb
|
|
694
|
-
- spec/models/simple_order_form_time_in_force_spec.rb
|
|
695
|
-
- spec/models/mutual_fund_instrument_kind_spec.rb
|
|
696
|
-
- spec/models/brokerage_authorization_transactions_sync_confirmation_spec.rb
|
|
697
|
-
- spec/models/manual_trade_symbol_spec.rb
|
|
698
|
-
- spec/models/account_category_spec.rb
|
|
699
|
-
- spec/models/mleg_instrument_type_spec.rb
|
|
700
|
-
- spec/models/option_quote_greeks_spec.rb
|
|
701
|
-
- spec/models/model400_failed_request_response_spec.rb
|
|
702
|
-
- spec/models/account_order_record_trailing_stop_spec.rb
|
|
703
|
-
- spec/models/institution_connection_spec.rb
|
|
704
|
-
- spec/models/o_auth_webhook_base_spec.rb
|
|
705
|
-
- spec/models/trade_detection_cancel_subscription_response_spec.rb
|
|
706
|
-
- spec/models/snaptrade_spec.rb
|
|
707
|
-
- spec/models/login_redirect_uri_spec.rb
|
|
708
|
-
- spec/models/option_chain_inner_spec.rb
|
|
709
|
-
- spec/models/cfd_instrument_spec.rb
|
|
710
|
-
- spec/models/encrypted_response_encrypted_message_data_spec.rb
|
|
711
|
-
- spec/models/account_type_spec.rb
|
|
712
|
-
- spec/models/account_order_record_leg_instrument_spec.rb
|
|
713
|
-
- spec/models/model402_brokerage_auth_already_disabled_exception_spec.rb
|
|
714
|
-
- spec/models/cryptocurrency_pair_quote_spec.rb
|
|
715
|
-
- spec/models/action_strict_spec.rb
|
|
716
|
-
- spec/models/future_option_instrument_spec.rb
|
|
717
|
-
- spec/models/symbol_spec.rb
|
|
718
|
-
- spec/models/time_in_force_strict_spec.rb
|
|
719
|
-
- spec/models/underlying_tokenized_asset_instrument_spec.rb
|
|
720
|
-
- spec/models/mleg_trading_instrument_spec.rb
|
|
721
|
-
- spec/models/option_instrument_kind_spec.rb
|
|
722
|
-
- spec/models/price_effect_spec.rb
|
|
723
|
-
- spec/models/account_sync_status_spec.rb
|
|
724
|
-
- spec/models/account_universal_activity_symbol_spec.rb
|
|
725
|
-
- spec/models/mleg_trade_form_spec.rb
|
|
726
|
-
- spec/models/brokerage_type_spec.rb
|
|
727
|
-
- spec/models/auth_type_spec.rb
|
|
728
|
-
- spec/models/snap_trade_holdings_account_spec.rb
|
|
689
|
+
- spec/models/manual_trade_place_time_in_force_strict_spec.rb
|
|
690
|
+
- spec/models/adr_instrument_kind_spec.rb
|
|
729
691
|
- spec/models/strategy_order_record_status_spec.rb
|
|
730
|
-
- spec/models/
|
|
731
|
-
- spec/models/
|
|
732
|
-
- spec/models/
|
|
733
|
-
- spec/models/
|
|
734
|
-
- spec/models/
|
|
735
|
-
- spec/models/security_type_spec.rb
|
|
736
|
-
- spec/models/brokerage_authorization_disabled_confirmation_spec.rb
|
|
737
|
-
- spec/models/trading_instrument_type_spec.rb
|
|
738
|
-
- spec/models/trading_get_user_account_option_quotes410_response_spec.rb
|
|
739
|
-
- spec/models/account_value_history_item_spec.rb
|
|
740
|
-
- spec/models/trade_detection_subscription_spec.rb
|
|
741
|
-
- spec/models/cancel_order_response_spec.rb
|
|
742
|
-
- spec/models/line_of_credit_account_kind_spec.rb
|
|
743
|
-
- spec/models/cash_change_direction_spec.rb
|
|
744
|
-
- spec/models/manual_trade_and_impact_spec.rb
|
|
745
|
-
- spec/models/mleg_price_effect_strict_spec.rb
|
|
746
|
-
- spec/models/account_order_record_leg_spec.rb
|
|
747
|
-
- spec/models/crypto_order_preview_spec.rb
|
|
748
|
-
- spec/models/manual_trade_form_notional_value_spec.rb
|
|
749
|
-
- spec/models/universal_symbol_spec.rb
|
|
750
|
-
- spec/models/option_chain_inner_chain_per_root_inner_spec.rb
|
|
751
|
-
- spec/models/complex_order_leg_order_role_spec.rb
|
|
752
|
-
- spec/models/model425_failed_request_response_spec.rb
|
|
753
|
-
- spec/models/account_value_history_response_spec.rb
|
|
754
|
-
- spec/models/account_universal_activity_option_symbol_spec.rb
|
|
755
|
-
- spec/models/line_of_credit_account_sync_status_spec.rb
|
|
756
|
-
- spec/models/rate_of_return_response_spec.rb
|
|
757
|
-
- spec/models/all_account_positions_response_spec.rb
|
|
758
|
-
- spec/models/option_strategy_spec.rb
|
|
759
|
-
- spec/models/account_order_record_quote_currency_spec.rb
|
|
760
|
-
- spec/models/account_order_record_child_brokerage_order_ids_spec.rb
|
|
761
|
-
- spec/models/brokerage_spec.rb
|
|
762
|
-
- spec/models/options_position_currency_spec.rb
|
|
763
|
-
- spec/models/take_profit_spec.rb
|
|
764
|
-
- spec/models/past_value_spec.rb
|
|
765
|
-
- spec/models/manual_trade_replace_form_spec.rb
|
|
766
|
-
- spec/models/monthly_dividends_spec.rb
|
|
767
|
-
- spec/models/underlying_symbol_type_spec.rb
|
|
768
|
-
- spec/models/exchange_spec.rb
|
|
769
|
-
- spec/models/symbol_query_spec.rb
|
|
770
|
-
- spec/models/other_instrument_spec.rb
|
|
692
|
+
- spec/models/institution_spec.rb
|
|
693
|
+
- spec/models/investment_account_spec.rb
|
|
694
|
+
- spec/models/brokerage_authorization_type_read_only_spec.rb
|
|
695
|
+
- spec/models/account_information_get_user_account_order_detail_request_spec.rb
|
|
696
|
+
- spec/models/model404_failed_request_response_spec.rb
|
|
771
697
|
- spec/models/other_instrument_kind_spec.rb
|
|
772
|
-
- spec/models/
|
|
773
|
-
- spec/models/
|
|
774
|
-
- spec/models/
|
|
775
|
-
- spec/models/
|
|
776
|
-
- spec/models/mleg_leg_spec.rb
|
|
777
|
-
- spec/models/account_balance_total_spec.rb
|
|
698
|
+
- spec/models/rate_of_return_object_spec.rb
|
|
699
|
+
- spec/models/transactions_status_spec.rb
|
|
700
|
+
- spec/models/model403_feature_not_enabled_response_spec.rb
|
|
701
|
+
- spec/models/manual_trade_replace_form_spec.rb
|
|
778
702
|
- spec/models/crypto_order_preview_estimated_fee_spec.rb
|
|
779
|
-
- spec/models/mleg_action_strict_spec.rb
|
|
780
|
-
- spec/models/connection_account_spec.rb
|
|
781
|
-
- spec/models/account_holdings_account_spec.rb
|
|
782
|
-
- spec/models/encrypted_response_spec.rb
|
|
783
703
|
- spec/models/brokerage_authorization_data_freshness_mode_spec.rb
|
|
784
|
-
- spec/models/account_order_record_status_spec.rb
|
|
785
|
-
- spec/models/transactions_status_spec.rb
|
|
786
|
-
- spec/models/tokenized_asset_instrument_spec.rb
|
|
787
|
-
- spec/models/stock_instrument_spec.rb
|
|
788
|
-
- spec/models/us_exchange_spec.rb
|
|
789
|
-
- spec/models/snap_trade_register_user_request_body_spec.rb
|
|
790
704
|
- spec/models/delete_connection_confirmation_spec.rb
|
|
791
|
-
- spec/models/
|
|
792
|
-
- spec/models/
|
|
705
|
+
- spec/models/cfd_instrument_kind_spec.rb
|
|
706
|
+
- spec/models/line_of_credit_account_kind_spec.rb
|
|
707
|
+
- spec/models/model425_failed_request_response_spec.rb
|
|
708
|
+
- spec/models/crypto_instrument_spec.rb
|
|
709
|
+
- spec/models/balance_currency_spec.rb
|
|
710
|
+
- spec/models/deposit_account_net_value_spec.rb
|
|
711
|
+
- spec/models/trade_detection_cancel_subscription_response_spec.rb
|
|
712
|
+
- spec/models/mleg_action_strict_spec.rb
|
|
713
|
+
- spec/models/account_simple_spec.rb
|
|
714
|
+
- spec/models/account_universal_activity_currency_spec.rb
|
|
715
|
+
- spec/models/monthly_dividends_spec.rb
|
|
716
|
+
- spec/models/deposit_account_sync_status_spec.rb
|
|
717
|
+
- spec/models/option_instrument_option_type_spec.rb
|
|
718
|
+
- spec/models/security_type_spec.rb
|
|
719
|
+
- spec/models/strategy_type_spec.rb
|
|
720
|
+
- spec/models/account_category_spec.rb
|
|
721
|
+
- spec/models/strategy_quotes_spec.rb
|
|
793
722
|
- spec/models/delete_user_response_spec.rb
|
|
794
|
-
- spec/models/
|
|
723
|
+
- spec/models/position_currency_spec.rb
|
|
724
|
+
- spec/models/crypto_trading_instrument_spec.rb
|
|
725
|
+
- spec/models/login_redirect_uri_spec.rb
|
|
726
|
+
- spec/models/account_universal_activity_option_symbol_spec.rb
|
|
727
|
+
- spec/models/manual_trade_form_complex_spec.rb
|
|
728
|
+
- spec/models/complex_order_leg_order_role_spec.rb
|
|
729
|
+
- spec/models/complex_order_leg_spec.rb
|
|
730
|
+
- spec/models/notional_value_spec.rb
|
|
731
|
+
- spec/models/option_chain_inner_chain_per_root_inner_spec.rb
|
|
732
|
+
- spec/models/manual_trade_form_with_options_spec.rb
|
|
733
|
+
- spec/models/session_event_spec.rb
|
|
795
734
|
- spec/models/user_i_dand_secret_spec.rb
|
|
796
|
-
- spec/models/
|
|
797
|
-
- spec/models/
|
|
798
|
-
- spec/models/
|
|
799
|
-
- spec/models/
|
|
800
|
-
- spec/models/
|
|
801
|
-
- spec/models/
|
|
802
|
-
- spec/models/
|
|
803
|
-
- spec/models/
|
|
804
|
-
- spec/models/
|
|
805
|
-
- spec/models/model404_failed_request_response_spec.rb
|
|
735
|
+
- spec/models/figi_instrument_spec.rb
|
|
736
|
+
- spec/models/account_order_record_v2_spec.rb
|
|
737
|
+
- spec/models/account_order_record_status_v2_spec.rb
|
|
738
|
+
- spec/models/brokerage_authorization_transactions_sync_confirmation_spec.rb
|
|
739
|
+
- spec/models/cef_instrument_kind_spec.rb
|
|
740
|
+
- spec/models/snaptrade_spec.rb
|
|
741
|
+
- spec/models/option_quote_greeks_spec.rb
|
|
742
|
+
- spec/models/action_strict_spec.rb
|
|
743
|
+
- spec/models/line_of_credit_account_available_credit_spec.rb
|
|
806
744
|
- spec/models/investment_account_net_value_spec.rb
|
|
807
|
-
- spec/models/
|
|
808
|
-
- spec/models/
|
|
809
|
-
- spec/models/
|
|
810
|
-
- spec/models/
|
|
811
|
-
- spec/models/
|
|
812
|
-
- spec/models/
|
|
813
|
-
- spec/models/
|
|
814
|
-
- spec/models/
|
|
815
|
-
- spec/models/
|
|
816
|
-
- spec/models/
|
|
817
|
-
- spec/models/
|
|
818
|
-
- spec/models/
|
|
819
|
-
- spec/models/
|
|
820
|
-
- spec/models/
|
|
821
|
-
- spec/models/
|
|
822
|
-
- spec/models/
|
|
823
|
-
- spec/models/
|
|
824
|
-
- spec/models/account_holdings_spec.rb
|
|
825
|
-
- spec/models/line_of_credit_account_spec.rb
|
|
826
|
-
- spec/models/underlying_symbol_exchange_spec.rb
|
|
827
|
-
- spec/models/option_impact_spec.rb
|
|
828
|
-
- spec/models/adr_instrument_kind_spec.rb
|
|
829
|
-
- spec/models/holdings_status_spec.rb
|
|
830
|
-
- spec/models/deposit_account_net_value_spec.rb
|
|
831
|
-
- spec/models/account_order_record_v2_order_role_spec.rb
|
|
832
|
-
- spec/models/balance_spec.rb
|
|
833
|
-
- spec/models/order_updated_response_order_spec.rb
|
|
834
|
-
- spec/models/instrument_spec.rb
|
|
835
|
-
- spec/models/action_strict_with_options_spec.rb
|
|
836
|
-
- spec/models/etf_instrument_spec.rb
|
|
837
|
-
- spec/models/type_spec.rb
|
|
838
|
-
- spec/models/deposit_account_sync_status_spec.rb
|
|
839
|
-
- spec/models/all_account_positions_response_data_freshness_spec.rb
|
|
840
|
-
- spec/models/connection_type_spec.rb
|
|
745
|
+
- spec/models/trading_instrument_spec.rb
|
|
746
|
+
- spec/models/deposit_account_spec.rb
|
|
747
|
+
- spec/models/us_exchange_spec.rb
|
|
748
|
+
- spec/models/account_value_history_response_spec.rb
|
|
749
|
+
- spec/models/trade_detection_cancel_subscription_request_spec.rb
|
|
750
|
+
- spec/models/underlying_option_instrument_spec.rb
|
|
751
|
+
- spec/models/position_symbol_spec.rb
|
|
752
|
+
- spec/models/connection_account_sync_status_spec.rb
|
|
753
|
+
- spec/models/strategy_order_record_spec.rb
|
|
754
|
+
- spec/models/underlying_symbol_spec.rb
|
|
755
|
+
- spec/models/order_updated_response_spec.rb
|
|
756
|
+
- spec/models/account_order_record_leg_spec.rb
|
|
757
|
+
- spec/models/institution_connection_spec.rb
|
|
758
|
+
- spec/models/etf_instrument_kind_spec.rb
|
|
759
|
+
- spec/models/line_of_credit_account_sync_status_spec.rb
|
|
760
|
+
- spec/models/symbol_currency_spec.rb
|
|
761
|
+
- spec/models/timeframe_spec.rb
|
|
841
762
|
- spec/models/model501_not_implemented_response_spec.rb
|
|
842
|
-
- spec/models/
|
|
843
|
-
- spec/models/account_simple_spec.rb
|
|
844
|
-
- spec/models/account_position_spec.rb
|
|
845
|
-
- spec/models/account_balance_spec.rb
|
|
846
|
-
- spec/models/crypto_trading_instrument_type_spec.rb
|
|
847
|
-
- spec/models/account_order_record_status_v2_spec.rb
|
|
848
|
-
- spec/models/tax_lot_spec.rb
|
|
849
|
-
- spec/models/trading_session_spec.rb
|
|
850
|
-
- spec/models/crypto_order_form_spec.rb
|
|
851
|
-
- spec/models/recent_orders_response_spec.rb
|
|
763
|
+
- spec/models/account_status_spec.rb
|
|
852
764
|
- spec/models/symbols_quotes_inner_spec.rb
|
|
765
|
+
- spec/models/brokerage_authorization_disabled_confirmation_spec.rb
|
|
766
|
+
- spec/models/mleg_order_type_strict_spec.rb
|
|
767
|
+
- spec/models/option_strategy_spec.rb
|
|
768
|
+
- spec/models/manual_trade_symbol_spec.rb
|
|
769
|
+
- spec/models/account_holdings_spec.rb
|
|
853
770
|
- spec/models/trading_search_cryptocurrency_pair_instruments200_response_spec.rb
|
|
771
|
+
- spec/models/cryptocurrency_pair_spec.rb
|
|
772
|
+
- spec/models/recent_orders_response_spec.rb
|
|
773
|
+
- spec/models/strategy_quotes_greek_spec.rb
|
|
774
|
+
- spec/models/snap_trade_holdings_total_value_spec.rb
|
|
775
|
+
- spec/models/model400_failed_request_response_spec.rb
|
|
776
|
+
- spec/models/crypto_order_form_spec.rb
|
|
777
|
+
- spec/models/underlying_cfd_instrument_spec.rb
|
|
778
|
+
- spec/models/past_value_spec.rb
|
|
779
|
+
- spec/models/account_value_history_item_spec.rb
|
|
780
|
+
- spec/models/trade_detection_subscription_spec.rb
|
|
781
|
+
- spec/models/manual_trade_spec.rb
|
|
782
|
+
- spec/models/session_event_type_spec.rb
|
|
783
|
+
- spec/models/net_dividend_spec.rb
|
|
784
|
+
- spec/models/crypto_trading_instrument_type_spec.rb
|
|
785
|
+
- spec/models/account_type_spec.rb
|
|
786
|
+
- spec/models/future_instrument_kind_spec.rb
|
|
787
|
+
- spec/models/model503_brokerage_request_response_spec.rb
|
|
854
788
|
- spec/models/option_leg_action_spec.rb
|
|
855
|
-
- spec/models/
|
|
856
|
-
- spec/models/
|
|
857
|
-
- spec/models/
|
|
858
|
-
- spec/models/
|
|
859
|
-
- spec/models/
|
|
860
|
-
- spec/models/strategy_order_record_spec.rb
|
|
789
|
+
- spec/models/option_instrument_spec.rb
|
|
790
|
+
- spec/models/mutual_fund_instrument_kind_spec.rb
|
|
791
|
+
- spec/models/crypto_order_form_time_in_force_spec.rb
|
|
792
|
+
- spec/models/account_order_record_child_brokerage_order_ids_spec.rb
|
|
793
|
+
- spec/models/crypto_order_preview_spec.rb
|
|
861
794
|
- spec/models/currency_spec.rb
|
|
862
|
-
- spec/models/
|
|
863
|
-
- spec/models/
|
|
864
|
-
- spec/models/account_orders_v2_response_spec.rb
|
|
865
|
-
- spec/models/connection_accounts_response_spec.rb
|
|
866
|
-
- spec/models/release_stage_spec.rb
|
|
867
|
-
- spec/models/options_symbol_option_type_spec.rb
|
|
868
|
-
- spec/models/crypto_instrument_spec.rb
|
|
869
|
-
- spec/models/manual_trade_impact_spec.rb
|
|
870
|
-
- spec/models/rate_of_return_object_spec.rb
|
|
795
|
+
- spec/models/time_in_force_strict_spec.rb
|
|
796
|
+
- spec/models/account_order_record_quote_currency_spec.rb
|
|
871
797
|
- spec/models/manual_trade_form_complex_type_spec.rb
|
|
798
|
+
- spec/models/future_option_instrument_spec.rb
|
|
799
|
+
- spec/models/option_chain_inner_spec.rb
|
|
800
|
+
- spec/models/mleg_trade_form_spec.rb
|
|
801
|
+
- spec/models/all_user_accounts_response_spec.rb
|
|
802
|
+
- spec/models/simple_order_form_type_spec.rb
|
|
803
|
+
- spec/models/manual_trade_impact_spec.rb
|
|
804
|
+
- spec/models/cef_instrument_spec.rb
|
|
872
805
|
- spec/models/complex_order_response_spec.rb
|
|
873
|
-
- spec/models/
|
|
874
|
-
- spec/models/underlying_symbol_spec.rb
|
|
875
|
-
- spec/models/crypto_instrument_kind_spec.rb
|
|
876
|
-
- spec/models/tokenized_asset_instrument_kind_spec.rb
|
|
877
|
-
- spec/models/manual_trade_balance_spec.rb
|
|
878
|
-
- spec/models/option_instrument_spec.rb
|
|
879
|
-
- spec/models/net_contributions_spec.rb
|
|
880
|
-
- spec/models/complex_order_leg_spec.rb
|
|
881
|
-
- spec/models/option_strategy_legs_inner_spec.rb
|
|
882
|
-
- spec/models/position_currency_spec.rb
|
|
883
|
-
- spec/models/strategy_quotes_greek_spec.rb
|
|
806
|
+
- spec/models/option_brokerage_symbol_spec.rb
|
|
884
807
|
- spec/models/stock_instrument_figi_instrument_spec.rb
|
|
885
|
-
- spec/models/performance_custom_spec.rb
|
|
886
|
-
- spec/models/manual_trade_form_spec.rb
|
|
887
|
-
- spec/models/session_event_spec.rb
|
|
888
|
-
- spec/models/mleg_order_response_spec.rb
|
|
889
|
-
- spec/models/connection_account_sync_status_spec.rb
|
|
890
|
-
- spec/models/exchange_rate_pairs_spec.rb
|
|
891
|
-
- spec/models/line_of_credit_account_net_value_spec.rb
|
|
892
|
-
- spec/models/account_information_get_user_account_order_detail_request_spec.rb
|
|
893
|
-
- spec/models/simple_order_form_spec.rb
|
|
894
|
-
- spec/models/options_position_spec.rb
|
|
895
|
-
- spec/models/brokerage_authorization_type_read_only_spec.rb
|
|
896
|
-
- spec/models/brokerage_authorization_institution_spec.rb
|
|
897
|
-
- spec/models/trading_instrument_spec.rb
|
|
898
|
-
- spec/models/institution_spec.rb
|
|
899
|
-
- spec/models/simple_order_form_type_spec.rb
|
|
900
|
-
- spec/models/option_quote_spec.rb
|
|
901
|
-
- spec/models/figi_instrument_spec.rb
|
|
902
|
-
- spec/models/kind_spec.rb
|
|
903
|
-
- spec/models/line_of_credit_account_minimum_payment_amount_spec.rb
|
|
904
|
-
- spec/models/manual_trade_spec.rb
|
|
905
|
-
- spec/models/investment_account_spec.rb
|
|
906
|
-
- spec/models/account_order_record_v2_spec.rb
|
|
907
|
-
- spec/models/brokerage_instrument_spec.rb
|
|
908
|
-
- spec/models/net_dividend_spec.rb
|
|
909
|
-
- spec/models/snap_trade_holdings_total_value_spec.rb
|
|
910
|
-
- spec/models/trade_detection_cancel_subscription_request_spec.rb
|
|
911
808
|
- spec/models/order_role_spec.rb
|
|
912
|
-
- spec/models/
|
|
913
|
-
- spec/models/
|
|
914
|
-
- spec/models/underlying_cfd_instrument_spec.rb
|
|
915
|
-
- spec/models/option_instrument_option_type_spec.rb
|
|
916
|
-
- spec/models/cef_instrument_kind_spec.rb
|
|
917
|
-
- spec/models/position_symbol_spec.rb
|
|
809
|
+
- spec/models/o_auth_webhook_base_spec.rb
|
|
810
|
+
- spec/models/option_quote_spec.rb
|
|
918
811
|
- spec/models/connection_portal_version_spec.rb
|
|
919
|
-
- spec/models/
|
|
920
|
-
- spec/models/
|
|
921
|
-
- spec/models/
|
|
922
|
-
- spec/models/
|
|
923
|
-
- spec/models/
|
|
924
|
-
- spec/models/
|
|
812
|
+
- spec/models/cryptocurrency_pair_quote_spec.rb
|
|
813
|
+
- spec/models/underlying_symbol_exchange_spec.rb
|
|
814
|
+
- spec/models/brokerage_authorization_type_read_only_brokerage_spec.rb
|
|
815
|
+
- spec/models/brokerage_type_spec.rb
|
|
816
|
+
- spec/models/snap_trade_login_user_request_body_spec.rb
|
|
817
|
+
- spec/models/stock_instrument_kind_spec.rb
|
|
925
818
|
- spec/models/brokerage_authorization_spec.rb
|
|
926
|
-
- spec/models/
|
|
927
|
-
- spec/models/
|
|
928
|
-
- spec/models/
|
|
929
|
-
- spec/models/
|
|
819
|
+
- spec/models/type_spec.rb
|
|
820
|
+
- spec/models/connection_type_spec.rb
|
|
821
|
+
- spec/models/cash_change_direction_spec.rb
|
|
822
|
+
- spec/models/account_balance_spec.rb
|
|
823
|
+
- spec/models/mleg_price_effect_strict_spec.rb
|
|
824
|
+
- spec/models/mutual_fund_instrument_spec.rb
|
|
930
825
|
- spec/models/account_universal_activity_spec.rb
|
|
931
|
-
- spec/models/
|
|
826
|
+
- spec/models/validated_trade_body_spec.rb
|
|
827
|
+
- spec/models/line_of_credit_account_net_value_spec.rb
|
|
828
|
+
- spec/models/release_stage_spec.rb
|
|
829
|
+
- spec/models/account_holdings_account_spec.rb
|
|
830
|
+
- spec/models/paginated_universal_activity_spec.rb
|
|
831
|
+
- spec/models/trading_get_user_account_option_quotes410_response_spec.rb
|
|
832
|
+
- spec/models/account_sync_status_spec.rb
|
|
833
|
+
- spec/models/brokerage_instrument_spec.rb
|
|
834
|
+
- spec/models/brokerage_authorization_institution_spec.rb
|
|
835
|
+
- spec/models/order_type_strict_spec.rb
|
|
836
|
+
- spec/models/simple_order_form_spec.rb
|
|
932
837
|
- spec/models/account_order_record_spec.rb
|
|
838
|
+
- spec/models/balance_spec.rb
|
|
839
|
+
- spec/models/model402_brokerage_auth_already_disabled_exception_spec.rb
|
|
840
|
+
- spec/models/snap_trade_holdings_account_spec.rb
|
|
841
|
+
- spec/models/exchange_rate_pairs_spec.rb
|
|
842
|
+
- spec/models/partner_data_spec.rb
|
|
843
|
+
- spec/models/trading_instrument_type_spec.rb
|
|
844
|
+
- spec/models/crypto_instrument_kind_spec.rb
|
|
845
|
+
- spec/models/option_impact_spec.rb
|
|
846
|
+
- spec/models/crypto_order_form_type_spec.rb
|
|
847
|
+
- spec/models/schema_version_spec.rb
|
|
848
|
+
- spec/models/option_instrument_kind_spec.rb
|
|
849
|
+
- spec/models/symbol_exchange_spec.rb
|
|
933
850
|
- spec/models/manual_trade_form_bracket_spec.rb
|
|
934
|
-
- spec/models/
|
|
935
|
-
- spec/models/
|
|
851
|
+
- spec/models/mleg_trading_instrument_spec.rb
|
|
852
|
+
- spec/models/account_order_record_status_spec.rb
|
|
853
|
+
- spec/models/tokenized_asset_instrument_kind_spec.rb
|
|
854
|
+
- spec/models/pagination_details_spec.rb
|
|
855
|
+
- spec/models/future_instrument_spec.rb
|
|
856
|
+
- spec/models/snap_trade_register_user_request_body_spec.rb
|
|
857
|
+
- spec/models/kind_spec.rb
|
|
858
|
+
- spec/models/order_updated_response_order_spec.rb
|
|
859
|
+
- spec/models/line_of_credit_account_minimum_payment_amount_spec.rb
|
|
860
|
+
- spec/models/universal_activity_spec.rb
|
|
861
|
+
- spec/models/connection_account_spec.rb
|
|
862
|
+
- spec/models/manual_trade_form_spec.rb
|
|
863
|
+
- spec/models/account_orders_v2_response_spec.rb
|
|
864
|
+
- spec/models/connection_accounts_response_spec.rb
|
|
865
|
+
- spec/models/options_position_currency_spec.rb
|
|
866
|
+
- spec/models/child_brokerage_order_ids_spec.rb
|
|
867
|
+
- spec/models/option_type_spec.rb
|
|
868
|
+
- spec/models/options_symbol_spec.rb
|
|
869
|
+
- spec/models/account_order_record_universal_symbol_spec.rb
|
|
870
|
+
- spec/models/symbol_query_spec.rb
|
|
871
|
+
- spec/models/encrypted_response_encrypted_message_data_spec.rb
|
|
872
|
+
- spec/models/brokerage_instruments_response_spec.rb
|
|
873
|
+
- spec/models/underlying_symbol_type_spec.rb
|
|
874
|
+
- spec/models/universal_symbol_spec.rb
|
|
875
|
+
- spec/models/account_order_record_leg_instrument_spec.rb
|
|
876
|
+
- spec/models/account_order_record_trailing_stop_spec.rb
|
|
877
|
+
- spec/models/take_profit_spec.rb
|
|
878
|
+
- spec/models/sub_period_return_rate_spec.rb
|
|
879
|
+
- spec/models/instrument_spec.rb
|
|
880
|
+
- spec/models/stop_loss_spec.rb
|
|
881
|
+
- spec/models/mleg_order_response_spec.rb
|
|
882
|
+
- spec/models/account_universal_activity_currency_universal_symbol_spec.rb
|
|
883
|
+
- spec/models/encrypted_response_spec.rb
|
|
884
|
+
- spec/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner_spec.rb
|
|
885
|
+
- spec/models/tax_lot_spec.rb
|
|
886
|
+
- spec/models/manual_trade_balance_spec.rb
|
|
936
887
|
- spec/models/option_leg_spec.rb
|
|
937
|
-
- spec/models/
|
|
888
|
+
- spec/models/options_position_spec.rb
|
|
889
|
+
- spec/models/simple_order_form_time_in_force_spec.rb
|
|
890
|
+
- spec/models/performance_custom_spec.rb
|
|
891
|
+
- spec/models/deposit_account_kind_spec.rb
|
|
892
|
+
- spec/models/price_effect_spec.rb
|
|
893
|
+
- spec/models/model401_failed_request_response_spec.rb
|
|
894
|
+
- spec/models/status_spec.rb
|
|
895
|
+
- spec/models/account_order_record_option_symbol_spec.rb
|
|
896
|
+
- spec/models/all_account_positions_response_data_freshness_spec.rb
|
|
897
|
+
- spec/models/brokerage_spec.rb
|
|
898
|
+
- spec/models/auth_type_spec.rb
|
|
899
|
+
- spec/models/cancel_order_response_spec.rb
|
|
900
|
+
- spec/models/tokenized_asset_instrument_spec.rb
|
|
901
|
+
- spec/models/exchange_spec.rb
|
|
902
|
+
- spec/models/cfd_instrument_spec.rb
|
|
903
|
+
- spec/models/trade_detection_add_subscription_request_spec.rb
|
|
904
|
+
- spec/models/dividend_at_date_spec.rb
|
|
905
|
+
- spec/models/options_symbol_option_type_spec.rb
|
|
906
|
+
- spec/models/underlying_tokenized_asset_instrument_spec.rb
|
|
907
|
+
- spec/models/brokerage_authorization_refresh_confirmation_spec.rb
|
|
908
|
+
- spec/models/model402_brokerage_auth_disabled_response_spec.rb
|
|
909
|
+
- spec/models/rate_of_return_response_spec.rb
|
|
910
|
+
- spec/models/other_instrument_spec.rb
|
|
911
|
+
- spec/models/trailing_stop_spec.rb
|
|
912
|
+
- spec/models/mleg_instrument_type_spec.rb
|
|
913
|
+
- spec/models/net_contributions_spec.rb
|
|
914
|
+
- spec/models/mleg_leg_spec.rb
|
|
915
|
+
- spec/models/stock_instrument_spec.rb
|
|
916
|
+
- spec/models/etf_instrument_spec.rb
|
|
917
|
+
- spec/models/action_strict_with_options_spec.rb
|
|
918
|
+
- spec/models/option_strategy_legs_inner_spec.rb
|
|
919
|
+
- spec/models/authentication_login_snap_trade_user200_response_spec.rb
|
|
920
|
+
- spec/models/all_account_positions_response_spec.rb
|
|
921
|
+
- spec/models/account_universal_activity_symbol_spec.rb
|
|
922
|
+
- spec/models/line_of_credit_account_spec.rb
|
|
923
|
+
- spec/models/symbol_spec.rb
|
|
924
|
+
- spec/models/model429_too_many_requests_response_spec.rb
|
|
925
|
+
- spec/models/complex_order_response_type_spec.rb
|
|
926
|
+
- spec/models/holdings_status_spec.rb
|
|
927
|
+
- spec/models/model500_unexpected_exception_response_spec.rb
|
|
928
|
+
- spec/models/manual_trade_and_impact_spec.rb
|
|
929
|
+
- spec/models/account_balance_total_spec.rb
|
|
930
|
+
- spec/models/account_order_record_v2_order_role_spec.rb
|
|
931
|
+
- spec/models/position_spec.rb
|
|
932
|
+
- spec/models/brokerage_authorization_type_read_only_type_spec.rb
|
|
933
|
+
- spec/models/model403_failed_request_response_spec.rb
|
|
934
|
+
- spec/models/adr_instrument_spec.rb
|
|
935
|
+
- spec/models/manual_trade_form_notional_value_spec.rb
|
|
936
|
+
- spec/models/future_option_instrument_kind_spec.rb
|
|
937
|
+
- spec/models/trading_session_spec.rb
|
|
938
|
+
- spec/models/account_position_spec.rb
|
|
939
|
+
- spec/models/account_spec.rb
|
|
940
|
+
- spec/models/account_order_record_quote_universal_symbol_spec.rb
|
|
941
|
+
- spec/regression/request_signing_spec.rb
|
|
938
942
|
- spec/regression/all_account_positions_spec.rb
|
|
939
943
|
- spec/regression/fixtures/all_account_positions.json
|
|
940
|
-
- spec/regression/request_signing_spec.rb
|
|
941
944
|
- spec/spec_helper.rb
|