Class: SnapTrade::AccountInformationApi
- Inherits:
-
Object
- Object
- SnapTrade::AccountInformationApi
- Defined in:
- lib/snaptrade/api/account_information_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_account_activities(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {}) ⇒ Object
List account activities.
-
#get_account_activities_with_http_info(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {}) ⇒ Object
List account activities.
-
#get_account_balance_history(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List historical account total value.
-
#get_account_balance_history_with_http_info(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List historical account total value.
-
#get_all_account_positions(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List all account positions.
-
#get_all_account_positions_with_http_info(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List all account positions.
-
#get_user_account_balance(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List account balances.
-
#get_user_account_balance_with_http_info(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List account balances.
-
#get_user_account_details(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
Get account detail.
-
#get_user_account_details_with_http_info(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
Get account detail.
-
#get_user_account_order_detail(brokerage_order_id:, account_id:, user_id:, user_secret:, extra: {}) ⇒ Object
Get account order detail.
-
#get_user_account_order_detail_with_http_info(brokerage_order_id:, account_id:, user_id:, user_secret:, extra: {}) ⇒ Object
Get account order detail.
-
#get_user_account_orders(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {}) ⇒ Object
List account orders.
-
#get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {}) ⇒ Object
List account orders.
-
#get_user_account_recent_orders(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {}) ⇒ Object
List account recent orders (last 24 hours only).
-
#get_user_account_recent_orders_with_http_info(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {}) ⇒ Object
List account recent orders (last 24 hours only).
-
#get_user_account_return_rates(user_id:, user_secret:, account_id:, timeframes: SENTINEL, extra: {}) ⇒ Object
List account rate of returns.
-
#get_user_account_return_rates_with_http_info(user_id:, user_secret:, account_id:, timeframes: SENTINEL, extra: {}) ⇒ Object
List account rate of returns.
-
#get_user_aum_percentile(user_id:, user_secret:, extra: {}) ⇒ Object
Get the user's AUM percentile.
-
#get_user_aum_percentile_with_http_info(user_id:, user_secret:, extra: {}) ⇒ Object
Get the user's AUM percentile.
-
#get_user_holdings(account_id:, user_id:, user_secret:, extra: {}) ⇒ Object
List account holdings.
-
#get_user_holdings_with_http_info(account_id:, user_id:, user_secret:, extra: {}) ⇒ Object
List account holdings.
-
#initialize(api_client = ApiClient.default) ⇒ AccountInformationApi
constructor
A new instance of AccountInformationApi.
-
#list_user_accounts(user_id:, user_secret:, extra: {}) ⇒ Object
List accounts.
-
#list_user_accounts_with_http_info(user_id:, user_secret:, extra: {}) ⇒ Object
List accounts.
-
#update_user_account(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
Update details of an investment account.
-
#update_user_account_with_http_info(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
Update details of an investment account.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountInformationApi
Returns a new instance of AccountInformationApi.
16 17 18 |
# File 'lib/snaptrade/api/account_information_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/snaptrade/api/account_information_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#get_account_activities(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {}) ⇒ Object
List account activities
This endpoint is not deprecated and has no planned sunset. Responses to requests using the legacy /api/v1 path prefix include Deprecation: @1781222400 (June 12, 2026); that header applies only to the path prefix. Use the canonical root path /accounts/{accountId}/activities.
Returns all historical transactions for the specified account.
This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options.
Transaction are returned in reverse chronological order, using the trade_date field.
This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage.
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 on how to fix a disabled connection.
43 44 45 46 47 48 49 50 51 |
# File 'lib/snaptrade/api/account_information_api.rb', line 43 def get_account_activities(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {}) extra[:start_date] = start_date if start_date != SENTINEL extra[:end_date] = end_date if end_date != SENTINEL extra[:offset] = offset if offset != SENTINEL extra[:limit] = limit if limit != SENTINEL extra[:type] = type if type != SENTINEL data, _status_code, _headers = get_account_activities_with_http_info_impl(account_id, user_id, user_secret, extra) data end |
#get_account_activities_with_http_info(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {}) ⇒ Object
List account activities
This endpoint is not deprecated and has no planned sunset. Responses to requests using the legacy /api/v1 path prefix include Deprecation: @1781222400 (June 12, 2026); that header applies only to the path prefix. Use the canonical root path /accounts/{accountId}/activities.
Returns all historical transactions for the specified account.
This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options.
Transaction are returned in reverse chronological order, using the trade_date field.
This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage.
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 on how to fix a disabled connection.
76 77 78 79 80 81 82 83 |
# File 'lib/snaptrade/api/account_information_api.rb', line 76 def get_account_activities_with_http_info(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {}) extra[:start_date] = start_date if start_date != SENTINEL extra[:end_date] = end_date if end_date != SENTINEL extra[:offset] = offset if offset != SENTINEL extra[:limit] = limit if limit != SENTINEL extra[:type] = type if type != SENTINEL get_account_activities_with_http_info_impl(account_id, user_id, user_secret, extra) end |
#get_account_balance_history(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List historical account total value
An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
194 195 196 197 |
# File 'lib/snaptrade/api/account_information_api.rb', line 194 def get_account_balance_history(user_id:, user_secret:, account_id:, extra: {}) data, _status_code, _headers = get_account_balance_history_with_http_info_impl(user_id, user_secret, account_id, extra) data end |
#get_account_balance_history_with_http_info(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List historical account total value
An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
207 208 209 |
# File 'lib/snaptrade/api/account_information_api.rb', line 207 def get_account_balance_history_with_http_info(user_id:, user_secret:, account_id:, extra: {}) get_account_balance_history_with_http_info_impl(user_id, user_secret, account_id, extra) end |
#get_all_account_positions(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List all account positions
Returns a list of all positions in the specified account.
The results list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the instrument.kind discriminator to determine the schema for each position's instrument.
mutualfund positions may also include cash_equivalent. stock, etf, and mutualfund 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.
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 on how to fix a disabled connection.
303 304 305 306 |
# File 'lib/snaptrade/api/account_information_api.rb', line 303 def get_all_account_positions(user_id:, user_secret:, account_id:, extra: {}) data, _status_code, _headers = get_all_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra) data end |
#get_all_account_positions_with_http_info(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List all account positions
Returns a list of all positions in the specified account.
The results list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the instrument.kind discriminator to determine the schema for each position's instrument.
mutualfund positions may also include cash_equivalent. stock, etf, and mutualfund 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.
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 on how to fix a disabled connection.
322 323 324 |
# File 'lib/snaptrade/api/account_information_api.rb', line 322 def get_all_account_positions_with_http_info(user_id:, user_secret:, account_id:, extra: {}) get_all_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra) end |
#get_user_account_balance(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List account balances
Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade allows holding multiple currencies in the same account.
Check your API key on the Customer Dashboard billing page to see if you have real-time data access:
- If you do, this endpoint returns real-time data.
- If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see this guide on how to fix a disabled connection.
418 419 420 421 |
# File 'lib/snaptrade/api/account_information_api.rb', line 418 def get_user_account_balance(user_id:, user_secret:, account_id:, extra: {}) data, _status_code, _headers = get_user_account_balance_with_http_info_impl(user_id, user_secret, account_id, extra) data end |
#get_user_account_balance_with_http_info(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
List account balances
Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade allows holding multiple currencies in the same account.
Check your API key on the Customer Dashboard billing page to see if you have real-time data access:
- If you do, this endpoint returns real-time data.
- If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see this guide on how to fix a disabled connection.
437 438 439 |
# File 'lib/snaptrade/api/account_information_api.rb', line 437 def get_user_account_balance_with_http_info(user_id:, user_secret:, account_id:, extra: {}) get_user_account_balance_with_http_info_impl(user_id, user_secret, account_id, extra) end |
#get_user_account_details(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
Get account detail
Returns account detail known to SnapTrade for the specified account.
Check your API key on the Customer Dashboard billing page to see if you have real-time data access:
- If you do, this endpoint returns real-time data.
- If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see this guide on how to fix a disabled connection.
533 534 535 536 |
# File 'lib/snaptrade/api/account_information_api.rb', line 533 def get_user_account_details(user_id:, user_secret:, account_id:, extra: {}) data, _status_code, _headers = get_user_account_details_with_http_info_impl(user_id, user_secret, account_id, extra) data end |
#get_user_account_details_with_http_info(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
Get account detail
Returns account detail known to SnapTrade for the specified account.
Check your API key on the Customer Dashboard billing page to see if you have real-time data access:
- If you do, this endpoint returns real-time data.
- If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see this guide on how to fix a disabled connection.
552 553 554 |
# File 'lib/snaptrade/api/account_information_api.rb', line 552 def get_user_account_details_with_http_info(user_id:, user_secret:, account_id:, extra: {}) get_user_account_details_with_http_info_impl(user_id, user_secret, account_id, extra) end |
#get_user_account_order_detail(brokerage_order_id:, account_id:, user_id:, user_secret:, extra: {}) ⇒ Object
Get account order detail
Returns the detail of a single order using the external order ID provided in the request body.
This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future.
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.
650 651 652 653 654 655 656 |
# File 'lib/snaptrade/api/account_information_api.rb', line 650 def get_user_account_order_detail(brokerage_order_id:, account_id:, user_id:, user_secret:, extra: {}) _body = {} _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL account_information_get_user_account_order_detail_request = _body data, _status_code, _headers = get_user_account_order_detail_with_http_info_impl(account_id, user_id, user_secret, account_information_get_user_account_order_detail_request, extra) data end |
#get_user_account_order_detail_with_http_info(brokerage_order_id:, account_id:, user_id:, user_secret:, extra: {}) ⇒ Object
Get account order detail
Returns the detail of a single order using the external order ID provided in the request body.
This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future.
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.
674 675 676 677 678 679 |
# File 'lib/snaptrade/api/account_information_api.rb', line 674 def get_user_account_order_detail_with_http_info(brokerage_order_id:, account_id:, user_id:, user_secret:, extra: {}) _body = {} _body[:brokerage_order_id] = brokerage_order_id if brokerage_order_id != SENTINEL account_information_get_user_account_order_detail_request = _body get_user_account_order_detail_with_http_info_impl(account_id, user_id, user_secret, account_information_get_user_account_order_detail_request, extra) end |
#get_user_account_orders(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {}) ⇒ Object
List account orders
Returns a list of recent orders in the specified account.
Check your API key on the Customer Dashboard billing page to see if you have real-time data access:
- If you do, this endpoint returns real-time data.
- If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see this guide on how to fix a disabled connection.
786 787 788 789 790 791 |
# File 'lib/snaptrade/api/account_information_api.rb', line 786 def get_user_account_orders(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {}) extra[:state] = state if state != SENTINEL extra[:days] = days if days != SENTINEL data, _status_code, _headers = get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, extra) data end |
#get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {}) ⇒ Object
List account orders
Returns a list of recent orders in the specified account.
Check your API key on the Customer Dashboard billing page to see if you have real-time data access:
- If you do, this endpoint returns real-time data.
- If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see this guide on how to fix a disabled connection.
809 810 811 812 813 |
# File 'lib/snaptrade/api/account_information_api.rb', line 809 def get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {}) extra[:state] = state if state != SENTINEL extra[:days] = days if days != SENTINEL get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, extra) end |
#get_user_account_recent_orders(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {}) ⇒ Object
List account recent orders (last 24 hours only)
A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting only_executed to false
923 924 925 926 927 |
# File 'lib/snaptrade/api/account_information_api.rb', line 923 def get_user_account_recent_orders(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {}) extra[:only_executed] = only_executed if only_executed != SENTINEL data, _status_code, _headers = get_user_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, extra) data end |
#get_user_account_recent_orders_with_http_info(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {}) ⇒ Object
List account recent orders (last 24 hours only)
A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting only_executed to false
941 942 943 944 |
# File 'lib/snaptrade/api/account_information_api.rb', line 941 def get_user_account_recent_orders_with_http_info(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {}) extra[:only_executed] = only_executed if only_executed != SENTINEL get_user_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, extra) end |
#get_user_account_return_rates(user_id:, user_secret:, account_id:, timeframes: SENTINEL, extra: {}) ⇒ Object
List account rate of returns
Returns a list of rate of return percents for a given account.
1036 1037 1038 1039 1040 |
# File 'lib/snaptrade/api/account_information_api.rb', line 1036 def get_user_account_return_rates(user_id:, user_secret:, account_id:, timeframes: SENTINEL, extra: {}) extra[:timeframes] = timeframes if timeframes != SENTINEL data, _status_code, _headers = get_user_account_return_rates_with_http_info_impl(user_id, user_secret, account_id, extra) data end |
#get_user_account_return_rates_with_http_info(user_id:, user_secret:, account_id:, timeframes: SENTINEL, extra: {}) ⇒ Object
List account rate of returns
Returns a list of rate of return percents for a given account.
1051 1052 1053 1054 |
# File 'lib/snaptrade/api/account_information_api.rb', line 1051 def get_user_account_return_rates_with_http_info(user_id:, user_secret:, account_id:, timeframes: SENTINEL, extra: {}) extra[:timeframes] = timeframes if timeframes != SENTINEL get_user_account_return_rates_with_http_info_impl(user_id, user_secret, account_id, extra) end |
#get_user_aum_percentile(user_id:, user_secret:, extra: {}) ⇒ Object
Get the user's AUM percentile
Returns where the user's total assets sit within the distribution of a cohort of comparable users, as a coarse bucket plus an integer percentile.
The cohort is scoped to your own book: a user is only ever compared against your other users, never across SnapTrade customers. (Users on personal-use keys are the exception — they are compared against all other personal-use users, since a personal key has a single user and cannot form a distribution of its own.) The distribution is recomputed monthly, and as_of reports which month's distribution the placement came from.
data is null — a 200, not an error — when SnapTrade declines to place the user. That happens when the cohort is too small to publish a distribution, or when the user's own holdings are incomplete or stale (for example they hold a disabled connection). A placement computed from a partial view of a user's assets would understate them, so none is returned.
1148 1149 1150 1151 |
# File 'lib/snaptrade/api/account_information_api.rb', line 1148 def get_user_aum_percentile(user_id:, user_secret:, extra: {}) data, _status_code, _headers = get_user_aum_percentile_with_http_info_impl(user_id, user_secret, extra) data end |
#get_user_aum_percentile_with_http_info(user_id:, user_secret:, extra: {}) ⇒ Object
Get the user's AUM percentile
Returns where the user's total assets sit within the distribution of a cohort of comparable users, as a coarse bucket plus an integer percentile.
The cohort is scoped to your own book: a user is only ever compared against your other users, never across SnapTrade customers. (Users on personal-use keys are the exception — they are compared against all other personal-use users, since a personal key has a single user and cannot form a distribution of its own.) The distribution is recomputed monthly, and as_of reports which month's distribution the placement came from.
data is null — a 200, not an error — when SnapTrade declines to place the user. That happens when the cohort is too small to publish a distribution, or when the user's own holdings are incomplete or stale (for example they hold a disabled connection). A placement computed from a partial view of a user's assets would understate them, so none is returned.
1164 1165 1166 |
# File 'lib/snaptrade/api/account_information_api.rb', line 1164 def get_user_aum_percentile_with_http_info(user_id:, user_secret:, extra: {}) get_user_aum_percentile_with_http_info_impl(user_id, user_secret, extra) end |
#get_user_holdings(account_id:, user_id:, user_secret:, extra: {}) ⇒ Object
List account holdings
Deprecated. Use the finer-grained account data endpoints instead: balances, positions, and orders.
This endpoint will return HTTP 410 Gone for all customers that sign up after May 11, 2026.
Returns a list of balances, positions, and recent orders for the specified account.
Check your API key on the Customer Dashboard billing page to see if you have real-time data access:
- If you do, this endpoint returns real-time data.
- If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see this guide on how to fix a disabled connection.
1258 1259 1260 1261 |
# File 'lib/snaptrade/api/account_information_api.rb', line 1258 def get_user_holdings(account_id:, user_id:, user_secret:, extra: {}) data, _status_code, _headers = get_user_holdings_with_http_info_impl(account_id, user_id, user_secret, extra) data end |
#get_user_holdings_with_http_info(account_id:, user_id:, user_secret:, extra: {}) ⇒ Object
List account holdings
Deprecated. Use the finer-grained account data endpoints instead: balances, positions, and orders.
This endpoint will return HTTP 410 Gone for all customers that sign up after May 11, 2026.
Returns a list of balances, positions, and recent orders for the specified account.
Check your API key on the Customer Dashboard billing page to see if you have real-time data access:
- If you do, this endpoint returns real-time data.
- If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see this guide on how to fix a disabled connection.
1281 1282 1283 |
# File 'lib/snaptrade/api/account_information_api.rb', line 1281 def get_user_holdings_with_http_info(account_id:, user_id:, user_secret:, extra: {}) get_user_holdings_with_http_info_impl(account_id, user_id, user_secret, extra) end |
#list_user_accounts(user_id:, user_secret:, extra: {}) ⇒ Object
List accounts
Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
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 brokerage. To get real-time data on Pay as you Go / Real-time, use the list accounts for a connection endpoint. Customers on Pay as you Go / Daily can force a refresh with the manual refresh endpoint.
1372 1373 1374 1375 |
# File 'lib/snaptrade/api/account_information_api.rb', line 1372 def list_user_accounts(user_id:, user_secret:, extra: {}) data, _status_code, _headers = list_user_accounts_with_http_info_impl(user_id, user_secret, extra) data end |
#list_user_accounts_with_http_info(user_id:, user_secret:, extra: {}) ⇒ Object
List accounts
Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
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 brokerage. To get real-time data on Pay as you Go / Real-time, use the list accounts for a connection endpoint. Customers on Pay as you Go / Daily can force a refresh with the manual refresh endpoint.
1386 1387 1388 |
# File 'lib/snaptrade/api/account_information_api.rb', line 1386 def list_user_accounts_with_http_info(user_id:, user_secret:, extra: {}) list_user_accounts_with_http_info_impl(user_id, user_secret, extra) end |
#update_user_account(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
Update details of an investment account
Updates various properties of a specified account.
1470 1471 1472 1473 |
# File 'lib/snaptrade/api/account_information_api.rb', line 1470 def update_user_account(user_id:, user_secret:, account_id:, extra: {}) data, _status_code, _headers = update_user_account_with_http_info_impl(user_id, user_secret, account_id, extra) data end |
#update_user_account_with_http_info(user_id:, user_secret:, account_id:, extra: {}) ⇒ Object
Update details of an investment account
Updates various properties of a specified account.
1483 1484 1485 |
# File 'lib/snaptrade/api/account_information_api.rb', line 1483 def update_user_account_with_http_info(user_id:, user_secret:, account_id:, extra: {}) update_user_account_with_http_info_impl(user_id, user_secret, account_id, extra) end |