finnhub_ruby 1.1.2 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +46 -12
- data/docs/AggregateIndicators.md +10 -9
- data/docs/BasicFinancials.md +14 -11
- data/docs/BreakdownItem.md +20 -0
- data/docs/Company.md +20 -19
- data/docs/CompanyExecutive.md +10 -9
- data/docs/CompanyNews.md +34 -0
- data/docs/CompanyNewsStatistics.md +12 -11
- data/docs/CompanyProfile.md +62 -61
- data/docs/CompanyProfile2.md +30 -29
- data/docs/CountryMetadata.md +18 -17
- data/docs/CovidInfo.md +14 -13
- data/docs/CryptoCandles.md +20 -19
- data/docs/CryptoSymbol.md +12 -11
- data/docs/DefaultApi.md +2996 -895
- data/docs/Development.md +16 -13
- data/docs/Dividends.md +22 -21
- data/docs/Dividends2.md +20 -0
- data/docs/Dividends2Info.md +20 -0
- data/docs/ETFCountryExposureData.md +10 -9
- data/docs/ETFHoldingsData.md +20 -11
- data/docs/ETFProfileData.md +52 -0
- data/docs/ETFSectorExposureData.md +10 -9
- data/docs/ETFsCountryExposure.md +10 -9
- data/docs/ETFsHoldings.md +14 -9
- data/docs/ETFsProfile.md +10 -9
- data/docs/ETFsSectorExposure.md +20 -0
- data/docs/EarningEstimate.md +16 -15
- data/docs/EarningRelease.md +24 -23
- data/docs/EarningResult.md +18 -13
- data/docs/EarningsCalendar.md +8 -7
- data/docs/EarningsCallTranscripts.md +24 -23
- data/docs/EarningsCallTranscriptsList.md +10 -9
- data/docs/EarningsEstimates.md +12 -11
- data/docs/EarningsEstimatesInfo.md +26 -0
- data/docs/EconomicCalendar.md +8 -7
- data/docs/EconomicCode.md +14 -13
- data/docs/EconomicData.md +10 -9
- data/docs/EconomicDataInfo.md +20 -0
- data/docs/EconomicEvent.md +22 -21
- data/docs/Estimate.md +16 -15
- data/docs/FDAComitteeMeeting.md +24 -0
- data/docs/Filing.md +22 -21
- data/docs/FilingSentiment.md +34 -0
- data/docs/FinancialStatements.md +10 -9
- data/docs/FinancialsAsReported.md +12 -11
- data/docs/ForexCandles.md +20 -19
- data/docs/ForexSymbol.md +12 -11
- data/docs/Forexrates.md +10 -9
- data/docs/FundOwnership.md +10 -9
- data/docs/FundOwnershipInfo.md +26 -0
- data/docs/HistoricalNBBO.md +40 -0
- data/docs/IPOCalendar.md +8 -7
- data/docs/IPOEvent.md +22 -21
- data/docs/IndexHistoricalConstituent.md +12 -11
- data/docs/Indicator.md +12 -11
- data/docs/IndicesConstituents.md +10 -9
- data/docs/IndicesHistoricalConstituents.md +10 -9
- data/docs/InsiderTransactions.md +20 -0
- data/docs/InternationalFiling.md +34 -0
- data/docs/InvestmentThemePortfolio.md +18 -0
- data/docs/InvestmentThemes.md +20 -0
- data/docs/KeyCustomersSuppliers.md +24 -0
- data/docs/LastBidAsk.md +16 -15
- data/docs/MarketNews.md +34 -0
- data/docs/MutualFundCountryExposure.md +20 -0
- data/docs/MutualFundCountryExposureData.md +20 -0
- data/docs/MutualFundHoldings.md +24 -0
- data/docs/MutualFundHoldingsData.md +30 -0
- data/docs/MutualFundProfile.md +20 -0
- data/docs/MutualFundProfileData.md +58 -0
- data/docs/MutualFundSectorExposure.md +20 -0
- data/docs/MutualFundSectorExposureData.md +20 -0
- data/docs/NewsSentiment.md +18 -17
- data/docs/Ownership.md +20 -0
- data/docs/OwnershipInfo.md +24 -0
- data/docs/PatternRecognition.md +8 -7
- data/docs/PressRelease.md +20 -0
- data/docs/PriceTarget.md +18 -17
- data/docs/Quote.md +20 -15
- data/docs/RecommendationTrend.md +20 -19
- data/docs/RedditSentimentContent.md +30 -0
- data/docs/Report.md +28 -27
- data/docs/RevenueBreakdown.md +22 -0
- data/docs/RevenueEstimates.md +12 -11
- data/docs/RevenueEstimatesInfo.md +26 -0
- data/docs/SECSentimentAnalysis.md +24 -0
- data/docs/Sentiment.md +10 -9
- data/docs/SimilarityIndex.md +12 -11
- data/docs/SimilarityIndexInfo.md +40 -0
- data/docs/SocialSentiment.md +22 -0
- data/docs/Split.md +14 -13
- data/docs/StockCandles.md +20 -19
- data/docs/StockSymbol.md +30 -0
- data/docs/StockTranscripts.md +16 -15
- data/docs/SupplyChainRelationships.md +20 -0
- data/docs/SupportResistance.md +8 -7
- data/docs/SymbolLookup.md +20 -0
- data/docs/SymbolLookupInfo.md +24 -0
- data/docs/TechnicalAnalysis.md +10 -9
- data/docs/TickData.md +24 -21
- data/docs/Transactions.md +30 -0
- data/docs/TranscriptContent.md +12 -9
- data/docs/TranscriptParticipant.md +12 -9
- data/docs/Trend.md +10 -9
- data/docs/TwitterSentimentContent.md +30 -0
- data/docs/UpgradeDowngrade.md +18 -17
- data/finnhub_ruby.gemspec +7 -8
- data/lib/finnhub_ruby.rb +45 -12
- data/lib/finnhub_ruby/api/default_api.rb +1545 -443
- data/lib/finnhub_ruby/api_client.rb +52 -49
- data/lib/finnhub_ruby/api_error.rb +1 -1
- data/lib/finnhub_ruby/configuration.rb +39 -10
- data/lib/finnhub_ruby/models/aggregate_indicators.rb +19 -7
- data/lib/finnhub_ruby/models/basic_financials.rb +29 -8
- data/lib/finnhub_ruby/models/breakdown_item.rb +228 -0
- data/lib/finnhub_ruby/models/company.rb +19 -7
- data/lib/finnhub_ruby/models/company_executive.rb +20 -8
- data/lib/finnhub_ruby/models/company_news.rb +299 -0
- data/lib/finnhub_ruby/models/company_news_statistics.rb +19 -7
- data/lib/finnhub_ruby/models/company_profile.rb +20 -8
- data/lib/finnhub_ruby/models/company_profile2.rb +19 -7
- data/lib/finnhub_ruby/models/country_metadata.rb +19 -7
- data/lib/finnhub_ruby/models/covid_info.rb +20 -8
- data/lib/finnhub_ruby/models/crypto_candles.rb +19 -7
- data/lib/finnhub_ruby/models/crypto_symbol.rb +19 -7
- data/lib/finnhub_ruby/models/development.rb +34 -12
- data/lib/finnhub_ruby/models/dividends.rb +19 -7
- data/lib/finnhub_ruby/models/dividends2.rb +231 -0
- data/lib/finnhub_ruby/models/dividends2_basic.rb +231 -0
- data/lib/finnhub_ruby/models/dividends2_info.rb +229 -0
- data/lib/finnhub_ruby/models/earning_estimate.rb +20 -8
- data/lib/finnhub_ruby/models/earning_release.rb +22 -10
- data/lib/finnhub_ruby/models/earning_result.rb +40 -8
- data/lib/finnhub_ruby/models/earnings_calendar.rb +20 -8
- data/lib/finnhub_ruby/models/earnings_call_transcripts.rb +22 -10
- data/lib/finnhub_ruby/models/earnings_call_transcripts_list.rb +20 -8
- data/lib/finnhub_ruby/models/earnings_estimates.rb +20 -8
- data/lib/finnhub_ruby/models/earnings_estimates_info.rb +259 -0
- data/lib/finnhub_ruby/models/economic_calendar.rb +20 -8
- data/lib/finnhub_ruby/models/economic_code.rb +19 -7
- data/lib/finnhub_ruby/models/economic_data.rb +20 -8
- data/lib/finnhub_ruby/models/economic_data_info.rb +229 -0
- data/lib/finnhub_ruby/models/economic_event.rb +19 -7
- data/lib/finnhub_ruby/models/estimate.rb +20 -8
- data/lib/finnhub_ruby/models/etf_country_exposure_data.rb +20 -8
- data/lib/finnhub_ruby/models/etf_holdings_data.rb +63 -11
- data/lib/finnhub_ruby/models/etf_profile_data.rb +389 -0
- data/lib/finnhub_ruby/models/etf_sector_exposure_data.rb +20 -8
- data/lib/finnhub_ruby/models/etfs_country_exposure.rb +231 -0
- data/lib/finnhub_ruby/models/etfs_holdings.rb +251 -0
- data/lib/finnhub_ruby/models/etfs_profile.rb +228 -0
- data/lib/finnhub_ruby/models/etfs_sector_exposure.rb +231 -0
- data/lib/finnhub_ruby/models/fda_comittee_meeting.rb +249 -0
- data/lib/finnhub_ruby/models/filing.rb +21 -9
- data/lib/finnhub_ruby/models/filing_sentiment.rb +299 -0
- data/lib/finnhub_ruby/models/financial_statements.rb +19 -7
- data/lib/finnhub_ruby/models/financials_as_reported.rb +20 -8
- data/lib/finnhub_ruby/models/forex_candles.rb +19 -7
- data/lib/finnhub_ruby/models/forex_symbol.rb +19 -7
- data/lib/finnhub_ruby/models/forexrates.rb +19 -7
- data/lib/finnhub_ruby/models/fund_ownership.rb +20 -8
- data/lib/finnhub_ruby/models/fund_ownership_info.rb +259 -0
- data/lib/finnhub_ruby/models/historical_nbbo.rb +345 -0
- data/lib/finnhub_ruby/models/index_historical_constituent.rb +19 -7
- data/lib/finnhub_ruby/models/indicator.rb +19 -7
- data/lib/finnhub_ruby/models/indices_constituents.rb +19 -7
- data/lib/finnhub_ruby/models/indices_historical_constituents.rb +20 -8
- data/lib/finnhub_ruby/models/insider_transactions.rb +231 -0
- data/lib/finnhub_ruby/models/international_filing.rb +299 -0
- data/lib/finnhub_ruby/models/investment_theme_portfolio.rb +219 -0
- data/lib/finnhub_ruby/models/investment_themes.rb +231 -0
- data/lib/finnhub_ruby/models/investment_themes_thematic_investing.rb +231 -0
- data/lib/finnhub_ruby/models/investor.rb +19 -7
- data/lib/finnhub_ruby/models/ipo_calendar.rb +20 -8
- data/lib/finnhub_ruby/models/ipo_event.rb +21 -9
- data/lib/finnhub_ruby/models/key_customers_suppliers.rb +249 -0
- data/lib/finnhub_ruby/models/last_bid_ask.rb +19 -7
- data/lib/finnhub_ruby/models/major_press_releases.rb +231 -0
- data/lib/finnhub_ruby/models/market_news.rb +299 -0
- data/lib/finnhub_ruby/models/mutual_fund_country_exposure.rb +231 -0
- data/lib/finnhub_ruby/models/mutual_fund_country_exposure_data.rb +229 -0
- data/lib/finnhub_ruby/models/mutual_fund_holdings.rb +251 -0
- data/lib/finnhub_ruby/models/mutual_fund_holdings_data.rb +279 -0
- data/lib/finnhub_ruby/models/mutual_fund_profile.rb +228 -0
- data/lib/finnhub_ruby/models/mutual_fund_profile_data.rb +419 -0
- data/lib/finnhub_ruby/models/mutual_fund_sector_exposure.rb +231 -0
- data/lib/finnhub_ruby/models/mutual_fund_sector_exposure_data.rb +229 -0
- data/lib/finnhub_ruby/models/mutual_funds_country_exposure.rb +231 -0
- data/lib/finnhub_ruby/models/mutual_funds_holdings.rb +251 -0
- data/lib/finnhub_ruby/models/mutual_funds_profile.rb +228 -0
- data/lib/finnhub_ruby/models/news.rb +19 -7
- data/lib/finnhub_ruby/models/news_sentiment.rb +19 -7
- data/lib/finnhub_ruby/models/ownership.rb +231 -0
- data/lib/finnhub_ruby/models/ownership_info.rb +249 -0
- data/lib/finnhub_ruby/models/pattern_recognition.rb +19 -7
- data/lib/finnhub_ruby/models/press_release.rb +231 -0
- data/lib/finnhub_ruby/models/price_target.rb +20 -8
- data/lib/finnhub_ruby/models/quote.rb +43 -11
- data/lib/finnhub_ruby/models/recommendation_trend.rb +19 -7
- data/lib/finnhub_ruby/models/reddit_sentiment_content.rb +279 -0
- data/lib/finnhub_ruby/models/report.rb +23 -11
- data/lib/finnhub_ruby/models/revenue_breakdown.rb +241 -0
- data/lib/finnhub_ruby/models/revenue_estimates.rb +20 -8
- data/lib/finnhub_ruby/models/revenue_estimates_info.rb +259 -0
- data/lib/finnhub_ruby/models/sec_sentiment_analysis.rb +248 -0
- data/lib/finnhub_ruby/models/sentiment.rb +21 -9
- data/lib/finnhub_ruby/models/similarity_index.rb +20 -8
- data/lib/finnhub_ruby/models/similarity_index_info.rb +329 -0
- data/lib/finnhub_ruby/models/social_sentiment.rb +243 -0
- data/lib/finnhub_ruby/models/split.rb +19 -7
- data/lib/finnhub_ruby/models/stock.rb +23 -21
- data/lib/finnhub_ruby/models/stock_candles.rb +19 -7
- data/lib/finnhub_ruby/models/stock_symbol.rb +279 -0
- data/lib/finnhub_ruby/models/stock_transcripts.rb +20 -8
- data/lib/finnhub_ruby/models/supply_chain_relationships.rb +231 -0
- data/lib/finnhub_ruby/models/support_resistance.rb +19 -7
- data/lib/finnhub_ruby/models/symbol_lookup.rb +231 -0
- data/lib/finnhub_ruby/models/symbol_lookup_info.rb +249 -0
- data/lib/finnhub_ruby/models/technical_analysis.rb +19 -7
- data/lib/finnhub_ruby/models/tick_data.rb +36 -12
- data/lib/finnhub_ruby/models/transactions.rb +279 -0
- data/lib/finnhub_ruby/models/transcript_content.rb +33 -11
- data/lib/finnhub_ruby/models/transcript_participant.rb +33 -11
- data/lib/finnhub_ruby/models/trend.rb +19 -7
- data/lib/finnhub_ruby/models/twitter_sentiment_content.rb +279 -0
- data/lib/finnhub_ruby/models/upgrade_downgrade.rb +19 -7
- data/lib/finnhub_ruby/version.rb +2 -2
- data/release.sh +12 -2
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/aggregate_indicators_spec.rb +4 -11
- data/spec/models/basic_financials_spec.rb +10 -11
- data/spec/models/breakdown_item_spec.rb +40 -0
- data/spec/models/company_executive_spec.rb +4 -11
- data/spec/models/{news_spec.rb → company_news_spec.rb} +7 -14
- data/spec/models/company_news_statistics_spec.rb +4 -11
- data/spec/models/company_profile2_spec.rb +4 -11
- data/spec/models/company_profile_spec.rb +4 -11
- data/spec/models/company_spec.rb +4 -11
- data/spec/models/country_metadata_spec.rb +4 -11
- data/spec/models/covid_info_spec.rb +4 -11
- data/spec/models/crypto_candles_spec.rb +4 -11
- data/spec/models/crypto_symbol_spec.rb +4 -11
- data/spec/models/development_spec.rb +10 -11
- data/spec/models/dividends2_info_spec.rb +40 -0
- data/spec/models/dividends2_spec.rb +40 -0
- data/spec/models/dividends_spec.rb +4 -11
- data/spec/models/earning_estimate_spec.rb +4 -11
- data/spec/models/earning_release_spec.rb +4 -11
- data/spec/models/earning_result_spec.rb +16 -11
- data/spec/models/earnings_calendar_spec.rb +4 -11
- data/spec/models/earnings_call_transcripts_list_spec.rb +4 -11
- data/spec/models/earnings_call_transcripts_spec.rb +4 -11
- data/spec/models/earnings_estimates_info_spec.rb +58 -0
- data/spec/models/earnings_estimates_spec.rb +4 -11
- data/spec/models/economic_calendar_spec.rb +4 -11
- data/spec/models/economic_code_spec.rb +4 -11
- data/spec/models/economic_data_info_spec.rb +40 -0
- data/spec/models/economic_data_spec.rb +4 -11
- data/spec/models/economic_event_spec.rb +4 -11
- data/spec/models/estimate_spec.rb +4 -11
- data/spec/models/etf_country_exposure_data_spec.rb +4 -11
- data/spec/models/etf_holdings_data_spec.rb +28 -11
- data/spec/models/etf_profile_data_spec.rb +136 -0
- data/spec/models/etf_sector_exposure_data_spec.rb +4 -11
- data/spec/models/{et_fs_country_exposure_spec.rb → etfs_country_exposure_spec.rb} +4 -11
- data/spec/models/{et_fs_holdings_spec.rb → etfs_holdings_spec.rb} +16 -11
- data/spec/models/{et_fs_profile_spec.rb → etfs_profile_spec.rb} +4 -11
- data/spec/models/{et_fs_industry_exposure_spec.rb → etfs_sector_exposure_spec.rb} +7 -14
- data/spec/models/fda_comittee_meeting_spec.rb +52 -0
- data/spec/models/filing_sentiment_spec.rb +82 -0
- data/spec/models/filing_spec.rb +4 -11
- data/spec/models/financial_statements_spec.rb +4 -11
- data/spec/models/financials_as_reported_spec.rb +4 -11
- data/spec/models/forex_candles_spec.rb +4 -11
- data/spec/models/forex_symbol_spec.rb +4 -11
- data/spec/models/forexrates_spec.rb +4 -11
- data/spec/models/fund_ownership_info_spec.rb +58 -0
- data/spec/models/fund_ownership_spec.rb +4 -11
- data/spec/models/historical_nbbo_spec.rb +100 -0
- data/spec/models/index_historical_constituent_spec.rb +4 -11
- data/spec/models/indicator_spec.rb +4 -11
- data/spec/models/indices_constituents_spec.rb +4 -11
- data/spec/models/indices_historical_constituents_spec.rb +4 -11
- data/spec/models/insider_transactions_spec.rb +40 -0
- data/spec/models/international_filing_spec.rb +82 -0
- data/spec/models/investment_theme_portfolio_spec.rb +34 -0
- data/spec/models/investment_themes_spec.rb +40 -0
- data/spec/models/ipo_calendar_spec.rb +4 -11
- data/spec/models/ipo_event_spec.rb +4 -11
- data/spec/models/key_customers_suppliers_spec.rb +52 -0
- data/spec/models/last_bid_ask_spec.rb +4 -11
- data/spec/models/market_news_spec.rb +82 -0
- data/spec/models/mutual_fund_country_exposure_data_spec.rb +40 -0
- data/spec/models/mutual_fund_country_exposure_spec.rb +40 -0
- data/spec/models/mutual_fund_holdings_data_spec.rb +70 -0
- data/spec/models/mutual_fund_holdings_spec.rb +52 -0
- data/spec/models/mutual_fund_profile_data_spec.rb +154 -0
- data/spec/models/mutual_fund_profile_spec.rb +40 -0
- data/spec/models/mutual_fund_sector_exposure_data_spec.rb +40 -0
- data/spec/models/mutual_fund_sector_exposure_spec.rb +40 -0
- data/spec/models/news_sentiment_spec.rb +4 -11
- data/spec/models/{investor_spec.rb → ownership_info_spec.rb} +7 -14
- data/spec/models/{investors_ownership_spec.rb → ownership_spec.rb} +7 -14
- data/spec/models/pattern_recognition_spec.rb +4 -11
- data/spec/models/{major_developments_spec.rb → press_release_spec.rb} +7 -14
- data/spec/models/price_target_spec.rb +4 -11
- data/spec/models/quote_spec.rb +16 -11
- data/spec/models/recommendation_trend_spec.rb +4 -11
- data/spec/models/reddit_sentiment_content_spec.rb +70 -0
- data/spec/models/report_spec.rb +4 -11
- data/spec/models/revenue_breakdown_spec.rb +46 -0
- data/spec/models/revenue_estimates_info_spec.rb +58 -0
- data/spec/models/revenue_estimates_spec.rb +4 -11
- data/spec/models/sec_sentiment_analysis_spec.rb +52 -0
- data/spec/models/sentiment_spec.rb +4 -11
- data/spec/models/similarity_index_info_spec.rb +100 -0
- data/spec/models/similarity_index_spec.rb +4 -11
- data/spec/models/social_sentiment_spec.rb +46 -0
- data/spec/models/split_spec.rb +4 -11
- data/spec/models/stock_candles_spec.rb +4 -11
- data/spec/models/stock_symbol_spec.rb +70 -0
- data/spec/models/stock_transcripts_spec.rb +4 -11
- data/spec/models/supply_chain_relationships_spec.rb +40 -0
- data/spec/models/support_resistance_spec.rb +4 -11
- data/spec/models/{stock_spec.rb → symbol_lookup_info_spec.rb} +7 -20
- data/spec/models/symbol_lookup_spec.rb +40 -0
- data/spec/models/technical_analysis_spec.rb +4 -11
- data/spec/models/tick_data_spec.rb +10 -11
- data/spec/models/transactions_spec.rb +70 -0
- data/spec/models/transcript_content_spec.rb +10 -11
- data/spec/models/transcript_participant_spec.rb +10 -11
- data/spec/models/trend_spec.rb +4 -11
- data/spec/models/twitter_sentiment_content_spec.rb +70 -0
- data/spec/models/upgrade_downgrade_spec.rb +4 -11
- data/spec/spec_helper.rb +1 -1
- metadata +187 -53
- data/docs/ETFsIndustryExposure.md +0 -19
- data/docs/Investor.md +0 -23
- data/docs/InvestorsOwnership.md +0 -19
- data/docs/MajorDevelopments.md +0 -19
- data/docs/News.md +0 -33
- data/docs/Stock.md +0 -25
- data/test.rb +0 -157
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -65,15 +65,16 @@ module FinnhubRuby
|
|
65
65
|
form_params = opts[:form_params] || {}
|
66
66
|
|
67
67
|
# http body (model)
|
68
|
-
post_body = opts[:
|
68
|
+
post_body = opts[:debug_body]
|
69
69
|
|
70
70
|
# return_type
|
71
|
-
return_type = opts[:
|
71
|
+
return_type = opts[:debug_return_type] || 'AggregateIndicators'
|
72
72
|
|
73
73
|
# auth_names
|
74
|
-
auth_names = opts[:
|
74
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
75
75
|
|
76
76
|
new_options = opts.merge(
|
77
|
+
:operation => :"DefaultApi.aggregate_indicator",
|
77
78
|
:header_params => header_params,
|
78
79
|
:query_params => query_params,
|
79
80
|
:form_params => form_params,
|
@@ -92,7 +93,7 @@ module FinnhubRuby
|
|
92
93
|
# Basic Financials
|
93
94
|
# Get company basic financials such as margin, P/E ratio, 52-week high/low etc.
|
94
95
|
# @param symbol [String] Symbol of the company: AAPL.
|
95
|
-
# @param metric [String] Metric type. Can be 1 of the following values <code>all
|
96
|
+
# @param metric [String] Metric type. Can be 1 of the following values <code>all</code>
|
96
97
|
# @param [Hash] opts the optional parameters
|
97
98
|
# @return [BasicFinancials]
|
98
99
|
def company_basic_financials(symbol, metric, opts = {})
|
@@ -103,7 +104,7 @@ module FinnhubRuby
|
|
103
104
|
# Basic Financials
|
104
105
|
# Get company basic financials such as margin, P/E ratio, 52-week high/low etc.
|
105
106
|
# @param symbol [String] Symbol of the company: AAPL.
|
106
|
-
# @param metric [String] Metric type. Can be 1 of the following values <code>all
|
107
|
+
# @param metric [String] Metric type. Can be 1 of the following values <code>all</code>
|
107
108
|
# @param [Hash] opts the optional parameters
|
108
109
|
# @return [Array<(BasicFinancials, Integer, Hash)>] BasicFinancials data, response status code and response headers
|
109
110
|
def company_basic_financials_with_http_info(symbol, metric, opts = {})
|
@@ -135,15 +136,16 @@ module FinnhubRuby
|
|
135
136
|
form_params = opts[:form_params] || {}
|
136
137
|
|
137
138
|
# http body (model)
|
138
|
-
post_body = opts[:
|
139
|
+
post_body = opts[:debug_body]
|
139
140
|
|
140
141
|
# return_type
|
141
|
-
return_type = opts[:
|
142
|
+
return_type = opts[:debug_return_type] || 'BasicFinancials'
|
142
143
|
|
143
144
|
# auth_names
|
144
|
-
auth_names = opts[:
|
145
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
145
146
|
|
146
147
|
new_options = opts.merge(
|
148
|
+
:operation => :"DefaultApi.company_basic_financials",
|
147
149
|
:header_params => header_params,
|
148
150
|
:query_params => query_params,
|
149
151
|
:form_params => form_params,
|
@@ -201,15 +203,16 @@ module FinnhubRuby
|
|
201
203
|
form_params = opts[:form_params] || {}
|
202
204
|
|
203
205
|
# http body (model)
|
204
|
-
post_body = opts[:
|
206
|
+
post_body = opts[:debug_body]
|
205
207
|
|
206
208
|
# return_type
|
207
|
-
return_type = opts[:
|
209
|
+
return_type = opts[:debug_return_type] || 'Array<EarningResult>'
|
208
210
|
|
209
211
|
# auth_names
|
210
|
-
auth_names = opts[:
|
212
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
211
213
|
|
212
214
|
new_options = opts.merge(
|
215
|
+
:operation => :"DefaultApi.company_earnings",
|
213
216
|
:header_params => header_params,
|
214
217
|
:query_params => query_params,
|
215
218
|
:form_params => form_params,
|
@@ -267,15 +270,16 @@ module FinnhubRuby
|
|
267
270
|
form_params = opts[:form_params] || {}
|
268
271
|
|
269
272
|
# http body (model)
|
270
|
-
post_body = opts[:
|
273
|
+
post_body = opts[:debug_body]
|
271
274
|
|
272
275
|
# return_type
|
273
|
-
return_type = opts[:
|
276
|
+
return_type = opts[:debug_return_type] || 'EarningsEstimates'
|
274
277
|
|
275
278
|
# auth_names
|
276
|
-
auth_names = opts[:
|
279
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
277
280
|
|
278
281
|
new_options = opts.merge(
|
282
|
+
:operation => :"DefaultApi.company_eps_estimates",
|
279
283
|
:header_params => header_params,
|
280
284
|
:query_params => query_params,
|
281
285
|
:form_params => form_params,
|
@@ -330,15 +334,16 @@ module FinnhubRuby
|
|
330
334
|
form_params = opts[:form_params] || {}
|
331
335
|
|
332
336
|
# http body (model)
|
333
|
-
post_body = opts[:
|
337
|
+
post_body = opts[:debug_body]
|
334
338
|
|
335
339
|
# return_type
|
336
|
-
return_type = opts[:
|
340
|
+
return_type = opts[:debug_return_type] || 'CompanyExecutive'
|
337
341
|
|
338
342
|
# auth_names
|
339
|
-
auth_names = opts[:
|
343
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
340
344
|
|
341
345
|
new_options = opts.merge(
|
346
|
+
:operation => :"DefaultApi.company_executive",
|
342
347
|
:header_params => header_params,
|
343
348
|
:query_params => query_params,
|
344
349
|
:form_params => form_params,
|
@@ -360,7 +365,7 @@ module FinnhubRuby
|
|
360
365
|
# @param from [Date] From date <code>YYYY-MM-DD</code>.
|
361
366
|
# @param to [Date] To date <code>YYYY-MM-DD</code>.
|
362
367
|
# @param [Hash] opts the optional parameters
|
363
|
-
# @return [Array<
|
368
|
+
# @return [Array<CompanyNews>]
|
364
369
|
def company_news(symbol, from, to, opts = {})
|
365
370
|
data, _status_code, _headers = company_news_with_http_info(symbol, from, to, opts)
|
366
371
|
data
|
@@ -372,7 +377,7 @@ module FinnhubRuby
|
|
372
377
|
# @param from [Date] From date <code>YYYY-MM-DD</code>.
|
373
378
|
# @param to [Date] To date <code>YYYY-MM-DD</code>.
|
374
379
|
# @param [Hash] opts the optional parameters
|
375
|
-
# @return [Array<(Array<
|
380
|
+
# @return [Array<(Array<CompanyNews>, Integer, Hash)>] Array<CompanyNews> data, response status code and response headers
|
376
381
|
def company_news_with_http_info(symbol, from, to, opts = {})
|
377
382
|
if @api_client.config.debugging
|
378
383
|
@api_client.config.logger.debug 'Calling API: DefaultApi.company_news ...'
|
@@ -407,15 +412,16 @@ module FinnhubRuby
|
|
407
412
|
form_params = opts[:form_params] || {}
|
408
413
|
|
409
414
|
# http body (model)
|
410
|
-
post_body = opts[:
|
415
|
+
post_body = opts[:debug_body]
|
411
416
|
|
412
417
|
# return_type
|
413
|
-
return_type = opts[:
|
418
|
+
return_type = opts[:debug_return_type] || 'Array<CompanyNews>'
|
414
419
|
|
415
420
|
# auth_names
|
416
|
-
auth_names = opts[:
|
421
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
417
422
|
|
418
423
|
new_options = opts.merge(
|
424
|
+
:operation => :"DefaultApi.company_news",
|
419
425
|
:header_params => header_params,
|
420
426
|
:query_params => query_params,
|
421
427
|
:form_params => form_params,
|
@@ -470,15 +476,16 @@ module FinnhubRuby
|
|
470
476
|
form_params = opts[:form_params] || {}
|
471
477
|
|
472
478
|
# http body (model)
|
473
|
-
post_body = opts[:
|
479
|
+
post_body = opts[:debug_body]
|
474
480
|
|
475
481
|
# return_type
|
476
|
-
return_type = opts[:
|
482
|
+
return_type = opts[:debug_return_type] || 'Array<String>'
|
477
483
|
|
478
484
|
# auth_names
|
479
|
-
auth_names = opts[:
|
485
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
480
486
|
|
481
487
|
new_options = opts.merge(
|
488
|
+
:operation => :"DefaultApi.company_peers",
|
482
489
|
:header_params => header_params,
|
483
490
|
:query_params => query_params,
|
484
491
|
:form_params => form_params,
|
@@ -535,15 +542,16 @@ module FinnhubRuby
|
|
535
542
|
form_params = opts[:form_params] || {}
|
536
543
|
|
537
544
|
# http body (model)
|
538
|
-
post_body = opts[:
|
545
|
+
post_body = opts[:debug_body]
|
539
546
|
|
540
547
|
# return_type
|
541
|
-
return_type = opts[:
|
548
|
+
return_type = opts[:debug_return_type] || 'CompanyProfile'
|
542
549
|
|
543
550
|
# auth_names
|
544
|
-
auth_names = opts[:
|
551
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
545
552
|
|
546
553
|
new_options = opts.merge(
|
554
|
+
:operation => :"DefaultApi.company_profile",
|
547
555
|
:header_params => header_params,
|
548
556
|
:query_params => query_params,
|
549
557
|
:form_params => form_params,
|
@@ -600,15 +608,16 @@ module FinnhubRuby
|
|
600
608
|
form_params = opts[:form_params] || {}
|
601
609
|
|
602
610
|
# http body (model)
|
603
|
-
post_body = opts[:
|
611
|
+
post_body = opts[:debug_body]
|
604
612
|
|
605
613
|
# return_type
|
606
|
-
return_type = opts[:
|
614
|
+
return_type = opts[:debug_return_type] || 'CompanyProfile2'
|
607
615
|
|
608
616
|
# auth_names
|
609
|
-
auth_names = opts[:
|
617
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
610
618
|
|
611
619
|
new_options = opts.merge(
|
620
|
+
:operation => :"DefaultApi.company_profile2",
|
612
621
|
:header_params => header_params,
|
613
622
|
:query_params => query_params,
|
614
623
|
:form_params => form_params,
|
@@ -666,15 +675,16 @@ module FinnhubRuby
|
|
666
675
|
form_params = opts[:form_params] || {}
|
667
676
|
|
668
677
|
# http body (model)
|
669
|
-
post_body = opts[:
|
678
|
+
post_body = opts[:debug_body]
|
670
679
|
|
671
680
|
# return_type
|
672
|
-
return_type = opts[:
|
681
|
+
return_type = opts[:debug_return_type] || 'RevenueEstimates'
|
673
682
|
|
674
683
|
# auth_names
|
675
|
-
auth_names = opts[:
|
684
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
676
685
|
|
677
686
|
new_options = opts.merge(
|
687
|
+
:operation => :"DefaultApi.company_revenue_estimates",
|
678
688
|
:header_params => header_params,
|
679
689
|
:query_params => query_params,
|
680
690
|
:form_params => form_params,
|
@@ -722,15 +732,16 @@ module FinnhubRuby
|
|
722
732
|
form_params = opts[:form_params] || {}
|
723
733
|
|
724
734
|
# http body (model)
|
725
|
-
post_body = opts[:
|
735
|
+
post_body = opts[:debug_body]
|
726
736
|
|
727
737
|
# return_type
|
728
|
-
return_type = opts[:
|
738
|
+
return_type = opts[:debug_return_type] || 'Array<CountryMetadata>'
|
729
739
|
|
730
740
|
# auth_names
|
731
|
-
auth_names = opts[:
|
741
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
732
742
|
|
733
743
|
new_options = opts.merge(
|
744
|
+
:operation => :"DefaultApi.country",
|
734
745
|
:header_params => header_params,
|
735
746
|
:query_params => query_params,
|
736
747
|
:form_params => form_params,
|
@@ -778,15 +789,16 @@ module FinnhubRuby
|
|
778
789
|
form_params = opts[:form_params] || {}
|
779
790
|
|
780
791
|
# http body (model)
|
781
|
-
post_body = opts[:
|
792
|
+
post_body = opts[:debug_body]
|
782
793
|
|
783
794
|
# return_type
|
784
|
-
return_type = opts[:
|
795
|
+
return_type = opts[:debug_return_type] || 'Array<CovidInfo>'
|
785
796
|
|
786
797
|
# auth_names
|
787
|
-
auth_names = opts[:
|
798
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
788
799
|
|
789
800
|
new_options = opts.merge(
|
801
|
+
:operation => :"DefaultApi.covid19",
|
790
802
|
:header_params => header_params,
|
791
803
|
:query_params => query_params,
|
792
804
|
:form_params => form_params,
|
@@ -862,15 +874,16 @@ module FinnhubRuby
|
|
862
874
|
form_params = opts[:form_params] || {}
|
863
875
|
|
864
876
|
# http body (model)
|
865
|
-
post_body = opts[:
|
877
|
+
post_body = opts[:debug_body]
|
866
878
|
|
867
879
|
# return_type
|
868
|
-
return_type = opts[:
|
880
|
+
return_type = opts[:debug_return_type] || 'CryptoCandles'
|
869
881
|
|
870
882
|
# auth_names
|
871
|
-
auth_names = opts[:
|
883
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
872
884
|
|
873
885
|
new_options = opts.merge(
|
886
|
+
:operation => :"DefaultApi.crypto_candles",
|
874
887
|
:header_params => header_params,
|
875
888
|
:query_params => query_params,
|
876
889
|
:form_params => form_params,
|
@@ -918,15 +931,16 @@ module FinnhubRuby
|
|
918
931
|
form_params = opts[:form_params] || {}
|
919
932
|
|
920
933
|
# http body (model)
|
921
|
-
post_body = opts[:
|
934
|
+
post_body = opts[:debug_body]
|
922
935
|
|
923
936
|
# return_type
|
924
|
-
return_type = opts[:
|
937
|
+
return_type = opts[:debug_return_type] || 'Array<String>'
|
925
938
|
|
926
939
|
# auth_names
|
927
|
-
auth_names = opts[:
|
940
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
928
941
|
|
929
942
|
new_options = opts.merge(
|
943
|
+
:operation => :"DefaultApi.crypto_exchanges",
|
930
944
|
:header_params => header_params,
|
931
945
|
:query_params => query_params,
|
932
946
|
:form_params => form_params,
|
@@ -981,15 +995,16 @@ module FinnhubRuby
|
|
981
995
|
form_params = opts[:form_params] || {}
|
982
996
|
|
983
997
|
# http body (model)
|
984
|
-
post_body = opts[:
|
998
|
+
post_body = opts[:debug_body]
|
985
999
|
|
986
1000
|
# return_type
|
987
|
-
return_type = opts[:
|
1001
|
+
return_type = opts[:debug_return_type] || 'Array<CryptoSymbol>'
|
988
1002
|
|
989
1003
|
# auth_names
|
990
|
-
auth_names = opts[:
|
1004
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
991
1005
|
|
992
1006
|
new_options = opts.merge(
|
1007
|
+
:operation => :"DefaultApi.crypto_symbols",
|
993
1008
|
:header_params => header_params,
|
994
1009
|
:query_params => query_params,
|
995
1010
|
:form_params => form_params,
|
@@ -1006,7 +1021,7 @@ module FinnhubRuby
|
|
1006
1021
|
end
|
1007
1022
|
|
1008
1023
|
# Earnings Calendar
|
1009
|
-
# Get historical and coming earnings release
|
1024
|
+
# Get historical and coming earnings release. EPS and Revenue in this endpoint are non-GAAP, which means they are adjusted to exclude some one-time or unusual items. This is the same data investors usually react to and talked about on the media. Estimates are sourced from both sell-side and buy-side analysts.
|
1010
1025
|
# @param [Hash] opts the optional parameters
|
1011
1026
|
# @option opts [Date] :from From date: 2020-03-15.
|
1012
1027
|
# @option opts [Date] :to To date: 2020-03-16.
|
@@ -1019,7 +1034,7 @@ module FinnhubRuby
|
|
1019
1034
|
end
|
1020
1035
|
|
1021
1036
|
# Earnings Calendar
|
1022
|
-
# Get historical and coming earnings release
|
1037
|
+
# Get historical and coming earnings release. EPS and Revenue in this endpoint are non-GAAP, which means they are adjusted to exclude some one-time or unusual items. This is the same data investors usually react to and talked about on the media. Estimates are sourced from both sell-side and buy-side analysts.
|
1023
1038
|
# @param [Hash] opts the optional parameters
|
1024
1039
|
# @option opts [Date] :from From date: 2020-03-15.
|
1025
1040
|
# @option opts [Date] :to To date: 2020-03-16.
|
@@ -1049,15 +1064,16 @@ module FinnhubRuby
|
|
1049
1064
|
form_params = opts[:form_params] || {}
|
1050
1065
|
|
1051
1066
|
# http body (model)
|
1052
|
-
post_body = opts[:
|
1067
|
+
post_body = opts[:debug_body]
|
1053
1068
|
|
1054
1069
|
# return_type
|
1055
|
-
return_type = opts[:
|
1070
|
+
return_type = opts[:debug_return_type] || 'EarningsCalendar'
|
1056
1071
|
|
1057
1072
|
# auth_names
|
1058
|
-
auth_names = opts[:
|
1073
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1059
1074
|
|
1060
1075
|
new_options = opts.merge(
|
1076
|
+
:operation => :"DefaultApi.earnings_calendar",
|
1061
1077
|
:header_params => header_params,
|
1062
1078
|
:query_params => query_params,
|
1063
1079
|
:form_params => form_params,
|
@@ -1073,6 +1089,63 @@ module FinnhubRuby
|
|
1073
1089
|
return data, status_code, headers
|
1074
1090
|
end
|
1075
1091
|
|
1092
|
+
# Economic Calendar
|
1093
|
+
# <p>Get recent and upcoming economic releases.</p><p>Historical events and surprises are available for Enterprise clients.</p>
|
1094
|
+
# @param [Hash] opts the optional parameters
|
1095
|
+
# @return [EconomicCalendar]
|
1096
|
+
def economic_calendar(opts = {})
|
1097
|
+
data, _status_code, _headers = economic_calendar_with_http_info(opts)
|
1098
|
+
data
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
# Economic Calendar
|
1102
|
+
# <p>Get recent and upcoming economic releases.</p><p>Historical events and surprises are available for Enterprise clients.</p>
|
1103
|
+
# @param [Hash] opts the optional parameters
|
1104
|
+
# @return [Array<(EconomicCalendar, Integer, Hash)>] EconomicCalendar data, response status code and response headers
|
1105
|
+
def economic_calendar_with_http_info(opts = {})
|
1106
|
+
if @api_client.config.debugging
|
1107
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.economic_calendar ...'
|
1108
|
+
end
|
1109
|
+
# resource path
|
1110
|
+
local_var_path = '/calendar/economic'
|
1111
|
+
|
1112
|
+
# query parameters
|
1113
|
+
query_params = opts[:query_params] || {}
|
1114
|
+
|
1115
|
+
# header parameters
|
1116
|
+
header_params = opts[:header_params] || {}
|
1117
|
+
# HTTP header 'Accept' (if needed)
|
1118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1119
|
+
|
1120
|
+
# form parameters
|
1121
|
+
form_params = opts[:form_params] || {}
|
1122
|
+
|
1123
|
+
# http body (model)
|
1124
|
+
post_body = opts[:debug_body]
|
1125
|
+
|
1126
|
+
# return_type
|
1127
|
+
return_type = opts[:debug_return_type] || 'EconomicCalendar'
|
1128
|
+
|
1129
|
+
# auth_names
|
1130
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1131
|
+
|
1132
|
+
new_options = opts.merge(
|
1133
|
+
:operation => :"DefaultApi.economic_calendar",
|
1134
|
+
:header_params => header_params,
|
1135
|
+
:query_params => query_params,
|
1136
|
+
:form_params => form_params,
|
1137
|
+
:body => post_body,
|
1138
|
+
:auth_names => auth_names,
|
1139
|
+
:return_type => return_type
|
1140
|
+
)
|
1141
|
+
|
1142
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1143
|
+
if @api_client.config.debugging
|
1144
|
+
@api_client.config.logger.debug "API called: DefaultApi#economic_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1145
|
+
end
|
1146
|
+
return data, status_code, headers
|
1147
|
+
end
|
1148
|
+
|
1076
1149
|
# Economic Code
|
1077
1150
|
# List codes of supported economic data.
|
1078
1151
|
# @param [Hash] opts the optional parameters
|
@@ -1105,15 +1178,16 @@ module FinnhubRuby
|
|
1105
1178
|
form_params = opts[:form_params] || {}
|
1106
1179
|
|
1107
1180
|
# http body (model)
|
1108
|
-
post_body = opts[:
|
1181
|
+
post_body = opts[:debug_body]
|
1109
1182
|
|
1110
1183
|
# return_type
|
1111
|
-
return_type = opts[:
|
1184
|
+
return_type = opts[:debug_return_type] || 'Array<EconomicCode>'
|
1112
1185
|
|
1113
1186
|
# auth_names
|
1114
|
-
auth_names = opts[:
|
1187
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1115
1188
|
|
1116
1189
|
new_options = opts.merge(
|
1190
|
+
:operation => :"DefaultApi.economic_code",
|
1117
1191
|
:header_params => header_params,
|
1118
1192
|
:query_params => query_params,
|
1119
1193
|
:form_params => form_params,
|
@@ -1168,15 +1242,16 @@ module FinnhubRuby
|
|
1168
1242
|
form_params = opts[:form_params] || {}
|
1169
1243
|
|
1170
1244
|
# http body (model)
|
1171
|
-
post_body = opts[:
|
1245
|
+
post_body = opts[:debug_body]
|
1172
1246
|
|
1173
1247
|
# return_type
|
1174
|
-
return_type = opts[:
|
1248
|
+
return_type = opts[:debug_return_type] || 'EconomicData'
|
1175
1249
|
|
1176
1250
|
# auth_names
|
1177
|
-
auth_names = opts[:
|
1251
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1178
1252
|
|
1179
1253
|
new_options = opts.merge(
|
1254
|
+
:operation => :"DefaultApi.economic_data",
|
1180
1255
|
:header_params => header_params,
|
1181
1256
|
:query_params => query_params,
|
1182
1257
|
:form_params => form_params,
|
@@ -1231,15 +1306,16 @@ module FinnhubRuby
|
|
1231
1306
|
form_params = opts[:form_params] || {}
|
1232
1307
|
|
1233
1308
|
# http body (model)
|
1234
|
-
post_body = opts[:
|
1309
|
+
post_body = opts[:debug_body]
|
1235
1310
|
|
1236
1311
|
# return_type
|
1237
|
-
return_type = opts[:
|
1312
|
+
return_type = opts[:debug_return_type] || 'ETFsCountryExposure'
|
1238
1313
|
|
1239
1314
|
# auth_names
|
1240
|
-
auth_names = opts[:
|
1315
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1241
1316
|
|
1242
1317
|
new_options = opts.merge(
|
1318
|
+
:operation => :"DefaultApi.etfs_country_exposure",
|
1243
1319
|
:header_params => header_params,
|
1244
1320
|
:query_params => query_params,
|
1245
1321
|
:form_params => form_params,
|
@@ -1256,34 +1332,36 @@ module FinnhubRuby
|
|
1256
1332
|
end
|
1257
1333
|
|
1258
1334
|
# ETFs Holdings
|
1259
|
-
# Get
|
1260
|
-
# @param symbol [String] ETF symbol.
|
1335
|
+
# Get full ETF holdings/constituents. This endpoint has global coverage. Widget only shows top 10 holdings.
|
1261
1336
|
# @param [Hash] opts the optional parameters
|
1337
|
+
# @option opts [String] :symbol ETF symbol.
|
1338
|
+
# @option opts [String] :isin ETF isin.
|
1339
|
+
# @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set.
|
1262
1340
|
# @return [ETFsHoldings]
|
1263
|
-
def etfs_holdings(
|
1264
|
-
data, _status_code, _headers = etfs_holdings_with_http_info(
|
1341
|
+
def etfs_holdings(opts = {})
|
1342
|
+
data, _status_code, _headers = etfs_holdings_with_http_info(opts)
|
1265
1343
|
data
|
1266
1344
|
end
|
1267
1345
|
|
1268
1346
|
# ETFs Holdings
|
1269
|
-
# Get
|
1270
|
-
# @param symbol [String] ETF symbol.
|
1347
|
+
# Get full ETF holdings/constituents. This endpoint has global coverage. Widget only shows top 10 holdings.
|
1271
1348
|
# @param [Hash] opts the optional parameters
|
1349
|
+
# @option opts [String] :symbol ETF symbol.
|
1350
|
+
# @option opts [String] :isin ETF isin.
|
1351
|
+
# @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set.
|
1272
1352
|
# @return [Array<(ETFsHoldings, Integer, Hash)>] ETFsHoldings data, response status code and response headers
|
1273
|
-
def etfs_holdings_with_http_info(
|
1353
|
+
def etfs_holdings_with_http_info(opts = {})
|
1274
1354
|
if @api_client.config.debugging
|
1275
1355
|
@api_client.config.logger.debug 'Calling API: DefaultApi.etfs_holdings ...'
|
1276
1356
|
end
|
1277
|
-
# verify the required parameter 'symbol' is set
|
1278
|
-
if @api_client.config.client_side_validation && symbol.nil?
|
1279
|
-
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.etfs_holdings"
|
1280
|
-
end
|
1281
1357
|
# resource path
|
1282
1358
|
local_var_path = '/etf/holdings'
|
1283
1359
|
|
1284
1360
|
# query parameters
|
1285
1361
|
query_params = opts[:query_params] || {}
|
1286
|
-
query_params[:'symbol'] = symbol
|
1362
|
+
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
1363
|
+
query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil?
|
1364
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
1287
1365
|
|
1288
1366
|
# header parameters
|
1289
1367
|
header_params = opts[:header_params] || {}
|
@@ -1294,15 +1372,16 @@ module FinnhubRuby
|
|
1294
1372
|
form_params = opts[:form_params] || {}
|
1295
1373
|
|
1296
1374
|
# http body (model)
|
1297
|
-
post_body = opts[:
|
1375
|
+
post_body = opts[:debug_body]
|
1298
1376
|
|
1299
1377
|
# return_type
|
1300
|
-
return_type = opts[:
|
1378
|
+
return_type = opts[:debug_return_type] || 'ETFsHoldings'
|
1301
1379
|
|
1302
1380
|
# auth_names
|
1303
|
-
auth_names = opts[:
|
1381
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1304
1382
|
|
1305
1383
|
new_options = opts.merge(
|
1384
|
+
:operation => :"DefaultApi.etfs_holdings",
|
1306
1385
|
:header_params => header_params,
|
1307
1386
|
:query_params => query_params,
|
1308
1387
|
:form_params => form_params,
|
@@ -1318,28 +1397,91 @@ module FinnhubRuby
|
|
1318
1397
|
return data, status_code, headers
|
1319
1398
|
end
|
1320
1399
|
|
1321
|
-
# ETFs
|
1322
|
-
# Get ETF
|
1400
|
+
# ETFs Profile
|
1401
|
+
# Get ETF profile information. This endpoint has global coverage.
|
1402
|
+
# @param [Hash] opts the optional parameters
|
1403
|
+
# @option opts [String] :symbol ETF symbol.
|
1404
|
+
# @option opts [String] :isin ETF isin.
|
1405
|
+
# @return [ETFsProfile]
|
1406
|
+
def etfs_profile(opts = {})
|
1407
|
+
data, _status_code, _headers = etfs_profile_with_http_info(opts)
|
1408
|
+
data
|
1409
|
+
end
|
1410
|
+
|
1411
|
+
# ETFs Profile
|
1412
|
+
# Get ETF profile information. This endpoint has global coverage.
|
1413
|
+
# @param [Hash] opts the optional parameters
|
1414
|
+
# @option opts [String] :symbol ETF symbol.
|
1415
|
+
# @option opts [String] :isin ETF isin.
|
1416
|
+
# @return [Array<(ETFsProfile, Integer, Hash)>] ETFsProfile data, response status code and response headers
|
1417
|
+
def etfs_profile_with_http_info(opts = {})
|
1418
|
+
if @api_client.config.debugging
|
1419
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.etfs_profile ...'
|
1420
|
+
end
|
1421
|
+
# resource path
|
1422
|
+
local_var_path = '/etf/profile'
|
1423
|
+
|
1424
|
+
# query parameters
|
1425
|
+
query_params = opts[:query_params] || {}
|
1426
|
+
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
1427
|
+
query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil?
|
1428
|
+
|
1429
|
+
# header parameters
|
1430
|
+
header_params = opts[:header_params] || {}
|
1431
|
+
# HTTP header 'Accept' (if needed)
|
1432
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1433
|
+
|
1434
|
+
# form parameters
|
1435
|
+
form_params = opts[:form_params] || {}
|
1436
|
+
|
1437
|
+
# http body (model)
|
1438
|
+
post_body = opts[:debug_body]
|
1439
|
+
|
1440
|
+
# return_type
|
1441
|
+
return_type = opts[:debug_return_type] || 'ETFsProfile'
|
1442
|
+
|
1443
|
+
# auth_names
|
1444
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1445
|
+
|
1446
|
+
new_options = opts.merge(
|
1447
|
+
:operation => :"DefaultApi.etfs_profile",
|
1448
|
+
:header_params => header_params,
|
1449
|
+
:query_params => query_params,
|
1450
|
+
:form_params => form_params,
|
1451
|
+
:body => post_body,
|
1452
|
+
:auth_names => auth_names,
|
1453
|
+
:return_type => return_type
|
1454
|
+
)
|
1455
|
+
|
1456
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1457
|
+
if @api_client.config.debugging
|
1458
|
+
@api_client.config.logger.debug "API called: DefaultApi#etfs_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1459
|
+
end
|
1460
|
+
return data, status_code, headers
|
1461
|
+
end
|
1462
|
+
|
1463
|
+
# ETFs Sector Exposure
|
1464
|
+
# Get ETF sector exposure data.
|
1323
1465
|
# @param symbol [String] ETF symbol.
|
1324
1466
|
# @param [Hash] opts the optional parameters
|
1325
|
-
# @return [
|
1326
|
-
def
|
1327
|
-
data, _status_code, _headers =
|
1467
|
+
# @return [ETFsSectorExposure]
|
1468
|
+
def etfs_sector_exposure(symbol, opts = {})
|
1469
|
+
data, _status_code, _headers = etfs_sector_exposure_with_http_info(symbol, opts)
|
1328
1470
|
data
|
1329
1471
|
end
|
1330
1472
|
|
1331
|
-
# ETFs
|
1332
|
-
# Get ETF
|
1473
|
+
# ETFs Sector Exposure
|
1474
|
+
# Get ETF sector exposure data.
|
1333
1475
|
# @param symbol [String] ETF symbol.
|
1334
1476
|
# @param [Hash] opts the optional parameters
|
1335
|
-
# @return [Array<(
|
1336
|
-
def
|
1477
|
+
# @return [Array<(ETFsSectorExposure, Integer, Hash)>] ETFsSectorExposure data, response status code and response headers
|
1478
|
+
def etfs_sector_exposure_with_http_info(symbol, opts = {})
|
1337
1479
|
if @api_client.config.debugging
|
1338
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
1480
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.etfs_sector_exposure ...'
|
1339
1481
|
end
|
1340
1482
|
# verify the required parameter 'symbol' is set
|
1341
1483
|
if @api_client.config.client_side_validation && symbol.nil?
|
1342
|
-
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.
|
1484
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.etfs_sector_exposure"
|
1343
1485
|
end
|
1344
1486
|
# resource path
|
1345
1487
|
local_var_path = '/etf/sector'
|
@@ -1357,15 +1499,16 @@ module FinnhubRuby
|
|
1357
1499
|
form_params = opts[:form_params] || {}
|
1358
1500
|
|
1359
1501
|
# http body (model)
|
1360
|
-
post_body = opts[:
|
1502
|
+
post_body = opts[:debug_body]
|
1361
1503
|
|
1362
1504
|
# return_type
|
1363
|
-
return_type = opts[:
|
1505
|
+
return_type = opts[:debug_return_type] || 'ETFsSectorExposure'
|
1364
1506
|
|
1365
1507
|
# auth_names
|
1366
|
-
auth_names = opts[:
|
1508
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1367
1509
|
|
1368
1510
|
new_options = opts.merge(
|
1511
|
+
:operation => :"DefaultApi.etfs_sector_exposure",
|
1369
1512
|
:header_params => header_params,
|
1370
1513
|
:query_params => query_params,
|
1371
1514
|
:form_params => form_params,
|
@@ -1376,40 +1519,33 @@ module FinnhubRuby
|
|
1376
1519
|
|
1377
1520
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1378
1521
|
if @api_client.config.debugging
|
1379
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
1522
|
+
@api_client.config.logger.debug "API called: DefaultApi#etfs_sector_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1380
1523
|
end
|
1381
1524
|
return data, status_code, headers
|
1382
1525
|
end
|
1383
1526
|
|
1384
|
-
#
|
1385
|
-
#
|
1386
|
-
# @param symbol [String] ETF symbol.
|
1527
|
+
# FDA Committee Meeting Calendar
|
1528
|
+
# FDA's advisory committees are established to provide functions which support the agency's mission of protecting and promoting the public health, while meeting the requirements set forth in the Federal Advisory Committee Act. Committees are either mandated by statute or established at the discretion of the Department of Health and Human Services. Each committee is subject to renewal at two-year intervals unless the committee charter states otherwise.
|
1387
1529
|
# @param [Hash] opts the optional parameters
|
1388
|
-
# @return [
|
1389
|
-
def
|
1390
|
-
data, _status_code, _headers =
|
1530
|
+
# @return [Array<FDAComitteeMeeting>]
|
1531
|
+
def fda_committee_meeting_calendar(opts = {})
|
1532
|
+
data, _status_code, _headers = fda_committee_meeting_calendar_with_http_info(opts)
|
1391
1533
|
data
|
1392
1534
|
end
|
1393
1535
|
|
1394
|
-
#
|
1395
|
-
#
|
1396
|
-
# @param symbol [String] ETF symbol.
|
1536
|
+
# FDA Committee Meeting Calendar
|
1537
|
+
# FDA's advisory committees are established to provide functions which support the agency's mission of protecting and promoting the public health, while meeting the requirements set forth in the Federal Advisory Committee Act. Committees are either mandated by statute or established at the discretion of the Department of Health and Human Services. Each committee is subject to renewal at two-year intervals unless the committee charter states otherwise.
|
1397
1538
|
# @param [Hash] opts the optional parameters
|
1398
|
-
# @return [Array<(
|
1399
|
-
def
|
1539
|
+
# @return [Array<(Array<FDAComitteeMeeting>, Integer, Hash)>] Array<FDAComitteeMeeting> data, response status code and response headers
|
1540
|
+
def fda_committee_meeting_calendar_with_http_info(opts = {})
|
1400
1541
|
if @api_client.config.debugging
|
1401
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
1402
|
-
end
|
1403
|
-
# verify the required parameter 'symbol' is set
|
1404
|
-
if @api_client.config.client_side_validation && symbol.nil?
|
1405
|
-
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.etfs_profile"
|
1542
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.fda_committee_meeting_calendar ...'
|
1406
1543
|
end
|
1407
1544
|
# resource path
|
1408
|
-
local_var_path = '/
|
1545
|
+
local_var_path = '/fda-advisory-committee-calendar'
|
1409
1546
|
|
1410
1547
|
# query parameters
|
1411
1548
|
query_params = opts[:query_params] || {}
|
1412
|
-
query_params[:'symbol'] = symbol
|
1413
1549
|
|
1414
1550
|
# header parameters
|
1415
1551
|
header_params = opts[:header_params] || {}
|
@@ -1420,15 +1556,16 @@ module FinnhubRuby
|
|
1420
1556
|
form_params = opts[:form_params] || {}
|
1421
1557
|
|
1422
1558
|
# http body (model)
|
1423
|
-
post_body = opts[:
|
1559
|
+
post_body = opts[:debug_body]
|
1424
1560
|
|
1425
1561
|
# return_type
|
1426
|
-
return_type = opts[:
|
1562
|
+
return_type = opts[:debug_return_type] || 'Array<FDAComitteeMeeting>'
|
1427
1563
|
|
1428
1564
|
# auth_names
|
1429
|
-
auth_names = opts[:
|
1565
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1430
1566
|
|
1431
1567
|
new_options = opts.merge(
|
1568
|
+
:operation => :"DefaultApi.fda_committee_meeting_calendar",
|
1432
1569
|
:header_params => header_params,
|
1433
1570
|
:query_params => query_params,
|
1434
1571
|
:form_params => form_params,
|
@@ -1439,12 +1576,12 @@ module FinnhubRuby
|
|
1439
1576
|
|
1440
1577
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1441
1578
|
if @api_client.config.debugging
|
1442
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
1579
|
+
@api_client.config.logger.debug "API called: DefaultApi#fda_committee_meeting_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1443
1580
|
end
|
1444
1581
|
return data, status_code, headers
|
1445
1582
|
end
|
1446
1583
|
|
1447
|
-
# Filings
|
1584
|
+
# SEC Filings
|
1448
1585
|
# List company's filing. Limit to 250 documents at a time. This data is available for bulk download on <a href=\"https://www.kaggle.com/finnhub/sec-filings\" target=\"_blank\">Kaggle SEC Filings database</a>.
|
1449
1586
|
# @param [Hash] opts the optional parameters
|
1450
1587
|
# @option opts [String] :symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings.
|
@@ -1459,7 +1596,7 @@ module FinnhubRuby
|
|
1459
1596
|
data
|
1460
1597
|
end
|
1461
1598
|
|
1462
|
-
# Filings
|
1599
|
+
# SEC Filings
|
1463
1600
|
# List company's filing. Limit to 250 documents at a time. This data is available for bulk download on <a href=\"https://www.kaggle.com/finnhub/sec-filings\" target=\"_blank\">Kaggle SEC Filings database</a>.
|
1464
1601
|
# @param [Hash] opts the optional parameters
|
1465
1602
|
# @option opts [String] :symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings.
|
@@ -1494,15 +1631,16 @@ module FinnhubRuby
|
|
1494
1631
|
form_params = opts[:form_params] || {}
|
1495
1632
|
|
1496
1633
|
# http body (model)
|
1497
|
-
post_body = opts[:
|
1634
|
+
post_body = opts[:debug_body]
|
1498
1635
|
|
1499
1636
|
# return_type
|
1500
|
-
return_type = opts[:
|
1637
|
+
return_type = opts[:debug_return_type] || 'Array<Filing>'
|
1501
1638
|
|
1502
1639
|
# auth_names
|
1503
|
-
auth_names = opts[:
|
1640
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1504
1641
|
|
1505
1642
|
new_options = opts.merge(
|
1643
|
+
:operation => :"DefaultApi.filings",
|
1506
1644
|
:header_params => header_params,
|
1507
1645
|
:query_params => query_params,
|
1508
1646
|
:form_params => form_params,
|
@@ -1518,8 +1656,72 @@ module FinnhubRuby
|
|
1518
1656
|
return data, status_code, headers
|
1519
1657
|
end
|
1520
1658
|
|
1659
|
+
# SEC Sentiment Analysis
|
1660
|
+
# Get sentiment analysis of 10-K and 10-Q filings from SEC. An abnormal increase in the number of positive/negative words in filings can signal a significant change in the company's stock price in the upcoming 4 quarters. We make use of <a href= \"https://sraf.nd.edu/textual-analysis/resources/\" target=\"_blank\">Loughran and McDonald Sentiment Word Lists</a> to calculate the sentiment for each filing.
|
1661
|
+
# @param access_number [String] Access number of a specific report you want to retrieve data from.
|
1662
|
+
# @param [Hash] opts the optional parameters
|
1663
|
+
# @return [SECSentimentAnalysis]
|
1664
|
+
def filings_sentiment(access_number, opts = {})
|
1665
|
+
data, _status_code, _headers = filings_sentiment_with_http_info(access_number, opts)
|
1666
|
+
data
|
1667
|
+
end
|
1668
|
+
|
1669
|
+
# SEC Sentiment Analysis
|
1670
|
+
# Get sentiment analysis of 10-K and 10-Q filings from SEC. An abnormal increase in the number of positive/negative words in filings can signal a significant change in the company's stock price in the upcoming 4 quarters. We make use of <a href= \"https://sraf.nd.edu/textual-analysis/resources/\" target=\"_blank\">Loughran and McDonald Sentiment Word Lists</a> to calculate the sentiment for each filing.
|
1671
|
+
# @param access_number [String] Access number of a specific report you want to retrieve data from.
|
1672
|
+
# @param [Hash] opts the optional parameters
|
1673
|
+
# @return [Array<(SECSentimentAnalysis, Integer, Hash)>] SECSentimentAnalysis data, response status code and response headers
|
1674
|
+
def filings_sentiment_with_http_info(access_number, opts = {})
|
1675
|
+
if @api_client.config.debugging
|
1676
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.filings_sentiment ...'
|
1677
|
+
end
|
1678
|
+
# verify the required parameter 'access_number' is set
|
1679
|
+
if @api_client.config.client_side_validation && access_number.nil?
|
1680
|
+
fail ArgumentError, "Missing the required parameter 'access_number' when calling DefaultApi.filings_sentiment"
|
1681
|
+
end
|
1682
|
+
# resource path
|
1683
|
+
local_var_path = '/stock/filings-sentiment'
|
1684
|
+
|
1685
|
+
# query parameters
|
1686
|
+
query_params = opts[:query_params] || {}
|
1687
|
+
query_params[:'accessNumber'] = access_number
|
1688
|
+
|
1689
|
+
# header parameters
|
1690
|
+
header_params = opts[:header_params] || {}
|
1691
|
+
# HTTP header 'Accept' (if needed)
|
1692
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1693
|
+
|
1694
|
+
# form parameters
|
1695
|
+
form_params = opts[:form_params] || {}
|
1696
|
+
|
1697
|
+
# http body (model)
|
1698
|
+
post_body = opts[:debug_body]
|
1699
|
+
|
1700
|
+
# return_type
|
1701
|
+
return_type = opts[:debug_return_type] || 'SECSentimentAnalysis'
|
1702
|
+
|
1703
|
+
# auth_names
|
1704
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1705
|
+
|
1706
|
+
new_options = opts.merge(
|
1707
|
+
:operation => :"DefaultApi.filings_sentiment",
|
1708
|
+
:header_params => header_params,
|
1709
|
+
:query_params => query_params,
|
1710
|
+
:form_params => form_params,
|
1711
|
+
:body => post_body,
|
1712
|
+
:auth_names => auth_names,
|
1713
|
+
:return_type => return_type
|
1714
|
+
)
|
1715
|
+
|
1716
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1717
|
+
if @api_client.config.debugging
|
1718
|
+
@api_client.config.logger.debug "API called: DefaultApi#filings_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1719
|
+
end
|
1720
|
+
return data, status_code, headers
|
1721
|
+
end
|
1722
|
+
|
1521
1723
|
# Financial Statements
|
1522
|
-
# Get standardized balance sheet, income statement and cash flow for global companies going back 30+ years.
|
1724
|
+
# <p>Get standardized balance sheet, income statement and cash flow for global companies going back 30+ years. Data is sourced from original filings most of which made available through <a href=\"#filings\">SEC Filings</a> and <a href=\"#international-filings\">International Filings</a> endpoints.</p><p><i>Wondering why our standardized data is different from Bloomberg, Reuters, Factset, S&P or Yahoo Finance ? Check out our <a href=\"/faq\">FAQ page</a> to learn more</i></p>
|
1523
1725
|
# @param symbol [String] Symbol of the company: AAPL.
|
1524
1726
|
# @param statement [String] Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively.
|
1525
1727
|
# @param freq [String] Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow.
|
@@ -1531,7 +1733,7 @@ module FinnhubRuby
|
|
1531
1733
|
end
|
1532
1734
|
|
1533
1735
|
# Financial Statements
|
1534
|
-
# Get standardized balance sheet, income statement and cash flow for global companies going back 30+ years.
|
1736
|
+
# <p>Get standardized balance sheet, income statement and cash flow for global companies going back 30+ years. Data is sourced from original filings most of which made available through <a href=\"#filings\">SEC Filings</a> and <a href=\"#international-filings\">International Filings</a> endpoints.</p><p><i>Wondering why our standardized data is different from Bloomberg, Reuters, Factset, S&P or Yahoo Finance ? Check out our <a href=\"/faq\">FAQ page</a> to learn more</i></p>
|
1535
1737
|
# @param symbol [String] Symbol of the company: AAPL.
|
1536
1738
|
# @param statement [String] Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively.
|
1537
1739
|
# @param freq [String] Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow.
|
@@ -1571,15 +1773,16 @@ module FinnhubRuby
|
|
1571
1773
|
form_params = opts[:form_params] || {}
|
1572
1774
|
|
1573
1775
|
# http body (model)
|
1574
|
-
post_body = opts[:
|
1776
|
+
post_body = opts[:debug_body]
|
1575
1777
|
|
1576
1778
|
# return_type
|
1577
|
-
return_type = opts[:
|
1779
|
+
return_type = opts[:debug_return_type] || 'FinancialStatements'
|
1578
1780
|
|
1579
1781
|
# auth_names
|
1580
|
-
auth_names = opts[:
|
1782
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1581
1783
|
|
1582
1784
|
new_options = opts.merge(
|
1785
|
+
:operation => :"DefaultApi.financials",
|
1583
1786
|
:header_params => header_params,
|
1584
1787
|
:query_params => query_params,
|
1585
1788
|
:form_params => form_params,
|
@@ -1639,15 +1842,16 @@ module FinnhubRuby
|
|
1639
1842
|
form_params = opts[:form_params] || {}
|
1640
1843
|
|
1641
1844
|
# http body (model)
|
1642
|
-
post_body = opts[:
|
1845
|
+
post_body = opts[:debug_body]
|
1643
1846
|
|
1644
1847
|
# return_type
|
1645
|
-
return_type = opts[:
|
1848
|
+
return_type = opts[:debug_return_type] || 'FinancialsAsReported'
|
1646
1849
|
|
1647
1850
|
# auth_names
|
1648
|
-
auth_names = opts[:
|
1851
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1649
1852
|
|
1650
1853
|
new_options = opts.merge(
|
1854
|
+
:operation => :"DefaultApi.financials_reported",
|
1651
1855
|
:header_params => header_params,
|
1652
1856
|
:query_params => query_params,
|
1653
1857
|
:form_params => form_params,
|
@@ -1723,15 +1927,16 @@ module FinnhubRuby
|
|
1723
1927
|
form_params = opts[:form_params] || {}
|
1724
1928
|
|
1725
1929
|
# http body (model)
|
1726
|
-
post_body = opts[:
|
1930
|
+
post_body = opts[:debug_body]
|
1727
1931
|
|
1728
1932
|
# return_type
|
1729
|
-
return_type = opts[:
|
1933
|
+
return_type = opts[:debug_return_type] || 'ForexCandles'
|
1730
1934
|
|
1731
1935
|
# auth_names
|
1732
|
-
auth_names = opts[:
|
1936
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1733
1937
|
|
1734
1938
|
new_options = opts.merge(
|
1939
|
+
:operation => :"DefaultApi.forex_candles",
|
1735
1940
|
:header_params => header_params,
|
1736
1941
|
:query_params => query_params,
|
1737
1942
|
:form_params => form_params,
|
@@ -1779,15 +1984,16 @@ module FinnhubRuby
|
|
1779
1984
|
form_params = opts[:form_params] || {}
|
1780
1985
|
|
1781
1986
|
# http body (model)
|
1782
|
-
post_body = opts[:
|
1987
|
+
post_body = opts[:debug_body]
|
1783
1988
|
|
1784
1989
|
# return_type
|
1785
|
-
return_type = opts[:
|
1990
|
+
return_type = opts[:debug_return_type] || 'Array<String>'
|
1786
1991
|
|
1787
1992
|
# auth_names
|
1788
|
-
auth_names = opts[:
|
1993
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1789
1994
|
|
1790
1995
|
new_options = opts.merge(
|
1996
|
+
:operation => :"DefaultApi.forex_exchanges",
|
1791
1997
|
:header_params => header_params,
|
1792
1998
|
:query_params => query_params,
|
1793
1999
|
:form_params => form_params,
|
@@ -1838,15 +2044,16 @@ module FinnhubRuby
|
|
1838
2044
|
form_params = opts[:form_params] || {}
|
1839
2045
|
|
1840
2046
|
# http body (model)
|
1841
|
-
post_body = opts[:
|
2047
|
+
post_body = opts[:debug_body]
|
1842
2048
|
|
1843
2049
|
# return_type
|
1844
|
-
return_type = opts[:
|
2050
|
+
return_type = opts[:debug_return_type] || 'Forexrates'
|
1845
2051
|
|
1846
2052
|
# auth_names
|
1847
|
-
auth_names = opts[:
|
2053
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1848
2054
|
|
1849
2055
|
new_options = opts.merge(
|
2056
|
+
:operation => :"DefaultApi.forex_rates",
|
1850
2057
|
:header_params => header_params,
|
1851
2058
|
:query_params => query_params,
|
1852
2059
|
:form_params => form_params,
|
@@ -1901,15 +2108,16 @@ module FinnhubRuby
|
|
1901
2108
|
form_params = opts[:form_params] || {}
|
1902
2109
|
|
1903
2110
|
# http body (model)
|
1904
|
-
post_body = opts[:
|
2111
|
+
post_body = opts[:debug_body]
|
1905
2112
|
|
1906
2113
|
# return_type
|
1907
|
-
return_type = opts[:
|
2114
|
+
return_type = opts[:debug_return_type] || 'Array<ForexSymbol>'
|
1908
2115
|
|
1909
2116
|
# auth_names
|
1910
|
-
auth_names = opts[:
|
2117
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1911
2118
|
|
1912
2119
|
new_options = opts.merge(
|
2120
|
+
:operation => :"DefaultApi.forex_symbols",
|
1913
2121
|
:header_params => header_params,
|
1914
2122
|
:query_params => query_params,
|
1915
2123
|
:form_params => form_params,
|
@@ -1926,7 +2134,7 @@ module FinnhubRuby
|
|
1926
2134
|
end
|
1927
2135
|
|
1928
2136
|
# Fund Ownership
|
1929
|
-
# Get a full list fund and institutional investors of a company in descending order of the number of shares held.
|
2137
|
+
# Get a full list fund and institutional investors of a company in descending order of the number of shares held. Data is sourced from <code>13F form</code>, <code>Schedule 13D</code> and <code>13G</code> for US market, <code>UK Share Register</code> for UK market, <code>SEDI</code> for Canadian market and equivalent filings for other international markets.
|
1930
2138
|
# @param symbol [String] Symbol of the company: AAPL.
|
1931
2139
|
# @param [Hash] opts the optional parameters
|
1932
2140
|
# @option opts [Integer] :limit Limit number of results. Leave empty to get the full list.
|
@@ -1937,7 +2145,7 @@ module FinnhubRuby
|
|
1937
2145
|
end
|
1938
2146
|
|
1939
2147
|
# Fund Ownership
|
1940
|
-
# Get a full list fund and institutional investors of a company in descending order of the number of shares held.
|
2148
|
+
# Get a full list fund and institutional investors of a company in descending order of the number of shares held. Data is sourced from <code>13F form</code>, <code>Schedule 13D</code> and <code>13G</code> for US market, <code>UK Share Register</code> for UK market, <code>SEDI</code> for Canadian market and equivalent filings for other international markets.
|
1941
2149
|
# @param symbol [String] Symbol of the company: AAPL.
|
1942
2150
|
# @param [Hash] opts the optional parameters
|
1943
2151
|
# @option opts [Integer] :limit Limit number of results. Leave empty to get the full list.
|
@@ -1967,15 +2175,16 @@ module FinnhubRuby
|
|
1967
2175
|
form_params = opts[:form_params] || {}
|
1968
2176
|
|
1969
2177
|
# http body (model)
|
1970
|
-
post_body = opts[:
|
2178
|
+
post_body = opts[:debug_body]
|
1971
2179
|
|
1972
2180
|
# return_type
|
1973
|
-
return_type = opts[:
|
2181
|
+
return_type = opts[:debug_return_type] || 'FundOwnership'
|
1974
2182
|
|
1975
2183
|
# auth_names
|
1976
|
-
auth_names = opts[:
|
2184
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1977
2185
|
|
1978
2186
|
new_options = opts.merge(
|
2187
|
+
:operation => :"DefaultApi.fund_ownership",
|
1979
2188
|
:header_params => header_params,
|
1980
2189
|
:query_params => query_params,
|
1981
2190
|
:form_params => form_params,
|
@@ -1991,74 +2200,8 @@ module FinnhubRuby
|
|
1991
2200
|
return data, status_code, headers
|
1992
2201
|
end
|
1993
2202
|
|
1994
|
-
# General News
|
1995
|
-
# Get latest market news.
|
1996
|
-
# @param category [String] This parameter can be 1 of the following values <code>general, forex, crypto, merger</code>.
|
1997
|
-
# @param [Hash] opts the optional parameters
|
1998
|
-
# @option opts [String] :min_id Use this field to get only news after this ID. Default to 0
|
1999
|
-
# @return [Array<News>]
|
2000
|
-
def general_news(category, opts = {})
|
2001
|
-
data, _status_code, _headers = general_news_with_http_info(category, opts)
|
2002
|
-
data
|
2003
|
-
end
|
2004
|
-
|
2005
|
-
# General News
|
2006
|
-
# Get latest market news.
|
2007
|
-
# @param category [String] This parameter can be 1 of the following values <code>general, forex, crypto, merger</code>.
|
2008
|
-
# @param [Hash] opts the optional parameters
|
2009
|
-
# @option opts [String] :min_id Use this field to get only news after this ID. Default to 0
|
2010
|
-
# @return [Array<(Array<News>, Integer, Hash)>] Array<News> data, response status code and response headers
|
2011
|
-
def general_news_with_http_info(category, opts = {})
|
2012
|
-
if @api_client.config.debugging
|
2013
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.general_news ...'
|
2014
|
-
end
|
2015
|
-
# verify the required parameter 'category' is set
|
2016
|
-
if @api_client.config.client_side_validation && category.nil?
|
2017
|
-
fail ArgumentError, "Missing the required parameter 'category' when calling DefaultApi.general_news"
|
2018
|
-
end
|
2019
|
-
# resource path
|
2020
|
-
local_var_path = '/news'
|
2021
|
-
|
2022
|
-
# query parameters
|
2023
|
-
query_params = opts[:query_params] || {}
|
2024
|
-
query_params[:'category'] = category
|
2025
|
-
query_params[:'minId'] = opts[:'min_id'] if !opts[:'min_id'].nil?
|
2026
|
-
|
2027
|
-
# header parameters
|
2028
|
-
header_params = opts[:header_params] || {}
|
2029
|
-
# HTTP header 'Accept' (if needed)
|
2030
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2031
|
-
|
2032
|
-
# form parameters
|
2033
|
-
form_params = opts[:form_params] || {}
|
2034
|
-
|
2035
|
-
# http body (model)
|
2036
|
-
post_body = opts[:body]
|
2037
|
-
|
2038
|
-
# return_type
|
2039
|
-
return_type = opts[:return_type] || 'Array<News>'
|
2040
|
-
|
2041
|
-
# auth_names
|
2042
|
-
auth_names = opts[:auth_names] || ['api_key']
|
2043
|
-
|
2044
|
-
new_options = opts.merge(
|
2045
|
-
:header_params => header_params,
|
2046
|
-
:query_params => query_params,
|
2047
|
-
:form_params => form_params,
|
2048
|
-
:body => post_body,
|
2049
|
-
:auth_names => auth_names,
|
2050
|
-
:return_type => return_type
|
2051
|
-
)
|
2052
|
-
|
2053
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2054
|
-
if @api_client.config.debugging
|
2055
|
-
@api_client.config.logger.debug "API called: DefaultApi#general_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2056
|
-
end
|
2057
|
-
return data, status_code, headers
|
2058
|
-
end
|
2059
|
-
|
2060
2203
|
# Indices Constituents
|
2061
|
-
# Get a list of index's constituents.
|
2204
|
+
# Get a list of index's constituents. A list of supported indices for this endpoint can be found <a href=\"https://docs.google.com/spreadsheets/d/1Syr2eLielHWsorxkDEZXyc55d6bNx1M3ZeI4vdn7Qzo/edit?usp=sharing\" target=\"_blank\">here</a>.
|
2062
2205
|
# @param symbol [String] symbol
|
2063
2206
|
# @param [Hash] opts the optional parameters
|
2064
2207
|
# @return [IndicesConstituents]
|
@@ -2068,7 +2211,7 @@ module FinnhubRuby
|
|
2068
2211
|
end
|
2069
2212
|
|
2070
2213
|
# Indices Constituents
|
2071
|
-
# Get a list of index's constituents.
|
2214
|
+
# Get a list of index's constituents. A list of supported indices for this endpoint can be found <a href=\"https://docs.google.com/spreadsheets/d/1Syr2eLielHWsorxkDEZXyc55d6bNx1M3ZeI4vdn7Qzo/edit?usp=sharing\" target=\"_blank\">here</a>.
|
2072
2215
|
# @param symbol [String] symbol
|
2073
2216
|
# @param [Hash] opts the optional parameters
|
2074
2217
|
# @return [Array<(IndicesConstituents, Integer, Hash)>] IndicesConstituents data, response status code and response headers
|
@@ -2096,15 +2239,16 @@ module FinnhubRuby
|
|
2096
2239
|
form_params = opts[:form_params] || {}
|
2097
2240
|
|
2098
2241
|
# http body (model)
|
2099
|
-
post_body = opts[:
|
2242
|
+
post_body = opts[:debug_body]
|
2100
2243
|
|
2101
2244
|
# return_type
|
2102
|
-
return_type = opts[:
|
2245
|
+
return_type = opts[:debug_return_type] || 'IndicesConstituents'
|
2103
2246
|
|
2104
2247
|
# auth_names
|
2105
|
-
auth_names = opts[:
|
2248
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2106
2249
|
|
2107
2250
|
new_options = opts.merge(
|
2251
|
+
:operation => :"DefaultApi.indices_constituents",
|
2108
2252
|
:header_params => header_params,
|
2109
2253
|
:query_params => query_params,
|
2110
2254
|
:form_params => form_params,
|
@@ -2159,15 +2303,16 @@ module FinnhubRuby
|
|
2159
2303
|
form_params = opts[:form_params] || {}
|
2160
2304
|
|
2161
2305
|
# http body (model)
|
2162
|
-
post_body = opts[:
|
2306
|
+
post_body = opts[:debug_body]
|
2163
2307
|
|
2164
2308
|
# return_type
|
2165
|
-
return_type = opts[:
|
2309
|
+
return_type = opts[:debug_return_type] || 'IndicesHistoricalConstituents'
|
2166
2310
|
|
2167
2311
|
# auth_names
|
2168
|
-
auth_names = opts[:
|
2312
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2169
2313
|
|
2170
2314
|
new_options = opts.merge(
|
2315
|
+
:operation => :"DefaultApi.indices_historical_constituents",
|
2171
2316
|
:header_params => header_params,
|
2172
2317
|
:query_params => query_params,
|
2173
2318
|
:form_params => form_params,
|
@@ -2183,38 +2328,41 @@ module FinnhubRuby
|
|
2183
2328
|
return data, status_code, headers
|
2184
2329
|
end
|
2185
2330
|
|
2186
|
-
#
|
2187
|
-
#
|
2331
|
+
# Insider Transactions
|
2332
|
+
# Company insider transactions data sourced from <code>Form 3,4,5</code>. This endpoint only covers US companies at the moment. Limit to 100 transactions per API call.
|
2188
2333
|
# @param symbol [String] Symbol of the company: AAPL.
|
2189
2334
|
# @param [Hash] opts the optional parameters
|
2190
|
-
# @option opts [
|
2191
|
-
# @
|
2192
|
-
|
2193
|
-
|
2335
|
+
# @option opts [Date] :from From date: 2020-03-15.
|
2336
|
+
# @option opts [Date] :to To date: 2020-03-16.
|
2337
|
+
# @return [InsiderTransactions]
|
2338
|
+
def insider_transactions(symbol, opts = {})
|
2339
|
+
data, _status_code, _headers = insider_transactions_with_http_info(symbol, opts)
|
2194
2340
|
data
|
2195
2341
|
end
|
2196
2342
|
|
2197
|
-
#
|
2198
|
-
#
|
2343
|
+
# Insider Transactions
|
2344
|
+
# Company insider transactions data sourced from <code>Form 3,4,5</code>. This endpoint only covers US companies at the moment. Limit to 100 transactions per API call.
|
2199
2345
|
# @param symbol [String] Symbol of the company: AAPL.
|
2200
2346
|
# @param [Hash] opts the optional parameters
|
2201
|
-
# @option opts [
|
2202
|
-
# @
|
2203
|
-
|
2347
|
+
# @option opts [Date] :from From date: 2020-03-15.
|
2348
|
+
# @option opts [Date] :to To date: 2020-03-16.
|
2349
|
+
# @return [Array<(InsiderTransactions, Integer, Hash)>] InsiderTransactions data, response status code and response headers
|
2350
|
+
def insider_transactions_with_http_info(symbol, opts = {})
|
2204
2351
|
if @api_client.config.debugging
|
2205
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
2352
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.insider_transactions ...'
|
2206
2353
|
end
|
2207
2354
|
# verify the required parameter 'symbol' is set
|
2208
2355
|
if @api_client.config.client_side_validation && symbol.nil?
|
2209
|
-
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.
|
2356
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.insider_transactions"
|
2210
2357
|
end
|
2211
2358
|
# resource path
|
2212
|
-
local_var_path = '/stock/
|
2359
|
+
local_var_path = '/stock/insider-transactions'
|
2213
2360
|
|
2214
2361
|
# query parameters
|
2215
2362
|
query_params = opts[:query_params] || {}
|
2216
2363
|
query_params[:'symbol'] = symbol
|
2217
|
-
query_params[:'
|
2364
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
2365
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
2218
2366
|
|
2219
2367
|
# header parameters
|
2220
2368
|
header_params = opts[:header_params] || {}
|
@@ -2225,15 +2373,16 @@ module FinnhubRuby
|
|
2225
2373
|
form_params = opts[:form_params] || {}
|
2226
2374
|
|
2227
2375
|
# http body (model)
|
2228
|
-
post_body = opts[:
|
2376
|
+
post_body = opts[:debug_body]
|
2229
2377
|
|
2230
2378
|
# return_type
|
2231
|
-
return_type = opts[:
|
2379
|
+
return_type = opts[:debug_return_type] || 'InsiderTransactions'
|
2232
2380
|
|
2233
2381
|
# auth_names
|
2234
|
-
auth_names = opts[:
|
2382
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2235
2383
|
|
2236
2384
|
new_options = opts.merge(
|
2385
|
+
:operation => :"DefaultApi.insider_transactions",
|
2237
2386
|
:header_params => header_params,
|
2238
2387
|
:query_params => query_params,
|
2239
2388
|
:form_params => form_params,
|
@@ -2244,47 +2393,39 @@ module FinnhubRuby
|
|
2244
2393
|
|
2245
2394
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2246
2395
|
if @api_client.config.debugging
|
2247
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
2396
|
+
@api_client.config.logger.debug "API called: DefaultApi#insider_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2248
2397
|
end
|
2249
2398
|
return data, status_code, headers
|
2250
2399
|
end
|
2251
2400
|
|
2252
|
-
#
|
2253
|
-
#
|
2254
|
-
# @param from [Date] From date: 2020-03-15.
|
2255
|
-
# @param to [Date] To date: 2020-03-16.
|
2401
|
+
# International Filings
|
2402
|
+
# List filings for international companies which covers 95%+ of global market cap. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
|
2256
2403
|
# @param [Hash] opts the optional parameters
|
2257
|
-
# @
|
2258
|
-
|
2259
|
-
|
2404
|
+
# @option opts [String] :symbol Symbol. Leave empty to list latest filings.
|
2405
|
+
# @option opts [String] :country Filter by country using country's 2-letter code.
|
2406
|
+
# @return [Array<InternationalFiling>]
|
2407
|
+
def international_filings(opts = {})
|
2408
|
+
data, _status_code, _headers = international_filings_with_http_info(opts)
|
2260
2409
|
data
|
2261
2410
|
end
|
2262
2411
|
|
2263
|
-
#
|
2264
|
-
#
|
2265
|
-
# @param from [Date] From date: 2020-03-15.
|
2266
|
-
# @param to [Date] To date: 2020-03-16.
|
2412
|
+
# International Filings
|
2413
|
+
# List filings for international companies which covers 95%+ of global market cap. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
|
2267
2414
|
# @param [Hash] opts the optional parameters
|
2268
|
-
# @
|
2269
|
-
|
2415
|
+
# @option opts [String] :symbol Symbol. Leave empty to list latest filings.
|
2416
|
+
# @option opts [String] :country Filter by country using country's 2-letter code.
|
2417
|
+
# @return [Array<(Array<InternationalFiling>, Integer, Hash)>] Array<InternationalFiling> data, response status code and response headers
|
2418
|
+
def international_filings_with_http_info(opts = {})
|
2270
2419
|
if @api_client.config.debugging
|
2271
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
2272
|
-
end
|
2273
|
-
# verify the required parameter 'from' is set
|
2274
|
-
if @api_client.config.client_side_validation && from.nil?
|
2275
|
-
fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.ipo_calendar"
|
2276
|
-
end
|
2277
|
-
# verify the required parameter 'to' is set
|
2278
|
-
if @api_client.config.client_side_validation && to.nil?
|
2279
|
-
fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.ipo_calendar"
|
2420
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.international_filings ...'
|
2280
2421
|
end
|
2281
2422
|
# resource path
|
2282
|
-
local_var_path = '/
|
2423
|
+
local_var_path = '/stock/international-filings'
|
2283
2424
|
|
2284
2425
|
# query parameters
|
2285
2426
|
query_params = opts[:query_params] || {}
|
2286
|
-
query_params[:'
|
2287
|
-
query_params[:'
|
2427
|
+
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
2428
|
+
query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
|
2288
2429
|
|
2289
2430
|
# header parameters
|
2290
2431
|
header_params = opts[:header_params] || {}
|
@@ -2295,15 +2436,16 @@ module FinnhubRuby
|
|
2295
2436
|
form_params = opts[:form_params] || {}
|
2296
2437
|
|
2297
2438
|
# http body (model)
|
2298
|
-
post_body = opts[:
|
2439
|
+
post_body = opts[:debug_body]
|
2299
2440
|
|
2300
2441
|
# return_type
|
2301
|
-
return_type = opts[:
|
2442
|
+
return_type = opts[:debug_return_type] || 'Array<InternationalFiling>'
|
2302
2443
|
|
2303
2444
|
# auth_names
|
2304
|
-
auth_names = opts[:
|
2445
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2305
2446
|
|
2306
2447
|
new_options = opts.merge(
|
2448
|
+
:operation => :"DefaultApi.international_filings",
|
2307
2449
|
:header_params => header_params,
|
2308
2450
|
:query_params => query_params,
|
2309
2451
|
:form_params => form_params,
|
@@ -2314,46 +2456,40 @@ module FinnhubRuby
|
|
2314
2456
|
|
2315
2457
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2316
2458
|
if @api_client.config.debugging
|
2317
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
2459
|
+
@api_client.config.logger.debug "API called: DefaultApi#international_filings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2318
2460
|
end
|
2319
2461
|
return data, status_code, headers
|
2320
2462
|
end
|
2321
2463
|
|
2322
|
-
#
|
2323
|
-
#
|
2324
|
-
# @param
|
2464
|
+
# Investment Themes (Thematic Investing)
|
2465
|
+
# <p>Thematic investing involves creating a portfolio (or portion of a portfolio) by gathering together a collection of companies involved in certain areas that you predict will generate above-market returns over the long term. Themes can be based on a concept such as ageing populations or a sub-sector such as robotics, and drones. Thematic investing focuses on predicted long-term trends rather than specific companies or sectors, enabling investors to access structural, one-off shifts that can change an entire industry.</p><p>This endpoint will help you get portfolios of different investment themes that are changing our life and are the way of the future.</p><p>A full list of themes supported can be found <a target=\"_blank\" href=\"https://docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp=sharing\">here</a>. The theme coverage and portfolios are updated bi-weekly by our analysts. Our approach excludes penny, super-small cap and illiquid stocks.</p>
|
2466
|
+
# @param theme [String] Investment theme. A full list of themes supported can be found <a target=\"_blank\" href=\"https://docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp=sharing\">here</a>.
|
2325
2467
|
# @param [Hash] opts the optional parameters
|
2326
|
-
# @
|
2327
|
-
|
2328
|
-
|
2329
|
-
def major_developments(symbol, opts = {})
|
2330
|
-
data, _status_code, _headers = major_developments_with_http_info(symbol, opts)
|
2468
|
+
# @return [InvestmentThemes]
|
2469
|
+
def investment_themes(theme, opts = {})
|
2470
|
+
data, _status_code, _headers = investment_themes_with_http_info(theme, opts)
|
2331
2471
|
data
|
2332
2472
|
end
|
2333
2473
|
|
2334
|
-
#
|
2335
|
-
#
|
2336
|
-
# @param
|
2474
|
+
# Investment Themes (Thematic Investing)
|
2475
|
+
# <p>Thematic investing involves creating a portfolio (or portion of a portfolio) by gathering together a collection of companies involved in certain areas that you predict will generate above-market returns over the long term. Themes can be based on a concept such as ageing populations or a sub-sector such as robotics, and drones. Thematic investing focuses on predicted long-term trends rather than specific companies or sectors, enabling investors to access structural, one-off shifts that can change an entire industry.</p><p>This endpoint will help you get portfolios of different investment themes that are changing our life and are the way of the future.</p><p>A full list of themes supported can be found <a target=\"_blank\" href=\"https://docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp=sharing\">here</a>. The theme coverage and portfolios are updated bi-weekly by our analysts. Our approach excludes penny, super-small cap and illiquid stocks.</p>
|
2476
|
+
# @param theme [String] Investment theme. A full list of themes supported can be found <a target=\"_blank\" href=\"https://docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp=sharing\">here</a>.
|
2337
2477
|
# @param [Hash] opts the optional parameters
|
2338
|
-
# @
|
2339
|
-
|
2340
|
-
# @return [Array<(MajorDevelopments, Integer, Hash)>] MajorDevelopments data, response status code and response headers
|
2341
|
-
def major_developments_with_http_info(symbol, opts = {})
|
2478
|
+
# @return [Array<(InvestmentThemes, Integer, Hash)>] InvestmentThemes data, response status code and response headers
|
2479
|
+
def investment_themes_with_http_info(theme, opts = {})
|
2342
2480
|
if @api_client.config.debugging
|
2343
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
2481
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.investment_themes ...'
|
2344
2482
|
end
|
2345
|
-
# verify the required parameter '
|
2346
|
-
if @api_client.config.client_side_validation &&
|
2347
|
-
fail ArgumentError, "Missing the required parameter '
|
2483
|
+
# verify the required parameter 'theme' is set
|
2484
|
+
if @api_client.config.client_side_validation && theme.nil?
|
2485
|
+
fail ArgumentError, "Missing the required parameter 'theme' when calling DefaultApi.investment_themes"
|
2348
2486
|
end
|
2349
2487
|
# resource path
|
2350
|
-
local_var_path = '/
|
2488
|
+
local_var_path = '/stock/investment-theme'
|
2351
2489
|
|
2352
2490
|
# query parameters
|
2353
2491
|
query_params = opts[:query_params] || {}
|
2354
|
-
query_params[:'
|
2355
|
-
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
2356
|
-
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
2492
|
+
query_params[:'theme'] = theme
|
2357
2493
|
|
2358
2494
|
# header parameters
|
2359
2495
|
header_params = opts[:header_params] || {}
|
@@ -2364,15 +2500,16 @@ module FinnhubRuby
|
|
2364
2500
|
form_params = opts[:form_params] || {}
|
2365
2501
|
|
2366
2502
|
# http body (model)
|
2367
|
-
post_body = opts[:
|
2503
|
+
post_body = opts[:debug_body]
|
2368
2504
|
|
2369
2505
|
# return_type
|
2370
|
-
return_type = opts[:
|
2506
|
+
return_type = opts[:debug_return_type] || 'InvestmentThemes'
|
2371
2507
|
|
2372
2508
|
# auth_names
|
2373
|
-
auth_names = opts[:
|
2509
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2374
2510
|
|
2375
2511
|
new_options = opts.merge(
|
2512
|
+
:operation => :"DefaultApi.investment_themes",
|
2376
2513
|
:header_params => header_params,
|
2377
2514
|
:query_params => query_params,
|
2378
2515
|
:form_params => form_params,
|
@@ -2383,14 +2520,409 @@ module FinnhubRuby
|
|
2383
2520
|
|
2384
2521
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2385
2522
|
if @api_client.config.debugging
|
2386
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
2523
|
+
@api_client.config.logger.debug "API called: DefaultApi#investment_themes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2387
2524
|
end
|
2388
2525
|
return data, status_code, headers
|
2389
2526
|
end
|
2390
2527
|
|
2391
|
-
#
|
2392
|
-
# Get
|
2393
|
-
# @param
|
2528
|
+
# IPO Calendar
|
2529
|
+
# Get recent and upcoming IPO.
|
2530
|
+
# @param from [Date] From date: 2020-03-15.
|
2531
|
+
# @param to [Date] To date: 2020-03-16.
|
2532
|
+
# @param [Hash] opts the optional parameters
|
2533
|
+
# @return [IPOCalendar]
|
2534
|
+
def ipo_calendar(from, to, opts = {})
|
2535
|
+
data, _status_code, _headers = ipo_calendar_with_http_info(from, to, opts)
|
2536
|
+
data
|
2537
|
+
end
|
2538
|
+
|
2539
|
+
# IPO Calendar
|
2540
|
+
# Get recent and upcoming IPO.
|
2541
|
+
# @param from [Date] From date: 2020-03-15.
|
2542
|
+
# @param to [Date] To date: 2020-03-16.
|
2543
|
+
# @param [Hash] opts the optional parameters
|
2544
|
+
# @return [Array<(IPOCalendar, Integer, Hash)>] IPOCalendar data, response status code and response headers
|
2545
|
+
def ipo_calendar_with_http_info(from, to, opts = {})
|
2546
|
+
if @api_client.config.debugging
|
2547
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.ipo_calendar ...'
|
2548
|
+
end
|
2549
|
+
# verify the required parameter 'from' is set
|
2550
|
+
if @api_client.config.client_side_validation && from.nil?
|
2551
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.ipo_calendar"
|
2552
|
+
end
|
2553
|
+
# verify the required parameter 'to' is set
|
2554
|
+
if @api_client.config.client_side_validation && to.nil?
|
2555
|
+
fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.ipo_calendar"
|
2556
|
+
end
|
2557
|
+
# resource path
|
2558
|
+
local_var_path = '/calendar/ipo'
|
2559
|
+
|
2560
|
+
# query parameters
|
2561
|
+
query_params = opts[:query_params] || {}
|
2562
|
+
query_params[:'from'] = from
|
2563
|
+
query_params[:'to'] = to
|
2564
|
+
|
2565
|
+
# header parameters
|
2566
|
+
header_params = opts[:header_params] || {}
|
2567
|
+
# HTTP header 'Accept' (if needed)
|
2568
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2569
|
+
|
2570
|
+
# form parameters
|
2571
|
+
form_params = opts[:form_params] || {}
|
2572
|
+
|
2573
|
+
# http body (model)
|
2574
|
+
post_body = opts[:debug_body]
|
2575
|
+
|
2576
|
+
# return_type
|
2577
|
+
return_type = opts[:debug_return_type] || 'IPOCalendar'
|
2578
|
+
|
2579
|
+
# auth_names
|
2580
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2581
|
+
|
2582
|
+
new_options = opts.merge(
|
2583
|
+
:operation => :"DefaultApi.ipo_calendar",
|
2584
|
+
:header_params => header_params,
|
2585
|
+
:query_params => query_params,
|
2586
|
+
:form_params => form_params,
|
2587
|
+
:body => post_body,
|
2588
|
+
:auth_names => auth_names,
|
2589
|
+
:return_type => return_type
|
2590
|
+
)
|
2591
|
+
|
2592
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2593
|
+
if @api_client.config.debugging
|
2594
|
+
@api_client.config.logger.debug "API called: DefaultApi#ipo_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2595
|
+
end
|
2596
|
+
return data, status_code, headers
|
2597
|
+
end
|
2598
|
+
|
2599
|
+
# Market News
|
2600
|
+
# Get latest market news.
|
2601
|
+
# @param category [String] This parameter can be 1 of the following values <code>general, forex, crypto, merger</code>.
|
2602
|
+
# @param [Hash] opts the optional parameters
|
2603
|
+
# @option opts [Integer] :min_id Use this field to get only news after this ID. Default to 0
|
2604
|
+
# @return [Array<MarketNews>]
|
2605
|
+
def market_news(category, opts = {})
|
2606
|
+
data, _status_code, _headers = market_news_with_http_info(category, opts)
|
2607
|
+
data
|
2608
|
+
end
|
2609
|
+
|
2610
|
+
# Market News
|
2611
|
+
# Get latest market news.
|
2612
|
+
# @param category [String] This parameter can be 1 of the following values <code>general, forex, crypto, merger</code>.
|
2613
|
+
# @param [Hash] opts the optional parameters
|
2614
|
+
# @option opts [Integer] :min_id Use this field to get only news after this ID. Default to 0
|
2615
|
+
# @return [Array<(Array<MarketNews>, Integer, Hash)>] Array<MarketNews> data, response status code and response headers
|
2616
|
+
def market_news_with_http_info(category, opts = {})
|
2617
|
+
if @api_client.config.debugging
|
2618
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.market_news ...'
|
2619
|
+
end
|
2620
|
+
# verify the required parameter 'category' is set
|
2621
|
+
if @api_client.config.client_side_validation && category.nil?
|
2622
|
+
fail ArgumentError, "Missing the required parameter 'category' when calling DefaultApi.market_news"
|
2623
|
+
end
|
2624
|
+
# resource path
|
2625
|
+
local_var_path = '/news'
|
2626
|
+
|
2627
|
+
# query parameters
|
2628
|
+
query_params = opts[:query_params] || {}
|
2629
|
+
query_params[:'category'] = category
|
2630
|
+
query_params[:'minId'] = opts[:'min_id'] if !opts[:'min_id'].nil?
|
2631
|
+
|
2632
|
+
# header parameters
|
2633
|
+
header_params = opts[:header_params] || {}
|
2634
|
+
# HTTP header 'Accept' (if needed)
|
2635
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2636
|
+
|
2637
|
+
# form parameters
|
2638
|
+
form_params = opts[:form_params] || {}
|
2639
|
+
|
2640
|
+
# http body (model)
|
2641
|
+
post_body = opts[:debug_body]
|
2642
|
+
|
2643
|
+
# return_type
|
2644
|
+
return_type = opts[:debug_return_type] || 'Array<MarketNews>'
|
2645
|
+
|
2646
|
+
# auth_names
|
2647
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2648
|
+
|
2649
|
+
new_options = opts.merge(
|
2650
|
+
:operation => :"DefaultApi.market_news",
|
2651
|
+
:header_params => header_params,
|
2652
|
+
:query_params => query_params,
|
2653
|
+
:form_params => form_params,
|
2654
|
+
:body => post_body,
|
2655
|
+
:auth_names => auth_names,
|
2656
|
+
:return_type => return_type
|
2657
|
+
)
|
2658
|
+
|
2659
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2660
|
+
if @api_client.config.debugging
|
2661
|
+
@api_client.config.logger.debug "API called: DefaultApi#market_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2662
|
+
end
|
2663
|
+
return data, status_code, headers
|
2664
|
+
end
|
2665
|
+
|
2666
|
+
# Mutual Funds Country Exposure
|
2667
|
+
# Get Mutual Funds country exposure data.
|
2668
|
+
# @param symbol [String] Symbol.
|
2669
|
+
# @param [Hash] opts the optional parameters
|
2670
|
+
# @return [MutualFundCountryExposure]
|
2671
|
+
def mutual_fund_country_exposure(symbol, opts = {})
|
2672
|
+
data, _status_code, _headers = mutual_fund_country_exposure_with_http_info(symbol, opts)
|
2673
|
+
data
|
2674
|
+
end
|
2675
|
+
|
2676
|
+
# Mutual Funds Country Exposure
|
2677
|
+
# Get Mutual Funds country exposure data.
|
2678
|
+
# @param symbol [String] Symbol.
|
2679
|
+
# @param [Hash] opts the optional parameters
|
2680
|
+
# @return [Array<(MutualFundCountryExposure, Integer, Hash)>] MutualFundCountryExposure data, response status code and response headers
|
2681
|
+
def mutual_fund_country_exposure_with_http_info(symbol, opts = {})
|
2682
|
+
if @api_client.config.debugging
|
2683
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.mutual_fund_country_exposure ...'
|
2684
|
+
end
|
2685
|
+
# verify the required parameter 'symbol' is set
|
2686
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
2687
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.mutual_fund_country_exposure"
|
2688
|
+
end
|
2689
|
+
# resource path
|
2690
|
+
local_var_path = '/mutual-fund/country'
|
2691
|
+
|
2692
|
+
# query parameters
|
2693
|
+
query_params = opts[:query_params] || {}
|
2694
|
+
query_params[:'symbol'] = symbol
|
2695
|
+
|
2696
|
+
# header parameters
|
2697
|
+
header_params = opts[:header_params] || {}
|
2698
|
+
# HTTP header 'Accept' (if needed)
|
2699
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2700
|
+
|
2701
|
+
# form parameters
|
2702
|
+
form_params = opts[:form_params] || {}
|
2703
|
+
|
2704
|
+
# http body (model)
|
2705
|
+
post_body = opts[:debug_body]
|
2706
|
+
|
2707
|
+
# return_type
|
2708
|
+
return_type = opts[:debug_return_type] || 'MutualFundCountryExposure'
|
2709
|
+
|
2710
|
+
# auth_names
|
2711
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2712
|
+
|
2713
|
+
new_options = opts.merge(
|
2714
|
+
:operation => :"DefaultApi.mutual_fund_country_exposure",
|
2715
|
+
:header_params => header_params,
|
2716
|
+
:query_params => query_params,
|
2717
|
+
:form_params => form_params,
|
2718
|
+
:body => post_body,
|
2719
|
+
:auth_names => auth_names,
|
2720
|
+
:return_type => return_type
|
2721
|
+
)
|
2722
|
+
|
2723
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2724
|
+
if @api_client.config.debugging
|
2725
|
+
@api_client.config.logger.debug "API called: DefaultApi#mutual_fund_country_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2726
|
+
end
|
2727
|
+
return data, status_code, headers
|
2728
|
+
end
|
2729
|
+
|
2730
|
+
# Mutual Funds Holdings
|
2731
|
+
# Get full Mutual Funds holdings/constituents.
|
2732
|
+
# @param [Hash] opts the optional parameters
|
2733
|
+
# @option opts [String] :symbol Fund's symbol.
|
2734
|
+
# @option opts [String] :isin Fund's isin.
|
2735
|
+
# @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set.
|
2736
|
+
# @return [MutualFundHoldings]
|
2737
|
+
def mutual_fund_holdings(opts = {})
|
2738
|
+
data, _status_code, _headers = mutual_fund_holdings_with_http_info(opts)
|
2739
|
+
data
|
2740
|
+
end
|
2741
|
+
|
2742
|
+
# Mutual Funds Holdings
|
2743
|
+
# Get full Mutual Funds holdings/constituents.
|
2744
|
+
# @param [Hash] opts the optional parameters
|
2745
|
+
# @option opts [String] :symbol Fund's symbol.
|
2746
|
+
# @option opts [String] :isin Fund's isin.
|
2747
|
+
# @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set.
|
2748
|
+
# @return [Array<(MutualFundHoldings, Integer, Hash)>] MutualFundHoldings data, response status code and response headers
|
2749
|
+
def mutual_fund_holdings_with_http_info(opts = {})
|
2750
|
+
if @api_client.config.debugging
|
2751
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.mutual_fund_holdings ...'
|
2752
|
+
end
|
2753
|
+
# resource path
|
2754
|
+
local_var_path = '/mutual-fund/holdings'
|
2755
|
+
|
2756
|
+
# query parameters
|
2757
|
+
query_params = opts[:query_params] || {}
|
2758
|
+
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
2759
|
+
query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil?
|
2760
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
2761
|
+
|
2762
|
+
# header parameters
|
2763
|
+
header_params = opts[:header_params] || {}
|
2764
|
+
# HTTP header 'Accept' (if needed)
|
2765
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2766
|
+
|
2767
|
+
# form parameters
|
2768
|
+
form_params = opts[:form_params] || {}
|
2769
|
+
|
2770
|
+
# http body (model)
|
2771
|
+
post_body = opts[:debug_body]
|
2772
|
+
|
2773
|
+
# return_type
|
2774
|
+
return_type = opts[:debug_return_type] || 'MutualFundHoldings'
|
2775
|
+
|
2776
|
+
# auth_names
|
2777
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2778
|
+
|
2779
|
+
new_options = opts.merge(
|
2780
|
+
:operation => :"DefaultApi.mutual_fund_holdings",
|
2781
|
+
:header_params => header_params,
|
2782
|
+
:query_params => query_params,
|
2783
|
+
:form_params => form_params,
|
2784
|
+
:body => post_body,
|
2785
|
+
:auth_names => auth_names,
|
2786
|
+
:return_type => return_type
|
2787
|
+
)
|
2788
|
+
|
2789
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2790
|
+
if @api_client.config.debugging
|
2791
|
+
@api_client.config.logger.debug "API called: DefaultApi#mutual_fund_holdings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2792
|
+
end
|
2793
|
+
return data, status_code, headers
|
2794
|
+
end
|
2795
|
+
|
2796
|
+
# Mutual Funds Profile
|
2797
|
+
# Get mutual funds profile information. This endpoint covers US mutual funds only.
|
2798
|
+
# @param [Hash] opts the optional parameters
|
2799
|
+
# @option opts [String] :symbol Fund's symbol.
|
2800
|
+
# @option opts [String] :isin Fund's isin.
|
2801
|
+
# @return [MutualFundProfile]
|
2802
|
+
def mutual_fund_profile(opts = {})
|
2803
|
+
data, _status_code, _headers = mutual_fund_profile_with_http_info(opts)
|
2804
|
+
data
|
2805
|
+
end
|
2806
|
+
|
2807
|
+
# Mutual Funds Profile
|
2808
|
+
# Get mutual funds profile information. This endpoint covers US mutual funds only.
|
2809
|
+
# @param [Hash] opts the optional parameters
|
2810
|
+
# @option opts [String] :symbol Fund's symbol.
|
2811
|
+
# @option opts [String] :isin Fund's isin.
|
2812
|
+
# @return [Array<(MutualFundProfile, Integer, Hash)>] MutualFundProfile data, response status code and response headers
|
2813
|
+
def mutual_fund_profile_with_http_info(opts = {})
|
2814
|
+
if @api_client.config.debugging
|
2815
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.mutual_fund_profile ...'
|
2816
|
+
end
|
2817
|
+
# resource path
|
2818
|
+
local_var_path = '/mutual-fund/profile'
|
2819
|
+
|
2820
|
+
# query parameters
|
2821
|
+
query_params = opts[:query_params] || {}
|
2822
|
+
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
2823
|
+
query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil?
|
2824
|
+
|
2825
|
+
# header parameters
|
2826
|
+
header_params = opts[:header_params] || {}
|
2827
|
+
# HTTP header 'Accept' (if needed)
|
2828
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2829
|
+
|
2830
|
+
# form parameters
|
2831
|
+
form_params = opts[:form_params] || {}
|
2832
|
+
|
2833
|
+
# http body (model)
|
2834
|
+
post_body = opts[:debug_body]
|
2835
|
+
|
2836
|
+
# return_type
|
2837
|
+
return_type = opts[:debug_return_type] || 'MutualFundProfile'
|
2838
|
+
|
2839
|
+
# auth_names
|
2840
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2841
|
+
|
2842
|
+
new_options = opts.merge(
|
2843
|
+
:operation => :"DefaultApi.mutual_fund_profile",
|
2844
|
+
:header_params => header_params,
|
2845
|
+
:query_params => query_params,
|
2846
|
+
:form_params => form_params,
|
2847
|
+
:body => post_body,
|
2848
|
+
:auth_names => auth_names,
|
2849
|
+
:return_type => return_type
|
2850
|
+
)
|
2851
|
+
|
2852
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2853
|
+
if @api_client.config.debugging
|
2854
|
+
@api_client.config.logger.debug "API called: DefaultApi#mutual_fund_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2855
|
+
end
|
2856
|
+
return data, status_code, headers
|
2857
|
+
end
|
2858
|
+
|
2859
|
+
# Mutual Funds Sector Exposure
|
2860
|
+
# Get Mutual Funds sector exposure data.
|
2861
|
+
# @param symbol [String] Mutual Fund symbol.
|
2862
|
+
# @param [Hash] opts the optional parameters
|
2863
|
+
# @return [MutualFundSectorExposure]
|
2864
|
+
def mutual_fund_sector_exposure(symbol, opts = {})
|
2865
|
+
data, _status_code, _headers = mutual_fund_sector_exposure_with_http_info(symbol, opts)
|
2866
|
+
data
|
2867
|
+
end
|
2868
|
+
|
2869
|
+
# Mutual Funds Sector Exposure
|
2870
|
+
# Get Mutual Funds sector exposure data.
|
2871
|
+
# @param symbol [String] Mutual Fund symbol.
|
2872
|
+
# @param [Hash] opts the optional parameters
|
2873
|
+
# @return [Array<(MutualFundSectorExposure, Integer, Hash)>] MutualFundSectorExposure data, response status code and response headers
|
2874
|
+
def mutual_fund_sector_exposure_with_http_info(symbol, opts = {})
|
2875
|
+
if @api_client.config.debugging
|
2876
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.mutual_fund_sector_exposure ...'
|
2877
|
+
end
|
2878
|
+
# verify the required parameter 'symbol' is set
|
2879
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
2880
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.mutual_fund_sector_exposure"
|
2881
|
+
end
|
2882
|
+
# resource path
|
2883
|
+
local_var_path = '/mutual-fund/sector'
|
2884
|
+
|
2885
|
+
# query parameters
|
2886
|
+
query_params = opts[:query_params] || {}
|
2887
|
+
query_params[:'symbol'] = symbol
|
2888
|
+
|
2889
|
+
# header parameters
|
2890
|
+
header_params = opts[:header_params] || {}
|
2891
|
+
# HTTP header 'Accept' (if needed)
|
2892
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2893
|
+
|
2894
|
+
# form parameters
|
2895
|
+
form_params = opts[:form_params] || {}
|
2896
|
+
|
2897
|
+
# http body (model)
|
2898
|
+
post_body = opts[:debug_body]
|
2899
|
+
|
2900
|
+
# return_type
|
2901
|
+
return_type = opts[:debug_return_type] || 'MutualFundSectorExposure'
|
2902
|
+
|
2903
|
+
# auth_names
|
2904
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2905
|
+
|
2906
|
+
new_options = opts.merge(
|
2907
|
+
:operation => :"DefaultApi.mutual_fund_sector_exposure",
|
2908
|
+
:header_params => header_params,
|
2909
|
+
:query_params => query_params,
|
2910
|
+
:form_params => form_params,
|
2911
|
+
:body => post_body,
|
2912
|
+
:auth_names => auth_names,
|
2913
|
+
:return_type => return_type
|
2914
|
+
)
|
2915
|
+
|
2916
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2917
|
+
if @api_client.config.debugging
|
2918
|
+
@api_client.config.logger.debug "API called: DefaultApi#mutual_fund_sector_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2919
|
+
end
|
2920
|
+
return data, status_code, headers
|
2921
|
+
end
|
2922
|
+
|
2923
|
+
# News Sentiment
|
2924
|
+
# Get company's news sentiment and statistics. This endpoint is only available for US companies.
|
2925
|
+
# @param symbol [String] Company symbol.
|
2394
2926
|
# @param [Hash] opts the optional parameters
|
2395
2927
|
# @return [NewsSentiment]
|
2396
2928
|
def news_sentiment(symbol, opts = {})
|
@@ -2398,25 +2930,92 @@ module FinnhubRuby
|
|
2398
2930
|
data
|
2399
2931
|
end
|
2400
2932
|
|
2401
|
-
# News Sentiment
|
2402
|
-
# Get company's news sentiment and statistics. This endpoint is only available for US companies.
|
2403
|
-
# @param symbol [String] Company symbol.
|
2933
|
+
# News Sentiment
|
2934
|
+
# Get company's news sentiment and statistics. This endpoint is only available for US companies.
|
2935
|
+
# @param symbol [String] Company symbol.
|
2936
|
+
# @param [Hash] opts the optional parameters
|
2937
|
+
# @return [Array<(NewsSentiment, Integer, Hash)>] NewsSentiment data, response status code and response headers
|
2938
|
+
def news_sentiment_with_http_info(symbol, opts = {})
|
2939
|
+
if @api_client.config.debugging
|
2940
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.news_sentiment ...'
|
2941
|
+
end
|
2942
|
+
# verify the required parameter 'symbol' is set
|
2943
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
2944
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.news_sentiment"
|
2945
|
+
end
|
2946
|
+
# resource path
|
2947
|
+
local_var_path = '/news-sentiment'
|
2948
|
+
|
2949
|
+
# query parameters
|
2950
|
+
query_params = opts[:query_params] || {}
|
2951
|
+
query_params[:'symbol'] = symbol
|
2952
|
+
|
2953
|
+
# header parameters
|
2954
|
+
header_params = opts[:header_params] || {}
|
2955
|
+
# HTTP header 'Accept' (if needed)
|
2956
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2957
|
+
|
2958
|
+
# form parameters
|
2959
|
+
form_params = opts[:form_params] || {}
|
2960
|
+
|
2961
|
+
# http body (model)
|
2962
|
+
post_body = opts[:debug_body]
|
2963
|
+
|
2964
|
+
# return_type
|
2965
|
+
return_type = opts[:debug_return_type] || 'NewsSentiment'
|
2966
|
+
|
2967
|
+
# auth_names
|
2968
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2969
|
+
|
2970
|
+
new_options = opts.merge(
|
2971
|
+
:operation => :"DefaultApi.news_sentiment",
|
2972
|
+
:header_params => header_params,
|
2973
|
+
:query_params => query_params,
|
2974
|
+
:form_params => form_params,
|
2975
|
+
:body => post_body,
|
2976
|
+
:auth_names => auth_names,
|
2977
|
+
:return_type => return_type
|
2978
|
+
)
|
2979
|
+
|
2980
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2981
|
+
if @api_client.config.debugging
|
2982
|
+
@api_client.config.logger.debug "API called: DefaultApi#news_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2983
|
+
end
|
2984
|
+
return data, status_code, headers
|
2985
|
+
end
|
2986
|
+
|
2987
|
+
# Ownership
|
2988
|
+
# Get a full list of shareholders of a company in descending order of the number of shares held. Data is sourced from <code>13F form</code>, <code>Schedule 13D</code> and <code>13G</code> for US market, <code>UK Share Register</code> for UK market, <code>SEDI</code> for Canadian market and equivalent filings for other international markets.
|
2989
|
+
# @param symbol [String] Symbol of the company: AAPL.
|
2990
|
+
# @param [Hash] opts the optional parameters
|
2991
|
+
# @option opts [Integer] :limit Limit number of results. Leave empty to get the full list.
|
2992
|
+
# @return [Ownership]
|
2993
|
+
def ownership(symbol, opts = {})
|
2994
|
+
data, _status_code, _headers = ownership_with_http_info(symbol, opts)
|
2995
|
+
data
|
2996
|
+
end
|
2997
|
+
|
2998
|
+
# Ownership
|
2999
|
+
# Get a full list of shareholders of a company in descending order of the number of shares held. Data is sourced from <code>13F form</code>, <code>Schedule 13D</code> and <code>13G</code> for US market, <code>UK Share Register</code> for UK market, <code>SEDI</code> for Canadian market and equivalent filings for other international markets.
|
3000
|
+
# @param symbol [String] Symbol of the company: AAPL.
|
2404
3001
|
# @param [Hash] opts the optional parameters
|
2405
|
-
# @
|
2406
|
-
|
3002
|
+
# @option opts [Integer] :limit Limit number of results. Leave empty to get the full list.
|
3003
|
+
# @return [Array<(Ownership, Integer, Hash)>] Ownership data, response status code and response headers
|
3004
|
+
def ownership_with_http_info(symbol, opts = {})
|
2407
3005
|
if @api_client.config.debugging
|
2408
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
3006
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.ownership ...'
|
2409
3007
|
end
|
2410
3008
|
# verify the required parameter 'symbol' is set
|
2411
3009
|
if @api_client.config.client_side_validation && symbol.nil?
|
2412
|
-
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.
|
3010
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.ownership"
|
2413
3011
|
end
|
2414
3012
|
# resource path
|
2415
|
-
local_var_path = '/
|
3013
|
+
local_var_path = '/stock/ownership'
|
2416
3014
|
|
2417
3015
|
# query parameters
|
2418
3016
|
query_params = opts[:query_params] || {}
|
2419
3017
|
query_params[:'symbol'] = symbol
|
3018
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
2420
3019
|
|
2421
3020
|
# header parameters
|
2422
3021
|
header_params = opts[:header_params] || {}
|
@@ -2427,15 +3026,16 @@ module FinnhubRuby
|
|
2427
3026
|
form_params = opts[:form_params] || {}
|
2428
3027
|
|
2429
3028
|
# http body (model)
|
2430
|
-
post_body = opts[:
|
3029
|
+
post_body = opts[:debug_body]
|
2431
3030
|
|
2432
3031
|
# return_type
|
2433
|
-
return_type = opts[:
|
3032
|
+
return_type = opts[:debug_return_type] || 'Ownership'
|
2434
3033
|
|
2435
3034
|
# auth_names
|
2436
|
-
auth_names = opts[:
|
3035
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2437
3036
|
|
2438
3037
|
new_options = opts.merge(
|
3038
|
+
:operation => :"DefaultApi.ownership",
|
2439
3039
|
:header_params => header_params,
|
2440
3040
|
:query_params => query_params,
|
2441
3041
|
:form_params => form_params,
|
@@ -2446,7 +3046,7 @@ module FinnhubRuby
|
|
2446
3046
|
|
2447
3047
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2448
3048
|
if @api_client.config.debugging
|
2449
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
3049
|
+
@api_client.config.logger.debug "API called: DefaultApi#ownership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2450
3050
|
end
|
2451
3051
|
return data, status_code, headers
|
2452
3052
|
end
|
@@ -2497,15 +3097,16 @@ module FinnhubRuby
|
|
2497
3097
|
form_params = opts[:form_params] || {}
|
2498
3098
|
|
2499
3099
|
# http body (model)
|
2500
|
-
post_body = opts[:
|
3100
|
+
post_body = opts[:debug_body]
|
2501
3101
|
|
2502
3102
|
# return_type
|
2503
|
-
return_type = opts[:
|
3103
|
+
return_type = opts[:debug_return_type] || 'PatternRecognition'
|
2504
3104
|
|
2505
3105
|
# auth_names
|
2506
|
-
auth_names = opts[:
|
3106
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2507
3107
|
|
2508
3108
|
new_options = opts.merge(
|
3109
|
+
:operation => :"DefaultApi.pattern_recognition",
|
2509
3110
|
:header_params => header_params,
|
2510
3111
|
:query_params => query_params,
|
2511
3112
|
:form_params => form_params,
|
@@ -2521,6 +3122,76 @@ module FinnhubRuby
|
|
2521
3122
|
return data, status_code, headers
|
2522
3123
|
end
|
2523
3124
|
|
3125
|
+
# Major Press Releases
|
3126
|
+
# Get latest major press releases of a company. This data can be used to highlight the most significant events comprised of mostly press releases sourced from the exchanges, BusinessWire, AccessWire, GlobeNewswire, Newsfile, and PRNewswire.
|
3127
|
+
# @param symbol [String] Company symbol.
|
3128
|
+
# @param [Hash] opts the optional parameters
|
3129
|
+
# @option opts [Date] :from From time: 2020-01-01.
|
3130
|
+
# @option opts [Date] :to To time: 2020-01-05.
|
3131
|
+
# @return [PressRelease]
|
3132
|
+
def press_releases(symbol, opts = {})
|
3133
|
+
data, _status_code, _headers = press_releases_with_http_info(symbol, opts)
|
3134
|
+
data
|
3135
|
+
end
|
3136
|
+
|
3137
|
+
# Major Press Releases
|
3138
|
+
# Get latest major press releases of a company. This data can be used to highlight the most significant events comprised of mostly press releases sourced from the exchanges, BusinessWire, AccessWire, GlobeNewswire, Newsfile, and PRNewswire.
|
3139
|
+
# @param symbol [String] Company symbol.
|
3140
|
+
# @param [Hash] opts the optional parameters
|
3141
|
+
# @option opts [Date] :from From time: 2020-01-01.
|
3142
|
+
# @option opts [Date] :to To time: 2020-01-05.
|
3143
|
+
# @return [Array<(PressRelease, Integer, Hash)>] PressRelease data, response status code and response headers
|
3144
|
+
def press_releases_with_http_info(symbol, opts = {})
|
3145
|
+
if @api_client.config.debugging
|
3146
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.press_releases ...'
|
3147
|
+
end
|
3148
|
+
# verify the required parameter 'symbol' is set
|
3149
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
3150
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.press_releases"
|
3151
|
+
end
|
3152
|
+
# resource path
|
3153
|
+
local_var_path = '/press-releases'
|
3154
|
+
|
3155
|
+
# query parameters
|
3156
|
+
query_params = opts[:query_params] || {}
|
3157
|
+
query_params[:'symbol'] = symbol
|
3158
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
3159
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
3160
|
+
|
3161
|
+
# header parameters
|
3162
|
+
header_params = opts[:header_params] || {}
|
3163
|
+
# HTTP header 'Accept' (if needed)
|
3164
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3165
|
+
|
3166
|
+
# form parameters
|
3167
|
+
form_params = opts[:form_params] || {}
|
3168
|
+
|
3169
|
+
# http body (model)
|
3170
|
+
post_body = opts[:debug_body]
|
3171
|
+
|
3172
|
+
# return_type
|
3173
|
+
return_type = opts[:debug_return_type] || 'PressRelease'
|
3174
|
+
|
3175
|
+
# auth_names
|
3176
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3177
|
+
|
3178
|
+
new_options = opts.merge(
|
3179
|
+
:operation => :"DefaultApi.press_releases",
|
3180
|
+
:header_params => header_params,
|
3181
|
+
:query_params => query_params,
|
3182
|
+
:form_params => form_params,
|
3183
|
+
:body => post_body,
|
3184
|
+
:auth_names => auth_names,
|
3185
|
+
:return_type => return_type
|
3186
|
+
)
|
3187
|
+
|
3188
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3189
|
+
if @api_client.config.debugging
|
3190
|
+
@api_client.config.logger.debug "API called: DefaultApi#press_releases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3191
|
+
end
|
3192
|
+
return data, status_code, headers
|
3193
|
+
end
|
3194
|
+
|
2524
3195
|
# Price Target
|
2525
3196
|
# Get latest price target consensus.
|
2526
3197
|
# @param symbol [String] Symbol of the company: AAPL.
|
@@ -2531,25 +3202,216 @@ module FinnhubRuby
|
|
2531
3202
|
data
|
2532
3203
|
end
|
2533
3204
|
|
2534
|
-
# Price Target
|
2535
|
-
# Get latest price target consensus.
|
2536
|
-
# @param symbol [String] Symbol of the company: AAPL.
|
3205
|
+
# Price Target
|
3206
|
+
# Get latest price target consensus.
|
3207
|
+
# @param symbol [String] Symbol of the company: AAPL.
|
3208
|
+
# @param [Hash] opts the optional parameters
|
3209
|
+
# @return [Array<(PriceTarget, Integer, Hash)>] PriceTarget data, response status code and response headers
|
3210
|
+
def price_target_with_http_info(symbol, opts = {})
|
3211
|
+
if @api_client.config.debugging
|
3212
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.price_target ...'
|
3213
|
+
end
|
3214
|
+
# verify the required parameter 'symbol' is set
|
3215
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
3216
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.price_target"
|
3217
|
+
end
|
3218
|
+
# resource path
|
3219
|
+
local_var_path = '/stock/price-target'
|
3220
|
+
|
3221
|
+
# query parameters
|
3222
|
+
query_params = opts[:query_params] || {}
|
3223
|
+
query_params[:'symbol'] = symbol
|
3224
|
+
|
3225
|
+
# header parameters
|
3226
|
+
header_params = opts[:header_params] || {}
|
3227
|
+
# HTTP header 'Accept' (if needed)
|
3228
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3229
|
+
|
3230
|
+
# form parameters
|
3231
|
+
form_params = opts[:form_params] || {}
|
3232
|
+
|
3233
|
+
# http body (model)
|
3234
|
+
post_body = opts[:debug_body]
|
3235
|
+
|
3236
|
+
# return_type
|
3237
|
+
return_type = opts[:debug_return_type] || 'PriceTarget'
|
3238
|
+
|
3239
|
+
# auth_names
|
3240
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3241
|
+
|
3242
|
+
new_options = opts.merge(
|
3243
|
+
:operation => :"DefaultApi.price_target",
|
3244
|
+
:header_params => header_params,
|
3245
|
+
:query_params => query_params,
|
3246
|
+
:form_params => form_params,
|
3247
|
+
:body => post_body,
|
3248
|
+
:auth_names => auth_names,
|
3249
|
+
:return_type => return_type
|
3250
|
+
)
|
3251
|
+
|
3252
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3253
|
+
if @api_client.config.debugging
|
3254
|
+
@api_client.config.logger.debug "API called: DefaultApi#price_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3255
|
+
end
|
3256
|
+
return data, status_code, headers
|
3257
|
+
end
|
3258
|
+
|
3259
|
+
# Quote
|
3260
|
+
# <p>Get real-time quote data for US stocks. Constant polling is not recommended. Use websocket if you need real-time updates.</p><p>Real-time stock prices for international markets are supported for Enterprise clients via our partner's feed. <a href=\"mailto:support@finnhub.io\">Contact Us</a> to learn more.</p>
|
3261
|
+
# @param symbol [String] Symbol
|
3262
|
+
# @param [Hash] opts the optional parameters
|
3263
|
+
# @return [Quote]
|
3264
|
+
def quote(symbol, opts = {})
|
3265
|
+
data, _status_code, _headers = quote_with_http_info(symbol, opts)
|
3266
|
+
data
|
3267
|
+
end
|
3268
|
+
|
3269
|
+
# Quote
|
3270
|
+
# <p>Get real-time quote data for US stocks. Constant polling is not recommended. Use websocket if you need real-time updates.</p><p>Real-time stock prices for international markets are supported for Enterprise clients via our partner's feed. <a href=\"mailto:support@finnhub.io\">Contact Us</a> to learn more.</p>
|
3271
|
+
# @param symbol [String] Symbol
|
3272
|
+
# @param [Hash] opts the optional parameters
|
3273
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
3274
|
+
def quote_with_http_info(symbol, opts = {})
|
3275
|
+
if @api_client.config.debugging
|
3276
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.quote ...'
|
3277
|
+
end
|
3278
|
+
# verify the required parameter 'symbol' is set
|
3279
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
3280
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.quote"
|
3281
|
+
end
|
3282
|
+
# resource path
|
3283
|
+
local_var_path = '/quote'
|
3284
|
+
|
3285
|
+
# query parameters
|
3286
|
+
query_params = opts[:query_params] || {}
|
3287
|
+
query_params[:'symbol'] = symbol
|
3288
|
+
|
3289
|
+
# header parameters
|
3290
|
+
header_params = opts[:header_params] || {}
|
3291
|
+
# HTTP header 'Accept' (if needed)
|
3292
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3293
|
+
|
3294
|
+
# form parameters
|
3295
|
+
form_params = opts[:form_params] || {}
|
3296
|
+
|
3297
|
+
# http body (model)
|
3298
|
+
post_body = opts[:debug_body]
|
3299
|
+
|
3300
|
+
# return_type
|
3301
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
3302
|
+
|
3303
|
+
# auth_names
|
3304
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3305
|
+
|
3306
|
+
new_options = opts.merge(
|
3307
|
+
:operation => :"DefaultApi.quote",
|
3308
|
+
:header_params => header_params,
|
3309
|
+
:query_params => query_params,
|
3310
|
+
:form_params => form_params,
|
3311
|
+
:body => post_body,
|
3312
|
+
:auth_names => auth_names,
|
3313
|
+
:return_type => return_type
|
3314
|
+
)
|
3315
|
+
|
3316
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3317
|
+
if @api_client.config.debugging
|
3318
|
+
@api_client.config.logger.debug "API called: DefaultApi#quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3319
|
+
end
|
3320
|
+
return data, status_code, headers
|
3321
|
+
end
|
3322
|
+
|
3323
|
+
# Recommendation Trends
|
3324
|
+
# Get latest analyst recommendation trends for a company.
|
3325
|
+
# @param symbol [String] Symbol of the company: AAPL.
|
3326
|
+
# @param [Hash] opts the optional parameters
|
3327
|
+
# @return [Array<RecommendationTrend>]
|
3328
|
+
def recommendation_trends(symbol, opts = {})
|
3329
|
+
data, _status_code, _headers = recommendation_trends_with_http_info(symbol, opts)
|
3330
|
+
data
|
3331
|
+
end
|
3332
|
+
|
3333
|
+
# Recommendation Trends
|
3334
|
+
# Get latest analyst recommendation trends for a company.
|
3335
|
+
# @param symbol [String] Symbol of the company: AAPL.
|
3336
|
+
# @param [Hash] opts the optional parameters
|
3337
|
+
# @return [Array<(Array<RecommendationTrend>, Integer, Hash)>] Array<RecommendationTrend> data, response status code and response headers
|
3338
|
+
def recommendation_trends_with_http_info(symbol, opts = {})
|
3339
|
+
if @api_client.config.debugging
|
3340
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.recommendation_trends ...'
|
3341
|
+
end
|
3342
|
+
# verify the required parameter 'symbol' is set
|
3343
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
3344
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.recommendation_trends"
|
3345
|
+
end
|
3346
|
+
# resource path
|
3347
|
+
local_var_path = '/stock/recommendation'
|
3348
|
+
|
3349
|
+
# query parameters
|
3350
|
+
query_params = opts[:query_params] || {}
|
3351
|
+
query_params[:'symbol'] = symbol
|
3352
|
+
|
3353
|
+
# header parameters
|
3354
|
+
header_params = opts[:header_params] || {}
|
3355
|
+
# HTTP header 'Accept' (if needed)
|
3356
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3357
|
+
|
3358
|
+
# form parameters
|
3359
|
+
form_params = opts[:form_params] || {}
|
3360
|
+
|
3361
|
+
# http body (model)
|
3362
|
+
post_body = opts[:debug_body]
|
3363
|
+
|
3364
|
+
# return_type
|
3365
|
+
return_type = opts[:debug_return_type] || 'Array<RecommendationTrend>'
|
3366
|
+
|
3367
|
+
# auth_names
|
3368
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3369
|
+
|
3370
|
+
new_options = opts.merge(
|
3371
|
+
:operation => :"DefaultApi.recommendation_trends",
|
3372
|
+
:header_params => header_params,
|
3373
|
+
:query_params => query_params,
|
3374
|
+
:form_params => form_params,
|
3375
|
+
:body => post_body,
|
3376
|
+
:auth_names => auth_names,
|
3377
|
+
:return_type => return_type
|
3378
|
+
)
|
3379
|
+
|
3380
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3381
|
+
if @api_client.config.debugging
|
3382
|
+
@api_client.config.logger.debug "API called: DefaultApi#recommendation_trends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3383
|
+
end
|
3384
|
+
return data, status_code, headers
|
3385
|
+
end
|
3386
|
+
|
3387
|
+
# Revenue Breakdown
|
3388
|
+
# Get revenue breakdown by product. This dataset is only available for US companies which disclose their revenue breakdown in the annual or quarterly reports.
|
3389
|
+
# @param [Hash] opts the optional parameters
|
3390
|
+
# @option opts [String] :symbol Symbol.
|
3391
|
+
# @option opts [String] :cik CIK.
|
3392
|
+
# @return [RevenueBreakdown]
|
3393
|
+
def revenue_breakdown(opts = {})
|
3394
|
+
data, _status_code, _headers = revenue_breakdown_with_http_info(opts)
|
3395
|
+
data
|
3396
|
+
end
|
3397
|
+
|
3398
|
+
# Revenue Breakdown
|
3399
|
+
# Get revenue breakdown by product. This dataset is only available for US companies which disclose their revenue breakdown in the annual or quarterly reports.
|
2537
3400
|
# @param [Hash] opts the optional parameters
|
2538
|
-
# @
|
2539
|
-
|
3401
|
+
# @option opts [String] :symbol Symbol.
|
3402
|
+
# @option opts [String] :cik CIK.
|
3403
|
+
# @return [Array<(RevenueBreakdown, Integer, Hash)>] RevenueBreakdown data, response status code and response headers
|
3404
|
+
def revenue_breakdown_with_http_info(opts = {})
|
2540
3405
|
if @api_client.config.debugging
|
2541
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
2542
|
-
end
|
2543
|
-
# verify the required parameter 'symbol' is set
|
2544
|
-
if @api_client.config.client_side_validation && symbol.nil?
|
2545
|
-
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.price_target"
|
3406
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.revenue_breakdown ...'
|
2546
3407
|
end
|
2547
3408
|
# resource path
|
2548
|
-
local_var_path = '/stock/
|
3409
|
+
local_var_path = '/stock/revenue-breakdown'
|
2549
3410
|
|
2550
3411
|
# query parameters
|
2551
3412
|
query_params = opts[:query_params] || {}
|
2552
|
-
query_params[:'symbol'] = symbol
|
3413
|
+
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
3414
|
+
query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil?
|
2553
3415
|
|
2554
3416
|
# header parameters
|
2555
3417
|
header_params = opts[:header_params] || {}
|
@@ -2560,15 +3422,16 @@ module FinnhubRuby
|
|
2560
3422
|
form_params = opts[:form_params] || {}
|
2561
3423
|
|
2562
3424
|
# http body (model)
|
2563
|
-
post_body = opts[:
|
3425
|
+
post_body = opts[:debug_body]
|
2564
3426
|
|
2565
3427
|
# return_type
|
2566
|
-
return_type = opts[:
|
3428
|
+
return_type = opts[:debug_return_type] || 'RevenueBreakdown'
|
2567
3429
|
|
2568
3430
|
# auth_names
|
2569
|
-
auth_names = opts[:
|
3431
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2570
3432
|
|
2571
3433
|
new_options = opts.merge(
|
3434
|
+
:operation => :"DefaultApi.revenue_breakdown",
|
2572
3435
|
:header_params => header_params,
|
2573
3436
|
:query_params => query_params,
|
2574
3437
|
:form_params => form_params,
|
@@ -2579,40 +3442,42 @@ module FinnhubRuby
|
|
2579
3442
|
|
2580
3443
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2581
3444
|
if @api_client.config.debugging
|
2582
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
3445
|
+
@api_client.config.logger.debug "API called: DefaultApi#revenue_breakdown\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2583
3446
|
end
|
2584
3447
|
return data, status_code, headers
|
2585
3448
|
end
|
2586
3449
|
|
2587
|
-
#
|
2588
|
-
# <p>
|
2589
|
-
# @param symbol [String] Symbol
|
3450
|
+
# Similarity Index
|
3451
|
+
# <p>Calculate the textual difference between a company's 10-K / 10-Q reports and the same type of report in the previous year using Cosine Similarity. For example, this endpoint compares 2019's 10-K with 2018's 10-K. Companies breaking from its routines in disclosure of financial condition and risk analysis section can signal a significant change in the company's stock price in the upcoming 4 quarters.</p>
|
2590
3452
|
# @param [Hash] opts the optional parameters
|
2591
|
-
# @
|
2592
|
-
|
2593
|
-
|
3453
|
+
# @option opts [String] :symbol Symbol. Required if cik is empty
|
3454
|
+
# @option opts [String] :cik CIK. Required if symbol is empty
|
3455
|
+
# @option opts [String] :freq <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>
|
3456
|
+
# @return [SimilarityIndex]
|
3457
|
+
def similarity_index(opts = {})
|
3458
|
+
data, _status_code, _headers = similarity_index_with_http_info(opts)
|
2594
3459
|
data
|
2595
3460
|
end
|
2596
3461
|
|
2597
|
-
#
|
2598
|
-
# <p>
|
2599
|
-
# @param symbol [String] Symbol
|
3462
|
+
# Similarity Index
|
3463
|
+
# <p>Calculate the textual difference between a company's 10-K / 10-Q reports and the same type of report in the previous year using Cosine Similarity. For example, this endpoint compares 2019's 10-K with 2018's 10-K. Companies breaking from its routines in disclosure of financial condition and risk analysis section can signal a significant change in the company's stock price in the upcoming 4 quarters.</p>
|
2600
3464
|
# @param [Hash] opts the optional parameters
|
2601
|
-
# @
|
2602
|
-
|
3465
|
+
# @option opts [String] :symbol Symbol. Required if cik is empty
|
3466
|
+
# @option opts [String] :cik CIK. Required if symbol is empty
|
3467
|
+
# @option opts [String] :freq <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>
|
3468
|
+
# @return [Array<(SimilarityIndex, Integer, Hash)>] SimilarityIndex data, response status code and response headers
|
3469
|
+
def similarity_index_with_http_info(opts = {})
|
2603
3470
|
if @api_client.config.debugging
|
2604
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
2605
|
-
end
|
2606
|
-
# verify the required parameter 'symbol' is set
|
2607
|
-
if @api_client.config.client_side_validation && symbol.nil?
|
2608
|
-
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.quote"
|
3471
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.similarity_index ...'
|
2609
3472
|
end
|
2610
3473
|
# resource path
|
2611
|
-
local_var_path = '/
|
3474
|
+
local_var_path = '/stock/similarity-index'
|
2612
3475
|
|
2613
3476
|
# query parameters
|
2614
3477
|
query_params = opts[:query_params] || {}
|
2615
|
-
query_params[:'symbol'] = symbol
|
3478
|
+
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
3479
|
+
query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil?
|
3480
|
+
query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil?
|
2616
3481
|
|
2617
3482
|
# header parameters
|
2618
3483
|
header_params = opts[:header_params] || {}
|
@@ -2623,15 +3488,16 @@ module FinnhubRuby
|
|
2623
3488
|
form_params = opts[:form_params] || {}
|
2624
3489
|
|
2625
3490
|
# http body (model)
|
2626
|
-
post_body = opts[:
|
3491
|
+
post_body = opts[:debug_body]
|
2627
3492
|
|
2628
3493
|
# return_type
|
2629
|
-
return_type = opts[:
|
3494
|
+
return_type = opts[:debug_return_type] || 'SimilarityIndex'
|
2630
3495
|
|
2631
3496
|
# auth_names
|
2632
|
-
auth_names = opts[:
|
3497
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2633
3498
|
|
2634
3499
|
new_options = opts.merge(
|
3500
|
+
:operation => :"DefaultApi.similarity_index",
|
2635
3501
|
:header_params => header_params,
|
2636
3502
|
:query_params => query_params,
|
2637
3503
|
:form_params => form_params,
|
@@ -2642,40 +3508,46 @@ module FinnhubRuby
|
|
2642
3508
|
|
2643
3509
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2644
3510
|
if @api_client.config.debugging
|
2645
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
3511
|
+
@api_client.config.logger.debug "API called: DefaultApi#similarity_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2646
3512
|
end
|
2647
3513
|
return data, status_code, headers
|
2648
3514
|
end
|
2649
3515
|
|
2650
|
-
#
|
2651
|
-
# Get
|
2652
|
-
# @param symbol [String]
|
3516
|
+
# Social Sentiment
|
3517
|
+
# <p>Get social sentiment for stocks on Reddit and Twitter. This endpoint is currently in Beta.</p>
|
3518
|
+
# @param symbol [String] Company symbol.
|
2653
3519
|
# @param [Hash] opts the optional parameters
|
2654
|
-
# @
|
2655
|
-
|
2656
|
-
|
3520
|
+
# @option opts [Date] :from From date <code>YYYY-MM-DD</code>.
|
3521
|
+
# @option opts [Date] :to To date <code>YYYY-MM-DD</code>.
|
3522
|
+
# @return [SocialSentiment]
|
3523
|
+
def social_sentiment(symbol, opts = {})
|
3524
|
+
data, _status_code, _headers = social_sentiment_with_http_info(symbol, opts)
|
2657
3525
|
data
|
2658
3526
|
end
|
2659
3527
|
|
2660
|
-
#
|
2661
|
-
# Get
|
2662
|
-
# @param symbol [String]
|
3528
|
+
# Social Sentiment
|
3529
|
+
# <p>Get social sentiment for stocks on Reddit and Twitter. This endpoint is currently in Beta.</p>
|
3530
|
+
# @param symbol [String] Company symbol.
|
2663
3531
|
# @param [Hash] opts the optional parameters
|
2664
|
-
# @
|
2665
|
-
|
3532
|
+
# @option opts [Date] :from From date <code>YYYY-MM-DD</code>.
|
3533
|
+
# @option opts [Date] :to To date <code>YYYY-MM-DD</code>.
|
3534
|
+
# @return [Array<(SocialSentiment, Integer, Hash)>] SocialSentiment data, response status code and response headers
|
3535
|
+
def social_sentiment_with_http_info(symbol, opts = {})
|
2666
3536
|
if @api_client.config.debugging
|
2667
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
3537
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.social_sentiment ...'
|
2668
3538
|
end
|
2669
3539
|
# verify the required parameter 'symbol' is set
|
2670
3540
|
if @api_client.config.client_side_validation && symbol.nil?
|
2671
|
-
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.
|
3541
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.social_sentiment"
|
2672
3542
|
end
|
2673
3543
|
# resource path
|
2674
|
-
local_var_path = '/stock/
|
3544
|
+
local_var_path = '/stock/social-sentiment'
|
2675
3545
|
|
2676
3546
|
# query parameters
|
2677
3547
|
query_params = opts[:query_params] || {}
|
2678
3548
|
query_params[:'symbol'] = symbol
|
3549
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
3550
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
2679
3551
|
|
2680
3552
|
# header parameters
|
2681
3553
|
header_params = opts[:header_params] || {}
|
@@ -2686,15 +3558,16 @@ module FinnhubRuby
|
|
2686
3558
|
form_params = opts[:form_params] || {}
|
2687
3559
|
|
2688
3560
|
# http body (model)
|
2689
|
-
post_body = opts[:
|
3561
|
+
post_body = opts[:debug_body]
|
2690
3562
|
|
2691
3563
|
# return_type
|
2692
|
-
return_type = opts[:
|
3564
|
+
return_type = opts[:debug_return_type] || 'SocialSentiment'
|
2693
3565
|
|
2694
3566
|
# auth_names
|
2695
|
-
auth_names = opts[:
|
3567
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2696
3568
|
|
2697
3569
|
new_options = opts.merge(
|
3570
|
+
:operation => :"DefaultApi.social_sentiment",
|
2698
3571
|
:header_params => header_params,
|
2699
3572
|
:query_params => query_params,
|
2700
3573
|
:form_params => form_params,
|
@@ -2705,42 +3578,40 @@ module FinnhubRuby
|
|
2705
3578
|
|
2706
3579
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2707
3580
|
if @api_client.config.debugging
|
2708
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
3581
|
+
@api_client.config.logger.debug "API called: DefaultApi#social_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2709
3582
|
end
|
2710
3583
|
return data, status_code, headers
|
2711
3584
|
end
|
2712
3585
|
|
2713
|
-
#
|
2714
|
-
#
|
3586
|
+
# Dividends 2 (Basic)
|
3587
|
+
# Get global dividends data.
|
3588
|
+
# @param symbol [String] Symbol.
|
2715
3589
|
# @param [Hash] opts the optional parameters
|
2716
|
-
# @
|
2717
|
-
|
2718
|
-
|
2719
|
-
# @return [SimilarityIndex]
|
2720
|
-
def similarity_index(opts = {})
|
2721
|
-
data, _status_code, _headers = similarity_index_with_http_info(opts)
|
3590
|
+
# @return [Dividends2]
|
3591
|
+
def stock_basic_dividends(symbol, opts = {})
|
3592
|
+
data, _status_code, _headers = stock_basic_dividends_with_http_info(symbol, opts)
|
2722
3593
|
data
|
2723
3594
|
end
|
2724
3595
|
|
2725
|
-
#
|
2726
|
-
#
|
3596
|
+
# Dividends 2 (Basic)
|
3597
|
+
# Get global dividends data.
|
3598
|
+
# @param symbol [String] Symbol.
|
2727
3599
|
# @param [Hash] opts the optional parameters
|
2728
|
-
# @
|
2729
|
-
|
2730
|
-
# @option opts [String] :freq <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>
|
2731
|
-
# @return [Array<(SimilarityIndex, Integer, Hash)>] SimilarityIndex data, response status code and response headers
|
2732
|
-
def similarity_index_with_http_info(opts = {})
|
3600
|
+
# @return [Array<(Dividends2, Integer, Hash)>] Dividends2 data, response status code and response headers
|
3601
|
+
def stock_basic_dividends_with_http_info(symbol, opts = {})
|
2733
3602
|
if @api_client.config.debugging
|
2734
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
3603
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.stock_basic_dividends ...'
|
3604
|
+
end
|
3605
|
+
# verify the required parameter 'symbol' is set
|
3606
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
3607
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_basic_dividends"
|
2735
3608
|
end
|
2736
3609
|
# resource path
|
2737
|
-
local_var_path = '/stock/
|
3610
|
+
local_var_path = '/stock/dividend2'
|
2738
3611
|
|
2739
3612
|
# query parameters
|
2740
3613
|
query_params = opts[:query_params] || {}
|
2741
|
-
query_params[:'symbol'] =
|
2742
|
-
query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil?
|
2743
|
-
query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil?
|
3614
|
+
query_params[:'symbol'] = symbol
|
2744
3615
|
|
2745
3616
|
# header parameters
|
2746
3617
|
header_params = opts[:header_params] || {}
|
@@ -2751,15 +3622,16 @@ module FinnhubRuby
|
|
2751
3622
|
form_params = opts[:form_params] || {}
|
2752
3623
|
|
2753
3624
|
# http body (model)
|
2754
|
-
post_body = opts[:
|
3625
|
+
post_body = opts[:debug_body]
|
2755
3626
|
|
2756
3627
|
# return_type
|
2757
|
-
return_type = opts[:
|
3628
|
+
return_type = opts[:debug_return_type] || 'Dividends2'
|
2758
3629
|
|
2759
3630
|
# auth_names
|
2760
|
-
auth_names = opts[:
|
3631
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2761
3632
|
|
2762
3633
|
new_options = opts.merge(
|
3634
|
+
:operation => :"DefaultApi.stock_basic_dividends",
|
2763
3635
|
:header_params => header_params,
|
2764
3636
|
:query_params => query_params,
|
2765
3637
|
:form_params => form_params,
|
@@ -2770,7 +3642,7 @@ module FinnhubRuby
|
|
2770
3642
|
|
2771
3643
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2772
3644
|
if @api_client.config.debugging
|
2773
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
3645
|
+
@api_client.config.logger.debug "API called: DefaultApi#stock_basic_dividends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2774
3646
|
end
|
2775
3647
|
return data, status_code, headers
|
2776
3648
|
end
|
@@ -2814,15 +3686,16 @@ module FinnhubRuby
|
|
2814
3686
|
form_params = opts[:form_params] || {}
|
2815
3687
|
|
2816
3688
|
# http body (model)
|
2817
|
-
post_body = opts[:
|
3689
|
+
post_body = opts[:debug_body]
|
2818
3690
|
|
2819
3691
|
# return_type
|
2820
|
-
return_type = opts[:
|
3692
|
+
return_type = opts[:debug_return_type] || 'LastBidAsk'
|
2821
3693
|
|
2822
3694
|
# auth_names
|
2823
|
-
auth_names = opts[:
|
3695
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2824
3696
|
|
2825
3697
|
new_options = opts.merge(
|
3698
|
+
:operation => :"DefaultApi.stock_bidask",
|
2826
3699
|
:header_params => header_params,
|
2827
3700
|
:query_params => query_params,
|
2828
3701
|
:form_params => form_params,
|
@@ -2839,13 +3712,12 @@ module FinnhubRuby
|
|
2839
3712
|
end
|
2840
3713
|
|
2841
3714
|
# Stock Candles
|
2842
|
-
# <p>Get candlestick data
|
3715
|
+
# <p>Get candlestick data (OHLCV) for stocks.</p><p>Daily data will be adjusted for Splits. Intraday data will remain unadjusted.</p>
|
2843
3716
|
# @param symbol [String] Symbol.
|
2844
3717
|
# @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange.
|
2845
3718
|
# @param from [Integer] UNIX timestamp. Interval initial value.
|
2846
3719
|
# @param to [Integer] UNIX timestamp. Interval end value.
|
2847
3720
|
# @param [Hash] opts the optional parameters
|
2848
|
-
# @option opts [String] :adjusted By default, <code>adjusted=false</code>. Use <code>true</code> to get adjusted data.
|
2849
3721
|
# @return [StockCandles]
|
2850
3722
|
def stock_candles(symbol, resolution, from, to, opts = {})
|
2851
3723
|
data, _status_code, _headers = stock_candles_with_http_info(symbol, resolution, from, to, opts)
|
@@ -2853,13 +3725,12 @@ module FinnhubRuby
|
|
2853
3725
|
end
|
2854
3726
|
|
2855
3727
|
# Stock Candles
|
2856
|
-
# <p>Get candlestick data
|
3728
|
+
# <p>Get candlestick data (OHLCV) for stocks.</p><p>Daily data will be adjusted for Splits. Intraday data will remain unadjusted.</p>
|
2857
3729
|
# @param symbol [String] Symbol.
|
2858
3730
|
# @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange.
|
2859
3731
|
# @param from [Integer] UNIX timestamp. Interval initial value.
|
2860
3732
|
# @param to [Integer] UNIX timestamp. Interval end value.
|
2861
3733
|
# @param [Hash] opts the optional parameters
|
2862
|
-
# @option opts [String] :adjusted By default, <code>adjusted=false</code>. Use <code>true</code> to get adjusted data.
|
2863
3734
|
# @return [Array<(StockCandles, Integer, Hash)>] StockCandles data, response status code and response headers
|
2864
3735
|
def stock_candles_with_http_info(symbol, resolution, from, to, opts = {})
|
2865
3736
|
if @api_client.config.debugging
|
@@ -2890,7 +3761,6 @@ module FinnhubRuby
|
|
2890
3761
|
query_params[:'resolution'] = resolution
|
2891
3762
|
query_params[:'from'] = from
|
2892
3763
|
query_params[:'to'] = to
|
2893
|
-
query_params[:'adjusted'] = opts[:'adjusted'] if !opts[:'adjusted'].nil?
|
2894
3764
|
|
2895
3765
|
# header parameters
|
2896
3766
|
header_params = opts[:header_params] || {}
|
@@ -2901,15 +3771,16 @@ module FinnhubRuby
|
|
2901
3771
|
form_params = opts[:form_params] || {}
|
2902
3772
|
|
2903
3773
|
# http body (model)
|
2904
|
-
post_body = opts[:
|
3774
|
+
post_body = opts[:debug_body]
|
2905
3775
|
|
2906
3776
|
# return_type
|
2907
|
-
return_type = opts[:
|
3777
|
+
return_type = opts[:debug_return_type] || 'StockCandles'
|
2908
3778
|
|
2909
3779
|
# auth_names
|
2910
|
-
auth_names = opts[:
|
3780
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2911
3781
|
|
2912
3782
|
new_options = opts.merge(
|
3783
|
+
:operation => :"DefaultApi.stock_candles",
|
2913
3784
|
:header_params => header_params,
|
2914
3785
|
:query_params => query_params,
|
2915
3786
|
:form_params => form_params,
|
@@ -2978,15 +3849,16 @@ module FinnhubRuby
|
|
2978
3849
|
form_params = opts[:form_params] || {}
|
2979
3850
|
|
2980
3851
|
# http body (model)
|
2981
|
-
post_body = opts[:
|
3852
|
+
post_body = opts[:debug_body]
|
2982
3853
|
|
2983
3854
|
# return_type
|
2984
|
-
return_type = opts[:
|
3855
|
+
return_type = opts[:debug_return_type] || 'Array<Dividends>'
|
2985
3856
|
|
2986
3857
|
# auth_names
|
2987
|
-
auth_names = opts[:
|
3858
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2988
3859
|
|
2989
3860
|
new_options = opts.merge(
|
3861
|
+
:operation => :"DefaultApi.stock_dividends",
|
2990
3862
|
:header_params => header_params,
|
2991
3863
|
:query_params => query_params,
|
2992
3864
|
:form_params => form_params,
|
@@ -3002,6 +3874,91 @@ module FinnhubRuby
|
|
3002
3874
|
return data, status_code, headers
|
3003
3875
|
end
|
3004
3876
|
|
3877
|
+
# Historical NBBO
|
3878
|
+
# <p>Get historical best bid and offer for US stocks, LSE, TSX, Euronext and Deutsche Borse.</p><p>For US market, this endpoint only serves historical NBBO from the beginning of 2020. To download more historical data, please visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a>.</p>
|
3879
|
+
# @param symbol [String] Symbol.
|
3880
|
+
# @param date [Date] Date: 2020-04-02.
|
3881
|
+
# @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code>
|
3882
|
+
# @param skip [Integer] Number of ticks to skip. Use this parameter to loop through the entire data.
|
3883
|
+
# @param [Hash] opts the optional parameters
|
3884
|
+
# @return [HistoricalNBBO]
|
3885
|
+
def stock_nbbo(symbol, date, limit, skip, opts = {})
|
3886
|
+
data, _status_code, _headers = stock_nbbo_with_http_info(symbol, date, limit, skip, opts)
|
3887
|
+
data
|
3888
|
+
end
|
3889
|
+
|
3890
|
+
# Historical NBBO
|
3891
|
+
# <p>Get historical best bid and offer for US stocks, LSE, TSX, Euronext and Deutsche Borse.</p><p>For US market, this endpoint only serves historical NBBO from the beginning of 2020. To download more historical data, please visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a>.</p>
|
3892
|
+
# @param symbol [String] Symbol.
|
3893
|
+
# @param date [Date] Date: 2020-04-02.
|
3894
|
+
# @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code>
|
3895
|
+
# @param skip [Integer] Number of ticks to skip. Use this parameter to loop through the entire data.
|
3896
|
+
# @param [Hash] opts the optional parameters
|
3897
|
+
# @return [Array<(HistoricalNBBO, Integer, Hash)>] HistoricalNBBO data, response status code and response headers
|
3898
|
+
def stock_nbbo_with_http_info(symbol, date, limit, skip, opts = {})
|
3899
|
+
if @api_client.config.debugging
|
3900
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.stock_nbbo ...'
|
3901
|
+
end
|
3902
|
+
# verify the required parameter 'symbol' is set
|
3903
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
3904
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_nbbo"
|
3905
|
+
end
|
3906
|
+
# verify the required parameter 'date' is set
|
3907
|
+
if @api_client.config.client_side_validation && date.nil?
|
3908
|
+
fail ArgumentError, "Missing the required parameter 'date' when calling DefaultApi.stock_nbbo"
|
3909
|
+
end
|
3910
|
+
# verify the required parameter 'limit' is set
|
3911
|
+
if @api_client.config.client_side_validation && limit.nil?
|
3912
|
+
fail ArgumentError, "Missing the required parameter 'limit' when calling DefaultApi.stock_nbbo"
|
3913
|
+
end
|
3914
|
+
# verify the required parameter 'skip' is set
|
3915
|
+
if @api_client.config.client_side_validation && skip.nil?
|
3916
|
+
fail ArgumentError, "Missing the required parameter 'skip' when calling DefaultApi.stock_nbbo"
|
3917
|
+
end
|
3918
|
+
# resource path
|
3919
|
+
local_var_path = '/stock/bbo'
|
3920
|
+
|
3921
|
+
# query parameters
|
3922
|
+
query_params = opts[:query_params] || {}
|
3923
|
+
query_params[:'symbol'] = symbol
|
3924
|
+
query_params[:'date'] = date
|
3925
|
+
query_params[:'limit'] = limit
|
3926
|
+
query_params[:'skip'] = skip
|
3927
|
+
|
3928
|
+
# header parameters
|
3929
|
+
header_params = opts[:header_params] || {}
|
3930
|
+
# HTTP header 'Accept' (if needed)
|
3931
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3932
|
+
|
3933
|
+
# form parameters
|
3934
|
+
form_params = opts[:form_params] || {}
|
3935
|
+
|
3936
|
+
# http body (model)
|
3937
|
+
post_body = opts[:debug_body]
|
3938
|
+
|
3939
|
+
# return_type
|
3940
|
+
return_type = opts[:debug_return_type] || 'HistoricalNBBO'
|
3941
|
+
|
3942
|
+
# auth_names
|
3943
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3944
|
+
|
3945
|
+
new_options = opts.merge(
|
3946
|
+
:operation => :"DefaultApi.stock_nbbo",
|
3947
|
+
:header_params => header_params,
|
3948
|
+
:query_params => query_params,
|
3949
|
+
:form_params => form_params,
|
3950
|
+
:body => post_body,
|
3951
|
+
:auth_names => auth_names,
|
3952
|
+
:return_type => return_type
|
3953
|
+
)
|
3954
|
+
|
3955
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3956
|
+
if @api_client.config.debugging
|
3957
|
+
@api_client.config.logger.debug "API called: DefaultApi#stock_nbbo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3958
|
+
end
|
3959
|
+
return data, status_code, headers
|
3960
|
+
end
|
3961
|
+
|
3005
3962
|
# Splits
|
3006
3963
|
# Get splits data for stocks.
|
3007
3964
|
# @param symbol [String] Symbol.
|
@@ -3055,15 +4012,16 @@ module FinnhubRuby
|
|
3055
4012
|
form_params = opts[:form_params] || {}
|
3056
4013
|
|
3057
4014
|
# http body (model)
|
3058
|
-
post_body = opts[:
|
4015
|
+
post_body = opts[:debug_body]
|
3059
4016
|
|
3060
4017
|
# return_type
|
3061
|
-
return_type = opts[:
|
4018
|
+
return_type = opts[:debug_return_type] || 'Array<Split>'
|
3062
4019
|
|
3063
4020
|
# auth_names
|
3064
|
-
auth_names = opts[:
|
4021
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3065
4022
|
|
3066
4023
|
new_options = opts.merge(
|
4024
|
+
:operation => :"DefaultApi.stock_splits",
|
3067
4025
|
:header_params => header_params,
|
3068
4026
|
:query_params => query_params,
|
3069
4027
|
:form_params => form_params,
|
@@ -3080,20 +4038,26 @@ module FinnhubRuby
|
|
3080
4038
|
end
|
3081
4039
|
|
3082
4040
|
# Stock Symbol
|
3083
|
-
# List supported stocks. A list of supported CFD Indices can be found <a href=\"https://docs.google.com/spreadsheets/d/1BAbIXBgl405fj0oHeEyRFEu8mW4QD1PhvtaBATLoR14/edit?usp=sharing\" target=\"_blank\">here</a>.
|
3084
|
-
# @param exchange [String] Exchange you want to get the list of symbols from. List of
|
4041
|
+
# List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>. A list of supported CFD Indices can be found <a href=\"https://docs.google.com/spreadsheets/d/1BAbIXBgl405fj0oHeEyRFEu8mW4QD1PhvtaBATLoR14/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4042
|
+
# @param exchange [String] Exchange you want to get the list of symbols from. List of exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
3085
4043
|
# @param [Hash] opts the optional parameters
|
3086
|
-
# @
|
4044
|
+
# @option opts [String] :mic Filter by MIC code.
|
4045
|
+
# @option opts [String] :security_type Filter by security type used by OpenFigi standard.
|
4046
|
+
# @option opts [String] :currency Filter by currency.
|
4047
|
+
# @return [Array<StockSymbol>]
|
3087
4048
|
def stock_symbols(exchange, opts = {})
|
3088
4049
|
data, _status_code, _headers = stock_symbols_with_http_info(exchange, opts)
|
3089
4050
|
data
|
3090
4051
|
end
|
3091
4052
|
|
3092
4053
|
# Stock Symbol
|
3093
|
-
# List supported stocks. A list of supported CFD Indices can be found <a href=\"https://docs.google.com/spreadsheets/d/1BAbIXBgl405fj0oHeEyRFEu8mW4QD1PhvtaBATLoR14/edit?usp=sharing\" target=\"_blank\">here</a>.
|
3094
|
-
# @param exchange [String] Exchange you want to get the list of symbols from. List of
|
4054
|
+
# List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>. A list of supported CFD Indices can be found <a href=\"https://docs.google.com/spreadsheets/d/1BAbIXBgl405fj0oHeEyRFEu8mW4QD1PhvtaBATLoR14/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4055
|
+
# @param exchange [String] Exchange you want to get the list of symbols from. List of exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
3095
4056
|
# @param [Hash] opts the optional parameters
|
3096
|
-
# @
|
4057
|
+
# @option opts [String] :mic Filter by MIC code.
|
4058
|
+
# @option opts [String] :security_type Filter by security type used by OpenFigi standard.
|
4059
|
+
# @option opts [String] :currency Filter by currency.
|
4060
|
+
# @return [Array<(Array<StockSymbol>, Integer, Hash)>] Array<StockSymbol> data, response status code and response headers
|
3097
4061
|
def stock_symbols_with_http_info(exchange, opts = {})
|
3098
4062
|
if @api_client.config.debugging
|
3099
4063
|
@api_client.config.logger.debug 'Calling API: DefaultApi.stock_symbols ...'
|
@@ -3108,6 +4072,9 @@ module FinnhubRuby
|
|
3108
4072
|
# query parameters
|
3109
4073
|
query_params = opts[:query_params] || {}
|
3110
4074
|
query_params[:'exchange'] = exchange
|
4075
|
+
query_params[:'mic'] = opts[:'mic'] if !opts[:'mic'].nil?
|
4076
|
+
query_params[:'securityType'] = opts[:'security_type'] if !opts[:'security_type'].nil?
|
4077
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
3111
4078
|
|
3112
4079
|
# header parameters
|
3113
4080
|
header_params = opts[:header_params] || {}
|
@@ -3118,15 +4085,16 @@ module FinnhubRuby
|
|
3118
4085
|
form_params = opts[:form_params] || {}
|
3119
4086
|
|
3120
4087
|
# http body (model)
|
3121
|
-
post_body = opts[:
|
4088
|
+
post_body = opts[:debug_body]
|
3122
4089
|
|
3123
4090
|
# return_type
|
3124
|
-
return_type = opts[:
|
4091
|
+
return_type = opts[:debug_return_type] || 'Array<StockSymbol>'
|
3125
4092
|
|
3126
4093
|
# auth_names
|
3127
|
-
auth_names = opts[:
|
4094
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3128
4095
|
|
3129
4096
|
new_options = opts.merge(
|
4097
|
+
:operation => :"DefaultApi.stock_symbols",
|
3130
4098
|
:header_params => header_params,
|
3131
4099
|
:query_params => query_params,
|
3132
4100
|
:form_params => form_params,
|
@@ -3143,7 +4111,7 @@ module FinnhubRuby
|
|
3143
4111
|
end
|
3144
4112
|
|
3145
4113
|
# Tick Data
|
3146
|
-
# <p>Get historical tick data for
|
4114
|
+
# <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</p><p>Note that for Nasdaq Nordic and Baltic, you need to use ISIN instead of symbol to query tick data. </p><table class=\"table table-hover\"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class=\"text-blue\">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Nasdaq Nordic & Baltic</th> <td> <ul> <li>Copenhagen (CO)</li> <li>Stockholm (ST)</li> <li>Helsinki (HE)</li> <li>Iceland (IC)</li> <li>Riga (RG)</li> <li>Tallinn (TL)</li> <li>Vilnius(VS)</li> <li>Fixed Income</li> <li>Derivatives</li> <li>Commodities</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table>
|
3147
4115
|
# @param symbol [String] Symbol.
|
3148
4116
|
# @param date [Date] Date: 2020-04-02.
|
3149
4117
|
# @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code>
|
@@ -3156,7 +4124,7 @@ module FinnhubRuby
|
|
3156
4124
|
end
|
3157
4125
|
|
3158
4126
|
# Tick Data
|
3159
|
-
# <p>Get historical tick data for
|
4127
|
+
# <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</p><p>Note that for Nasdaq Nordic and Baltic, you need to use ISIN instead of symbol to query tick data. </p><table class=\"table table-hover\"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class=\"text-blue\">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Nasdaq Nordic & Baltic</th> <td> <ul> <li>Copenhagen (CO)</li> <li>Stockholm (ST)</li> <li>Helsinki (HE)</li> <li>Iceland (IC)</li> <li>Riga (RG)</li> <li>Tallinn (TL)</li> <li>Vilnius(VS)</li> <li>Fixed Income</li> <li>Derivatives</li> <li>Commodities</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table>
|
3160
4128
|
# @param symbol [String] Symbol.
|
3161
4129
|
# @param date [Date] Date: 2020-04-02.
|
3162
4130
|
# @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code>
|
@@ -3202,15 +4170,16 @@ module FinnhubRuby
|
|
3202
4170
|
form_params = opts[:form_params] || {}
|
3203
4171
|
|
3204
4172
|
# http body (model)
|
3205
|
-
post_body = opts[:
|
4173
|
+
post_body = opts[:debug_body]
|
3206
4174
|
|
3207
4175
|
# return_type
|
3208
|
-
return_type = opts[:
|
4176
|
+
return_type = opts[:debug_return_type] || 'TickData'
|
3209
4177
|
|
3210
4178
|
# auth_names
|
3211
|
-
auth_names = opts[:
|
4179
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3212
4180
|
|
3213
4181
|
new_options = opts.merge(
|
4182
|
+
:operation => :"DefaultApi.stock_tick",
|
3214
4183
|
:header_params => header_params,
|
3215
4184
|
:query_params => query_params,
|
3216
4185
|
:form_params => form_params,
|
@@ -3226,6 +4195,70 @@ module FinnhubRuby
|
|
3226
4195
|
return data, status_code, headers
|
3227
4196
|
end
|
3228
4197
|
|
4198
|
+
# Supply Chain Relationships
|
4199
|
+
# <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p><p>We currently cover data for S&P500 and Nasdaq 100 companies.</p>
|
4200
|
+
# @param symbol [String] Symbol.
|
4201
|
+
# @param [Hash] opts the optional parameters
|
4202
|
+
# @return [SupplyChainRelationships]
|
4203
|
+
def supply_chain_relationships(symbol, opts = {})
|
4204
|
+
data, _status_code, _headers = supply_chain_relationships_with_http_info(symbol, opts)
|
4205
|
+
data
|
4206
|
+
end
|
4207
|
+
|
4208
|
+
# Supply Chain Relationships
|
4209
|
+
# <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p><p>We currently cover data for S&P500 and Nasdaq 100 companies.</p>
|
4210
|
+
# @param symbol [String] Symbol.
|
4211
|
+
# @param [Hash] opts the optional parameters
|
4212
|
+
# @return [Array<(SupplyChainRelationships, Integer, Hash)>] SupplyChainRelationships data, response status code and response headers
|
4213
|
+
def supply_chain_relationships_with_http_info(symbol, opts = {})
|
4214
|
+
if @api_client.config.debugging
|
4215
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.supply_chain_relationships ...'
|
4216
|
+
end
|
4217
|
+
# verify the required parameter 'symbol' is set
|
4218
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
4219
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.supply_chain_relationships"
|
4220
|
+
end
|
4221
|
+
# resource path
|
4222
|
+
local_var_path = '/stock/supply-chain'
|
4223
|
+
|
4224
|
+
# query parameters
|
4225
|
+
query_params = opts[:query_params] || {}
|
4226
|
+
query_params[:'symbol'] = symbol
|
4227
|
+
|
4228
|
+
# header parameters
|
4229
|
+
header_params = opts[:header_params] || {}
|
4230
|
+
# HTTP header 'Accept' (if needed)
|
4231
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
4232
|
+
|
4233
|
+
# form parameters
|
4234
|
+
form_params = opts[:form_params] || {}
|
4235
|
+
|
4236
|
+
# http body (model)
|
4237
|
+
post_body = opts[:debug_body]
|
4238
|
+
|
4239
|
+
# return_type
|
4240
|
+
return_type = opts[:debug_return_type] || 'SupplyChainRelationships'
|
4241
|
+
|
4242
|
+
# auth_names
|
4243
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
4244
|
+
|
4245
|
+
new_options = opts.merge(
|
4246
|
+
:operation => :"DefaultApi.supply_chain_relationships",
|
4247
|
+
:header_params => header_params,
|
4248
|
+
:query_params => query_params,
|
4249
|
+
:form_params => form_params,
|
4250
|
+
:body => post_body,
|
4251
|
+
:auth_names => auth_names,
|
4252
|
+
:return_type => return_type
|
4253
|
+
)
|
4254
|
+
|
4255
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
4256
|
+
if @api_client.config.debugging
|
4257
|
+
@api_client.config.logger.debug "API called: DefaultApi#supply_chain_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4258
|
+
end
|
4259
|
+
return data, status_code, headers
|
4260
|
+
end
|
4261
|
+
|
3229
4262
|
# Support/Resistance
|
3230
4263
|
# Get support and resistance levels for a symbol.
|
3231
4264
|
# @param symbol [String] Symbol
|
@@ -3272,15 +4305,16 @@ module FinnhubRuby
|
|
3272
4305
|
form_params = opts[:form_params] || {}
|
3273
4306
|
|
3274
4307
|
# http body (model)
|
3275
|
-
post_body = opts[:
|
4308
|
+
post_body = opts[:debug_body]
|
3276
4309
|
|
3277
4310
|
# return_type
|
3278
|
-
return_type = opts[:
|
4311
|
+
return_type = opts[:debug_return_type] || 'SupportResistance'
|
3279
4312
|
|
3280
4313
|
# auth_names
|
3281
|
-
auth_names = opts[:
|
4314
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3282
4315
|
|
3283
4316
|
new_options = opts.merge(
|
4317
|
+
:operation => :"DefaultApi.support_resistance",
|
3284
4318
|
:header_params => header_params,
|
3285
4319
|
:query_params => query_params,
|
3286
4320
|
:form_params => form_params,
|
@@ -3296,6 +4330,70 @@ module FinnhubRuby
|
|
3296
4330
|
return data, status_code, headers
|
3297
4331
|
end
|
3298
4332
|
|
4333
|
+
# Symbol Lookup
|
4334
|
+
# Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip.
|
4335
|
+
# @param q [String] Query text can be symbol, name, isin, or cusip.
|
4336
|
+
# @param [Hash] opts the optional parameters
|
4337
|
+
# @return [SymbolLookup]
|
4338
|
+
def symbol_search(q, opts = {})
|
4339
|
+
data, _status_code, _headers = symbol_search_with_http_info(q, opts)
|
4340
|
+
data
|
4341
|
+
end
|
4342
|
+
|
4343
|
+
# Symbol Lookup
|
4344
|
+
# Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip.
|
4345
|
+
# @param q [String] Query text can be symbol, name, isin, or cusip.
|
4346
|
+
# @param [Hash] opts the optional parameters
|
4347
|
+
# @return [Array<(SymbolLookup, Integer, Hash)>] SymbolLookup data, response status code and response headers
|
4348
|
+
def symbol_search_with_http_info(q, opts = {})
|
4349
|
+
if @api_client.config.debugging
|
4350
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.symbol_search ...'
|
4351
|
+
end
|
4352
|
+
# verify the required parameter 'q' is set
|
4353
|
+
if @api_client.config.client_side_validation && q.nil?
|
4354
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling DefaultApi.symbol_search"
|
4355
|
+
end
|
4356
|
+
# resource path
|
4357
|
+
local_var_path = '/search'
|
4358
|
+
|
4359
|
+
# query parameters
|
4360
|
+
query_params = opts[:query_params] || {}
|
4361
|
+
query_params[:'q'] = q
|
4362
|
+
|
4363
|
+
# header parameters
|
4364
|
+
header_params = opts[:header_params] || {}
|
4365
|
+
# HTTP header 'Accept' (if needed)
|
4366
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
4367
|
+
|
4368
|
+
# form parameters
|
4369
|
+
form_params = opts[:form_params] || {}
|
4370
|
+
|
4371
|
+
# http body (model)
|
4372
|
+
post_body = opts[:debug_body]
|
4373
|
+
|
4374
|
+
# return_type
|
4375
|
+
return_type = opts[:debug_return_type] || 'SymbolLookup'
|
4376
|
+
|
4377
|
+
# auth_names
|
4378
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
4379
|
+
|
4380
|
+
new_options = opts.merge(
|
4381
|
+
:operation => :"DefaultApi.symbol_search",
|
4382
|
+
:header_params => header_params,
|
4383
|
+
:query_params => query_params,
|
4384
|
+
:form_params => form_params,
|
4385
|
+
:body => post_body,
|
4386
|
+
:auth_names => auth_names,
|
4387
|
+
:return_type => return_type
|
4388
|
+
)
|
4389
|
+
|
4390
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
4391
|
+
if @api_client.config.debugging
|
4392
|
+
@api_client.config.logger.debug "API called: DefaultApi#symbol_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4393
|
+
end
|
4394
|
+
return data, status_code, headers
|
4395
|
+
end
|
4396
|
+
|
3299
4397
|
# Technical Indicators
|
3300
4398
|
# Return technical indicator with price data. List of supported indicators can be found <a href=\"https://docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing\" target=\"_blank\">here</a>.
|
3301
4399
|
# @param symbol [String] symbol
|
@@ -3367,15 +4465,16 @@ module FinnhubRuby
|
|
3367
4465
|
form_params = opts[:form_params] || {}
|
3368
4466
|
|
3369
4467
|
# http body (model)
|
3370
|
-
post_body = opts[:
|
4468
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'indicator_fields'])
|
3371
4469
|
|
3372
4470
|
# return_type
|
3373
|
-
return_type = opts[:
|
4471
|
+
return_type = opts[:debug_return_type] || 'Object'
|
3374
4472
|
|
3375
4473
|
# auth_names
|
3376
|
-
auth_names = opts[:
|
4474
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3377
4475
|
|
3378
4476
|
new_options = opts.merge(
|
4477
|
+
:operation => :"DefaultApi.technical_indicator",
|
3379
4478
|
:header_params => header_params,
|
3380
4479
|
:query_params => query_params,
|
3381
4480
|
:form_params => form_params,
|
@@ -3392,7 +4491,7 @@ module FinnhubRuby
|
|
3392
4491
|
end
|
3393
4492
|
|
3394
4493
|
# Earnings Call Transcripts
|
3395
|
-
# <p>Get earnings call transcripts, audio and participants' list. This endpoint is only available for US companies. <p>
|
4494
|
+
# <p>Get earnings call transcripts, audio and participants' list. This endpoint is only available for US, UK, and Candian companies. <p>15+ years of data is available with 220,000+ audio which add up to 7TB in size.</p>
|
3396
4495
|
# @param id [String] Transcript's id obtained with <a href=\"#transcripts-list\">Transcripts List endpoint</a>.
|
3397
4496
|
# @param [Hash] opts the optional parameters
|
3398
4497
|
# @return [EarningsCallTranscripts]
|
@@ -3402,7 +4501,7 @@ module FinnhubRuby
|
|
3402
4501
|
end
|
3403
4502
|
|
3404
4503
|
# Earnings Call Transcripts
|
3405
|
-
# <p>Get earnings call transcripts, audio and participants' list. This endpoint is only available for US companies. <p>
|
4504
|
+
# <p>Get earnings call transcripts, audio and participants' list. This endpoint is only available for US, UK, and Candian companies. <p>15+ years of data is available with 220,000+ audio which add up to 7TB in size.</p>
|
3406
4505
|
# @param id [String] Transcript's id obtained with <a href=\"#transcripts-list\">Transcripts List endpoint</a>.
|
3407
4506
|
# @param [Hash] opts the optional parameters
|
3408
4507
|
# @return [Array<(EarningsCallTranscripts, Integer, Hash)>] EarningsCallTranscripts data, response status code and response headers
|
@@ -3430,15 +4529,16 @@ module FinnhubRuby
|
|
3430
4529
|
form_params = opts[:form_params] || {}
|
3431
4530
|
|
3432
4531
|
# http body (model)
|
3433
|
-
post_body = opts[:
|
4532
|
+
post_body = opts[:debug_body]
|
3434
4533
|
|
3435
4534
|
# return_type
|
3436
|
-
return_type = opts[:
|
4535
|
+
return_type = opts[:debug_return_type] || 'EarningsCallTranscripts'
|
3437
4536
|
|
3438
4537
|
# auth_names
|
3439
|
-
auth_names = opts[:
|
4538
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3440
4539
|
|
3441
4540
|
new_options = opts.merge(
|
4541
|
+
:operation => :"DefaultApi.transcripts",
|
3442
4542
|
:header_params => header_params,
|
3443
4543
|
:query_params => query_params,
|
3444
4544
|
:form_params => form_params,
|
@@ -3455,7 +4555,7 @@ module FinnhubRuby
|
|
3455
4555
|
end
|
3456
4556
|
|
3457
4557
|
# Earnings Call Transcripts List
|
3458
|
-
# List earnings call transcripts' metadata. This endpoint is
|
4558
|
+
# List earnings call transcripts' metadata. This endpoint is available for US, UK and Canadian companies.
|
3459
4559
|
# @param symbol [String] Company symbol: AAPL. Leave empty to list the latest transcripts
|
3460
4560
|
# @param [Hash] opts the optional parameters
|
3461
4561
|
# @return [EarningsCallTranscriptsList]
|
@@ -3465,7 +4565,7 @@ module FinnhubRuby
|
|
3465
4565
|
end
|
3466
4566
|
|
3467
4567
|
# Earnings Call Transcripts List
|
3468
|
-
# List earnings call transcripts' metadata. This endpoint is
|
4568
|
+
# List earnings call transcripts' metadata. This endpoint is available for US, UK and Canadian companies.
|
3469
4569
|
# @param symbol [String] Company symbol: AAPL. Leave empty to list the latest transcripts
|
3470
4570
|
# @param [Hash] opts the optional parameters
|
3471
4571
|
# @return [Array<(EarningsCallTranscriptsList, Integer, Hash)>] EarningsCallTranscriptsList data, response status code and response headers
|
@@ -3493,15 +4593,16 @@ module FinnhubRuby
|
|
3493
4593
|
form_params = opts[:form_params] || {}
|
3494
4594
|
|
3495
4595
|
# http body (model)
|
3496
|
-
post_body = opts[:
|
4596
|
+
post_body = opts[:debug_body]
|
3497
4597
|
|
3498
4598
|
# return_type
|
3499
|
-
return_type = opts[:
|
4599
|
+
return_type = opts[:debug_return_type] || 'EarningsCallTranscriptsList'
|
3500
4600
|
|
3501
4601
|
# auth_names
|
3502
|
-
auth_names = opts[:
|
4602
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3503
4603
|
|
3504
4604
|
new_options = opts.merge(
|
4605
|
+
:operation => :"DefaultApi.transcripts_list",
|
3505
4606
|
:header_params => header_params,
|
3506
4607
|
:query_params => query_params,
|
3507
4608
|
:form_params => form_params,
|
@@ -3558,15 +4659,16 @@ module FinnhubRuby
|
|
3558
4659
|
form_params = opts[:form_params] || {}
|
3559
4660
|
|
3560
4661
|
# http body (model)
|
3561
|
-
post_body = opts[:
|
4662
|
+
post_body = opts[:debug_body]
|
3562
4663
|
|
3563
4664
|
# return_type
|
3564
|
-
return_type = opts[:
|
4665
|
+
return_type = opts[:debug_return_type] || 'Array<UpgradeDowngrade>'
|
3565
4666
|
|
3566
4667
|
# auth_names
|
3567
|
-
auth_names = opts[:
|
4668
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
3568
4669
|
|
3569
4670
|
new_options = opts.merge(
|
4671
|
+
:operation => :"DefaultApi.upgrade_downgrade",
|
3570
4672
|
:header_params => header_params,
|
3571
4673
|
:query_params => query_params,
|
3572
4674
|
:form_params => form_params,
|