snaptrade 1.17.10 → 2.0.77
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/Gemfile +1 -0
- data/Gemfile.lock +31 -28
- data/README.md +1995 -208
- data/lib/snaptrade/api/account_information_api.rb +535 -71
- data/lib/snaptrade/api/api_status_api.rb +6 -3
- data/lib/snaptrade/api/authentication_api.rb +180 -140
- data/lib/snaptrade/api/connections_api.rb +401 -41
- data/lib/snaptrade/api/options_api.rb +82 -39
- data/lib/snaptrade/api/reference_data_api.rb +181 -101
- data/lib/snaptrade/api/trading_api.rb +200 -228
- data/lib/snaptrade/api/transactions_and_reporting_api.rb +48 -33
- data/lib/snaptrade/api_client.rb +24 -14
- data/lib/snaptrade/api_error.rb +0 -1
- data/lib/snaptrade/configuration.rb +11 -29
- data/lib/snaptrade/models/account.rb +84 -29
- data/lib/snaptrade/models/account_balance.rb +1 -2
- data/lib/snaptrade/models/account_balance_total.rb +3 -9
- data/lib/snaptrade/models/account_holdings.rb +0 -1
- data/lib/snaptrade/models/account_holdings_account.rb +19 -4
- data/lib/snaptrade/models/account_order_record.rb +52 -33
- data/lib/snaptrade/models/{brokerage_symbol_option_symbol.rb → account_order_record_option_symbol.rb} +15 -27
- data/lib/snaptrade/models/account_order_record_status.rb +0 -1
- data/lib/snaptrade/models/{brokerage_symbol_symbol.rb → account_order_record_universal_symbol.rb} +33 -7
- data/lib/snaptrade/models/account_simple.rb +4 -2
- data/lib/snaptrade/models/account_sync_status.rb +14 -6
- data/lib/snaptrade/models/account_universal_activity.rb +371 -0
- data/lib/snaptrade/models/account_universal_activity_currency.rb +245 -0
- data/lib/snaptrade/models/{target_asset.rb → account_universal_activity_option_symbol.rb} +83 -59
- data/lib/snaptrade/models/{universal_symbol_ticker.rb → account_universal_activity_symbol.rb} +37 -16
- data/lib/snaptrade/models/{trade_action.rb → action_strict.rb} +3 -4
- data/lib/snaptrade/models/{trade_execution_status_action.rb → action_strict_with_options.rb} +8 -5
- data/lib/snaptrade/models/auth_type.rb +0 -1
- data/lib/snaptrade/models/authentication_login_snap_trade_user200_response.rb +0 -1
- data/lib/snaptrade/models/balance.rb +19 -8
- data/lib/snaptrade/models/{model_portfolio.rb → balance_currency.rb} +27 -19
- data/lib/snaptrade/models/brokerage.rb +57 -50
- data/lib/snaptrade/models/brokerage_authorization.rb +24 -21
- data/lib/snaptrade/models/{model_asset_class.rb → brokerage_authorization_disabled_confirmation.rb} +12 -20
- data/lib/snaptrade/models/{jwt.rb → brokerage_authorization_refresh_confirmation.rb} +12 -12
- data/lib/snaptrade/models/brokerage_authorization_type_read_only.rb +1 -2
- data/lib/snaptrade/models/brokerage_authorization_type_read_only_brokerage.rb +2 -3
- data/lib/snaptrade/models/brokerage_type.rb +1 -2
- data/lib/snaptrade/models/connection_portal_version.rb +3 -3
- data/lib/snaptrade/models/connection_type.rb +0 -1
- data/lib/snaptrade/models/connections_session_events200_response_inner.rb +1 -2
- data/lib/snaptrade/models/currency.rb +4 -2
- data/lib/snaptrade/models/delete_user_response.rb +13 -5
- data/lib/snaptrade/models/dividend_at_date.rb +0 -1
- data/lib/snaptrade/models/encrypted_response.rb +0 -1
- data/lib/snaptrade/models/encrypted_response_encrypted_message_data.rb +0 -1
- data/lib/snaptrade/models/exchange.rb +9 -2
- data/lib/snaptrade/models/exchange_rate_pairs.rb +0 -1
- data/lib/snaptrade/models/figi_instrument.rb +230 -0
- data/lib/snaptrade/models/holdings_status.rb +229 -0
- data/lib/snaptrade/models/login_redirect_uri.rb +3 -3
- data/lib/snaptrade/models/manual_trade.rb +10 -6
- data/lib/snaptrade/models/manual_trade_and_impact.rb +2 -3
- data/lib/snaptrade/models/manual_trade_balance.rb +3 -4
- data/lib/snaptrade/models/manual_trade_form.rb +56 -28
- data/lib/snaptrade/models/{model_asset_class_target.rb → manual_trade_form_notional_value.rb} +12 -15
- data/lib/snaptrade/models/{trade.rb → manual_trade_form_with_options.rb} +126 -43
- data/lib/snaptrade/models/{snap_trade_api_disclaimer_accept_status.rb → manual_trade_form_with_options_stop_loss.rb} +24 -18
- data/lib/snaptrade/models/manual_trade_form_with_options_take_profit.rb +223 -0
- data/lib/snaptrade/models/{trade_impact.rb → manual_trade_impact.rb} +20 -17
- data/lib/snaptrade/models/manual_trade_symbol.rb +19 -15
- data/lib/snaptrade/models/model400_failed_request_response.rb +0 -1
- data/lib/snaptrade/models/model401_failed_request_response.rb +0 -1
- data/lib/snaptrade/models/model402_brokerage_auth_already_disabled_exception.rb +228 -0
- data/lib/snaptrade/models/{amount.rb → model402_brokerage_auth_disabled_response.rb} +19 -18
- data/lib/snaptrade/models/model403_failed_request_response.rb +0 -1
- data/lib/snaptrade/models/model403_feature_not_enabled_response.rb +228 -0
- data/lib/snaptrade/models/model404_failed_request_response.rb +0 -1
- data/lib/snaptrade/models/{calculated_trade.rb → model425_failed_request_response.rb} +19 -20
- data/lib/snaptrade/models/model500_unexpected_exception_response.rb +0 -1
- data/lib/snaptrade/models/monthly_dividends.rb +1 -2
- data/lib/snaptrade/models/net_contributions.rb +1 -2
- data/lib/snaptrade/models/net_dividend.rb +0 -1
- data/lib/snaptrade/models/notional_value.rb +103 -0
- data/lib/snaptrade/models/{options_holdings.rb → option_brokerage_symbol.rb} +19 -50
- data/lib/snaptrade/models/option_chain_inner.rb +0 -1
- data/lib/snaptrade/models/option_chain_inner_chain_per_root_inner.rb +0 -1
- data/lib/snaptrade/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner.rb +0 -1
- data/lib/snaptrade/models/option_leg.rb +0 -1
- data/lib/snaptrade/models/option_leg_action.rb +0 -1
- data/lib/snaptrade/models/option_strategy.rb +0 -1
- data/lib/snaptrade/models/option_strategy_legs_inner.rb +0 -1
- data/lib/snaptrade/models/option_type.rb +0 -1
- data/lib/snaptrade/models/options_get_option_strategy_request.rb +0 -1
- data/lib/snaptrade/models/options_place_option_strategy_request.rb +4 -3
- data/lib/snaptrade/models/options_position.rb +20 -20
- data/lib/snaptrade/models/options_position_currency.rb +4 -1
- data/lib/snaptrade/models/options_symbol.rb +12 -25
- data/lib/snaptrade/models/{model_type.rb → order_class.rb} +6 -8
- data/lib/snaptrade/models/{order_type.rb → order_type_strict.rb} +5 -6
- data/lib/snaptrade/models/paginated_universal_activity.rb +228 -0
- data/lib/snaptrade/models/pagination_details.rb +228 -0
- data/lib/snaptrade/models/partner_data.rb +49 -50
- data/lib/snaptrade/models/past_value.rb +1 -2
- data/lib/snaptrade/models/performance_custom.rb +0 -1
- data/lib/snaptrade/models/position.rb +21 -20
- data/lib/snaptrade/models/position_symbol.rb +16 -12
- data/lib/snaptrade/models/{portfolio_group_position.rb → rate_of_return_object.rb} +26 -26
- data/lib/snaptrade/models/{brokerage_authorization_type.rb → rate_of_return_response.rb} +14 -11
- data/lib/snaptrade/models/{strategy_order_place.rb → recent_orders_response.rb} +7 -16
- data/lib/snaptrade/models/security_type.rb +5 -2
- data/lib/snaptrade/models/session_event.rb +1 -2
- data/lib/snaptrade/models/session_event_type.rb +11 -4
- data/lib/snaptrade/models/snap_trade_holdings_account.rb +0 -1
- data/lib/snaptrade/models/snap_trade_holdings_total_value.rb +3 -2
- data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +10 -5
- data/lib/snaptrade/models/snap_trade_register_user_request_body.rb +1 -2
- data/lib/snaptrade/models/status.rb +0 -1
- data/lib/snaptrade/models/stop_loss.rb +227 -0
- data/lib/snaptrade/models/strategy_order_record.rb +5 -3
- data/lib/snaptrade/models/strategy_order_record_status.rb +0 -1
- data/lib/snaptrade/models/strategy_quotes.rb +0 -1
- data/lib/snaptrade/models/strategy_quotes_greek.rb +0 -1
- data/lib/snaptrade/models/strategy_type.rb +0 -1
- data/lib/snaptrade/models/sub_period_return_rate.rb +2 -3
- data/lib/snaptrade/models/symbol.rb +39 -14
- data/lib/snaptrade/models/{portfolio_group.rb → symbol_currency.rb} +24 -5
- data/lib/snaptrade/models/symbol_exchange.rb +296 -0
- data/lib/snaptrade/models/{model_portfolio_security.rb → symbol_figi_instrument.rb} +27 -41
- data/lib/snaptrade/models/symbol_query.rb +1 -2
- data/lib/snaptrade/models/symbols_quotes_inner.rb +15 -11
- data/lib/snaptrade/models/{excluded_asset.rb → take_profit.rb} +11 -12
- data/lib/snaptrade/models/{time_in_force.rb → time_in_force_strict.rb} +5 -6
- data/lib/snaptrade/models/{brokerage_authorization_type_type.rb → timeframe.rb} +9 -7
- data/lib/snaptrade/models/trading_cancel_user_account_order_request.rb +1 -1
- data/lib/snaptrade/models/transactions_status.rb +19 -8
- data/lib/snaptrade/models/type.rb +3 -4
- data/lib/snaptrade/models/underlying_symbol.rb +40 -6
- data/lib/snaptrade/models/{snap_trade_holdings_account_account_id.rb → underlying_symbol_exchange.rb} +55 -54
- data/lib/snaptrade/models/{brokerage_symbol.rb → underlying_symbol_type.rb} +28 -39
- data/lib/snaptrade/models/universal_activity.rb +91 -82
- data/lib/snaptrade/models/universal_symbol.rb +30 -5
- data/lib/snaptrade/models/us_exchange.rb +0 -1
- data/lib/snaptrade/models/user_i_dand_secret.rb +2 -4
- data/lib/snaptrade/models/validated_trade_body.rb +218 -0
- data/lib/snaptrade/version.rb +1 -2
- data/lib/snaptrade.rb +90 -66
- data/snaptrade.gemspec +0 -1
- data/spec/api/account_information_api_spec.rb +66 -13
- data/spec/api/api_status_api_spec.rb +0 -1
- data/spec/api/authentication_api_spec.rb +20 -20
- data/spec/api/connections_api_spec.rb +54 -9
- data/spec/api/options_api_spec.rb +11 -7
- data/spec/api/reference_data_api_spec.rb +24 -16
- data/spec/api/trading_api_spec.rb +17 -25
- data/spec/api/transactions_and_reporting_api_spec.rb +7 -8
- data/spec/api_client_spec.rb +0 -1
- data/spec/configuration_spec.rb +0 -1
- data/spec/models/account_balance_spec.rb +0 -1
- data/spec/models/account_balance_total_spec.rb +0 -1
- data/spec/models/account_holdings_account_spec.rb +6 -1
- data/spec/models/account_holdings_spec.rb +0 -1
- data/spec/models/{strategy_impact_legs_inner_spec.rb → account_order_record_option_symbol_spec.rb} +13 -14
- data/spec/models/account_order_record_spec.rb +12 -7
- data/spec/models/account_order_record_status_spec.rb +0 -1
- data/spec/models/{brokerage_symbol_symbol_spec.rb → account_order_record_universal_symbol_spec.rb} +18 -7
- data/spec/models/account_simple_spec.rb +0 -1
- data/spec/models/account_spec.rb +14 -9
- data/spec/models/account_sync_status_spec.rb +6 -1
- data/spec/models/account_universal_activity_currency_spec.rb +41 -0
- data/spec/models/{brokerage_symbol_option_symbol_spec.rb → account_universal_activity_option_symbol_spec.rb} +6 -19
- data/spec/models/{portfolio_group_info_spec.rb → account_universal_activity_spec.rb} +47 -18
- data/spec/models/{universal_symbol_ticker_spec.rb → account_universal_activity_symbol_spec.rb} +13 -8
- data/spec/models/action_strict_spec.rb +23 -0
- data/spec/models/action_strict_with_options_spec.rb +23 -0
- data/spec/models/auth_type_spec.rb +0 -1
- data/spec/models/authentication_login_snap_trade_user200_response_spec.rb +0 -1
- data/spec/models/{model_portfolio_spec.rb → balance_currency_spec.rb} +8 -9
- data/spec/models/balance_spec.rb +6 -1
- data/spec/models/brokerage_authorization_disabled_confirmation_spec.rb +29 -0
- data/spec/models/{brokerage_authorization_type_spec.rb → brokerage_authorization_refresh_confirmation_spec.rb} +7 -8
- data/spec/models/brokerage_authorization_spec.rb +6 -7
- data/spec/models/brokerage_authorization_type_read_only_brokerage_spec.rb +0 -1
- data/spec/models/brokerage_authorization_type_read_only_spec.rb +0 -1
- data/spec/models/brokerage_spec.rb +12 -19
- data/spec/models/brokerage_type_spec.rb +0 -1
- data/spec/models/connection_portal_version_spec.rb +0 -1
- data/spec/models/connection_type_spec.rb +0 -1
- data/spec/models/connections_session_events200_response_inner_spec.rb +0 -1
- data/spec/models/currency_spec.rb +0 -1
- data/spec/models/delete_user_response_spec.rb +6 -1
- data/spec/models/dividend_at_date_spec.rb +0 -1
- data/spec/models/encrypted_response_encrypted_message_data_spec.rb +0 -1
- data/spec/models/encrypted_response_spec.rb +0 -1
- data/spec/models/exchange_rate_pairs_spec.rb +0 -1
- data/spec/models/exchange_spec.rb +0 -1
- data/spec/models/{portfolio_group_spec.rb → figi_instrument_spec.rb} +8 -9
- data/spec/models/{calculated_trade_spec.rb → holdings_status_spec.rb} +8 -9
- data/spec/models/login_redirect_uri_spec.rb +0 -1
- data/spec/models/manual_trade_and_impact_spec.rb +0 -1
- data/spec/models/manual_trade_balance_spec.rb +0 -1
- data/spec/models/manual_trade_form_notional_value_spec.rb +23 -0
- data/spec/models/manual_trade_form_spec.rb +6 -7
- data/spec/models/{strategy_impact_spec.rb → manual_trade_form_with_options_spec.rb} +29 -18
- data/spec/models/{snap_trade_api_disclaimer_accept_status_spec.rb → manual_trade_form_with_options_stop_loss_spec.rb} +8 -9
- data/spec/models/manual_trade_form_with_options_take_profit_spec.rb +29 -0
- data/spec/models/{trade_impact_spec.rb → manual_trade_impact_spec.rb} +7 -8
- data/spec/models/manual_trade_spec.rb +0 -1
- data/spec/models/manual_trade_symbol_spec.rb +6 -7
- data/spec/models/model400_failed_request_response_spec.rb +0 -1
- data/spec/models/model401_failed_request_response_spec.rb +0 -1
- data/spec/models/model402_brokerage_auth_already_disabled_exception_spec.rb +35 -0
- data/spec/models/model402_brokerage_auth_disabled_response_spec.rb +35 -0
- data/spec/models/model403_failed_request_response_spec.rb +0 -1
- data/spec/models/{model_asset_class_details_spec.rb → model403_feature_not_enabled_response_spec.rb} +8 -9
- data/spec/models/model404_failed_request_response_spec.rb +0 -1
- data/spec/models/model425_failed_request_response_spec.rb +35 -0
- data/spec/models/model500_unexpected_exception_response_spec.rb +0 -1
- data/spec/models/monthly_dividends_spec.rb +0 -1
- data/spec/models/net_contributions_spec.rb +0 -1
- data/spec/models/net_dividend_spec.rb +0 -1
- data/spec/models/notional_value_spec.rb +26 -0
- data/spec/models/{model_portfolio_details_spec.rb → option_brokerage_symbol_spec.rb} +9 -10
- data/spec/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner_spec.rb +0 -1
- data/spec/models/option_chain_inner_chain_per_root_inner_spec.rb +0 -1
- data/spec/models/option_chain_inner_spec.rb +0 -1
- data/spec/models/option_leg_action_spec.rb +0 -1
- data/spec/models/option_leg_spec.rb +0 -1
- data/spec/models/option_strategy_legs_inner_spec.rb +0 -1
- data/spec/models/option_strategy_spec.rb +0 -1
- data/spec/models/option_type_spec.rb +0 -1
- data/spec/models/options_get_option_strategy_request_spec.rb +0 -1
- data/spec/models/options_place_option_strategy_request_spec.rb +0 -1
- data/spec/models/options_position_currency_spec.rb +0 -1
- data/spec/models/options_position_spec.rb +2 -3
- data/spec/models/options_symbol_spec.rb +0 -13
- data/spec/models/order_class_spec.rb +23 -0
- data/spec/models/order_type_strict_spec.rb +23 -0
- data/spec/models/{model_portfolio_asset_class_spec.rb → paginated_universal_activity_spec.rb} +8 -9
- data/spec/models/{model_asset_class_spec.rb → pagination_details_spec.rb} +8 -9
- data/spec/models/partner_data_spec.rb +12 -13
- data/spec/models/past_value_spec.rb +0 -1
- data/spec/models/performance_custom_spec.rb +0 -1
- data/spec/models/position_spec.rb +2 -3
- data/spec/models/position_symbol_spec.rb +3 -4
- data/spec/models/{portfolio_group_position_spec.rb → rate_of_return_object_spec.rb} +9 -10
- data/spec/models/rate_of_return_response_spec.rb +29 -0
- data/spec/models/recent_orders_response_spec.rb +29 -0
- data/spec/models/security_type_spec.rb +0 -1
- data/spec/models/session_event_spec.rb +0 -1
- data/spec/models/session_event_type_spec.rb +0 -1
- data/spec/models/snap_trade_holdings_account_spec.rb +0 -1
- data/spec/models/snap_trade_holdings_total_value_spec.rb +0 -1
- data/spec/models/snap_trade_login_user_request_body_spec.rb +0 -1
- data/spec/models/snap_trade_register_user_request_body_spec.rb +0 -1
- data/spec/models/status_spec.rb +0 -1
- data/spec/models/{amount_spec.rb → stop_loss_spec.rb} +8 -9
- data/spec/models/strategy_order_record_spec.rb +0 -1
- data/spec/models/strategy_order_record_status_spec.rb +0 -1
- data/spec/models/strategy_quotes_greek_spec.rb +0 -1
- data/spec/models/strategy_quotes_spec.rb +0 -1
- data/spec/models/strategy_type_spec.rb +0 -1
- data/spec/models/sub_period_return_rate_spec.rb +0 -1
- data/spec/models/symbol_currency_spec.rb +41 -0
- data/spec/models/{trade_spec.rb → symbol_exchange_spec.rb} +13 -14
- data/spec/models/symbol_figi_instrument_spec.rb +35 -0
- data/spec/models/symbol_query_spec.rb +0 -1
- data/spec/models/symbol_spec.rb +13 -2
- data/spec/models/symbols_quotes_inner_spec.rb +3 -4
- data/spec/models/{jwt_spec.rb → take_profit_spec.rb} +7 -8
- data/spec/models/time_in_force_strict_spec.rb +23 -0
- data/spec/models/timeframe_spec.rb +23 -0
- data/spec/models/trading_cancel_user_account_order_request_spec.rb +0 -1
- data/spec/models/transactions_status_spec.rb +6 -1
- data/spec/models/type_spec.rb +0 -1
- data/spec/models/{snap_trade_holdings_account_account_id_spec.rb → underlying_symbol_exchange_spec.rb} +13 -14
- data/spec/models/underlying_symbol_spec.rb +18 -1
- data/spec/models/{cash_restriction_spec.rb → underlying_symbol_type_spec.rb} +9 -16
- data/spec/models/universal_activity_spec.rb +15 -16
- data/spec/models/universal_symbol_spec.rb +12 -1
- data/spec/models/us_exchange_spec.rb +0 -1
- data/spec/models/user_i_dand_secret_spec.rb +0 -1
- data/spec/models/{excluded_asset_spec.rb → validated_trade_body_spec.rb} +7 -8
- data/spec/spec_helper.rb +0 -1
- metadata +203 -360
- data/docs/APIStatusApi.md +0 -57
- data/docs/Account.md +0 -38
- data/docs/AccountBalance.md +0 -18
- data/docs/AccountBalanceTotal.md +0 -20
- data/docs/AccountHoldings.md +0 -24
- data/docs/AccountHoldingsAccount.md +0 -26
- data/docs/AccountInformationApi.md +0 -544
- data/docs/AccountOrderRecord.md +0 -52
- data/docs/AccountOrderRecordStatus.md +0 -15
- data/docs/AccountSimple.md +0 -24
- data/docs/AccountSyncStatus.md +0 -18
- data/docs/Action.md +0 -15
- data/docs/Amount.md +0 -20
- data/docs/AuthType.md +0 -15
- data/docs/AuthenticationApi.md +0 -320
- data/docs/AuthenticationLoginSnapTradeUser200Response.md +0 -49
- data/docs/Balance.md +0 -20
- data/docs/Brokerage.md +0 -52
- data/docs/BrokerageAuthorization.md +0 -34
- data/docs/BrokerageAuthorizationType.md +0 -18
- data/docs/BrokerageAuthorizationTypeReadOnly.md +0 -24
- data/docs/BrokerageAuthorizationTypeReadOnlyBrokerage.md +0 -22
- data/docs/BrokerageAuthorizationTypeReadOnlyType.md +0 -15
- data/docs/BrokerageAuthorizationTypeType.md +0 -15
- data/docs/BrokerageSymbol.md +0 -28
- data/docs/BrokerageSymbolOptionSymbol.md +0 -34
- data/docs/BrokerageSymbolSymbol.md +0 -32
- data/docs/BrokerageType.md +0 -20
- data/docs/CalculatedTrade.md +0 -20
- data/docs/CashRestriction.md +0 -26
- data/docs/ConnectionPortalVersion.md +0 -15
- data/docs/ConnectionType.md +0 -15
- data/docs/ConnectionsApi.md +0 -265
- data/docs/ConnectionsSessionEvents200ResponseInner.md +0 -30
- data/docs/Currency.md +0 -22
- data/docs/DeleteUserResponse.md +0 -20
- data/docs/DividendAtDate.md +0 -22
- data/docs/EncryptedResponse.md +0 -20
- data/docs/EncryptedResponseEncryptedMessageData.md +0 -22
- data/docs/ErrorLogsApi.md +0 -68
- data/docs/Exchange.md +0 -32
- data/docs/ExchangeRatePairs.md +0 -22
- data/docs/ExcludedAsset.md +0 -18
- data/docs/JWT.md +0 -18
- data/docs/LoginRedirectURI.md +0 -20
- data/docs/ManualTrade.md +0 -32
- data/docs/ManualTradeAndImpact.md +0 -22
- data/docs/ManualTradeBalance.md +0 -22
- data/docs/ManualTradeForm.md +0 -34
- data/docs/ManualTradeSymbol.md +0 -28
- data/docs/Model400FailedRequestResponse.md +0 -20
- data/docs/Model401FailedRequestResponse.md +0 -20
- data/docs/Model403FailedRequestResponse.md +0 -20
- data/docs/Model404FailedRequestResponse.md +0 -20
- data/docs/Model500UnexpectedExceptionResponse.md +0 -22
- data/docs/ModelAssetClass.md +0 -20
- data/docs/ModelAssetClassDetails.md +0 -20
- data/docs/ModelAssetClassTarget.md +0 -18
- data/docs/ModelPortfolio.md +0 -22
- data/docs/ModelPortfolioAssetClass.md +0 -20
- data/docs/ModelPortfolioDetails.md +0 -22
- data/docs/ModelPortfolioSecurity.md +0 -20
- data/docs/ModelType.md +0 -15
- data/docs/MonthlyDividends.md +0 -20
- data/docs/NetContributions.md +0 -22
- data/docs/NetDividend.md +0 -22
- data/docs/OptionChainInner.md +0 -26
- data/docs/OptionChainInnerChainPerRootInner.md +0 -22
- data/docs/OptionChainInnerChainPerRootInnerChainPerStrikePriceInner.md +0 -22
- data/docs/OptionLeg.md +0 -22
- data/docs/OptionLegAction.md +0 -15
- data/docs/OptionStrategy.md +0 -26
- data/docs/OptionStrategyLegsInner.md +0 -24
- data/docs/OptionType.md +0 -15
- data/docs/OptionsApi.md +0 -390
- data/docs/OptionsGetOptionStrategyRequest.md +0 -22
- data/docs/OptionsHoldings.md +0 -28
- data/docs/OptionsPlaceOptionStrategyRequest.md +0 -22
- data/docs/OptionsPosition.md +0 -26
- data/docs/OptionsPositionCurrency.md +0 -22
- data/docs/OptionsSymbol.md +0 -34
- data/docs/OrderType.md +0 -15
- data/docs/PartnerData.md +0 -40
- data/docs/PastValue.md +0 -22
- data/docs/PerformanceCustom.md +0 -54
- data/docs/PortfolioGroup.md +0 -20
- data/docs/PortfolioGroupInfo.md +0 -38
- data/docs/PortfolioGroupPosition.md +0 -22
- data/docs/PortfolioGroupSettings.md +0 -26
- data/docs/Position.md +0 -28
- data/docs/PositionSymbol.md +0 -28
- data/docs/RedirectTokenandPin.md +0 -20
- data/docs/ReferenceDataApi.md +0 -597
- data/docs/SecurityType.md +0 -24
- data/docs/SessionEvent.md +0 -30
- data/docs/SessionEventType.md +0 -15
- data/docs/SnapTradeAPIDisclaimerAcceptStatus.md +0 -20
- data/docs/SnapTradeHoldingsAccount.md +0 -32
- data/docs/SnapTradeHoldingsAccountAccountId.md +0 -34
- data/docs/SnapTradeHoldingsTotalValue.md +0 -20
- data/docs/SnapTradeLoginUserRequestBody.md +0 -28
- data/docs/SnapTradeRegisterUserRequestBody.md +0 -18
- data/docs/State.md +0 -15
- data/docs/Status.md +0 -22
- data/docs/StrategyImpact.md +0 -38
- data/docs/StrategyImpactLegsInner.md +0 -30
- data/docs/StrategyOrderPlace.md +0 -20
- data/docs/StrategyOrderPlaceOrdersInner.md +0 -102
- data/docs/StrategyOrderPlaceOrdersInnerLegsInner.md +0 -30
- data/docs/StrategyOrderRecord.md +0 -38
- data/docs/StrategyOrderRecordStatus.md +0 -15
- data/docs/StrategyQuotes.md +0 -28
- data/docs/StrategyQuotesGreek.md +0 -26
- data/docs/StrategyType.md +0 -15
- data/docs/SubPeriodReturnRate.md +0 -22
- data/docs/Symbol.md +0 -30
- data/docs/SymbolQuery.md +0 -18
- data/docs/SymbolsQuotesInner.md +0 -28
- data/docs/TargetAsset.md +0 -28
- data/docs/TimeInForce.md +0 -15
- data/docs/Trade.md +0 -32
- data/docs/TradeAction.md +0 -15
- data/docs/TradeExecutionStatus.md +0 -34
- data/docs/TradeExecutionStatusAction.md +0 -15
- data/docs/TradeImpact.md +0 -26
- data/docs/TradingApi.md +0 -486
- data/docs/TradingCancelUserAccountOrderRequest.md +0 -18
- data/docs/TradingPlaceOCOOrderRequest.md +0 -20
- data/docs/TransactionsAndReportingApi.md +0 -183
- data/docs/TransactionsStatus.md +0 -20
- data/docs/Type.md +0 -15
- data/docs/USExchange.md +0 -34
- data/docs/UnderlyingSymbol.md +0 -30
- data/docs/UniversalActivity.md +0 -50
- data/docs/UniversalSymbol.md +0 -32
- data/docs/UniversalSymbolTicker.md +0 -32
- data/docs/UserErrorLog.md +0 -28
- data/docs/UserIDandSecret.md +0 -20
- data/docs/UserSettings.md +0 -36
- data/lib/snaptrade/api/error_logs_api.rb +0 -110
- data/lib/snaptrade/models/action.rb +0 -38
- data/lib/snaptrade/models/brokerage_authorization_type_read_only_type.rb +0 -38
- data/lib/snaptrade/models/cash_restriction.rb +0 -254
- data/lib/snaptrade/models/model_asset_class_details.rb +0 -228
- data/lib/snaptrade/models/model_portfolio_asset_class.rb +0 -250
- data/lib/snaptrade/models/model_portfolio_details.rb +0 -239
- data/lib/snaptrade/models/portfolio_group_info.rb +0 -326
- data/lib/snaptrade/models/portfolio_group_settings.rb +0 -277
- data/lib/snaptrade/models/redirect_tokenand_pin.rb +0 -227
- data/lib/snaptrade/models/state.rb +0 -41
- data/lib/snaptrade/models/strategy_impact.rb +0 -310
- data/lib/snaptrade/models/strategy_impact_legs_inner.rb +0 -271
- data/lib/snaptrade/models/strategy_order_place_orders_inner.rb +0 -597
- data/lib/snaptrade/models/strategy_order_place_orders_inner_legs_inner.rb +0 -271
- data/lib/snaptrade/models/trade_execution_status.rb +0 -296
- data/lib/snaptrade/models/trading_place_oco_order_request.rb +0 -230
- data/lib/snaptrade/models/user_error_log.rb +0 -263
- data/lib/snaptrade/models/user_settings.rb +0 -299
- data/spec/api/error_logs_api_spec.rb +0 -43
- data/spec/models/action_spec.rb +0 -24
- data/spec/models/brokerage_authorization_type_read_only_type_spec.rb +0 -24
- data/spec/models/brokerage_authorization_type_type_spec.rb +0 -24
- data/spec/models/brokerage_symbol_spec.rb +0 -60
- data/spec/models/model_asset_class_target_spec.rb +0 -30
- data/spec/models/model_portfolio_security_spec.rb +0 -36
- data/spec/models/model_type_spec.rb +0 -24
- data/spec/models/options_holdings_spec.rb +0 -60
- data/spec/models/order_type_spec.rb +0 -24
- data/spec/models/portfolio_group_settings_spec.rb +0 -54
- data/spec/models/redirect_tokenand_pin_spec.rb +0 -36
- data/spec/models/state_spec.rb +0 -24
- data/spec/models/strategy_order_place_orders_inner_legs_inner_spec.rb +0 -66
- data/spec/models/strategy_order_place_orders_inner_spec.rb +0 -282
- data/spec/models/strategy_order_place_spec.rb +0 -36
- data/spec/models/target_asset_spec.rb +0 -60
- data/spec/models/time_in_force_spec.rb +0 -24
- data/spec/models/trade_action_spec.rb +0 -24
- data/spec/models/trade_execution_status_action_spec.rb +0 -24
- data/spec/models/trade_execution_status_spec.rb +0 -78
- data/spec/models/trading_place_oco_order_request_spec.rb +0 -36
- data/spec/models/user_error_log_spec.rb +0 -60
- data/spec/models/user_settings_spec.rb +0 -84
@@ -5,7 +5,6 @@
|
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: api@snaptrade.com
|
8
|
-
|
9
8
|
=end
|
10
9
|
|
11
10
|
require 'cgi'
|
@@ -18,10 +17,174 @@ module SnapTrade
|
|
18
17
|
@api_client = api_client
|
19
18
|
end
|
20
19
|
|
20
|
+
# List account activities
|
21
|
+
#
|
22
|
+
# Returns all historical transactions for the specified account.
|
23
|
+
#
|
24
|
+
# 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.
|
25
|
+
#
|
26
|
+
# Transaction are returned in reverse chronological order, using the `trade_date` field.
|
27
|
+
#
|
28
|
+
# The data returned here is always cached and refreshed once a day.
|
29
|
+
#
|
30
|
+
# @param account_id [String]
|
31
|
+
# @param user_id [String]
|
32
|
+
# @param user_secret [String]
|
33
|
+
# @param start_date [Date] The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`.
|
34
|
+
# @param end_date [Date] The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
35
|
+
# @param offset [Integer] An integer that specifies the starting point of the paginated results. Default is 0.
|
36
|
+
# @param limit [Integer] An integer that specifies the maximum number of transactions to return. Default of 1000.
|
37
|
+
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
|
38
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
39
|
+
def get_account_activities(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {})
|
40
|
+
extra[:start_date] = start_date if start_date != SENTINEL
|
41
|
+
extra[:end_date] = end_date if end_date != SENTINEL
|
42
|
+
extra[:offset] = offset if offset != SENTINEL
|
43
|
+
extra[:limit] = limit if limit != SENTINEL
|
44
|
+
extra[:type] = type if type != SENTINEL
|
45
|
+
data, _status_code, _headers = get_account_activities_with_http_info_impl(account_id, user_id, user_secret, extra)
|
46
|
+
data
|
47
|
+
end
|
48
|
+
|
49
|
+
# List account activities
|
50
|
+
#
|
51
|
+
# Returns all historical transactions for the specified account.
|
52
|
+
#
|
53
|
+
# 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.
|
54
|
+
#
|
55
|
+
# Transaction are returned in reverse chronological order, using the `trade_date` field.
|
56
|
+
#
|
57
|
+
# The data returned here is always cached and refreshed once a day.
|
58
|
+
#
|
59
|
+
# @param account_id [String]
|
60
|
+
# @param user_id [String]
|
61
|
+
# @param user_secret [String]
|
62
|
+
# @param start_date [Date] The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`.
|
63
|
+
# @param end_date [Date] The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
64
|
+
# @param offset [Integer] An integer that specifies the starting point of the paginated results. Default is 0.
|
65
|
+
# @param limit [Integer] An integer that specifies the maximum number of transactions to return. Default of 1000.
|
66
|
+
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
|
67
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
68
|
+
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: {})
|
69
|
+
extra[:start_date] = start_date if start_date != SENTINEL
|
70
|
+
extra[:end_date] = end_date if end_date != SENTINEL
|
71
|
+
extra[:offset] = offset if offset != SENTINEL
|
72
|
+
extra[:limit] = limit if limit != SENTINEL
|
73
|
+
extra[:type] = type if type != SENTINEL
|
74
|
+
get_account_activities_with_http_info_impl(account_id, user_id, user_secret, extra)
|
75
|
+
end
|
76
|
+
|
77
|
+
# List account activities
|
78
|
+
# 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. The data returned here is always cached and refreshed once a day.
|
79
|
+
# @param account_id [String]
|
80
|
+
# @param user_id [String]
|
81
|
+
# @param user_secret [String]
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @option opts [Date] :start_date The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`.
|
84
|
+
# @option opts [Date] :end_date The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
85
|
+
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0.
|
86
|
+
# @option opts [Integer] :limit An integer that specifies the maximum number of transactions to return. Default of 1000.
|
87
|
+
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
|
88
|
+
# @return [PaginatedUniversalActivity]
|
89
|
+
private def get_account_activities_impl(account_id, user_id, user_secret, opts = {})
|
90
|
+
data, _status_code, _headers = get_account_activities_with_http_info(account_id, user_id, user_secret, opts)
|
91
|
+
data
|
92
|
+
end
|
93
|
+
|
94
|
+
# List account activities
|
95
|
+
# 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. The data returned here is always cached and refreshed once a day.
|
96
|
+
# @param account_id [String]
|
97
|
+
# @param user_id [String]
|
98
|
+
# @param user_secret [String]
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @option opts [Date] :start_date The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`.
|
101
|
+
# @option opts [Date] :end_date The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
102
|
+
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0.
|
103
|
+
# @option opts [Integer] :limit An integer that specifies the maximum number of transactions to return. Default of 1000.
|
104
|
+
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
|
105
|
+
# @return [Array<(PaginatedUniversalActivity, Integer, Hash)>] PaginatedUniversalActivity data, response status code and response headers
|
106
|
+
private def get_account_activities_with_http_info_impl(account_id, user_id, user_secret, opts = {})
|
107
|
+
if @api_client.config.debugging
|
108
|
+
@api_client.config.logger.debug 'Calling API: AccountInformationApi.get_account_activities ...'
|
109
|
+
end
|
110
|
+
# verify the required parameter 'account_id' is set
|
111
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
112
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountInformationApi.get_account_activities"
|
113
|
+
end
|
114
|
+
# verify the required parameter 'user_id' is set
|
115
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AccountInformationApi.get_account_activities"
|
117
|
+
end
|
118
|
+
# verify the required parameter 'user_secret' is set
|
119
|
+
if @api_client.config.client_side_validation && user_secret.nil?
|
120
|
+
fail ArgumentError, "Missing the required parameter 'user_secret' when calling AccountInformationApi.get_account_activities"
|
121
|
+
end
|
122
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
123
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling AccountInformationApi.get_account_activities, must be greater than or equal to 0.'
|
124
|
+
end
|
125
|
+
|
126
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
127
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountInformationApi.get_account_activities, must be greater than or equal to 1.'
|
128
|
+
end
|
129
|
+
|
130
|
+
# resource path
|
131
|
+
local_var_path = '/accounts/{accountId}/activities'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
132
|
+
|
133
|
+
# query parameters
|
134
|
+
query_params = opts[:query_params] || {}
|
135
|
+
query_params[:'userId'] = user_id
|
136
|
+
query_params[:'userSecret'] = user_secret
|
137
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
138
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
139
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
140
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
141
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
142
|
+
|
143
|
+
# header parameters
|
144
|
+
header_params = opts[:header_params] || {}
|
145
|
+
# HTTP header 'Accept' (if needed)
|
146
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
147
|
+
|
148
|
+
# form parameters
|
149
|
+
form_params = opts[:form_params] || {}
|
150
|
+
|
151
|
+
# http body (model)
|
152
|
+
post_body = opts[:debug_body]
|
153
|
+
|
154
|
+
# return_type
|
155
|
+
return_type = opts[:debug_return_type] || 'PaginatedUniversalActivity'
|
156
|
+
|
157
|
+
# auth_names
|
158
|
+
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
159
|
+
|
160
|
+
new_options = opts.merge(
|
161
|
+
:operation => :"AccountInformationApi.get_account_activities",
|
162
|
+
:header_params => header_params,
|
163
|
+
:query_params => query_params,
|
164
|
+
:form_params => form_params,
|
165
|
+
:body => post_body,
|
166
|
+
:auth_names => auth_names,
|
167
|
+
:return_type => return_type
|
168
|
+
)
|
169
|
+
|
170
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
171
|
+
if @api_client.config.debugging
|
172
|
+
@api_client.config.logger.debug "API called: AccountInformationApi#get_account_activities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
173
|
+
end
|
174
|
+
return data, status_code, headers, response
|
175
|
+
end
|
176
|
+
|
177
|
+
|
21
178
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
179
|
+
#
|
180
|
+
# **Deprecated, please use the account-specific holdings endpoint instead.**
|
181
|
+
#
|
182
|
+
# List all accounts for the user, plus balances, positions, and orders for each
|
183
|
+
# account.
|
184
|
+
#
|
22
185
|
# @param user_id [String]
|
23
186
|
# @param user_secret [String]
|
24
|
-
# @param brokerage_authorizations [String] Optional. Comma
|
187
|
+
# @param brokerage_authorizations [String] Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
25
188
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
26
189
|
def get_all_user_holdings(user_id:, user_secret:, brokerage_authorizations: SENTINEL, extra: {})
|
27
190
|
extra[:brokerage_authorizations] = brokerage_authorizations if brokerage_authorizations != SENTINEL
|
@@ -30,9 +193,15 @@ module SnapTrade
|
|
30
193
|
end
|
31
194
|
|
32
195
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
196
|
+
#
|
197
|
+
# **Deprecated, please use the account-specific holdings endpoint instead.**
|
198
|
+
#
|
199
|
+
# List all accounts for the user, plus balances, positions, and orders for each
|
200
|
+
# account.
|
201
|
+
#
|
33
202
|
# @param user_id [String]
|
34
203
|
# @param user_secret [String]
|
35
|
-
# @param brokerage_authorizations [String] Optional. Comma
|
204
|
+
# @param brokerage_authorizations [String] Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
36
205
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
37
206
|
def get_all_user_holdings_with_http_info(user_id:, user_secret:, brokerage_authorizations: SENTINEL, extra: {})
|
38
207
|
extra[:brokerage_authorizations] = brokerage_authorizations if brokerage_authorizations != SENTINEL
|
@@ -40,23 +209,25 @@ module SnapTrade
|
|
40
209
|
end
|
41
210
|
|
42
211
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
212
|
+
# **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account.
|
43
213
|
# @param user_id [String]
|
44
214
|
# @param user_secret [String]
|
45
215
|
# @param [Hash] opts the optional parameters
|
46
|
-
# @option opts [String] :brokerage_authorizations Optional. Comma
|
216
|
+
# @option opts [String] :brokerage_authorizations Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
47
217
|
# @return [Array<AccountHoldings>]
|
48
|
-
def get_all_user_holdings_impl(user_id, user_secret, opts = {})
|
218
|
+
private def get_all_user_holdings_impl(user_id, user_secret, opts = {})
|
49
219
|
data, _status_code, _headers = get_all_user_holdings_with_http_info(user_id, user_secret, opts)
|
50
220
|
data
|
51
221
|
end
|
52
222
|
|
53
223
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
224
|
+
# **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account.
|
54
225
|
# @param user_id [String]
|
55
226
|
# @param user_secret [String]
|
56
227
|
# @param [Hash] opts the optional parameters
|
57
|
-
# @option opts [String] :brokerage_authorizations Optional. Comma
|
228
|
+
# @option opts [String] :brokerage_authorizations Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
58
229
|
# @return [Array<(Array<AccountHoldings>, Integer, Hash)>] Array<AccountHoldings> data, response status code and response headers
|
59
|
-
def get_all_user_holdings_with_http_info_impl(user_id, user_secret, opts = {})
|
230
|
+
private def get_all_user_holdings_with_http_info_impl(user_id, user_secret, opts = {})
|
60
231
|
if @api_client.config.debugging
|
61
232
|
@api_client.config.logger.debug 'Calling API: AccountInformationApi.get_all_user_holdings ...'
|
62
233
|
end
|
@@ -113,10 +284,14 @@ module SnapTrade
|
|
113
284
|
|
114
285
|
|
115
286
|
# List account balances
|
116
|
-
#
|
287
|
+
#
|
288
|
+
# 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](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances).
|
289
|
+
#
|
290
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
291
|
+
#
|
117
292
|
# @param user_id [String]
|
118
293
|
# @param user_secret [String]
|
119
|
-
# @param account_id [String]
|
294
|
+
# @param account_id [String]
|
120
295
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
121
296
|
def get_user_account_balance(user_id:, user_secret:, account_id:, extra: {})
|
122
297
|
data, _status_code, _headers = get_user_account_balance_with_http_info_impl(user_id, user_secret, account_id, extra)
|
@@ -124,35 +299,39 @@ module SnapTrade
|
|
124
299
|
end
|
125
300
|
|
126
301
|
# List account balances
|
127
|
-
#
|
302
|
+
#
|
303
|
+
# 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](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances).
|
304
|
+
#
|
305
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
306
|
+
#
|
128
307
|
# @param user_id [String]
|
129
308
|
# @param user_secret [String]
|
130
|
-
# @param account_id [String]
|
309
|
+
# @param account_id [String]
|
131
310
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
132
311
|
def get_user_account_balance_with_http_info(user_id:, user_secret:, account_id:, extra: {})
|
133
312
|
get_user_account_balance_with_http_info_impl(user_id, user_secret, account_id, extra)
|
134
313
|
end
|
135
314
|
|
136
315
|
# List account balances
|
137
|
-
#
|
316
|
+
# 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](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
138
317
|
# @param user_id [String]
|
139
318
|
# @param user_secret [String]
|
140
|
-
# @param account_id [String]
|
319
|
+
# @param account_id [String]
|
141
320
|
# @param [Hash] opts the optional parameters
|
142
321
|
# @return [Array<Balance>]
|
143
|
-
def get_user_account_balance_impl(user_id, user_secret, account_id, opts = {})
|
322
|
+
private def get_user_account_balance_impl(user_id, user_secret, account_id, opts = {})
|
144
323
|
data, _status_code, _headers = get_user_account_balance_with_http_info(user_id, user_secret, account_id, opts)
|
145
324
|
data
|
146
325
|
end
|
147
326
|
|
148
327
|
# List account balances
|
149
|
-
#
|
328
|
+
# 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](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
150
329
|
# @param user_id [String]
|
151
330
|
# @param user_secret [String]
|
152
|
-
# @param account_id [String]
|
331
|
+
# @param account_id [String]
|
153
332
|
# @param [Hash] opts the optional parameters
|
154
333
|
# @return [Array<(Array<Balance>, Integer, Hash)>] Array<Balance> data, response status code and response headers
|
155
|
-
def get_user_account_balance_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
334
|
+
private def get_user_account_balance_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
156
335
|
if @api_client.config.debugging
|
157
336
|
@api_client.config.logger.debug 'Calling API: AccountInformationApi.get_user_account_balance ...'
|
158
337
|
end
|
@@ -179,7 +358,7 @@ module SnapTrade
|
|
179
358
|
# header parameters
|
180
359
|
header_params = opts[:header_params] || {}
|
181
360
|
# HTTP header 'Accept' (if needed)
|
182
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
361
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
183
362
|
|
184
363
|
# form parameters
|
185
364
|
form_params = opts[:form_params] || {}
|
@@ -211,43 +390,55 @@ module SnapTrade
|
|
211
390
|
end
|
212
391
|
|
213
392
|
|
214
|
-
#
|
393
|
+
# Get account detail
|
394
|
+
#
|
395
|
+
# Returns account detail known to SnapTrade for the specified account.
|
396
|
+
#
|
397
|
+
# The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
398
|
+
#
|
215
399
|
# @param user_id [String]
|
216
400
|
# @param user_secret [String]
|
217
|
-
# @param account_id [String]
|
401
|
+
# @param account_id [String]
|
218
402
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
219
403
|
def get_user_account_details(user_id:, user_secret:, account_id:, extra: {})
|
220
404
|
data, _status_code, _headers = get_user_account_details_with_http_info_impl(user_id, user_secret, account_id, extra)
|
221
405
|
data
|
222
406
|
end
|
223
407
|
|
224
|
-
#
|
408
|
+
# Get account detail
|
409
|
+
#
|
410
|
+
# Returns account detail known to SnapTrade for the specified account.
|
411
|
+
#
|
412
|
+
# The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
413
|
+
#
|
225
414
|
# @param user_id [String]
|
226
415
|
# @param user_secret [String]
|
227
|
-
# @param account_id [String]
|
416
|
+
# @param account_id [String]
|
228
417
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
229
418
|
def get_user_account_details_with_http_info(user_id:, user_secret:, account_id:, extra: {})
|
230
419
|
get_user_account_details_with_http_info_impl(user_id, user_secret, account_id, extra)
|
231
420
|
end
|
232
421
|
|
233
|
-
#
|
422
|
+
# Get account detail
|
423
|
+
# Returns account detail known to SnapTrade for the specified account. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
234
424
|
# @param user_id [String]
|
235
425
|
# @param user_secret [String]
|
236
|
-
# @param account_id [String]
|
426
|
+
# @param account_id [String]
|
237
427
|
# @param [Hash] opts the optional parameters
|
238
428
|
# @return [Account]
|
239
|
-
def get_user_account_details_impl(user_id, user_secret, account_id, opts = {})
|
429
|
+
private def get_user_account_details_impl(user_id, user_secret, account_id, opts = {})
|
240
430
|
data, _status_code, _headers = get_user_account_details_with_http_info(user_id, user_secret, account_id, opts)
|
241
431
|
data
|
242
432
|
end
|
243
433
|
|
244
|
-
#
|
434
|
+
# Get account detail
|
435
|
+
# Returns account detail known to SnapTrade for the specified account. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
245
436
|
# @param user_id [String]
|
246
437
|
# @param user_secret [String]
|
247
|
-
# @param account_id [String]
|
438
|
+
# @param account_id [String]
|
248
439
|
# @param [Hash] opts the optional parameters
|
249
440
|
# @return [Array<(Account, Integer, Hash)>] Account data, response status code and response headers
|
250
|
-
def get_user_account_details_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
441
|
+
private def get_user_account_details_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
251
442
|
if @api_client.config.debugging
|
252
443
|
@api_client.config.logger.debug 'Calling API: AccountInformationApi.get_user_account_details ...'
|
253
444
|
end
|
@@ -306,13 +497,17 @@ module SnapTrade
|
|
306
497
|
end
|
307
498
|
|
308
499
|
|
309
|
-
# List account orders
|
310
|
-
#
|
500
|
+
# List account recent orders
|
501
|
+
#
|
502
|
+
# Returns a list of recent orders in the specified account.
|
503
|
+
#
|
504
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
505
|
+
#
|
311
506
|
# @param user_id [String]
|
312
507
|
# @param user_secret [String]
|
313
|
-
# @param account_id [String]
|
314
|
-
# @param state [String] defaults value is set to
|
315
|
-
# @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last
|
508
|
+
# @param account_id [String]
|
509
|
+
# @param state [String] defaults value is set to \"all\"
|
510
|
+
# @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
316
511
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
317
512
|
def get_user_account_orders(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
|
318
513
|
extra[:state] = state if state != SENTINEL
|
@@ -321,13 +516,17 @@ module SnapTrade
|
|
321
516
|
data
|
322
517
|
end
|
323
518
|
|
324
|
-
# List account orders
|
325
|
-
#
|
519
|
+
# List account recent orders
|
520
|
+
#
|
521
|
+
# Returns a list of recent orders in the specified account.
|
522
|
+
#
|
523
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
524
|
+
#
|
326
525
|
# @param user_id [String]
|
327
526
|
# @param user_secret [String]
|
328
|
-
# @param account_id [String]
|
329
|
-
# @param state [String] defaults value is set to
|
330
|
-
# @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last
|
527
|
+
# @param account_id [String]
|
528
|
+
# @param state [String] defaults value is set to \"all\"
|
529
|
+
# @param days [Integer] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
331
530
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
332
531
|
def get_user_account_orders_with_http_info(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
|
333
532
|
extra[:state] = state if state != SENTINEL
|
@@ -335,30 +534,30 @@ module SnapTrade
|
|
335
534
|
get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
|
336
535
|
end
|
337
536
|
|
338
|
-
# List account orders
|
339
|
-
#
|
537
|
+
# List account recent orders
|
538
|
+
# Returns a list of recent orders in the specified account. The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
340
539
|
# @param user_id [String]
|
341
540
|
# @param user_secret [String]
|
342
|
-
# @param account_id [String]
|
541
|
+
# @param account_id [String]
|
343
542
|
# @param [Hash] opts the optional parameters
|
344
|
-
# @option opts [String] :state defaults value is set to
|
345
|
-
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last
|
543
|
+
# @option opts [String] :state defaults value is set to \"all\"
|
544
|
+
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
346
545
|
# @return [Array<AccountOrderRecord>]
|
347
|
-
def get_user_account_orders_impl(user_id, user_secret, account_id, opts = {})
|
546
|
+
private def get_user_account_orders_impl(user_id, user_secret, account_id, opts = {})
|
348
547
|
data, _status_code, _headers = get_user_account_orders_with_http_info(user_id, user_secret, account_id, opts)
|
349
548
|
data
|
350
549
|
end
|
351
550
|
|
352
|
-
# List account orders
|
353
|
-
#
|
551
|
+
# List account recent orders
|
552
|
+
# Returns a list of recent orders in the specified account. The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
354
553
|
# @param user_id [String]
|
355
554
|
# @param user_secret [String]
|
356
|
-
# @param account_id [String]
|
555
|
+
# @param account_id [String]
|
357
556
|
# @param [Hash] opts the optional parameters
|
358
|
-
# @option opts [String] :state defaults value is set to
|
359
|
-
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last
|
557
|
+
# @option opts [String] :state defaults value is set to \"all\"
|
558
|
+
# @option opts [Integer] :days Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
360
559
|
# @return [Array<(Array<AccountOrderRecord>, Integer, Hash)>] Array<AccountOrderRecord> data, response status code and response headers
|
361
|
-
def get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
560
|
+
private def get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
362
561
|
if @api_client.config.debugging
|
363
562
|
@api_client.config.logger.debug 'Calling API: AccountInformationApi.get_user_account_orders ...'
|
364
563
|
end
|
@@ -428,9 +627,14 @@ module SnapTrade
|
|
428
627
|
|
429
628
|
|
430
629
|
# List account positions
|
630
|
+
#
|
631
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings).
|
632
|
+
#
|
633
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
634
|
+
#
|
431
635
|
# @param user_id [String]
|
432
636
|
# @param user_secret [String]
|
433
|
-
# @param account_id [String]
|
637
|
+
# @param account_id [String]
|
434
638
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
435
639
|
def get_user_account_positions(user_id:, user_secret:, account_id:, extra: {})
|
436
640
|
data, _status_code, _headers = get_user_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra)
|
@@ -438,32 +642,39 @@ module SnapTrade
|
|
438
642
|
end
|
439
643
|
|
440
644
|
# List account positions
|
645
|
+
#
|
646
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings).
|
647
|
+
#
|
648
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
649
|
+
#
|
441
650
|
# @param user_id [String]
|
442
651
|
# @param user_secret [String]
|
443
|
-
# @param account_id [String]
|
652
|
+
# @param account_id [String]
|
444
653
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
445
654
|
def get_user_account_positions_with_http_info(user_id:, user_secret:, account_id:, extra: {})
|
446
655
|
get_user_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra)
|
447
656
|
end
|
448
657
|
|
449
658
|
# List account positions
|
659
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
450
660
|
# @param user_id [String]
|
451
661
|
# @param user_secret [String]
|
452
|
-
# @param account_id [String]
|
662
|
+
# @param account_id [String]
|
453
663
|
# @param [Hash] opts the optional parameters
|
454
664
|
# @return [Array<Position>]
|
455
|
-
def get_user_account_positions_impl(user_id, user_secret, account_id, opts = {})
|
665
|
+
private def get_user_account_positions_impl(user_id, user_secret, account_id, opts = {})
|
456
666
|
data, _status_code, _headers = get_user_account_positions_with_http_info(user_id, user_secret, account_id, opts)
|
457
667
|
data
|
458
668
|
end
|
459
669
|
|
460
670
|
# List account positions
|
671
|
+
# Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
461
672
|
# @param user_id [String]
|
462
673
|
# @param user_secret [String]
|
463
|
-
# @param account_id [String]
|
674
|
+
# @param account_id [String]
|
464
675
|
# @param [Hash] opts the optional parameters
|
465
676
|
# @return [Array<(Array<Position>, Integer, Hash)>] Array<Position> data, response status code and response headers
|
466
|
-
def get_user_account_positions_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
677
|
+
private def get_user_account_positions_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
467
678
|
if @api_client.config.debugging
|
468
679
|
@api_client.config.logger.debug 'Calling API: AccountInformationApi.get_user_account_positions ...'
|
469
680
|
end
|
@@ -490,7 +701,7 @@ module SnapTrade
|
|
490
701
|
# header parameters
|
491
702
|
header_params = opts[:header_params] || {}
|
492
703
|
# HTTP header 'Accept' (if needed)
|
493
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
704
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
494
705
|
|
495
706
|
# form parameters
|
496
707
|
form_params = opts[:form_params] || {}
|
@@ -522,8 +733,234 @@ module SnapTrade
|
|
522
733
|
end
|
523
734
|
|
524
735
|
|
525
|
-
# List
|
526
|
-
#
|
736
|
+
# List account recent orders (last 24 hours only)
|
737
|
+
#
|
738
|
+
# A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account.
|
739
|
+
# 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
|
740
|
+
# Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days
|
741
|
+
# By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
742
|
+
# **Please contact support for access as this endpoint is not enabled by default.**
|
743
|
+
#
|
744
|
+
# @param user_id [String]
|
745
|
+
# @param user_secret [String]
|
746
|
+
# @param account_id [String]
|
747
|
+
# @param only_executed [Boolean] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
|
748
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
749
|
+
def get_user_account_recent_orders(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {})
|
750
|
+
extra[:only_executed] = only_executed if only_executed != SENTINEL
|
751
|
+
data, _status_code, _headers = get_user_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
|
752
|
+
data
|
753
|
+
end
|
754
|
+
|
755
|
+
# List account recent orders (last 24 hours only)
|
756
|
+
#
|
757
|
+
# A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account.
|
758
|
+
# 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
|
759
|
+
# Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days
|
760
|
+
# By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
761
|
+
# **Please contact support for access as this endpoint is not enabled by default.**
|
762
|
+
#
|
763
|
+
# @param user_id [String]
|
764
|
+
# @param user_secret [String]
|
765
|
+
# @param account_id [String]
|
766
|
+
# @param only_executed [Boolean] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
|
767
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
768
|
+
def get_user_account_recent_orders_with_http_info(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {})
|
769
|
+
extra[:only_executed] = only_executed if only_executed != SENTINEL
|
770
|
+
get_user_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
|
771
|
+
end
|
772
|
+
|
773
|
+
# List account recent orders (last 24 hours only)
|
774
|
+
# A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. 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 realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Please contact support for access as this endpoint is not enabled by default.**
|
775
|
+
# @param user_id [String]
|
776
|
+
# @param user_secret [String]
|
777
|
+
# @param account_id [String]
|
778
|
+
# @param [Hash] opts the optional parameters
|
779
|
+
# @option opts [Boolean] :only_executed Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
|
780
|
+
# @return [RecentOrdersResponse]
|
781
|
+
private def get_user_account_recent_orders_impl(user_id, user_secret, account_id, opts = {})
|
782
|
+
data, _status_code, _headers = get_user_account_recent_orders_with_http_info(user_id, user_secret, account_id, opts)
|
783
|
+
data
|
784
|
+
end
|
785
|
+
|
786
|
+
# List account recent orders (last 24 hours only)
|
787
|
+
# A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. 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 realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Please contact support for access as this endpoint is not enabled by default.**
|
788
|
+
# @param user_id [String]
|
789
|
+
# @param user_secret [String]
|
790
|
+
# @param account_id [String]
|
791
|
+
# @param [Hash] opts the optional parameters
|
792
|
+
# @option opts [Boolean] :only_executed Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
|
793
|
+
# @return [Array<(RecentOrdersResponse, Integer, Hash)>] RecentOrdersResponse data, response status code and response headers
|
794
|
+
private def get_user_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
795
|
+
if @api_client.config.debugging
|
796
|
+
@api_client.config.logger.debug 'Calling API: AccountInformationApi.get_user_account_recent_orders ...'
|
797
|
+
end
|
798
|
+
# verify the required parameter 'user_id' is set
|
799
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
800
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AccountInformationApi.get_user_account_recent_orders"
|
801
|
+
end
|
802
|
+
# verify the required parameter 'user_secret' is set
|
803
|
+
if @api_client.config.client_side_validation && user_secret.nil?
|
804
|
+
fail ArgumentError, "Missing the required parameter 'user_secret' when calling AccountInformationApi.get_user_account_recent_orders"
|
805
|
+
end
|
806
|
+
# verify the required parameter 'account_id' is set
|
807
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
808
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountInformationApi.get_user_account_recent_orders"
|
809
|
+
end
|
810
|
+
# resource path
|
811
|
+
local_var_path = '/accounts/{accountId}/recentOrders'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
812
|
+
|
813
|
+
# query parameters
|
814
|
+
query_params = opts[:query_params] || {}
|
815
|
+
query_params[:'userId'] = user_id
|
816
|
+
query_params[:'userSecret'] = user_secret
|
817
|
+
query_params[:'only_executed'] = opts[:'only_executed'] if !opts[:'only_executed'].nil?
|
818
|
+
|
819
|
+
# header parameters
|
820
|
+
header_params = opts[:header_params] || {}
|
821
|
+
# HTTP header 'Accept' (if needed)
|
822
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
823
|
+
|
824
|
+
# form parameters
|
825
|
+
form_params = opts[:form_params] || {}
|
826
|
+
|
827
|
+
# http body (model)
|
828
|
+
post_body = opts[:debug_body]
|
829
|
+
|
830
|
+
# return_type
|
831
|
+
return_type = opts[:debug_return_type] || 'RecentOrdersResponse'
|
832
|
+
|
833
|
+
# auth_names
|
834
|
+
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
835
|
+
|
836
|
+
new_options = opts.merge(
|
837
|
+
:operation => :"AccountInformationApi.get_user_account_recent_orders",
|
838
|
+
:header_params => header_params,
|
839
|
+
:query_params => query_params,
|
840
|
+
:form_params => form_params,
|
841
|
+
:body => post_body,
|
842
|
+
:auth_names => auth_names,
|
843
|
+
:return_type => return_type
|
844
|
+
)
|
845
|
+
|
846
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
847
|
+
if @api_client.config.debugging
|
848
|
+
@api_client.config.logger.debug "API called: AccountInformationApi#get_user_account_recent_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
849
|
+
end
|
850
|
+
return data, status_code, headers, response
|
851
|
+
end
|
852
|
+
|
853
|
+
|
854
|
+
# List account rate of returns
|
855
|
+
#
|
856
|
+
# Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example "ALL", "1Y", "6M", "3M", "1M"
|
857
|
+
#
|
858
|
+
# @param user_id [String]
|
859
|
+
# @param user_secret [String]
|
860
|
+
# @param account_id [String]
|
861
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
862
|
+
def get_user_account_return_rates(user_id:, user_secret:, account_id:, extra: {})
|
863
|
+
data, _status_code, _headers = get_user_account_return_rates_with_http_info_impl(user_id, user_secret, account_id, extra)
|
864
|
+
data
|
865
|
+
end
|
866
|
+
|
867
|
+
# List account rate of returns
|
868
|
+
#
|
869
|
+
# Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example "ALL", "1Y", "6M", "3M", "1M"
|
870
|
+
#
|
871
|
+
# @param user_id [String]
|
872
|
+
# @param user_secret [String]
|
873
|
+
# @param account_id [String]
|
874
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
875
|
+
def get_user_account_return_rates_with_http_info(user_id:, user_secret:, account_id:, extra: {})
|
876
|
+
get_user_account_return_rates_with_http_info_impl(user_id, user_secret, account_id, extra)
|
877
|
+
end
|
878
|
+
|
879
|
+
# List account rate of returns
|
880
|
+
# Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
|
881
|
+
# @param user_id [String]
|
882
|
+
# @param user_secret [String]
|
883
|
+
# @param account_id [String]
|
884
|
+
# @param [Hash] opts the optional parameters
|
885
|
+
# @return [RateOfReturnResponse]
|
886
|
+
private def get_user_account_return_rates_impl(user_id, user_secret, account_id, opts = {})
|
887
|
+
data, _status_code, _headers = get_user_account_return_rates_with_http_info(user_id, user_secret, account_id, opts)
|
888
|
+
data
|
889
|
+
end
|
890
|
+
|
891
|
+
# List account rate of returns
|
892
|
+
# Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
|
893
|
+
# @param user_id [String]
|
894
|
+
# @param user_secret [String]
|
895
|
+
# @param account_id [String]
|
896
|
+
# @param [Hash] opts the optional parameters
|
897
|
+
# @return [Array<(RateOfReturnResponse, Integer, Hash)>] RateOfReturnResponse data, response status code and response headers
|
898
|
+
private def get_user_account_return_rates_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
899
|
+
if @api_client.config.debugging
|
900
|
+
@api_client.config.logger.debug 'Calling API: AccountInformationApi.get_user_account_return_rates ...'
|
901
|
+
end
|
902
|
+
# verify the required parameter 'user_id' is set
|
903
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
904
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AccountInformationApi.get_user_account_return_rates"
|
905
|
+
end
|
906
|
+
# verify the required parameter 'user_secret' is set
|
907
|
+
if @api_client.config.client_side_validation && user_secret.nil?
|
908
|
+
fail ArgumentError, "Missing the required parameter 'user_secret' when calling AccountInformationApi.get_user_account_return_rates"
|
909
|
+
end
|
910
|
+
# verify the required parameter 'account_id' is set
|
911
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
912
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountInformationApi.get_user_account_return_rates"
|
913
|
+
end
|
914
|
+
# resource path
|
915
|
+
local_var_path = '/accounts/{accountId}/returnRates'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
916
|
+
|
917
|
+
# query parameters
|
918
|
+
query_params = opts[:query_params] || {}
|
919
|
+
query_params[:'userId'] = user_id
|
920
|
+
query_params[:'userSecret'] = user_secret
|
921
|
+
|
922
|
+
# header parameters
|
923
|
+
header_params = opts[:header_params] || {}
|
924
|
+
# HTTP header 'Accept' (if needed)
|
925
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
926
|
+
|
927
|
+
# form parameters
|
928
|
+
form_params = opts[:form_params] || {}
|
929
|
+
|
930
|
+
# http body (model)
|
931
|
+
post_body = opts[:debug_body]
|
932
|
+
|
933
|
+
# return_type
|
934
|
+
return_type = opts[:debug_return_type] || 'RateOfReturnResponse'
|
935
|
+
|
936
|
+
# auth_names
|
937
|
+
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
938
|
+
|
939
|
+
new_options = opts.merge(
|
940
|
+
:operation => :"AccountInformationApi.get_user_account_return_rates",
|
941
|
+
:header_params => header_params,
|
942
|
+
:query_params => query_params,
|
943
|
+
:form_params => form_params,
|
944
|
+
:body => post_body,
|
945
|
+
:auth_names => auth_names,
|
946
|
+
:return_type => return_type
|
947
|
+
)
|
948
|
+
|
949
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
950
|
+
if @api_client.config.debugging
|
951
|
+
@api_client.config.logger.debug "API called: AccountInformationApi#get_user_account_return_rates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
952
|
+
end
|
953
|
+
return data, status_code, headers, response
|
954
|
+
end
|
955
|
+
|
956
|
+
|
957
|
+
# List account holdings
|
958
|
+
#
|
959
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__
|
960
|
+
#
|
961
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
962
|
+
#
|
963
|
+
# @param account_id [String]
|
527
964
|
# @param user_id [String]
|
528
965
|
# @param user_secret [String]
|
529
966
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -532,8 +969,13 @@ module SnapTrade
|
|
532
969
|
data
|
533
970
|
end
|
534
971
|
|
535
|
-
# List
|
536
|
-
#
|
972
|
+
# List account holdings
|
973
|
+
#
|
974
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__
|
975
|
+
#
|
976
|
+
# The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
977
|
+
#
|
978
|
+
# @param account_id [String]
|
537
979
|
# @param user_id [String]
|
538
980
|
# @param user_secret [String]
|
539
981
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -541,24 +983,26 @@ module SnapTrade
|
|
541
983
|
get_user_holdings_with_http_info_impl(account_id, user_id, user_secret, extra)
|
542
984
|
end
|
543
985
|
|
544
|
-
# List
|
545
|
-
#
|
986
|
+
# List account holdings
|
987
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
988
|
+
# @param account_id [String]
|
546
989
|
# @param user_id [String]
|
547
990
|
# @param user_secret [String]
|
548
991
|
# @param [Hash] opts the optional parameters
|
549
992
|
# @return [AccountHoldingsAccount]
|
550
|
-
def get_user_holdings_impl(account_id, user_id, user_secret, opts = {})
|
993
|
+
private def get_user_holdings_impl(account_id, user_id, user_secret, opts = {})
|
551
994
|
data, _status_code, _headers = get_user_holdings_with_http_info(account_id, user_id, user_secret, opts)
|
552
995
|
data
|
553
996
|
end
|
554
997
|
|
555
|
-
# List
|
556
|
-
#
|
998
|
+
# List account holdings
|
999
|
+
# Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
1000
|
+
# @param account_id [String]
|
557
1001
|
# @param user_id [String]
|
558
1002
|
# @param user_secret [String]
|
559
1003
|
# @param [Hash] opts the optional parameters
|
560
1004
|
# @return [Array<(AccountHoldingsAccount, Integer, Hash)>] AccountHoldingsAccount data, response status code and response headers
|
561
|
-
def get_user_holdings_with_http_info_impl(account_id, user_id, user_secret, opts = {})
|
1005
|
+
private def get_user_holdings_with_http_info_impl(account_id, user_id, user_secret, opts = {})
|
562
1006
|
if @api_client.config.debugging
|
563
1007
|
@api_client.config.logger.debug 'Calling API: AccountInformationApi.get_user_holdings ...'
|
564
1008
|
end
|
@@ -618,6 +1062,11 @@ module SnapTrade
|
|
618
1062
|
|
619
1063
|
|
620
1064
|
# List accounts
|
1065
|
+
#
|
1066
|
+
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
1067
|
+
#
|
1068
|
+
# The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
1069
|
+
#
|
621
1070
|
# @param user_id [String]
|
622
1071
|
# @param user_secret [String]
|
623
1072
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -627,6 +1076,11 @@ module SnapTrade
|
|
627
1076
|
end
|
628
1077
|
|
629
1078
|
# List accounts
|
1079
|
+
#
|
1080
|
+
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
1081
|
+
#
|
1082
|
+
# The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
1083
|
+
#
|
630
1084
|
# @param user_id [String]
|
631
1085
|
# @param user_secret [String]
|
632
1086
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -635,21 +1089,23 @@ module SnapTrade
|
|
635
1089
|
end
|
636
1090
|
|
637
1091
|
# List accounts
|
1092
|
+
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
638
1093
|
# @param user_id [String]
|
639
1094
|
# @param user_secret [String]
|
640
1095
|
# @param [Hash] opts the optional parameters
|
641
1096
|
# @return [Array<Account>]
|
642
|
-
def list_user_accounts_impl(user_id, user_secret, opts = {})
|
1097
|
+
private def list_user_accounts_impl(user_id, user_secret, opts = {})
|
643
1098
|
data, _status_code, _headers = list_user_accounts_with_http_info(user_id, user_secret, opts)
|
644
1099
|
data
|
645
1100
|
end
|
646
1101
|
|
647
1102
|
# List accounts
|
1103
|
+
# Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
648
1104
|
# @param user_id [String]
|
649
1105
|
# @param user_secret [String]
|
650
1106
|
# @param [Hash] opts the optional parameters
|
651
1107
|
# @return [Array<(Array<Account>, Integer, Hash)>] Array<Account> data, response status code and response headers
|
652
|
-
def list_user_accounts_with_http_info_impl(user_id, user_secret, opts = {})
|
1108
|
+
private def list_user_accounts_with_http_info_impl(user_id, user_secret, opts = {})
|
653
1109
|
if @api_client.config.debugging
|
654
1110
|
@api_client.config.logger.debug 'Calling API: AccountInformationApi.list_user_accounts ...'
|
655
1111
|
end
|
@@ -705,6 +1161,9 @@ module SnapTrade
|
|
705
1161
|
|
706
1162
|
|
707
1163
|
# Update details of an investment account
|
1164
|
+
#
|
1165
|
+
# Updates various properties of a specified account.
|
1166
|
+
#
|
708
1167
|
# @param user_id [String]
|
709
1168
|
# @param user_secret [String]
|
710
1169
|
# @param account_id [String] The ID of the account to update.
|
@@ -715,6 +1174,9 @@ module SnapTrade
|
|
715
1174
|
end
|
716
1175
|
|
717
1176
|
# Update details of an investment account
|
1177
|
+
#
|
1178
|
+
# Updates various properties of a specified account.
|
1179
|
+
#
|
718
1180
|
# @param user_id [String]
|
719
1181
|
# @param user_secret [String]
|
720
1182
|
# @param account_id [String] The ID of the account to update.
|
@@ -724,23 +1186,25 @@ module SnapTrade
|
|
724
1186
|
end
|
725
1187
|
|
726
1188
|
# Update details of an investment account
|
1189
|
+
# Updates various properties of a specified account.
|
727
1190
|
# @param user_id [String]
|
728
1191
|
# @param user_secret [String]
|
729
1192
|
# @param account_id [String] The ID of the account to update.
|
730
1193
|
# @param [Hash] opts the optional parameters
|
731
1194
|
# @return [Array<Account>]
|
732
|
-
def update_user_account_impl(user_id, user_secret, account_id, opts = {})
|
1195
|
+
private def update_user_account_impl(user_id, user_secret, account_id, opts = {})
|
733
1196
|
data, _status_code, _headers = update_user_account_with_http_info(user_id, user_secret, account_id, opts)
|
734
1197
|
data
|
735
1198
|
end
|
736
1199
|
|
737
1200
|
# Update details of an investment account
|
1201
|
+
# Updates various properties of a specified account.
|
738
1202
|
# @param user_id [String]
|
739
1203
|
# @param user_secret [String]
|
740
1204
|
# @param account_id [String] The ID of the account to update.
|
741
1205
|
# @param [Hash] opts the optional parameters
|
742
1206
|
# @return [Array<(Array<Account>, Integer, Hash)>] Array<Account> data, response status code and response headers
|
743
|
-
def update_user_account_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
1207
|
+
private def update_user_account_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
744
1208
|
if @api_client.config.debugging
|
745
1209
|
@api_client.config.logger.debug 'Calling API: AccountInformationApi.update_user_account ...'
|
746
1210
|
end
|