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,7 +17,10 @@ module SnapTrade
|
|
18
17
|
@api_client = api_client
|
19
18
|
end
|
20
19
|
|
21
|
-
#
|
20
|
+
# Get exchange rate of a currency pair
|
21
|
+
#
|
22
|
+
# Returns an Exchange Rate Pair object for the specified Currency Pair.
|
23
|
+
#
|
22
24
|
# @param currency_pair [String] A currency pair based on currency code for example, {CAD-USD}
|
23
25
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
24
26
|
def get_currency_exchange_rate_pair(currency_pair:, extra: {})
|
@@ -26,27 +28,32 @@ module SnapTrade
|
|
26
28
|
data
|
27
29
|
end
|
28
30
|
|
29
|
-
#
|
31
|
+
# Get exchange rate of a currency pair
|
32
|
+
#
|
33
|
+
# Returns an Exchange Rate Pair object for the specified Currency Pair.
|
34
|
+
#
|
30
35
|
# @param currency_pair [String] A currency pair based on currency code for example, {CAD-USD}
|
31
36
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
32
37
|
def get_currency_exchange_rate_pair_with_http_info(currency_pair:, extra: {})
|
33
38
|
get_currency_exchange_rate_pair_with_http_info_impl(currency_pair, extra)
|
34
39
|
end
|
35
40
|
|
36
|
-
#
|
41
|
+
# Get exchange rate of a currency pair
|
42
|
+
# Returns an Exchange Rate Pair object for the specified Currency Pair.
|
37
43
|
# @param currency_pair [String] A currency pair based on currency code for example, {CAD-USD}
|
38
44
|
# @param [Hash] opts the optional parameters
|
39
45
|
# @return [ExchangeRatePairs]
|
40
|
-
def get_currency_exchange_rate_pair_impl(currency_pair, opts = {})
|
46
|
+
private def get_currency_exchange_rate_pair_impl(currency_pair, opts = {})
|
41
47
|
data, _status_code, _headers = get_currency_exchange_rate_pair_with_http_info(currency_pair, opts)
|
42
48
|
data
|
43
49
|
end
|
44
50
|
|
45
|
-
#
|
51
|
+
# Get exchange rate of a currency pair
|
52
|
+
# Returns an Exchange Rate Pair object for the specified Currency Pair.
|
46
53
|
# @param currency_pair [String] A currency pair based on currency code for example, {CAD-USD}
|
47
54
|
# @param [Hash] opts the optional parameters
|
48
55
|
# @return [Array<(ExchangeRatePairs, Integer, Hash)>] ExchangeRatePairs data, response status code and response headers
|
49
|
-
def get_currency_exchange_rate_pair_with_http_info_impl(currency_pair, opts = {})
|
56
|
+
private def get_currency_exchange_rate_pair_with_http_info_impl(currency_pair, opts = {})
|
50
57
|
if @api_client.config.debugging
|
51
58
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.get_currency_exchange_rate_pair ...'
|
52
59
|
end
|
@@ -95,31 +102,39 @@ module SnapTrade
|
|
95
102
|
end
|
96
103
|
|
97
104
|
|
98
|
-
# Get
|
105
|
+
# Get Client Info
|
106
|
+
#
|
107
|
+
# Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
108
|
+
#
|
99
109
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
100
110
|
def get_partner_info(extra: {})
|
101
111
|
data, _status_code, _headers = get_partner_info_with_http_info_impl(extra)
|
102
112
|
data
|
103
113
|
end
|
104
114
|
|
105
|
-
# Get
|
115
|
+
# Get Client Info
|
116
|
+
#
|
117
|
+
# Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
118
|
+
#
|
106
119
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
107
120
|
def get_partner_info_with_http_info(extra: {})
|
108
121
|
get_partner_info_with_http_info_impl(extra)
|
109
122
|
end
|
110
123
|
|
111
|
-
# Get
|
124
|
+
# Get Client Info
|
125
|
+
# Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
112
126
|
# @param [Hash] opts the optional parameters
|
113
127
|
# @return [PartnerData]
|
114
|
-
def get_partner_info_impl(opts = {})
|
128
|
+
private def get_partner_info_impl(opts = {})
|
115
129
|
data, _status_code, _headers = get_partner_info_with_http_info(opts)
|
116
130
|
data
|
117
131
|
end
|
118
132
|
|
119
|
-
# Get
|
133
|
+
# Get Client Info
|
134
|
+
# Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
120
135
|
# @param [Hash] opts the optional parameters
|
121
136
|
# @return [Array<(PartnerData, Integer, Hash)>] PartnerData data, response status code and response headers
|
122
|
-
def get_partner_info_with_http_info_impl(opts = {})
|
137
|
+
private def get_partner_info_with_http_info_impl(opts = {})
|
123
138
|
if @api_client.config.debugging
|
124
139
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.get_partner_info ...'
|
125
140
|
end
|
@@ -164,35 +179,39 @@ module SnapTrade
|
|
164
179
|
end
|
165
180
|
|
166
181
|
|
167
|
-
# List
|
168
|
-
#
|
182
|
+
# List security types
|
183
|
+
#
|
184
|
+
# Return all available security types supported by SnapTrade.
|
185
|
+
#
|
169
186
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
170
187
|
def get_security_types(extra: {})
|
171
188
|
data, _status_code, _headers = get_security_types_with_http_info_impl(extra)
|
172
189
|
data
|
173
190
|
end
|
174
191
|
|
175
|
-
# List
|
176
|
-
#
|
192
|
+
# List security types
|
193
|
+
#
|
194
|
+
# Return all available security types supported by SnapTrade.
|
195
|
+
#
|
177
196
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
178
197
|
def get_security_types_with_http_info(extra: {})
|
179
198
|
get_security_types_with_http_info_impl(extra)
|
180
199
|
end
|
181
200
|
|
182
|
-
# List
|
183
|
-
#
|
201
|
+
# List security types
|
202
|
+
# Return all available security types supported by SnapTrade.
|
184
203
|
# @param [Hash] opts the optional parameters
|
185
204
|
# @return [Array<SecurityType>]
|
186
|
-
def get_security_types_impl(opts = {})
|
205
|
+
private def get_security_types_impl(opts = {})
|
187
206
|
data, _status_code, _headers = get_security_types_with_http_info(opts)
|
188
207
|
data
|
189
208
|
end
|
190
209
|
|
191
|
-
# List
|
192
|
-
#
|
210
|
+
# List security types
|
211
|
+
# Return all available security types supported by SnapTrade.
|
193
212
|
# @param [Hash] opts the optional parameters
|
194
213
|
# @return [Array<(Array<SecurityType>, Integer, Hash)>] Array<SecurityType> data, response status code and response headers
|
195
|
-
def get_security_types_with_http_info_impl(opts = {})
|
214
|
+
private def get_security_types_with_http_info_impl(opts = {})
|
196
215
|
if @api_client.config.debugging
|
197
216
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.get_security_types ...'
|
198
217
|
end
|
@@ -237,31 +256,39 @@ module SnapTrade
|
|
237
256
|
end
|
238
257
|
|
239
258
|
|
240
|
-
#
|
259
|
+
# Get exchanges
|
260
|
+
#
|
261
|
+
# Returns a list of all supported Exchanges.
|
262
|
+
#
|
241
263
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
242
264
|
def get_stock_exchanges(extra: {})
|
243
265
|
data, _status_code, _headers = get_stock_exchanges_with_http_info_impl(extra)
|
244
266
|
data
|
245
267
|
end
|
246
268
|
|
247
|
-
#
|
269
|
+
# Get exchanges
|
270
|
+
#
|
271
|
+
# Returns a list of all supported Exchanges.
|
272
|
+
#
|
248
273
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
249
274
|
def get_stock_exchanges_with_http_info(extra: {})
|
250
275
|
get_stock_exchanges_with_http_info_impl(extra)
|
251
276
|
end
|
252
277
|
|
253
|
-
#
|
278
|
+
# Get exchanges
|
279
|
+
# Returns a list of all supported Exchanges.
|
254
280
|
# @param [Hash] opts the optional parameters
|
255
281
|
# @return [Array<Exchange>]
|
256
|
-
def get_stock_exchanges_impl(opts = {})
|
282
|
+
private def get_stock_exchanges_impl(opts = {})
|
257
283
|
data, _status_code, _headers = get_stock_exchanges_with_http_info(opts)
|
258
284
|
data
|
259
285
|
end
|
260
286
|
|
261
|
-
#
|
287
|
+
# Get exchanges
|
288
|
+
# Returns a list of all supported Exchanges.
|
262
289
|
# @param [Hash] opts the optional parameters
|
263
290
|
# @return [Array<(Array<Exchange>, Integer, Hash)>] Array<Exchange> data, response status code and response headers
|
264
|
-
def get_stock_exchanges_with_http_info_impl(opts = {})
|
291
|
+
private def get_stock_exchanges_with_http_info_impl(opts = {})
|
265
292
|
if @api_client.config.debugging
|
266
293
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.get_stock_exchanges ...'
|
267
294
|
end
|
@@ -306,8 +333,11 @@ module SnapTrade
|
|
306
333
|
end
|
307
334
|
|
308
335
|
|
309
|
-
# Search
|
310
|
-
#
|
336
|
+
# Search symbols
|
337
|
+
#
|
338
|
+
# Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.
|
339
|
+
#
|
340
|
+
# @param substring [String] The search query for symbols.
|
311
341
|
# @param body [SymbolQuery]
|
312
342
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
313
343
|
def get_symbols(substring: SENTINEL, extra: {})
|
@@ -318,8 +348,11 @@ module SnapTrade
|
|
318
348
|
data
|
319
349
|
end
|
320
350
|
|
321
|
-
# Search
|
322
|
-
#
|
351
|
+
# Search symbols
|
352
|
+
#
|
353
|
+
# Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.
|
354
|
+
#
|
355
|
+
# @param substring [String] The search query for symbols.
|
323
356
|
# @param body [SymbolQuery]
|
324
357
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
325
358
|
def get_symbols_with_http_info(substring: SENTINEL, extra: {})
|
@@ -329,20 +362,22 @@ module SnapTrade
|
|
329
362
|
get_symbols_with_http_info_impl(extra)
|
330
363
|
end
|
331
364
|
|
332
|
-
# Search
|
365
|
+
# Search symbols
|
366
|
+
# Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.
|
333
367
|
# @param [Hash] opts the optional parameters
|
334
368
|
# @option opts [SymbolQuery] :symbol_query
|
335
369
|
# @return [Array<UniversalSymbol>]
|
336
|
-
def get_symbols_impl(opts = {})
|
370
|
+
private def get_symbols_impl(opts = {})
|
337
371
|
data, _status_code, _headers = get_symbols_with_http_info(opts)
|
338
372
|
data
|
339
373
|
end
|
340
374
|
|
341
|
-
# Search
|
375
|
+
# Search symbols
|
376
|
+
# Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.
|
342
377
|
# @param [Hash] opts the optional parameters
|
343
378
|
# @option opts [SymbolQuery] :symbol_query
|
344
379
|
# @return [Array<(Array<UniversalSymbol>, Integer, Hash)>] Array<UniversalSymbol> data, response status code and response headers
|
345
|
-
def get_symbols_with_http_info_impl(opts = {})
|
380
|
+
private def get_symbols_with_http_info_impl(opts = {})
|
346
381
|
if @api_client.config.debugging
|
347
382
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.get_symbols ...'
|
348
383
|
end
|
@@ -392,59 +427,60 @@ module SnapTrade
|
|
392
427
|
end
|
393
428
|
|
394
429
|
|
395
|
-
# Get
|
396
|
-
#
|
397
|
-
#
|
430
|
+
# Get symbol detail
|
431
|
+
#
|
432
|
+
# Returns the Universal Symbol object specified by the ticker or the Universal Symbol ID. When a ticker is specified, the first matching result is returned. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on "Yahoo Finance Market Coverage and Data Delays"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. Please use the ticker with the proper suffix for the best results.
|
433
|
+
#
|
434
|
+
# @param query [String] The ticker or Universal Symbol ID to look up the symbol with.
|
398
435
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
399
|
-
def get_symbols_by_ticker(
|
400
|
-
|
401
|
-
data, _status_code, _headers = get_symbols_by_ticker_with_http_info_impl(ticker, extra)
|
436
|
+
def get_symbols_by_ticker(query:, extra: {})
|
437
|
+
data, _status_code, _headers = get_symbols_by_ticker_with_http_info_impl(query, extra)
|
402
438
|
data
|
403
439
|
end
|
404
440
|
|
405
|
-
# Get
|
406
|
-
#
|
407
|
-
#
|
441
|
+
# Get symbol detail
|
442
|
+
#
|
443
|
+
# Returns the Universal Symbol object specified by the ticker or the Universal Symbol ID. When a ticker is specified, the first matching result is returned. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on "Yahoo Finance Market Coverage and Data Delays"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. Please use the ticker with the proper suffix for the best results.
|
444
|
+
#
|
445
|
+
# @param query [String] The ticker or Universal Symbol ID to look up the symbol with.
|
408
446
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
409
|
-
def get_symbols_by_ticker_with_http_info(
|
410
|
-
extra
|
411
|
-
get_symbols_by_ticker_with_http_info_impl(ticker, extra)
|
447
|
+
def get_symbols_by_ticker_with_http_info(query:, extra: {})
|
448
|
+
get_symbols_by_ticker_with_http_info_impl(query, extra)
|
412
449
|
end
|
413
450
|
|
414
|
-
# Get
|
415
|
-
#
|
451
|
+
# Get symbol detail
|
452
|
+
# Returns the Universal Symbol object specified by the ticker or the Universal Symbol ID. When a ticker is specified, the first matching result is returned. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on \"Yahoo Finance Market Coverage and Data Delays\"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. Please use the ticker with the proper suffix for the best results.
|
453
|
+
# @param query [String] The ticker or Universal Symbol ID to look up the symbol with.
|
416
454
|
# @param [Hash] opts the optional parameters
|
417
|
-
# @option opts [String] :symbol_id OPTIONAL IN PATH Can be used instead of the ticker ; The ID of the UniversalSymbol to get.
|
418
455
|
# @return [UniversalSymbol]
|
419
|
-
def get_symbols_by_ticker_impl(
|
420
|
-
data, _status_code, _headers = get_symbols_by_ticker_with_http_info(
|
456
|
+
private def get_symbols_by_ticker_impl(query, opts = {})
|
457
|
+
data, _status_code, _headers = get_symbols_by_ticker_with_http_info(query, opts)
|
421
458
|
data
|
422
459
|
end
|
423
460
|
|
424
|
-
# Get
|
425
|
-
#
|
461
|
+
# Get symbol detail
|
462
|
+
# Returns the Universal Symbol object specified by the ticker or the Universal Symbol ID. When a ticker is specified, the first matching result is returned. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on \"Yahoo Finance Market Coverage and Data Delays\"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. Please use the ticker with the proper suffix for the best results.
|
463
|
+
# @param query [String] The ticker or Universal Symbol ID to look up the symbol with.
|
426
464
|
# @param [Hash] opts the optional parameters
|
427
|
-
# @option opts [String] :symbol_id OPTIONAL IN PATH Can be used instead of the ticker ; The ID of the UniversalSymbol to get.
|
428
465
|
# @return [Array<(UniversalSymbol, Integer, Hash)>] UniversalSymbol data, response status code and response headers
|
429
|
-
def get_symbols_by_ticker_with_http_info_impl(
|
466
|
+
private def get_symbols_by_ticker_with_http_info_impl(query, opts = {})
|
430
467
|
if @api_client.config.debugging
|
431
468
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.get_symbols_by_ticker ...'
|
432
469
|
end
|
433
|
-
# verify the required parameter '
|
434
|
-
if @api_client.config.client_side_validation &&
|
435
|
-
fail ArgumentError, "Missing the required parameter '
|
470
|
+
# verify the required parameter 'query' is set
|
471
|
+
if @api_client.config.client_side_validation && query.nil?
|
472
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling ReferenceDataApi.get_symbols_by_ticker"
|
436
473
|
end
|
437
474
|
# resource path
|
438
|
-
local_var_path = '/symbols/{
|
475
|
+
local_var_path = '/symbols/{query}'.sub('{' + 'query' + '}', CGI.escape(query.to_s))
|
439
476
|
|
440
477
|
# query parameters
|
441
478
|
query_params = opts[:query_params] || {}
|
442
|
-
query_params[:'symbolId'] = opts[:'symbol_id'] if !opts[:'symbol_id'].nil?
|
443
479
|
|
444
480
|
# header parameters
|
445
481
|
header_params = opts[:header_params] || {}
|
446
482
|
# HTTP header 'Accept' (if needed)
|
447
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
483
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
448
484
|
|
449
485
|
# form parameters
|
450
486
|
form_params = opts[:form_params] || {}
|
@@ -476,7 +512,10 @@ module SnapTrade
|
|
476
512
|
end
|
477
513
|
|
478
514
|
|
479
|
-
#
|
515
|
+
# Get all brokerage authorization types
|
516
|
+
#
|
517
|
+
# Returns a list of all defined Brokerage authorization Type objects.
|
518
|
+
#
|
480
519
|
# @param brokerage [String] Comma separated value of brokerage slugs
|
481
520
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
482
521
|
def list_all_brokerage_authorization_type(brokerage: SENTINEL, extra: {})
|
@@ -485,7 +524,10 @@ module SnapTrade
|
|
485
524
|
data
|
486
525
|
end
|
487
526
|
|
488
|
-
#
|
527
|
+
# Get all brokerage authorization types
|
528
|
+
#
|
529
|
+
# Returns a list of all defined Brokerage authorization Type objects.
|
530
|
+
#
|
489
531
|
# @param brokerage [String] Comma separated value of brokerage slugs
|
490
532
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
491
533
|
def list_all_brokerage_authorization_type_with_http_info(brokerage: SENTINEL, extra: {})
|
@@ -493,20 +535,22 @@ module SnapTrade
|
|
493
535
|
list_all_brokerage_authorization_type_with_http_info_impl(extra)
|
494
536
|
end
|
495
537
|
|
496
|
-
#
|
538
|
+
# Get all brokerage authorization types
|
539
|
+
# Returns a list of all defined Brokerage authorization Type objects.
|
497
540
|
# @param [Hash] opts the optional parameters
|
498
541
|
# @option opts [String] :brokerage Comma separated value of brokerage slugs
|
499
542
|
# @return [Array<BrokerageAuthorizationTypeReadOnly>]
|
500
|
-
def list_all_brokerage_authorization_type_impl(opts = {})
|
543
|
+
private def list_all_brokerage_authorization_type_impl(opts = {})
|
501
544
|
data, _status_code, _headers = list_all_brokerage_authorization_type_with_http_info(opts)
|
502
545
|
data
|
503
546
|
end
|
504
547
|
|
505
|
-
#
|
548
|
+
# Get all brokerage authorization types
|
549
|
+
# Returns a list of all defined Brokerage authorization Type objects.
|
506
550
|
# @param [Hash] opts the optional parameters
|
507
551
|
# @option opts [String] :brokerage Comma separated value of brokerage slugs
|
508
552
|
# @return [Array<(Array<BrokerageAuthorizationTypeReadOnly>, Integer, Hash)>] Array<BrokerageAuthorizationTypeReadOnly> data, response status code and response headers
|
509
|
-
def list_all_brokerage_authorization_type_with_http_info_impl(opts = {})
|
553
|
+
private def list_all_brokerage_authorization_type_with_http_info_impl(opts = {})
|
510
554
|
if @api_client.config.debugging
|
511
555
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.list_all_brokerage_authorization_type ...'
|
512
556
|
end
|
@@ -552,31 +596,39 @@ module SnapTrade
|
|
552
596
|
end
|
553
597
|
|
554
598
|
|
555
|
-
#
|
599
|
+
# Get brokerages
|
600
|
+
#
|
601
|
+
# Returns a list of all defined Brokerage objects.
|
602
|
+
#
|
556
603
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
557
604
|
def list_all_brokerages(extra: {})
|
558
605
|
data, _status_code, _headers = list_all_brokerages_with_http_info_impl(extra)
|
559
606
|
data
|
560
607
|
end
|
561
608
|
|
562
|
-
#
|
609
|
+
# Get brokerages
|
610
|
+
#
|
611
|
+
# Returns a list of all defined Brokerage objects.
|
612
|
+
#
|
563
613
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
564
614
|
def list_all_brokerages_with_http_info(extra: {})
|
565
615
|
list_all_brokerages_with_http_info_impl(extra)
|
566
616
|
end
|
567
617
|
|
568
|
-
#
|
618
|
+
# Get brokerages
|
619
|
+
# Returns a list of all defined Brokerage objects.
|
569
620
|
# @param [Hash] opts the optional parameters
|
570
621
|
# @return [Array<Brokerage>]
|
571
|
-
def list_all_brokerages_impl(opts = {})
|
622
|
+
private def list_all_brokerages_impl(opts = {})
|
572
623
|
data, _status_code, _headers = list_all_brokerages_with_http_info(opts)
|
573
624
|
data
|
574
625
|
end
|
575
626
|
|
576
|
-
#
|
627
|
+
# Get brokerages
|
628
|
+
# Returns a list of all defined Brokerage objects.
|
577
629
|
# @param [Hash] opts the optional parameters
|
578
630
|
# @return [Array<(Array<Brokerage>, Integer, Hash)>] Array<Brokerage> data, response status code and response headers
|
579
|
-
def list_all_brokerages_with_http_info_impl(opts = {})
|
631
|
+
private def list_all_brokerages_with_http_info_impl(opts = {})
|
580
632
|
if @api_client.config.debugging
|
581
633
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.list_all_brokerages ...'
|
582
634
|
end
|
@@ -621,31 +673,39 @@ module SnapTrade
|
|
621
673
|
end
|
622
674
|
|
623
675
|
|
624
|
-
#
|
676
|
+
# Get currencies
|
677
|
+
#
|
678
|
+
# Returns a list of all defined Currency objects.
|
679
|
+
#
|
625
680
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
626
681
|
def list_all_currencies(extra: {})
|
627
682
|
data, _status_code, _headers = list_all_currencies_with_http_info_impl(extra)
|
628
683
|
data
|
629
684
|
end
|
630
685
|
|
631
|
-
#
|
686
|
+
# Get currencies
|
687
|
+
#
|
688
|
+
# Returns a list of all defined Currency objects.
|
689
|
+
#
|
632
690
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
633
691
|
def list_all_currencies_with_http_info(extra: {})
|
634
692
|
list_all_currencies_with_http_info_impl(extra)
|
635
693
|
end
|
636
694
|
|
637
|
-
#
|
695
|
+
# Get currencies
|
696
|
+
# Returns a list of all defined Currency objects.
|
638
697
|
# @param [Hash] opts the optional parameters
|
639
698
|
# @return [Array<Currency>]
|
640
|
-
def list_all_currencies_impl(opts = {})
|
699
|
+
private def list_all_currencies_impl(opts = {})
|
641
700
|
data, _status_code, _headers = list_all_currencies_with_http_info(opts)
|
642
701
|
data
|
643
702
|
end
|
644
703
|
|
645
|
-
#
|
704
|
+
# Get currencies
|
705
|
+
# Returns a list of all defined Currency objects.
|
646
706
|
# @param [Hash] opts the optional parameters
|
647
707
|
# @return [Array<(Array<Currency>, Integer, Hash)>] Array<Currency> data, response status code and response headers
|
648
|
-
def list_all_currencies_with_http_info_impl(opts = {})
|
708
|
+
private def list_all_currencies_with_http_info_impl(opts = {})
|
649
709
|
if @api_client.config.debugging
|
650
710
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.list_all_currencies ...'
|
651
711
|
end
|
@@ -690,31 +750,39 @@ module SnapTrade
|
|
690
750
|
end
|
691
751
|
|
692
752
|
|
693
|
-
#
|
753
|
+
# Get currency exchange rates
|
754
|
+
#
|
755
|
+
# Returns a list of all Exchange Rate Pairs for all supported Currencies.
|
756
|
+
#
|
694
757
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
695
758
|
def list_all_currencies_rates(extra: {})
|
696
759
|
data, _status_code, _headers = list_all_currencies_rates_with_http_info_impl(extra)
|
697
760
|
data
|
698
761
|
end
|
699
762
|
|
700
|
-
#
|
763
|
+
# Get currency exchange rates
|
764
|
+
#
|
765
|
+
# Returns a list of all Exchange Rate Pairs for all supported Currencies.
|
766
|
+
#
|
701
767
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
702
768
|
def list_all_currencies_rates_with_http_info(extra: {})
|
703
769
|
list_all_currencies_rates_with_http_info_impl(extra)
|
704
770
|
end
|
705
771
|
|
706
|
-
#
|
772
|
+
# Get currency exchange rates
|
773
|
+
# Returns a list of all Exchange Rate Pairs for all supported Currencies.
|
707
774
|
# @param [Hash] opts the optional parameters
|
708
775
|
# @return [Array<ExchangeRatePairs>]
|
709
|
-
def list_all_currencies_rates_impl(opts = {})
|
776
|
+
private def list_all_currencies_rates_impl(opts = {})
|
710
777
|
data, _status_code, _headers = list_all_currencies_rates_with_http_info(opts)
|
711
778
|
data
|
712
779
|
end
|
713
780
|
|
714
|
-
#
|
781
|
+
# Get currency exchange rates
|
782
|
+
# Returns a list of all Exchange Rate Pairs for all supported Currencies.
|
715
783
|
# @param [Hash] opts the optional parameters
|
716
784
|
# @return [Array<(Array<ExchangeRatePairs>, Integer, Hash)>] Array<ExchangeRatePairs> data, response status code and response headers
|
717
|
-
def list_all_currencies_rates_with_http_info_impl(opts = {})
|
785
|
+
private def list_all_currencies_rates_with_http_info_impl(opts = {})
|
718
786
|
if @api_client.config.debugging
|
719
787
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.list_all_currencies_rates ...'
|
720
788
|
end
|
@@ -759,11 +827,16 @@ module SnapTrade
|
|
759
827
|
end
|
760
828
|
|
761
829
|
|
762
|
-
# Search
|
830
|
+
# Search account symbols
|
831
|
+
#
|
832
|
+
# Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.
|
833
|
+
#
|
834
|
+
# The search results are further limited to the symbols supported by the brokerage for which the account is under.
|
835
|
+
#
|
763
836
|
# @param user_id [String]
|
764
837
|
# @param user_secret [String]
|
765
|
-
# @param account_id [String]
|
766
|
-
# @param substring [String]
|
838
|
+
# @param account_id [String]
|
839
|
+
# @param substring [String] The search query for symbols.
|
767
840
|
# @param body [SymbolQuery]
|
768
841
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
769
842
|
def symbol_search_user_account(user_id:, user_secret:, account_id:, substring: SENTINEL, extra: {})
|
@@ -774,11 +847,16 @@ module SnapTrade
|
|
774
847
|
data
|
775
848
|
end
|
776
849
|
|
777
|
-
# Search
|
850
|
+
# Search account symbols
|
851
|
+
#
|
852
|
+
# Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.
|
853
|
+
#
|
854
|
+
# The search results are further limited to the symbols supported by the brokerage for which the account is under.
|
855
|
+
#
|
778
856
|
# @param user_id [String]
|
779
857
|
# @param user_secret [String]
|
780
|
-
# @param account_id [String]
|
781
|
-
# @param substring [String]
|
858
|
+
# @param account_id [String]
|
859
|
+
# @param substring [String] The search query for symbols.
|
782
860
|
# @param body [SymbolQuery]
|
783
861
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
784
862
|
def symbol_search_user_account_with_http_info(user_id:, user_secret:, account_id:, substring: SENTINEL, extra: {})
|
@@ -788,26 +866,28 @@ module SnapTrade
|
|
788
866
|
symbol_search_user_account_with_http_info_impl(user_id, user_secret, account_id, extra)
|
789
867
|
end
|
790
868
|
|
791
|
-
# Search
|
869
|
+
# Search account symbols
|
870
|
+
# Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned. The search results are further limited to the symbols supported by the brokerage for which the account is under.
|
792
871
|
# @param user_id [String]
|
793
872
|
# @param user_secret [String]
|
794
|
-
# @param account_id [String]
|
873
|
+
# @param account_id [String]
|
795
874
|
# @param [Hash] opts the optional parameters
|
796
875
|
# @option opts [SymbolQuery] :symbol_query
|
797
876
|
# @return [Array<UniversalSymbol>]
|
798
|
-
def symbol_search_user_account_impl(user_id, user_secret, account_id, opts = {})
|
877
|
+
private def symbol_search_user_account_impl(user_id, user_secret, account_id, opts = {})
|
799
878
|
data, _status_code, _headers = symbol_search_user_account_with_http_info(user_id, user_secret, account_id, opts)
|
800
879
|
data
|
801
880
|
end
|
802
881
|
|
803
|
-
# Search
|
882
|
+
# Search account symbols
|
883
|
+
# Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned. The search results are further limited to the symbols supported by the brokerage for which the account is under.
|
804
884
|
# @param user_id [String]
|
805
885
|
# @param user_secret [String]
|
806
|
-
# @param account_id [String]
|
886
|
+
# @param account_id [String]
|
807
887
|
# @param [Hash] opts the optional parameters
|
808
888
|
# @option opts [SymbolQuery] :symbol_query
|
809
889
|
# @return [Array<(Array<UniversalSymbol>, Integer, Hash)>] Array<UniversalSymbol> data, response status code and response headers
|
810
|
-
def symbol_search_user_account_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
890
|
+
private def symbol_search_user_account_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
811
891
|
if @api_client.config.debugging
|
812
892
|
@api_client.config.logger.debug 'Calling API: ReferenceDataApi.symbol_search_user_account ...'
|
813
893
|
end
|
@@ -834,7 +914,7 @@ module SnapTrade
|
|
834
914
|
# header parameters
|
835
915
|
header_params = opts[:header_params] || {}
|
836
916
|
# HTTP header 'Accept' (if needed)
|
837
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
917
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
838
918
|
# HTTP header 'Content-Type'
|
839
919
|
content_type = @api_client.select_header_content_type(['application/json'])
|
840
920
|
if !content_type.nil?
|