snaptrade 3.0.18 → 3.0.20
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 +48 -48
- data/lib/snaptrade/api/account_information_api.rb +8 -4
- data/lib/snaptrade/api/connections_api.rb +119 -0
- data/lib/snaptrade/api/experimental_endpoints_api.rb +0 -123
- data/lib/snaptrade/models/future_option_instrument.rb +356 -0
- data/lib/snaptrade/models/future_option_instrument_kind.rb +36 -0
- data/lib/snaptrade/models/instrument.rb +2 -0
- data/lib/snaptrade/models/option_instrument.rb +1 -1
- data/lib/snaptrade/models/option_instrument_option_type.rb +37 -0
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +3 -0
- data/spec/api/account_information_api_spec.rb +1 -1
- data/spec/api/connections_api_spec.rb +14 -0
- data/spec/api/experimental_endpoints_api_spec.rb +0 -14
- data/spec/models/future_option_instrument_kind_spec.rb +23 -0
- data/spec/models/future_option_instrument_spec.rb +89 -0
- data/spec/models/option_instrument_option_type_spec.rb +23 -0
- metadata +226 -217
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2728542b882358a83a687f6d8b0a602346785d19bb81c1f20f1a67abc3a87486
|
|
4
|
+
data.tar.gz: 297c3d500284fabe41cf16902981a2ef48c4705a5697262f08beef9396317562
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac58ddfe1863fdaf49b9aa73a28e069e92e7f8b16d1da55f4919d68e65d9110bc6d36fb834656a4bc56c741b3ad738f01732441b614952e55da571c69b6a7367
|
|
7
|
+
data.tar.gz: 8dffc348479e9f98011d5d67d32ba13a7507ff45cea782b36176e72e3e25ed50ba10e4daa48fa30ab34af94a9aafb757ebf8f242ef08d69a7dc562e9bf13c393
|
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.20)
|
|
67
67
|
[](https://snaptrade.com/)
|
|
68
68
|
|
|
69
69
|
</div>
|
|
@@ -99,6 +99,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
99
99
|
* [`snaptrade.connections.disable_brokerage_authorization`](#snaptradeconnectionsdisable_brokerage_authorization)
|
|
100
100
|
* [`snaptrade.connections.list_brokerage_authorization_accounts`](#snaptradeconnectionslist_brokerage_authorization_accounts)
|
|
101
101
|
* [`snaptrade.connections.list_brokerage_authorizations`](#snaptradeconnectionslist_brokerage_authorizations)
|
|
102
|
+
* [`snaptrade.connections.list_connection_accounts`](#snaptradeconnectionslist_connection_accounts)
|
|
102
103
|
* [`snaptrade.connections.refresh_brokerage_authorization`](#snaptradeconnectionsrefresh_brokerage_authorization)
|
|
103
104
|
* [`snaptrade.connections.return_rates`](#snaptradeconnectionsreturn_rates)
|
|
104
105
|
* [`snaptrade.connections.sync_brokerage_authorization_transactions`](#snaptradeconnectionssync_brokerage_authorization_transactions)
|
|
@@ -107,7 +108,6 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
107
108
|
* [`snaptrade.experimental_endpoints.get_user_account_order_detail_v2`](#snaptradeexperimental_endpointsget_user_account_order_detail_v2)
|
|
108
109
|
* [`snaptrade.experimental_endpoints.get_user_account_orders_v2`](#snaptradeexperimental_endpointsget_user_account_orders_v2)
|
|
109
110
|
* [`snaptrade.experimental_endpoints.get_user_account_recent_orders_v2`](#snaptradeexperimental_endpointsget_user_account_recent_orders_v2)
|
|
110
|
-
* [`snaptrade.experimental_endpoints.list_connection_accounts`](#snaptradeexperimental_endpointslist_connection_accounts)
|
|
111
111
|
* [`snaptrade.experimental_endpoints.list_subscriptions`](#snaptradeexperimental_endpointslist_subscriptions)
|
|
112
112
|
* [`snaptrade.reference_data.get_partner_info`](#snaptradereference_dataget_partner_info)
|
|
113
113
|
* [`snaptrade.reference_data.get_stock_exchanges`](#snaptradereference_dataget_stock_exchanges)
|
|
@@ -139,7 +139,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
139
139
|
Add to Gemfile:
|
|
140
140
|
|
|
141
141
|
```ruby
|
|
142
|
-
gem 'snaptrade', '~> 3.0.
|
|
142
|
+
gem 'snaptrade', '~> 3.0.20'
|
|
143
143
|
```
|
|
144
144
|
|
|
145
145
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -307,7 +307,9 @@ p result
|
|
|
307
307
|
|
|
308
308
|
Returns a list of all positions in the specified account.
|
|
309
309
|
|
|
310
|
-
The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
310
|
+
The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
311
|
+
|
|
312
|
+
**Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change.
|
|
311
313
|
|
|
312
314
|
Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages).
|
|
313
315
|
|
|
@@ -1135,6 +1137,48 @@ p result
|
|
|
1135
1137
|
---
|
|
1136
1138
|
|
|
1137
1139
|
|
|
1140
|
+
### `snaptrade.connections.list_connection_accounts`<a id="snaptradeconnectionslist_connection_accounts"></a>
|
|
1141
|
+
|
|
1142
|
+
Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape.
|
|
1143
|
+
|
|
1144
|
+
Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema.
|
|
1145
|
+
|
|
1146
|
+
On Pay as you Go / Real-time, this endpoint refreshes each account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts.
|
|
1147
|
+
|
|
1148
|
+
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).
|
|
1149
|
+
|
|
1150
|
+
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.
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1154
|
+
|
|
1155
|
+
```ruby
|
|
1156
|
+
result = snaptrade.connections.list_connection_accounts(
|
|
1157
|
+
connection_id: "87b24961-b51e-4db8-9226-f198f6518a89",
|
|
1158
|
+
user_id: "snaptrade-user-123",
|
|
1159
|
+
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1160
|
+
)
|
|
1161
|
+
p result
|
|
1162
|
+
```
|
|
1163
|
+
|
|
1164
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1165
|
+
|
|
1166
|
+
##### connection_id: `String`<a id="connection_id-string"></a>
|
|
1167
|
+
##### user_id: `String`<a id="user_id-string"></a>
|
|
1168
|
+
##### user_secret: `String`<a id="user_secret-string"></a>
|
|
1169
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
1170
|
+
|
|
1171
|
+
[ConnectionAccount](./lib/snaptrade/models/connection_account.rb)
|
|
1172
|
+
|
|
1173
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1174
|
+
|
|
1175
|
+
`/connections/{connectionId}/accounts` `GET`
|
|
1176
|
+
|
|
1177
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1178
|
+
|
|
1179
|
+
---
|
|
1180
|
+
|
|
1181
|
+
|
|
1138
1182
|
### `snaptrade.connections.refresh_brokerage_authorization`<a id="snaptradeconnectionsrefresh_brokerage_authorization"></a>
|
|
1139
1183
|
|
|
1140
1184
|
Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection.
|
|
@@ -1457,50 +1501,6 @@ false to retrieve non executed orders as well
|
|
|
1457
1501
|
---
|
|
1458
1502
|
|
|
1459
1503
|
|
|
1460
|
-
### `snaptrade.experimental_endpoints.list_connection_accounts`<a id="snaptradeexperimental_endpointslist_connection_accounts"></a>
|
|
1461
|
-
|
|
1462
|
-
Experimental and subject to change without notice.
|
|
1463
|
-
|
|
1464
|
-
Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape.
|
|
1465
|
-
|
|
1466
|
-
Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema.
|
|
1467
|
-
|
|
1468
|
-
On Pay as you Go / Real-time, this endpoint refreshes each account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts.
|
|
1469
|
-
|
|
1470
|
-
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).
|
|
1471
|
-
|
|
1472
|
-
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.
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1476
|
-
|
|
1477
|
-
```ruby
|
|
1478
|
-
result = snaptrade.experimental_endpoints.list_connection_accounts(
|
|
1479
|
-
connection_id: "87b24961-b51e-4db8-9226-f198f6518a89",
|
|
1480
|
-
user_id: "snaptrade-user-123",
|
|
1481
|
-
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1482
|
-
)
|
|
1483
|
-
p result
|
|
1484
|
-
```
|
|
1485
|
-
|
|
1486
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1487
|
-
|
|
1488
|
-
##### connection_id: `String`<a id="connection_id-string"></a>
|
|
1489
|
-
##### user_id: `String`<a id="user_id-string"></a>
|
|
1490
|
-
##### user_secret: `String`<a id="user_secret-string"></a>
|
|
1491
|
-
#### 🔄 Return<a id="🔄-return"></a>
|
|
1492
|
-
|
|
1493
|
-
[ConnectionAccount](./lib/snaptrade/models/connection_account.rb)
|
|
1494
|
-
|
|
1495
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1496
|
-
|
|
1497
|
-
`/connections/{connectionId}/accounts` `GET`
|
|
1498
|
-
|
|
1499
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1500
|
-
|
|
1501
|
-
---
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
1504
|
### `snaptrade.experimental_endpoints.list_subscriptions`<a id="snaptradeexperimental_endpointslist_subscriptions"></a>
|
|
1505
1505
|
|
|
1506
1506
|
Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
|
|
@@ -290,7 +290,9 @@ module SnapTrade
|
|
|
290
290
|
#
|
|
291
291
|
# Returns a list of all positions in the specified account.
|
|
292
292
|
#
|
|
293
|
-
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
293
|
+
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
294
|
+
#
|
|
295
|
+
# **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change.
|
|
294
296
|
#
|
|
295
297
|
# Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages).
|
|
296
298
|
#
|
|
@@ -309,7 +311,9 @@ module SnapTrade
|
|
|
309
311
|
#
|
|
310
312
|
# Returns a list of all positions in the specified account.
|
|
311
313
|
#
|
|
312
|
-
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
314
|
+
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
315
|
+
#
|
|
316
|
+
# **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change.
|
|
313
317
|
#
|
|
314
318
|
# Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages).
|
|
315
319
|
#
|
|
@@ -324,7 +328,7 @@ module SnapTrade
|
|
|
324
328
|
end
|
|
325
329
|
|
|
326
330
|
# List all account positions
|
|
327
|
-
# 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, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
|
|
331
|
+
# 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, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
|
|
328
332
|
# @param user_id [String]
|
|
329
333
|
# @param user_secret [String]
|
|
330
334
|
# @param account_id [String]
|
|
@@ -336,7 +340,7 @@ module SnapTrade
|
|
|
336
340
|
end
|
|
337
341
|
|
|
338
342
|
# List all account positions
|
|
339
|
-
# 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, bonds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
|
|
343
|
+
# 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, bonds, crypto, futures, option positions, future option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
|
|
340
344
|
# @param user_id [String]
|
|
341
345
|
# @param user_secret [String]
|
|
342
346
|
# @param account_id [String]
|
|
@@ -550,6 +550,125 @@ module SnapTrade
|
|
|
550
550
|
end
|
|
551
551
|
|
|
552
552
|
|
|
553
|
+
# List accounts for a connection (discriminated union)
|
|
554
|
+
#
|
|
555
|
+
# Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape.
|
|
556
|
+
#
|
|
557
|
+
# Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema.
|
|
558
|
+
#
|
|
559
|
+
# On Pay as you Go / Real-time, this endpoint refreshes each account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts.
|
|
560
|
+
#
|
|
561
|
+
# 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).
|
|
562
|
+
#
|
|
563
|
+
# 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.
|
|
564
|
+
#
|
|
565
|
+
# @param connection_id [String]
|
|
566
|
+
# @param user_id [String]
|
|
567
|
+
# @param user_secret [String]
|
|
568
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
569
|
+
def list_connection_accounts(connection_id:, user_id:, user_secret:, extra: {})
|
|
570
|
+
data, _status_code, _headers = list_connection_accounts_with_http_info_impl(connection_id, user_id, user_secret, extra)
|
|
571
|
+
data
|
|
572
|
+
end
|
|
573
|
+
|
|
574
|
+
# List accounts for a connection (discriminated union)
|
|
575
|
+
#
|
|
576
|
+
# Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape.
|
|
577
|
+
#
|
|
578
|
+
# Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema.
|
|
579
|
+
#
|
|
580
|
+
# On Pay as you Go / Real-time, this endpoint refreshes each account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts.
|
|
581
|
+
#
|
|
582
|
+
# 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).
|
|
583
|
+
#
|
|
584
|
+
# 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.
|
|
585
|
+
#
|
|
586
|
+
# @param connection_id [String]
|
|
587
|
+
# @param user_id [String]
|
|
588
|
+
# @param user_secret [String]
|
|
589
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
590
|
+
def list_connection_accounts_with_http_info(connection_id:, user_id:, user_secret:, extra: {})
|
|
591
|
+
list_connection_accounts_with_http_info_impl(connection_id, user_id, user_secret, extra)
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
# List accounts for a connection (discriminated union)
|
|
595
|
+
# Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each 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.
|
|
596
|
+
# @param connection_id [String]
|
|
597
|
+
# @param user_id [String]
|
|
598
|
+
# @param user_secret [String]
|
|
599
|
+
# @param [Hash] opts the optional parameters
|
|
600
|
+
# @return [Array<ConnectionAccount>]
|
|
601
|
+
private def list_connection_accounts_impl(connection_id, user_id, user_secret, opts = {})
|
|
602
|
+
data, _status_code, _headers = list_connection_accounts_with_http_info(connection_id, user_id, user_secret, opts)
|
|
603
|
+
data
|
|
604
|
+
end
|
|
605
|
+
|
|
606
|
+
# List accounts for a connection (discriminated union)
|
|
607
|
+
# Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each 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.
|
|
608
|
+
# @param connection_id [String]
|
|
609
|
+
# @param user_id [String]
|
|
610
|
+
# @param user_secret [String]
|
|
611
|
+
# @param [Hash] opts the optional parameters
|
|
612
|
+
# @return [Array<(Array<ConnectionAccount>, Integer, Hash)>] Array<ConnectionAccount> data, response status code and response headers
|
|
613
|
+
private def list_connection_accounts_with_http_info_impl(connection_id, user_id, user_secret, opts = {})
|
|
614
|
+
if @api_client.config.debugging
|
|
615
|
+
@api_client.config.logger.debug 'Calling API: ConnectionsApi.list_connection_accounts ...'
|
|
616
|
+
end
|
|
617
|
+
# verify the required parameter 'connection_id' is set
|
|
618
|
+
if @api_client.config.client_side_validation && connection_id.nil?
|
|
619
|
+
fail ArgumentError, "Missing the required parameter 'connection_id' when calling ConnectionsApi.list_connection_accounts"
|
|
620
|
+
end
|
|
621
|
+
# verify the required parameter 'user_id' is set
|
|
622
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
623
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling ConnectionsApi.list_connection_accounts"
|
|
624
|
+
end
|
|
625
|
+
# verify the required parameter 'user_secret' is set
|
|
626
|
+
if @api_client.config.client_side_validation && user_secret.nil?
|
|
627
|
+
fail ArgumentError, "Missing the required parameter 'user_secret' when calling ConnectionsApi.list_connection_accounts"
|
|
628
|
+
end
|
|
629
|
+
# resource path
|
|
630
|
+
local_var_path = '/connections/{connectionId}/accounts'.sub('{' + 'connectionId' + '}', CGI.escape(connection_id.to_s))
|
|
631
|
+
|
|
632
|
+
# query parameters
|
|
633
|
+
query_params = opts[:query_params] || {}
|
|
634
|
+
query_params[:'userId'] = user_id
|
|
635
|
+
query_params[:'userSecret'] = user_secret
|
|
636
|
+
|
|
637
|
+
# header parameters
|
|
638
|
+
header_params = opts[:header_params] || {}
|
|
639
|
+
# HTTP header 'Accept' (if needed)
|
|
640
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
641
|
+
|
|
642
|
+
# form parameters
|
|
643
|
+
form_params = opts[:form_params] || {}
|
|
644
|
+
|
|
645
|
+
# http body (model)
|
|
646
|
+
post_body = opts[:debug_body]
|
|
647
|
+
|
|
648
|
+
# return_type
|
|
649
|
+
return_type = opts[:debug_return_type] || 'Array<ConnectionAccount>'
|
|
650
|
+
|
|
651
|
+
# auth_names
|
|
652
|
+
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
|
653
|
+
|
|
654
|
+
new_options = opts.merge(
|
|
655
|
+
:operation => :"ConnectionsApi.list_connection_accounts",
|
|
656
|
+
:header_params => header_params,
|
|
657
|
+
:query_params => query_params,
|
|
658
|
+
:form_params => form_params,
|
|
659
|
+
:body => post_body,
|
|
660
|
+
:auth_names => auth_names,
|
|
661
|
+
:return_type => return_type
|
|
662
|
+
)
|
|
663
|
+
|
|
664
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
|
665
|
+
if @api_client.config.debugging
|
|
666
|
+
@api_client.config.logger.debug "API called: ConnectionsApi#list_connection_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
667
|
+
end
|
|
668
|
+
return data, status_code, headers, response
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
|
|
553
672
|
# Refresh holdings for a connection
|
|
554
673
|
#
|
|
555
674
|
# Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection.
|
|
@@ -619,129 +619,6 @@ module SnapTrade
|
|
|
619
619
|
end
|
|
620
620
|
|
|
621
621
|
|
|
622
|
-
# List accounts for a connection (discriminated union)
|
|
623
|
-
#
|
|
624
|
-
# Experimental and subject to change without notice.
|
|
625
|
-
#
|
|
626
|
-
# Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape.
|
|
627
|
-
#
|
|
628
|
-
# Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema.
|
|
629
|
-
#
|
|
630
|
-
# On Pay as you Go / Real-time, this endpoint refreshes each account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts.
|
|
631
|
-
#
|
|
632
|
-
# 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).
|
|
633
|
-
#
|
|
634
|
-
# 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.
|
|
635
|
-
#
|
|
636
|
-
# @param connection_id [String]
|
|
637
|
-
# @param user_id [String]
|
|
638
|
-
# @param user_secret [String]
|
|
639
|
-
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
640
|
-
def list_connection_accounts(connection_id:, user_id:, user_secret:, extra: {})
|
|
641
|
-
data, _status_code, _headers = list_connection_accounts_with_http_info_impl(connection_id, user_id, user_secret, extra)
|
|
642
|
-
data
|
|
643
|
-
end
|
|
644
|
-
|
|
645
|
-
# List accounts for a connection (discriminated union)
|
|
646
|
-
#
|
|
647
|
-
# Experimental and subject to change without notice.
|
|
648
|
-
#
|
|
649
|
-
# Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape.
|
|
650
|
-
#
|
|
651
|
-
# Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema.
|
|
652
|
-
#
|
|
653
|
-
# On Pay as you Go / Real-time, this endpoint refreshes each account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts.
|
|
654
|
-
#
|
|
655
|
-
# 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).
|
|
656
|
-
#
|
|
657
|
-
# 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.
|
|
658
|
-
#
|
|
659
|
-
# @param connection_id [String]
|
|
660
|
-
# @param user_id [String]
|
|
661
|
-
# @param user_secret [String]
|
|
662
|
-
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
663
|
-
def list_connection_accounts_with_http_info(connection_id:, user_id:, user_secret:, extra: {})
|
|
664
|
-
list_connection_accounts_with_http_info_impl(connection_id, user_id, user_secret, extra)
|
|
665
|
-
end
|
|
666
|
-
|
|
667
|
-
# List accounts for a connection (discriminated union)
|
|
668
|
-
# Experimental and subject to change without notice. Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each 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.
|
|
669
|
-
# @param connection_id [String]
|
|
670
|
-
# @param user_id [String]
|
|
671
|
-
# @param user_secret [String]
|
|
672
|
-
# @param [Hash] opts the optional parameters
|
|
673
|
-
# @return [Array<ConnectionAccount>]
|
|
674
|
-
private def list_connection_accounts_impl(connection_id, user_id, user_secret, opts = {})
|
|
675
|
-
data, _status_code, _headers = list_connection_accounts_with_http_info(connection_id, user_id, user_secret, opts)
|
|
676
|
-
data
|
|
677
|
-
end
|
|
678
|
-
|
|
679
|
-
# List accounts for a connection (discriminated union)
|
|
680
|
-
# Experimental and subject to change without notice. Returns the accounts that belong to the specified connection for the authenticated user, using the `kind`-discriminated account shape. Each item in the response carries a `kind` field (`investment`, `deposit`, and `line_of_credit` are implemented) that determines which additional fields are present -- see the `ConnectionAccount` schema. On Pay as you Go / Real-time, this endpoint refreshes each 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.
|
|
681
|
-
# @param connection_id [String]
|
|
682
|
-
# @param user_id [String]
|
|
683
|
-
# @param user_secret [String]
|
|
684
|
-
# @param [Hash] opts the optional parameters
|
|
685
|
-
# @return [Array<(Array<ConnectionAccount>, Integer, Hash)>] Array<ConnectionAccount> data, response status code and response headers
|
|
686
|
-
private def list_connection_accounts_with_http_info_impl(connection_id, user_id, user_secret, opts = {})
|
|
687
|
-
if @api_client.config.debugging
|
|
688
|
-
@api_client.config.logger.debug 'Calling API: ExperimentalEndpointsApi.list_connection_accounts ...'
|
|
689
|
-
end
|
|
690
|
-
# verify the required parameter 'connection_id' is set
|
|
691
|
-
if @api_client.config.client_side_validation && connection_id.nil?
|
|
692
|
-
fail ArgumentError, "Missing the required parameter 'connection_id' when calling ExperimentalEndpointsApi.list_connection_accounts"
|
|
693
|
-
end
|
|
694
|
-
# verify the required parameter 'user_id' is set
|
|
695
|
-
if @api_client.config.client_side_validation && user_id.nil?
|
|
696
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling ExperimentalEndpointsApi.list_connection_accounts"
|
|
697
|
-
end
|
|
698
|
-
# verify the required parameter 'user_secret' is set
|
|
699
|
-
if @api_client.config.client_side_validation && user_secret.nil?
|
|
700
|
-
fail ArgumentError, "Missing the required parameter 'user_secret' when calling ExperimentalEndpointsApi.list_connection_accounts"
|
|
701
|
-
end
|
|
702
|
-
# resource path
|
|
703
|
-
local_var_path = '/connections/{connectionId}/accounts'.sub('{' + 'connectionId' + '}', CGI.escape(connection_id.to_s))
|
|
704
|
-
|
|
705
|
-
# query parameters
|
|
706
|
-
query_params = opts[:query_params] || {}
|
|
707
|
-
query_params[:'userId'] = user_id
|
|
708
|
-
query_params[:'userSecret'] = user_secret
|
|
709
|
-
|
|
710
|
-
# header parameters
|
|
711
|
-
header_params = opts[:header_params] || {}
|
|
712
|
-
# HTTP header 'Accept' (if needed)
|
|
713
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
714
|
-
|
|
715
|
-
# form parameters
|
|
716
|
-
form_params = opts[:form_params] || {}
|
|
717
|
-
|
|
718
|
-
# http body (model)
|
|
719
|
-
post_body = opts[:debug_body]
|
|
720
|
-
|
|
721
|
-
# return_type
|
|
722
|
-
return_type = opts[:debug_return_type] || 'Array<ConnectionAccount>'
|
|
723
|
-
|
|
724
|
-
# auth_names
|
|
725
|
-
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
|
726
|
-
|
|
727
|
-
new_options = opts.merge(
|
|
728
|
-
:operation => :"ExperimentalEndpointsApi.list_connection_accounts",
|
|
729
|
-
:header_params => header_params,
|
|
730
|
-
:query_params => query_params,
|
|
731
|
-
:form_params => form_params,
|
|
732
|
-
:body => post_body,
|
|
733
|
-
:auth_names => auth_names,
|
|
734
|
-
:return_type => return_type
|
|
735
|
-
)
|
|
736
|
-
|
|
737
|
-
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
|
738
|
-
if @api_client.config.debugging
|
|
739
|
-
@api_client.config.logger.debug "API called: ExperimentalEndpointsApi#list_connection_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
740
|
-
end
|
|
741
|
-
return data, status_code, headers, response
|
|
742
|
-
end
|
|
743
|
-
|
|
744
|
-
|
|
745
622
|
# List active Trade Detection subscriptions
|
|
746
623
|
#
|
|
747
624
|
# Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned.
|