finnhub_ruby 1.0.1 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (343) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -8
  3. data/docs/AggregateIndicators.md +10 -9
  4. data/docs/BasicFinancials.md +14 -11
  5. data/docs/BreakdownItem.md +20 -0
  6. data/docs/Company.md +20 -19
  7. data/docs/CompanyExecutive.md +10 -9
  8. data/docs/CompanyNews.md +34 -0
  9. data/docs/CompanyNewsStatistics.md +12 -11
  10. data/docs/CompanyProfile.md +62 -61
  11. data/docs/CompanyProfile2.md +30 -29
  12. data/docs/CountryMetadata.md +18 -17
  13. data/docs/CovidInfo.md +14 -13
  14. data/docs/CryptoCandles.md +20 -19
  15. data/docs/CryptoSymbol.md +12 -11
  16. data/docs/DefaultApi.md +3288 -792
  17. data/docs/Development.md +16 -13
  18. data/docs/Dividends.md +22 -21
  19. data/docs/Dividends2.md +20 -0
  20. data/docs/Dividends2Info.md +20 -0
  21. data/docs/ETFCountryExposureData.md +20 -0
  22. data/docs/ETFHoldingsData.md +30 -0
  23. data/docs/ETFProfileData.md +52 -0
  24. data/docs/ETFSectorExposureData.md +20 -0
  25. data/docs/ETFsCountryExposure.md +20 -0
  26. data/docs/ETFsHoldings.md +24 -0
  27. data/docs/ETFsProfile.md +20 -0
  28. data/docs/ETFsSectorExposure.md +20 -0
  29. data/docs/EarningEstimate.md +16 -15
  30. data/docs/EarningRelease.md +24 -23
  31. data/docs/EarningResult.md +18 -13
  32. data/docs/EarningsCalendar.md +8 -7
  33. data/docs/EarningsCallTranscripts.md +24 -23
  34. data/docs/EarningsCallTranscriptsList.md +10 -9
  35. data/docs/EarningsEstimates.md +12 -11
  36. data/docs/EconomicCalendar.md +8 -7
  37. data/docs/EconomicCode.md +14 -13
  38. data/docs/EconomicData.md +10 -9
  39. data/docs/EconomicDataInfo.md +20 -0
  40. data/docs/EconomicEvent.md +22 -21
  41. data/docs/Estimate.md +16 -15
  42. data/docs/FDAComitteeMeeting.md +24 -0
  43. data/docs/Filing.md +22 -21
  44. data/docs/FilingSentiment.md +34 -0
  45. data/docs/FinancialStatements.md +10 -9
  46. data/docs/FinancialsAsReported.md +12 -11
  47. data/docs/ForexCandles.md +20 -19
  48. data/docs/ForexSymbol.md +12 -11
  49. data/docs/Forexrates.md +10 -9
  50. data/docs/FundOwnership.md +10 -9
  51. data/docs/FundOwnershipInfo.md +26 -0
  52. data/docs/HistoricalNBBO.md +40 -0
  53. data/docs/IPOCalendar.md +8 -7
  54. data/docs/IPOEvent.md +22 -21
  55. data/docs/IndexHistoricalConstituent.md +22 -0
  56. data/docs/Indicator.md +12 -11
  57. data/docs/IndicesConstituents.md +20 -0
  58. data/docs/IndicesHistoricalConstituents.md +20 -0
  59. data/docs/InsiderTransactions.md +20 -0
  60. data/docs/InternationalFiling.md +34 -0
  61. data/docs/InvestmentThemePortfolio.md +18 -0
  62. data/docs/InvestmentThemes.md +20 -0
  63. data/docs/KeyCustomersSuppliers.md +24 -0
  64. data/docs/LastBidAsk.md +16 -15
  65. data/docs/MarketNews.md +34 -0
  66. data/docs/MutualFundCountryExposure.md +20 -0
  67. data/docs/MutualFundCountryExposureData.md +20 -0
  68. data/docs/MutualFundHoldings.md +24 -0
  69. data/docs/MutualFundHoldingsData.md +30 -0
  70. data/docs/MutualFundProfile.md +20 -0
  71. data/docs/MutualFundProfileData.md +58 -0
  72. data/docs/MutualFundSectorExposure.md +20 -0
  73. data/docs/MutualFundSectorExposureData.md +20 -0
  74. data/docs/NewsSentiment.md +18 -17
  75. data/docs/Ownership.md +20 -0
  76. data/docs/OwnershipInfo.md +24 -0
  77. data/docs/PatternRecognition.md +8 -7
  78. data/docs/PressRelease.md +20 -0
  79. data/docs/PriceTarget.md +18 -17
  80. data/docs/Quote.md +20 -15
  81. data/docs/RecommendationTrend.md +20 -19
  82. data/docs/RedditSentimentContent.md +30 -0
  83. data/docs/Report.md +28 -27
  84. data/docs/RevenueBreakdown.md +22 -0
  85. data/docs/RevenueEstimates.md +12 -11
  86. data/docs/SECSentimentAnalysis.md +24 -0
  87. data/docs/Sentiment.md +10 -9
  88. data/docs/SimilarityIndex.md +22 -0
  89. data/docs/SocialSentiment.md +22 -0
  90. data/docs/Split.md +14 -13
  91. data/docs/StockCandles.md +20 -19
  92. data/docs/StockSymbol.md +30 -0
  93. data/docs/StockTranscripts.md +16 -15
  94. data/docs/SupplyChainRelationships.md +20 -0
  95. data/docs/SupportResistance.md +8 -7
  96. data/docs/SymbolLookup.md +20 -0
  97. data/docs/SymbolLookupInfo.md +24 -0
  98. data/docs/TechnicalAnalysis.md +10 -9
  99. data/docs/TickData.md +24 -21
  100. data/docs/Transactions.md +30 -0
  101. data/docs/TranscriptContent.md +12 -9
  102. data/docs/TranscriptParticipant.md +12 -9
  103. data/docs/Trend.md +10 -7
  104. data/docs/TwitterSentimentContent.md +30 -0
  105. data/docs/UpgradeDowngrade.md +18 -17
  106. data/finnhub_ruby-1.1.5.gem +0 -0
  107. data/finnhub_ruby.gemspec +7 -8
  108. data/lib/finnhub_ruby.rb +49 -6
  109. data/lib/finnhub_ruby/api/default_api.rb +2063 -515
  110. data/lib/finnhub_ruby/api_client.rb +50 -48
  111. data/lib/finnhub_ruby/api_error.rb +1 -1
  112. data/lib/finnhub_ruby/configuration.rb +39 -10
  113. data/lib/finnhub_ruby/models/aggregate_indicators.rb +19 -7
  114. data/lib/finnhub_ruby/models/basic_financials.rb +29 -8
  115. data/lib/finnhub_ruby/models/breakdown_item.rb +228 -0
  116. data/lib/finnhub_ruby/models/company.rb +19 -7
  117. data/lib/finnhub_ruby/models/company_executive.rb +20 -8
  118. data/lib/finnhub_ruby/models/company_news.rb +299 -0
  119. data/lib/finnhub_ruby/models/company_news_statistics.rb +19 -7
  120. data/lib/finnhub_ruby/models/company_profile.rb +20 -8
  121. data/lib/finnhub_ruby/models/company_profile2.rb +19 -7
  122. data/lib/finnhub_ruby/models/country_metadata.rb +19 -7
  123. data/lib/finnhub_ruby/models/covid_info.rb +20 -8
  124. data/lib/finnhub_ruby/models/crypto_candles.rb +19 -7
  125. data/lib/finnhub_ruby/models/crypto_symbol.rb +19 -7
  126. data/lib/finnhub_ruby/models/development.rb +34 -12
  127. data/lib/finnhub_ruby/models/dividends.rb +19 -7
  128. data/lib/finnhub_ruby/models/dividends2.rb +231 -0
  129. data/lib/finnhub_ruby/models/dividends2_basic.rb +231 -0
  130. data/lib/finnhub_ruby/models/dividends2_info.rb +229 -0
  131. data/lib/finnhub_ruby/models/earning_estimate.rb +20 -8
  132. data/lib/finnhub_ruby/models/earning_release.rb +20 -8
  133. data/lib/finnhub_ruby/models/earning_result.rb +40 -8
  134. data/lib/finnhub_ruby/models/earnings_calendar.rb +20 -8
  135. data/lib/finnhub_ruby/models/earnings_call_transcripts.rb +22 -10
  136. data/lib/finnhub_ruby/models/earnings_call_transcripts_list.rb +20 -8
  137. data/lib/finnhub_ruby/models/earnings_estimates.rb +20 -8
  138. data/lib/finnhub_ruby/models/economic_calendar.rb +20 -8
  139. data/lib/finnhub_ruby/models/economic_code.rb +19 -7
  140. data/lib/finnhub_ruby/models/economic_data.rb +20 -8
  141. data/lib/finnhub_ruby/models/economic_data_info.rb +229 -0
  142. data/lib/finnhub_ruby/models/economic_event.rb +19 -7
  143. data/lib/finnhub_ruby/models/estimate.rb +20 -8
  144. data/lib/finnhub_ruby/models/et_fs_country_exposure.rb +219 -0
  145. data/lib/finnhub_ruby/models/et_fs_holdings.rb +219 -0
  146. data/lib/finnhub_ruby/models/et_fs_industry_exposure.rb +219 -0
  147. data/lib/finnhub_ruby/models/et_fs_profile.rb +216 -0
  148. data/lib/finnhub_ruby/models/etf_country_exposure_data.rb +229 -0
  149. data/lib/finnhub_ruby/models/etf_holdings_data.rb +279 -0
  150. data/lib/finnhub_ruby/models/etf_profile_data.rb +389 -0
  151. data/lib/finnhub_ruby/models/etf_sector_exposure_data.rb +229 -0
  152. data/lib/finnhub_ruby/models/etfs_country_exposure.rb +231 -0
  153. data/lib/finnhub_ruby/models/etfs_holdings.rb +251 -0
  154. data/lib/finnhub_ruby/models/etfs_profile.rb +228 -0
  155. data/lib/finnhub_ruby/models/etfs_sector_exposure.rb +231 -0
  156. data/lib/finnhub_ruby/models/fda_comittee_meeting.rb +249 -0
  157. data/lib/finnhub_ruby/models/filing.rb +21 -9
  158. data/lib/finnhub_ruby/models/filing_sentiment.rb +299 -0
  159. data/lib/finnhub_ruby/models/financial_statements.rb +19 -7
  160. data/lib/finnhub_ruby/models/financials_as_reported.rb +20 -8
  161. data/lib/finnhub_ruby/models/forex_candles.rb +19 -7
  162. data/lib/finnhub_ruby/models/forex_symbol.rb +19 -7
  163. data/lib/finnhub_ruby/models/forexrates.rb +19 -7
  164. data/lib/finnhub_ruby/models/fund_ownership.rb +20 -8
  165. data/lib/finnhub_ruby/models/fund_ownership_info.rb +259 -0
  166. data/lib/finnhub_ruby/models/historical_nbbo.rb +345 -0
  167. data/lib/finnhub_ruby/models/index_historical_constituent.rb +239 -0
  168. data/lib/finnhub_ruby/models/indicator.rb +19 -7
  169. data/lib/finnhub_ruby/models/indices_constituents.rb +231 -0
  170. data/lib/finnhub_ruby/models/indices_historical_constituents.rb +231 -0
  171. data/lib/finnhub_ruby/models/insider_transactions.rb +231 -0
  172. data/lib/finnhub_ruby/models/international_filing.rb +299 -0
  173. data/lib/finnhub_ruby/models/investment_theme_portfolio.rb +219 -0
  174. data/lib/finnhub_ruby/models/investment_themes.rb +231 -0
  175. data/lib/finnhub_ruby/models/investment_themes_thematic_investing.rb +231 -0
  176. data/lib/finnhub_ruby/models/investor.rb +19 -7
  177. data/lib/finnhub_ruby/models/ipo_calendar.rb +20 -8
  178. data/lib/finnhub_ruby/models/ipo_event.rb +19 -7
  179. data/lib/finnhub_ruby/models/key_customers_suppliers.rb +249 -0
  180. data/lib/finnhub_ruby/models/last_bid_ask.rb +19 -7
  181. data/lib/finnhub_ruby/models/major_press_releases.rb +231 -0
  182. data/lib/finnhub_ruby/models/market_news.rb +299 -0
  183. data/lib/finnhub_ruby/models/mutual_fund_country_exposure.rb +231 -0
  184. data/lib/finnhub_ruby/models/mutual_fund_country_exposure_data.rb +229 -0
  185. data/lib/finnhub_ruby/models/mutual_fund_holdings.rb +251 -0
  186. data/lib/finnhub_ruby/models/mutual_fund_holdings_data.rb +279 -0
  187. data/lib/finnhub_ruby/models/mutual_fund_profile.rb +228 -0
  188. data/lib/finnhub_ruby/models/mutual_fund_profile_data.rb +419 -0
  189. data/lib/finnhub_ruby/models/mutual_fund_sector_exposure.rb +231 -0
  190. data/lib/finnhub_ruby/models/mutual_fund_sector_exposure_data.rb +229 -0
  191. data/lib/finnhub_ruby/models/mutual_funds_country_exposure.rb +231 -0
  192. data/lib/finnhub_ruby/models/mutual_funds_holdings.rb +251 -0
  193. data/lib/finnhub_ruby/models/mutual_funds_profile.rb +228 -0
  194. data/lib/finnhub_ruby/models/news.rb +19 -7
  195. data/lib/finnhub_ruby/models/news_sentiment.rb +19 -7
  196. data/lib/finnhub_ruby/models/ownership.rb +231 -0
  197. data/lib/finnhub_ruby/models/ownership_info.rb +249 -0
  198. data/lib/finnhub_ruby/models/pattern_recognition.rb +19 -7
  199. data/lib/finnhub_ruby/models/press_release.rb +231 -0
  200. data/lib/finnhub_ruby/models/price_target.rb +20 -8
  201. data/lib/finnhub_ruby/models/quote.rb +43 -11
  202. data/lib/finnhub_ruby/models/recommendation_trend.rb +19 -7
  203. data/lib/finnhub_ruby/models/reddit_sentiment_content.rb +279 -0
  204. data/lib/finnhub_ruby/models/report.rb +23 -11
  205. data/lib/finnhub_ruby/models/revenue_breakdown.rb +241 -0
  206. data/lib/finnhub_ruby/models/revenue_estimates.rb +20 -8
  207. data/lib/finnhub_ruby/models/sec_sentiment_analysis.rb +248 -0
  208. data/lib/finnhub_ruby/models/sentiment.rb +19 -7
  209. data/lib/finnhub_ruby/models/similarity_index.rb +241 -0
  210. data/lib/finnhub_ruby/models/social_sentiment.rb +243 -0
  211. data/lib/finnhub_ruby/models/split.rb +19 -7
  212. data/lib/finnhub_ruby/models/stock.rb +33 -11
  213. data/lib/finnhub_ruby/models/stock_candles.rb +19 -7
  214. data/lib/finnhub_ruby/models/stock_symbol.rb +279 -0
  215. data/lib/finnhub_ruby/models/stock_transcripts.rb +20 -8
  216. data/lib/finnhub_ruby/models/supply_chain_relationships.rb +231 -0
  217. data/lib/finnhub_ruby/models/support_resistance.rb +19 -7
  218. data/lib/finnhub_ruby/models/symbol_lookup.rb +231 -0
  219. data/lib/finnhub_ruby/models/symbol_lookup_info.rb +249 -0
  220. data/lib/finnhub_ruby/models/technical_analysis.rb +19 -7
  221. data/lib/finnhub_ruby/models/tick_data.rb +36 -12
  222. data/lib/finnhub_ruby/models/transactions.rb +279 -0
  223. data/lib/finnhub_ruby/models/transcript_content.rb +33 -11
  224. data/lib/finnhub_ruby/models/transcript_participant.rb +33 -11
  225. data/lib/finnhub_ruby/models/trend.rb +33 -11
  226. data/lib/finnhub_ruby/models/twitter_sentiment_content.rb +279 -0
  227. data/lib/finnhub_ruby/models/upgrade_downgrade.rb +19 -7
  228. data/lib/finnhub_ruby/version.rb +2 -2
  229. data/release.sh +12 -2
  230. data/spec/api/default_api_spec.rb +88 -2
  231. data/spec/api_client_spec.rb +1 -1
  232. data/spec/configuration_spec.rb +1 -1
  233. data/spec/models/aggregate_indicators_spec.rb +4 -11
  234. data/spec/models/basic_financials_spec.rb +10 -11
  235. data/spec/models/breakdown_item_spec.rb +40 -0
  236. data/spec/models/company_executive_spec.rb +4 -11
  237. data/spec/models/{news_spec.rb → company_news_spec.rb} +7 -14
  238. data/spec/models/company_news_statistics_spec.rb +4 -11
  239. data/spec/models/company_profile2_spec.rb +4 -11
  240. data/spec/models/company_profile_spec.rb +4 -11
  241. data/spec/models/company_spec.rb +4 -11
  242. data/spec/models/country_metadata_spec.rb +4 -11
  243. data/spec/models/covid_info_spec.rb +4 -11
  244. data/spec/models/crypto_candles_spec.rb +4 -11
  245. data/spec/models/crypto_symbol_spec.rb +4 -11
  246. data/spec/models/development_spec.rb +10 -11
  247. data/spec/models/dividends2_info_spec.rb +40 -0
  248. data/spec/models/dividends2_spec.rb +40 -0
  249. data/spec/models/dividends_spec.rb +4 -11
  250. data/spec/models/earning_estimate_spec.rb +4 -11
  251. data/spec/models/earning_release_spec.rb +4 -11
  252. data/spec/models/earning_result_spec.rb +16 -11
  253. data/spec/models/earnings_calendar_spec.rb +4 -11
  254. data/spec/models/earnings_call_transcripts_list_spec.rb +4 -11
  255. data/spec/models/earnings_call_transcripts_spec.rb +4 -11
  256. data/spec/models/earnings_estimates_spec.rb +4 -11
  257. data/spec/models/economic_calendar_spec.rb +4 -11
  258. data/spec/models/economic_code_spec.rb +4 -11
  259. data/spec/models/economic_data_info_spec.rb +40 -0
  260. data/spec/models/economic_data_spec.rb +4 -11
  261. data/spec/models/economic_event_spec.rb +4 -11
  262. data/spec/models/estimate_spec.rb +4 -11
  263. data/spec/models/etf_country_exposure_data_spec.rb +40 -0
  264. data/spec/models/etf_holdings_data_spec.rb +70 -0
  265. data/spec/models/etf_profile_data_spec.rb +136 -0
  266. data/spec/models/etf_sector_exposure_data_spec.rb +40 -0
  267. data/spec/models/etfs_country_exposure_spec.rb +40 -0
  268. data/spec/models/etfs_holdings_spec.rb +52 -0
  269. data/spec/models/etfs_profile_spec.rb +40 -0
  270. data/spec/models/etfs_sector_exposure_spec.rb +40 -0
  271. data/spec/models/fda_comittee_meeting_spec.rb +52 -0
  272. data/spec/models/filing_sentiment_spec.rb +82 -0
  273. data/spec/models/filing_spec.rb +4 -11
  274. data/spec/models/financial_statements_spec.rb +4 -11
  275. data/spec/models/financials_as_reported_spec.rb +4 -11
  276. data/spec/models/forex_candles_spec.rb +4 -11
  277. data/spec/models/forex_symbol_spec.rb +4 -11
  278. data/spec/models/forexrates_spec.rb +4 -11
  279. data/spec/models/fund_ownership_info_spec.rb +58 -0
  280. data/spec/models/fund_ownership_spec.rb +4 -11
  281. data/spec/models/historical_nbbo_spec.rb +100 -0
  282. data/spec/models/index_historical_constituent_spec.rb +46 -0
  283. data/spec/models/indicator_spec.rb +4 -11
  284. data/spec/models/indices_constituents_spec.rb +40 -0
  285. data/spec/models/indices_historical_constituents_spec.rb +40 -0
  286. data/spec/models/insider_transactions_spec.rb +40 -0
  287. data/spec/models/international_filing_spec.rb +82 -0
  288. data/spec/models/investment_theme_portfolio_spec.rb +34 -0
  289. data/spec/models/investment_themes_spec.rb +40 -0
  290. data/spec/models/ipo_calendar_spec.rb +4 -11
  291. data/spec/models/ipo_event_spec.rb +4 -11
  292. data/spec/models/key_customers_suppliers_spec.rb +52 -0
  293. data/spec/models/last_bid_ask_spec.rb +4 -11
  294. data/spec/models/market_news_spec.rb +82 -0
  295. data/spec/models/mutual_fund_country_exposure_data_spec.rb +40 -0
  296. data/spec/models/mutual_fund_country_exposure_spec.rb +40 -0
  297. data/spec/models/mutual_fund_holdings_data_spec.rb +70 -0
  298. data/spec/models/mutual_fund_holdings_spec.rb +52 -0
  299. data/spec/models/mutual_fund_profile_data_spec.rb +154 -0
  300. data/spec/models/mutual_fund_profile_spec.rb +40 -0
  301. data/spec/models/mutual_fund_sector_exposure_data_spec.rb +40 -0
  302. data/spec/models/mutual_fund_sector_exposure_spec.rb +40 -0
  303. data/spec/models/news_sentiment_spec.rb +4 -11
  304. data/spec/models/{investor_spec.rb → ownership_info_spec.rb} +7 -14
  305. data/spec/models/{investors_ownership_spec.rb → ownership_spec.rb} +7 -14
  306. data/spec/models/pattern_recognition_spec.rb +4 -11
  307. data/spec/models/{major_developments_spec.rb → press_release_spec.rb} +7 -14
  308. data/spec/models/price_target_spec.rb +4 -11
  309. data/spec/models/quote_spec.rb +16 -11
  310. data/spec/models/recommendation_trend_spec.rb +4 -11
  311. data/spec/models/reddit_sentiment_content_spec.rb +70 -0
  312. data/spec/models/report_spec.rb +4 -11
  313. data/spec/models/{stock_spec.rb → revenue_breakdown_spec.rb} +10 -17
  314. data/spec/models/revenue_estimates_spec.rb +4 -11
  315. data/spec/models/sec_sentiment_analysis_spec.rb +52 -0
  316. data/spec/models/sentiment_spec.rb +4 -11
  317. data/spec/models/similarity_index_spec.rb +46 -0
  318. data/spec/models/social_sentiment_spec.rb +46 -0
  319. data/spec/models/split_spec.rb +4 -11
  320. data/spec/models/stock_candles_spec.rb +4 -11
  321. data/spec/models/stock_symbol_spec.rb +70 -0
  322. data/spec/models/stock_transcripts_spec.rb +4 -11
  323. data/spec/models/supply_chain_relationships_spec.rb +40 -0
  324. data/spec/models/support_resistance_spec.rb +4 -11
  325. data/spec/models/symbol_lookup_info_spec.rb +52 -0
  326. data/spec/models/symbol_lookup_spec.rb +40 -0
  327. data/spec/models/technical_analysis_spec.rb +4 -11
  328. data/spec/models/tick_data_spec.rb +10 -11
  329. data/spec/models/transactions_spec.rb +70 -0
  330. data/spec/models/transcript_content_spec.rb +10 -11
  331. data/spec/models/transcript_participant_spec.rb +10 -11
  332. data/spec/models/trend_spec.rb +10 -11
  333. data/spec/models/twitter_sentiment_content_spec.rb +70 -0
  334. data/spec/models/upgrade_downgrade_spec.rb +4 -11
  335. data/spec/spec_helper.rb +1 -1
  336. metadata +211 -45
  337. data/docs/Investor.md +0 -23
  338. data/docs/InvestorsOwnership.md +0 -19
  339. data/docs/MajorDevelopments.md +0 -19
  340. data/docs/News.md +0 -33
  341. data/docs/Stock.md +0 -21
  342. data/finnhub_ruby-1.0.0.gem +0 -0
  343. data/test.rb +0 -139
@@ -2,18 +2,21 @@
2
2
 
3
3
  ## Properties
4
4
 
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **name** | **String** | Speaker's name | [optional]
8
- **speech** | **Array<String>** | Speaker's speech | [optional]
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Speaker's name | [optional] |
8
+ | **speech** | **Array<String>** | Speaker's speech | [optional] |
9
+ | **session** | **String** | Earnings calls section (management discussion or Q&A) | [optional] |
9
10
 
10
- ## Code Sample
11
+ ## Example
11
12
 
12
13
  ```ruby
13
- require 'FinnhubRuby'
14
+ require 'finnhub_ruby'
14
15
 
15
- instance = FinnhubRuby::TranscriptContent.new(name: null,
16
- speech: null)
16
+ instance = FinnhubRuby::TranscriptContent.new(
17
+ name: null,
18
+ speech: null,
19
+ session: null
20
+ )
17
21
  ```
18
22
 
19
-
@@ -2,18 +2,21 @@
2
2
 
3
3
  ## Properties
4
4
 
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **name** | **String** | Participant's name | [optional]
8
- **description** | **String** | Participant's description | [optional]
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Participant's name | [optional] |
8
+ | **description** | **String** | Participant's description | [optional] |
9
+ | **role** | **String** | Whether the speak is a company's executive or an analyst | [optional] |
9
10
 
10
- ## Code Sample
11
+ ## Example
11
12
 
12
13
  ```ruby
13
- require 'FinnhubRuby'
14
+ require 'finnhub_ruby'
14
15
 
15
- instance = FinnhubRuby::TranscriptParticipant.new(name: null,
16
- description: null)
16
+ instance = FinnhubRuby::TranscriptParticipant.new(
17
+ name: null,
18
+ description: null,
19
+ role: null
20
+ )
17
21
  ```
18
22
 
19
-
data/docs/Trend.md CHANGED
@@ -2,16 +2,19 @@
2
2
 
3
3
  ## Properties
4
4
 
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **adx** | **Float** | ADX reading | [optional]
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **adx** | **Float** | ADX reading | [optional] |
8
+ | **trending** | **Boolean** | Whether market is trending or going sideway | [optional] |
8
9
 
9
- ## Code Sample
10
+ ## Example
10
11
 
11
12
  ```ruby
12
- require 'FinnhubRuby'
13
+ require 'finnhub_ruby'
13
14
 
14
- instance = FinnhubRuby::Trend.new(adx: null)
15
+ instance = FinnhubRuby::Trend.new(
16
+ adx: null,
17
+ trending: null
18
+ )
15
19
  ```
16
20
 
17
-
@@ -0,0 +1,30 @@
1
+ # FinnhubRuby::TwitterSentimentContent
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **mention** | **Integer** | Number of mentions | [optional] |
8
+ | **positive_mention** | **Integer** | Number of positive mentions | [optional] |
9
+ | **negative_mention** | **Integer** | Number of negative mentions | [optional] |
10
+ | **positive_score** | **Float** | Positive score. Range 0-1 | [optional] |
11
+ | **negative_score** | **Float** | Negative score. Range 0-1 | [optional] |
12
+ | **score** | **Float** | Final score. Range: -1 to 1 with 1 is very positive and -1 is very negative | [optional] |
13
+ | **at_time** | **String** | Period. | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'finnhub_ruby'
19
+
20
+ instance = FinnhubRuby::TwitterSentimentContent.new(
21
+ mention: null,
22
+ positive_mention: null,
23
+ negative_mention: null,
24
+ positive_score: null,
25
+ negative_score: null,
26
+ score: null,
27
+ at_time: null
28
+ )
29
+ ```
30
+
@@ -2,26 +2,27 @@
2
2
 
3
3
  ## Properties
4
4
 
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **symbol** | **String** | Company symbol. | [optional]
8
- **grade_time** | **Integer** | Upgrade/downgrade time in UNIX timestamp. | [optional]
9
- **from_grade** | **String** | From grade. | [optional]
10
- **to_grade** | **String** | To grade. | [optional]
11
- **company** | **String** | Company/analyst who did the upgrade/downgrade. | [optional]
12
- **action** | **String** | Action can take any of the following values: <code>up(upgrade), down(downgrade), main(maintains), init(initiate), reit(reiterate)</code>. | [optional]
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **symbol** | **String** | Company symbol. | [optional] |
8
+ | **grade_time** | **Integer** | Upgrade/downgrade time in UNIX timestamp. | [optional] |
9
+ | **from_grade** | **String** | From grade. | [optional] |
10
+ | **to_grade** | **String** | To grade. | [optional] |
11
+ | **company** | **String** | Company/analyst who did the upgrade/downgrade. | [optional] |
12
+ | **action** | **String** | Action can take any of the following values: <code>up(upgrade), down(downgrade), main(maintains), init(initiate), reit(reiterate)</code>. | [optional] |
13
13
 
14
- ## Code Sample
14
+ ## Example
15
15
 
16
16
  ```ruby
17
- require 'FinnhubRuby'
17
+ require 'finnhub_ruby'
18
18
 
19
- instance = FinnhubRuby::UpgradeDowngrade.new(symbol: null,
20
- grade_time: null,
21
- from_grade: null,
22
- to_grade: null,
23
- company: null,
24
- action: null)
19
+ instance = FinnhubRuby::UpgradeDowngrade.new(
20
+ symbol: null,
21
+ grade_time: null,
22
+ from_grade: null,
23
+ to_grade: null,
24
+ company: null,
25
+ action: null
26
+ )
25
27
  ```
26
28
 
27
-
Binary file
data/finnhub_ruby.gemspec CHANGED
@@ -8,7 +8,7 @@
8
8
  The version of the OpenAPI document: 1.0.0
9
9
 
10
10
  Generated by: https://openapi-generator.tech
11
- OpenAPI Generator version: 4.3.1
11
+ OpenAPI Generator version: 5.2.0
12
12
 
13
13
  =end
14
14
 
@@ -19,16 +19,15 @@ Gem::Specification.new do |s|
19
19
  s.name = "finnhub_ruby"
20
20
  s.version = FinnhubRuby::VERSION
21
21
  s.platform = Gem::Platform::RUBY
22
- s.authors = ["Finnhub"]
23
- s.email = ["finnhub@support.io"]
24
- s.homepage = "https://finnhub.io/"
22
+ s.authors = ["OpenAPI-Generator"]
23
+ s.email = [""]
24
+ s.homepage = "https://openapi-generator.tech"
25
25
  s.summary = "Finnhub API Ruby Gem"
26
- s.description = "Finnhub API Client for Ruby"
27
- s.license = "Apache-2.0"
28
- s.required_ruby_version = ">= 1.9"
26
+ s.description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)"
27
+ s.license = "Unlicense"
28
+ s.required_ruby_version = ">= 2.4"
29
29
 
30
30
  s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
- s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
31
 
33
32
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
33
 
data/lib/finnhub_ruby.rb CHANGED
@@ -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: 4.3.1
9
+ OpenAPI Generator version: 5.2.0
10
10
 
11
11
  =end
12
12
 
@@ -19,8 +19,10 @@ require 'finnhub_ruby/configuration'
19
19
  # Models
20
20
  require 'finnhub_ruby/models/aggregate_indicators'
21
21
  require 'finnhub_ruby/models/basic_financials'
22
+ require 'finnhub_ruby/models/breakdown_item'
22
23
  require 'finnhub_ruby/models/company'
23
24
  require 'finnhub_ruby/models/company_executive'
25
+ require 'finnhub_ruby/models/company_news'
24
26
  require 'finnhub_ruby/models/company_news_statistics'
25
27
  require 'finnhub_ruby/models/company_profile'
26
28
  require 'finnhub_ruby/models/company_profile2'
@@ -30,6 +32,16 @@ require 'finnhub_ruby/models/crypto_candles'
30
32
  require 'finnhub_ruby/models/crypto_symbol'
31
33
  require 'finnhub_ruby/models/development'
32
34
  require 'finnhub_ruby/models/dividends'
35
+ require 'finnhub_ruby/models/dividends2'
36
+ require 'finnhub_ruby/models/dividends2_info'
37
+ require 'finnhub_ruby/models/etf_country_exposure_data'
38
+ require 'finnhub_ruby/models/etf_holdings_data'
39
+ require 'finnhub_ruby/models/etf_profile_data'
40
+ require 'finnhub_ruby/models/etf_sector_exposure_data'
41
+ require 'finnhub_ruby/models/etfs_country_exposure'
42
+ require 'finnhub_ruby/models/etfs_holdings'
43
+ require 'finnhub_ruby/models/etfs_profile'
44
+ require 'finnhub_ruby/models/etfs_sector_exposure'
33
45
  require 'finnhub_ruby/models/earning_estimate'
34
46
  require 'finnhub_ruby/models/earning_release'
35
47
  require 'finnhub_ruby/models/earning_result'
@@ -40,41 +52,72 @@ require 'finnhub_ruby/models/earnings_estimates'
40
52
  require 'finnhub_ruby/models/economic_calendar'
41
53
  require 'finnhub_ruby/models/economic_code'
42
54
  require 'finnhub_ruby/models/economic_data'
55
+ require 'finnhub_ruby/models/economic_data_info'
43
56
  require 'finnhub_ruby/models/economic_event'
44
57
  require 'finnhub_ruby/models/estimate'
58
+ require 'finnhub_ruby/models/fda_comittee_meeting'
45
59
  require 'finnhub_ruby/models/filing'
60
+ require 'finnhub_ruby/models/filing_sentiment'
46
61
  require 'finnhub_ruby/models/financial_statements'
47
62
  require 'finnhub_ruby/models/financials_as_reported'
48
63
  require 'finnhub_ruby/models/forex_candles'
49
64
  require 'finnhub_ruby/models/forex_symbol'
50
65
  require 'finnhub_ruby/models/forexrates'
51
66
  require 'finnhub_ruby/models/fund_ownership'
67
+ require 'finnhub_ruby/models/fund_ownership_info'
68
+ require 'finnhub_ruby/models/historical_nbbo'
52
69
  require 'finnhub_ruby/models/ipo_calendar'
53
70
  require 'finnhub_ruby/models/ipo_event'
71
+ require 'finnhub_ruby/models/index_historical_constituent'
54
72
  require 'finnhub_ruby/models/indicator'
55
- require 'finnhub_ruby/models/investor'
56
- require 'finnhub_ruby/models/investors_ownership'
73
+ require 'finnhub_ruby/models/indices_constituents'
74
+ require 'finnhub_ruby/models/indices_historical_constituents'
75
+ require 'finnhub_ruby/models/insider_transactions'
76
+ require 'finnhub_ruby/models/international_filing'
77
+ require 'finnhub_ruby/models/investment_theme_portfolio'
78
+ require 'finnhub_ruby/models/investment_themes'
79
+ require 'finnhub_ruby/models/key_customers_suppliers'
57
80
  require 'finnhub_ruby/models/last_bid_ask'
58
- require 'finnhub_ruby/models/major_developments'
59
- require 'finnhub_ruby/models/news'
81
+ require 'finnhub_ruby/models/market_news'
82
+ require 'finnhub_ruby/models/mutual_fund_country_exposure'
83
+ require 'finnhub_ruby/models/mutual_fund_country_exposure_data'
84
+ require 'finnhub_ruby/models/mutual_fund_holdings'
85
+ require 'finnhub_ruby/models/mutual_fund_holdings_data'
86
+ require 'finnhub_ruby/models/mutual_fund_profile'
87
+ require 'finnhub_ruby/models/mutual_fund_profile_data'
88
+ require 'finnhub_ruby/models/mutual_fund_sector_exposure'
89
+ require 'finnhub_ruby/models/mutual_fund_sector_exposure_data'
60
90
  require 'finnhub_ruby/models/news_sentiment'
91
+ require 'finnhub_ruby/models/ownership'
92
+ require 'finnhub_ruby/models/ownership_info'
61
93
  require 'finnhub_ruby/models/pattern_recognition'
94
+ require 'finnhub_ruby/models/press_release'
62
95
  require 'finnhub_ruby/models/price_target'
63
96
  require 'finnhub_ruby/models/quote'
64
97
  require 'finnhub_ruby/models/recommendation_trend'
98
+ require 'finnhub_ruby/models/reddit_sentiment_content'
65
99
  require 'finnhub_ruby/models/report'
100
+ require 'finnhub_ruby/models/revenue_breakdown'
66
101
  require 'finnhub_ruby/models/revenue_estimates'
102
+ require 'finnhub_ruby/models/sec_sentiment_analysis'
67
103
  require 'finnhub_ruby/models/sentiment'
104
+ require 'finnhub_ruby/models/similarity_index'
105
+ require 'finnhub_ruby/models/social_sentiment'
68
106
  require 'finnhub_ruby/models/split'
69
- require 'finnhub_ruby/models/stock'
70
107
  require 'finnhub_ruby/models/stock_candles'
108
+ require 'finnhub_ruby/models/stock_symbol'
71
109
  require 'finnhub_ruby/models/stock_transcripts'
110
+ require 'finnhub_ruby/models/supply_chain_relationships'
72
111
  require 'finnhub_ruby/models/support_resistance'
112
+ require 'finnhub_ruby/models/symbol_lookup'
113
+ require 'finnhub_ruby/models/symbol_lookup_info'
73
114
  require 'finnhub_ruby/models/technical_analysis'
74
115
  require 'finnhub_ruby/models/tick_data'
116
+ require 'finnhub_ruby/models/transactions'
75
117
  require 'finnhub_ruby/models/transcript_content'
76
118
  require 'finnhub_ruby/models/transcript_participant'
77
119
  require 'finnhub_ruby/models/trend'
120
+ require 'finnhub_ruby/models/twitter_sentiment_content'
78
121
  require 'finnhub_ruby/models/upgrade_downgrade'
79
122
 
80
123
  # APIs
@@ -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: 4.3.1
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[:body]
68
+ post_body = opts[:debug_body]
69
69
 
70
70
  # return_type
71
- return_type = opts[:return_type] || 'AggregateIndicators'
71
+ return_type = opts[:debug_return_type] || 'AggregateIndicators'
72
72
 
73
73
  # auth_names
74
- auth_names = opts[:auth_names] || ['api_key']
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, price, valuation, margin</code>
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, price, valuation, margin</code>
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[:body]
139
+ post_body = opts[:debug_body]
139
140
 
140
141
  # return_type
141
- return_type = opts[:return_type] || 'BasicFinancials'
142
+ return_type = opts[:debug_return_type] || 'BasicFinancials'
142
143
 
143
144
  # auth_names
144
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
206
+ post_body = opts[:debug_body]
205
207
 
206
208
  # return_type
207
- return_type = opts[:return_type] || 'Array<EarningResult>'
209
+ return_type = opts[:debug_return_type] || 'Array<EarningResult>'
208
210
 
209
211
  # auth_names
210
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
273
+ post_body = opts[:debug_body]
271
274
 
272
275
  # return_type
273
- return_type = opts[:return_type] || 'EarningsEstimates'
276
+ return_type = opts[:debug_return_type] || 'EarningsEstimates'
274
277
 
275
278
  # auth_names
276
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
337
+ post_body = opts[:debug_body]
334
338
 
335
339
  # return_type
336
- return_type = opts[:return_type] || 'CompanyExecutive'
340
+ return_type = opts[:debug_return_type] || 'CompanyExecutive'
337
341
 
338
342
  # auth_names
339
- auth_names = opts[:auth_names] || ['api_key']
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 &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
361
366
  # @param to [Date] To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
362
367
  # @param [Hash] opts the optional parameters
363
- # @return [Array<News>]
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 &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
373
378
  # @param to [Date] To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
374
379
  # @param [Hash] opts the optional parameters
375
- # @return [Array<(Array<News>, Integer, Hash)>] Array<News> data, response status code and response headers
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[:body]
415
+ post_body = opts[:debug_body]
411
416
 
412
417
  # return_type
413
- return_type = opts[:return_type] || 'Array<News>'
418
+ return_type = opts[:debug_return_type] || 'Array<CompanyNews>'
414
419
 
415
420
  # auth_names
416
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
479
+ post_body = opts[:debug_body]
474
480
 
475
481
  # return_type
476
- return_type = opts[:return_type] || 'Array<String>'
482
+ return_type = opts[:debug_return_type] || 'Array<String>'
477
483
 
478
484
  # auth_names
479
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
545
+ post_body = opts[:debug_body]
539
546
 
540
547
  # return_type
541
- return_type = opts[:return_type] || 'CompanyProfile'
548
+ return_type = opts[:debug_return_type] || 'CompanyProfile'
542
549
 
543
550
  # auth_names
544
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
611
+ post_body = opts[:debug_body]
604
612
 
605
613
  # return_type
606
- return_type = opts[:return_type] || 'CompanyProfile2'
614
+ return_type = opts[:debug_return_type] || 'CompanyProfile2'
607
615
 
608
616
  # auth_names
609
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
678
+ post_body = opts[:debug_body]
670
679
 
671
680
  # return_type
672
- return_type = opts[:return_type] || 'RevenueEstimates'
681
+ return_type = opts[:debug_return_type] || 'RevenueEstimates'
673
682
 
674
683
  # auth_names
675
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
735
+ post_body = opts[:debug_body]
726
736
 
727
737
  # return_type
728
- return_type = opts[:return_type] || 'Array<CountryMetadata>'
738
+ return_type = opts[:debug_return_type] || 'Array<CountryMetadata>'
729
739
 
730
740
  # auth_names
731
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
792
+ post_body = opts[:debug_body]
782
793
 
783
794
  # return_type
784
- return_type = opts[:return_type] || 'Array<CovidInfo>'
795
+ return_type = opts[:debug_return_type] || 'Array<CovidInfo>'
785
796
 
786
797
  # auth_names
787
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
877
+ post_body = opts[:debug_body]
866
878
 
867
879
  # return_type
868
- return_type = opts[:return_type] || 'CryptoCandles'
880
+ return_type = opts[:debug_return_type] || 'CryptoCandles'
869
881
 
870
882
  # auth_names
871
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
934
+ post_body = opts[:debug_body]
922
935
 
923
936
  # return_type
924
- return_type = opts[:return_type] || 'Array<String>'
937
+ return_type = opts[:debug_return_type] || 'Array<String>'
925
938
 
926
939
  # auth_names
927
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
998
+ post_body = opts[:debug_body]
985
999
 
986
1000
  # return_type
987
- return_type = opts[:return_type] || 'Array<CryptoSymbol>'
1001
+ return_type = opts[:debug_return_type] || 'Array<CryptoSymbol>'
988
1002
 
989
1003
  # auth_names
990
- auth_names = opts[:auth_names] || ['api_key']
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,12 +1021,12 @@ module FinnhubRuby
1006
1021
  end
1007
1022
 
1008
1023
  # Earnings Calendar
1009
- # Get historical and coming earnings release dating back to 2003. You can setup <a href=\"#webhook\">webhook</a> to receive real-time earnings update.
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.
1013
1028
  # @option opts [String] :symbol Filter by symbol: AAPL.
1014
- # @option opts [AnyType] :international Set to &lt;code&gt;true&lt;/code&gt; to include international markets. Default value is &lt;code&gt;false&lt;/code&gt;
1029
+ # @option opts [Boolean] :international Set to &lt;code&gt;true&lt;/code&gt; to include international markets. Default value is &lt;code&gt;false&lt;/code&gt;
1015
1030
  # @return [EarningsCalendar]
1016
1031
  def earnings_calendar(opts = {})
1017
1032
  data, _status_code, _headers = earnings_calendar_with_http_info(opts)
@@ -1019,12 +1034,12 @@ module FinnhubRuby
1019
1034
  end
1020
1035
 
1021
1036
  # Earnings Calendar
1022
- # Get historical and coming earnings release dating back to 2003. You can setup &lt;a href&#x3D;\&quot;#webhook\&quot;&gt;webhook&lt;/a&gt; to receive real-time earnings update.
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.
1026
1041
  # @option opts [String] :symbol Filter by symbol: AAPL.
1027
- # @option opts [AnyType] :international Set to &lt;code&gt;true&lt;/code&gt; to include international markets. Default value is &lt;code&gt;false&lt;/code&gt;
1042
+ # @option opts [Boolean] :international Set to &lt;code&gt;true&lt;/code&gt; to include international markets. Default value is &lt;code&gt;false&lt;/code&gt;
1028
1043
  # @return [Array<(EarningsCalendar, Integer, Hash)>] EarningsCalendar data, response status code and response headers
1029
1044
  def earnings_calendar_with_http_info(opts = {})
1030
1045
  if @api_client.config.debugging
@@ -1049,15 +1064,16 @@ module FinnhubRuby
1049
1064
  form_params = opts[:form_params] || {}
1050
1065
 
1051
1066
  # http body (model)
1052
- post_body = opts[:body]
1067
+ post_body = opts[:debug_body]
1053
1068
 
1054
1069
  # return_type
1055
- return_type = opts[:return_type] || 'EarningsCalendar'
1070
+ return_type = opts[:debug_return_type] || 'EarningsCalendar'
1056
1071
 
1057
1072
  # auth_names
1058
- auth_names = opts[:auth_names] || ['api_key']
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
+ # &lt;p&gt;Get recent and upcoming economic releases.&lt;/p&gt;&lt;p&gt;Historical events and surprises are available for Enterprise clients.&lt;/p&gt;
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[:body]
1181
+ post_body = opts[:debug_body]
1109
1182
 
1110
1183
  # return_type
1111
- return_type = opts[:return_type] || 'Array<EconomicCode>'
1184
+ return_type = opts[:debug_return_type] || 'Array<EconomicCode>'
1112
1185
 
1113
1186
  # auth_names
1114
- auth_names = opts[:auth_names] || ['api_key']
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[:body]
1245
+ post_body = opts[:debug_body]
1172
1246
 
1173
1247
  # return_type
1174
- return_type = opts[:return_type] || 'EconomicData'
1248
+ return_type = opts[:debug_return_type] || 'EconomicData'
1175
1249
 
1176
1250
  # auth_names
1177
- auth_names = opts[:auth_names] || ['api_key']
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,
@@ -1192,46 +1267,101 @@ module FinnhubRuby
1192
1267
  return data, status_code, headers
1193
1268
  end
1194
1269
 
1195
- # Filings
1196
- # 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>.
1270
+ # ETFs Country Exposure
1271
+ # Get ETF country exposure data.
1272
+ # @param symbol [String] ETF symbol.
1197
1273
  # @param [Hash] opts the optional parameters
1198
- # @option opts [String] :symbol Symbol. Leave &lt;code&gt;symbol&lt;/code&gt;,&lt;code&gt;cik&lt;/code&gt; and &lt;code&gt;accessNumber&lt;/code&gt; empty to list latest filings.
1199
- # @option opts [String] :cik CIK.
1200
- # @option opts [String] :access_number Access number of a specific report you want to retrieve data from.
1201
- # @option opts [String] :form Filter by form. You can use this value &lt;code&gt;NT 10-K&lt;/code&gt; to find non-timely filings for a company.
1202
- # @option opts [Date] :from From date: 2020-03-15.
1203
- # @option opts [Date] :to To date: 2020-03-16.
1204
- # @return [Array<Filing>]
1205
- def filings(opts = {})
1206
- data, _status_code, _headers = filings_with_http_info(opts)
1274
+ # @return [ETFsCountryExposure]
1275
+ def etfs_country_exposure(symbol, opts = {})
1276
+ data, _status_code, _headers = etfs_country_exposure_with_http_info(symbol, opts)
1207
1277
  data
1208
1278
  end
1209
1279
 
1210
- # Filings
1211
- # List company&#39;s filing. Limit to 250 documents at a time. This data is available for bulk download on &lt;a href&#x3D;\&quot;https://www.kaggle.com/finnhub/sec-filings\&quot; target&#x3D;\&quot;_blank\&quot;&gt;Kaggle SEC Filings database&lt;/a&gt;.
1280
+ # ETFs Country Exposure
1281
+ # Get ETF country exposure data.
1282
+ # @param symbol [String] ETF symbol.
1212
1283
  # @param [Hash] opts the optional parameters
1213
- # @option opts [String] :symbol Symbol. Leave &lt;code&gt;symbol&lt;/code&gt;,&lt;code&gt;cik&lt;/code&gt; and &lt;code&gt;accessNumber&lt;/code&gt; empty to list latest filings.
1214
- # @option opts [String] :cik CIK.
1215
- # @option opts [String] :access_number Access number of a specific report you want to retrieve data from.
1216
- # @option opts [String] :form Filter by form. You can use this value &lt;code&gt;NT 10-K&lt;/code&gt; to find non-timely filings for a company.
1217
- # @option opts [Date] :from From date: 2020-03-15.
1218
- # @option opts [Date] :to To date: 2020-03-16.
1219
- # @return [Array<(Array<Filing>, Integer, Hash)>] Array<Filing> data, response status code and response headers
1220
- def filings_with_http_info(opts = {})
1284
+ # @return [Array<(ETFsCountryExposure, Integer, Hash)>] ETFsCountryExposure data, response status code and response headers
1285
+ def etfs_country_exposure_with_http_info(symbol, opts = {})
1221
1286
  if @api_client.config.debugging
1222
- @api_client.config.logger.debug 'Calling API: DefaultApi.filings ...'
1287
+ @api_client.config.logger.debug 'Calling API: DefaultApi.etfs_country_exposure ...'
1288
+ end
1289
+ # verify the required parameter 'symbol' is set
1290
+ if @api_client.config.client_side_validation && symbol.nil?
1291
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.etfs_country_exposure"
1223
1292
  end
1224
1293
  # resource path
1225
- local_var_path = '/stock/filings'
1294
+ local_var_path = '/etf/country'
1295
+
1296
+ # query parameters
1297
+ query_params = opts[:query_params] || {}
1298
+ query_params[:'symbol'] = symbol
1299
+
1300
+ # header parameters
1301
+ header_params = opts[:header_params] || {}
1302
+ # HTTP header 'Accept' (if needed)
1303
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1304
+
1305
+ # form parameters
1306
+ form_params = opts[:form_params] || {}
1307
+
1308
+ # http body (model)
1309
+ post_body = opts[:debug_body]
1310
+
1311
+ # return_type
1312
+ return_type = opts[:debug_return_type] || 'ETFsCountryExposure'
1313
+
1314
+ # auth_names
1315
+ auth_names = opts[:debug_auth_names] || ['api_key']
1316
+
1317
+ new_options = opts.merge(
1318
+ :operation => :"DefaultApi.etfs_country_exposure",
1319
+ :header_params => header_params,
1320
+ :query_params => query_params,
1321
+ :form_params => form_params,
1322
+ :body => post_body,
1323
+ :auth_names => auth_names,
1324
+ :return_type => return_type
1325
+ )
1326
+
1327
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1328
+ if @api_client.config.debugging
1329
+ @api_client.config.logger.debug "API called: DefaultApi#etfs_country_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1330
+ end
1331
+ return data, status_code, headers
1332
+ end
1333
+
1334
+ # ETFs Holdings
1335
+ # Get full ETF holdings/constituents. This endpoint has global coverage. Widget only shows top 10 holdings.
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&#x3D;0 or not set.
1340
+ # @return [ETFsHoldings]
1341
+ def etfs_holdings(opts = {})
1342
+ data, _status_code, _headers = etfs_holdings_with_http_info(opts)
1343
+ data
1344
+ end
1345
+
1346
+ # ETFs Holdings
1347
+ # Get full ETF holdings/constituents. This endpoint has global coverage. Widget only shows top 10 holdings.
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&#x3D;0 or not set.
1352
+ # @return [Array<(ETFsHoldings, Integer, Hash)>] ETFsHoldings data, response status code and response headers
1353
+ def etfs_holdings_with_http_info(opts = {})
1354
+ if @api_client.config.debugging
1355
+ @api_client.config.logger.debug 'Calling API: DefaultApi.etfs_holdings ...'
1356
+ end
1357
+ # resource path
1358
+ local_var_path = '/etf/holdings'
1226
1359
 
1227
1360
  # query parameters
1228
1361
  query_params = opts[:query_params] || {}
1229
1362
  query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
1230
- query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil?
1231
- query_params[:'accessNumber'] = opts[:'access_number'] if !opts[:'access_number'].nil?
1232
- query_params[:'form'] = opts[:'form'] if !opts[:'form'].nil?
1233
- query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
1234
- query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
1363
+ query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil?
1364
+ query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
1235
1365
 
1236
1366
  # header parameters
1237
1367
  header_params = opts[:header_params] || {}
@@ -1242,15 +1372,16 @@ module FinnhubRuby
1242
1372
  form_params = opts[:form_params] || {}
1243
1373
 
1244
1374
  # http body (model)
1245
- post_body = opts[:body]
1375
+ post_body = opts[:debug_body]
1246
1376
 
1247
1377
  # return_type
1248
- return_type = opts[:return_type] || 'Array<Filing>'
1378
+ return_type = opts[:debug_return_type] || 'ETFsHoldings'
1249
1379
 
1250
1380
  # auth_names
1251
- auth_names = opts[:auth_names] || ['api_key']
1381
+ auth_names = opts[:debug_auth_names] || ['api_key']
1252
1382
 
1253
1383
  new_options = opts.merge(
1384
+ :operation => :"DefaultApi.etfs_holdings",
1254
1385
  :header_params => header_params,
1255
1386
  :query_params => query_params,
1256
1387
  :form_params => form_params,
@@ -1261,54 +1392,160 @@ module FinnhubRuby
1261
1392
 
1262
1393
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1263
1394
  if @api_client.config.debugging
1264
- @api_client.config.logger.debug "API called: DefaultApi#filings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1395
+ @api_client.config.logger.debug "API called: DefaultApi#etfs_holdings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1265
1396
  end
1266
1397
  return data, status_code, headers
1267
1398
  end
1268
1399
 
1269
- # Financial Statements
1270
- # Get standardized balance sheet, income statement and cash flow for global companies going back 30+ years.
1271
- # @param symbol [String] Symbol of the company: AAPL.
1272
- # @param statement [String] Statement can take 1 of these values &lt;code&gt;bs, ic, cf&lt;/code&gt; for Balance Sheet, Income Statement, Cash Flow respectively.
1273
- # @param freq [String] Frequency can take 1 of these values &lt;code&gt;annual, quarterly, ttm, ytd&lt;/code&gt;. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow.
1400
+ # ETFs Profile
1401
+ # Get ETF profile information. This endpoint has global coverage.
1274
1402
  # @param [Hash] opts the optional parameters
1275
- # @return [FinancialStatements]
1276
- def financials(symbol, statement, freq, opts = {})
1277
- data, _status_code, _headers = financials_with_http_info(symbol, statement, freq, opts)
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)
1278
1408
  data
1279
1409
  end
1280
1410
 
1281
- # Financial Statements
1282
- # Get standardized balance sheet, income statement and cash flow for global companies going back 30+ years.
1283
- # @param symbol [String] Symbol of the company: AAPL.
1284
- # @param statement [String] Statement can take 1 of these values &lt;code&gt;bs, ic, cf&lt;/code&gt; for Balance Sheet, Income Statement, Cash Flow respectively.
1285
- # @param freq [String] Frequency can take 1 of these values &lt;code&gt;annual, quarterly, ttm, ytd&lt;/code&gt;. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow.
1411
+ # ETFs Profile
1412
+ # Get ETF profile information. This endpoint has global coverage.
1286
1413
  # @param [Hash] opts the optional parameters
1287
- # @return [Array<(FinancialStatements, Integer, Hash)>] FinancialStatements data, response status code and response headers
1288
- def financials_with_http_info(symbol, statement, freq, opts = {})
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 = {})
1289
1418
  if @api_client.config.debugging
1290
- @api_client.config.logger.debug 'Calling API: DefaultApi.financials ...'
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.
1465
+ # @param symbol [String] ETF symbol.
1466
+ # @param [Hash] opts the optional parameters
1467
+ # @return [ETFsSectorExposure]
1468
+ def etfs_sector_exposure(symbol, opts = {})
1469
+ data, _status_code, _headers = etfs_sector_exposure_with_http_info(symbol, opts)
1470
+ data
1471
+ end
1472
+
1473
+ # ETFs Sector Exposure
1474
+ # Get ETF sector exposure data.
1475
+ # @param symbol [String] ETF symbol.
1476
+ # @param [Hash] opts the optional parameters
1477
+ # @return [Array<(ETFsSectorExposure, Integer, Hash)>] ETFsSectorExposure data, response status code and response headers
1478
+ def etfs_sector_exposure_with_http_info(symbol, opts = {})
1479
+ if @api_client.config.debugging
1480
+ @api_client.config.logger.debug 'Calling API: DefaultApi.etfs_sector_exposure ...'
1291
1481
  end
1292
1482
  # verify the required parameter 'symbol' is set
1293
1483
  if @api_client.config.client_side_validation && symbol.nil?
1294
- fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.financials"
1484
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.etfs_sector_exposure"
1295
1485
  end
1296
- # verify the required parameter 'statement' is set
1297
- if @api_client.config.client_side_validation && statement.nil?
1298
- fail ArgumentError, "Missing the required parameter 'statement' when calling DefaultApi.financials"
1486
+ # resource path
1487
+ local_var_path = '/etf/sector'
1488
+
1489
+ # query parameters
1490
+ query_params = opts[:query_params] || {}
1491
+ query_params[:'symbol'] = symbol
1492
+
1493
+ # header parameters
1494
+ header_params = opts[:header_params] || {}
1495
+ # HTTP header 'Accept' (if needed)
1496
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1497
+
1498
+ # form parameters
1499
+ form_params = opts[:form_params] || {}
1500
+
1501
+ # http body (model)
1502
+ post_body = opts[:debug_body]
1503
+
1504
+ # return_type
1505
+ return_type = opts[:debug_return_type] || 'ETFsSectorExposure'
1506
+
1507
+ # auth_names
1508
+ auth_names = opts[:debug_auth_names] || ['api_key']
1509
+
1510
+ new_options = opts.merge(
1511
+ :operation => :"DefaultApi.etfs_sector_exposure",
1512
+ :header_params => header_params,
1513
+ :query_params => query_params,
1514
+ :form_params => form_params,
1515
+ :body => post_body,
1516
+ :auth_names => auth_names,
1517
+ :return_type => return_type
1518
+ )
1519
+
1520
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1521
+ if @api_client.config.debugging
1522
+ @api_client.config.logger.debug "API called: DefaultApi#etfs_sector_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1299
1523
  end
1300
- # verify the required parameter 'freq' is set
1301
- if @api_client.config.client_side_validation && freq.nil?
1302
- fail ArgumentError, "Missing the required parameter 'freq' when calling DefaultApi.financials"
1524
+ return data, status_code, headers
1525
+ end
1526
+
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.
1529
+ # @param [Hash] opts the optional parameters
1530
+ # @return [Array<FDAComitteeMeeting>]
1531
+ def fda_committee_meeting_calendar(opts = {})
1532
+ data, _status_code, _headers = fda_committee_meeting_calendar_with_http_info(opts)
1533
+ data
1534
+ end
1535
+
1536
+ # FDA Committee Meeting Calendar
1537
+ # FDA&#39;s advisory committees are established to provide functions which support the agency&#39;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.
1538
+ # @param [Hash] opts the optional parameters
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 = {})
1541
+ if @api_client.config.debugging
1542
+ @api_client.config.logger.debug 'Calling API: DefaultApi.fda_committee_meeting_calendar ...'
1303
1543
  end
1304
1544
  # resource path
1305
- local_var_path = '/stock/financials'
1545
+ local_var_path = '/fda-advisory-committee-calendar'
1306
1546
 
1307
1547
  # query parameters
1308
1548
  query_params = opts[:query_params] || {}
1309
- query_params[:'symbol'] = symbol
1310
- query_params[:'statement'] = statement
1311
- query_params[:'freq'] = freq
1312
1549
 
1313
1550
  # header parameters
1314
1551
  header_params = opts[:header_params] || {}
@@ -1319,15 +1556,16 @@ module FinnhubRuby
1319
1556
  form_params = opts[:form_params] || {}
1320
1557
 
1321
1558
  # http body (model)
1322
- post_body = opts[:body]
1559
+ post_body = opts[:debug_body]
1323
1560
 
1324
1561
  # return_type
1325
- return_type = opts[:return_type] || 'FinancialStatements'
1562
+ return_type = opts[:debug_return_type] || 'Array<FDAComitteeMeeting>'
1326
1563
 
1327
1564
  # auth_names
1328
- auth_names = opts[:auth_names] || ['api_key']
1565
+ auth_names = opts[:debug_auth_names] || ['api_key']
1329
1566
 
1330
1567
  new_options = opts.merge(
1568
+ :operation => :"DefaultApi.fda_committee_meeting_calendar",
1331
1569
  :header_params => header_params,
1332
1570
  :query_params => query_params,
1333
1571
  :form_params => form_params,
@@ -1338,45 +1576,1122 @@ module FinnhubRuby
1338
1576
 
1339
1577
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1340
1578
  if @api_client.config.debugging
1341
- @api_client.config.logger.debug "API called: DefaultApi#financials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1579
+ @api_client.config.logger.debug "API called: DefaultApi#fda_committee_meeting_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1342
1580
  end
1343
1581
  return data, status_code, headers
1344
1582
  end
1345
1583
 
1346
- # Financials As Reported
1347
- # Get financials as reported. This data is available for bulk download on <a href=\"https://www.kaggle.com/finnhub/reported-financials\" target=\"_blank\">Kaggle SEC Financials database</a>.
1584
+ # SEC Filings
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>.
1348
1586
  # @param [Hash] opts the optional parameters
1349
- # @option opts [String] :symbol Symbol.
1587
+ # @option opts [String] :symbol Symbol. Leave &lt;code&gt;symbol&lt;/code&gt;,&lt;code&gt;cik&lt;/code&gt; and &lt;code&gt;accessNumber&lt;/code&gt; empty to list latest filings.
1350
1588
  # @option opts [String] :cik CIK.
1351
- # @option opts [String] :access_number Access number of a specific report you want to retrieve financials from.
1352
- # @option opts [String] :freq Frequency. Can be either &lt;code&gt;annual&lt;/code&gt; or &lt;code&gt;quarterly&lt;/code&gt;. Default to &lt;code&gt;annual&lt;/code&gt;.
1353
- # @return [FinancialsAsReported]
1354
- def financials_reported(opts = {})
1355
- data, _status_code, _headers = financials_reported_with_http_info(opts)
1589
+ # @option opts [String] :access_number Access number of a specific report you want to retrieve data from.
1590
+ # @option opts [String] :form Filter by form. You can use this value &lt;code&gt;NT 10-K&lt;/code&gt; to find non-timely filings for a company.
1591
+ # @option opts [Date] :from From date: 2020-03-15.
1592
+ # @option opts [Date] :to To date: 2020-03-16.
1593
+ # @return [Array<Filing>]
1594
+ def filings(opts = {})
1595
+ data, _status_code, _headers = filings_with_http_info(opts)
1356
1596
  data
1357
1597
  end
1358
1598
 
1359
- # Financials As Reported
1360
- # Get financials as reported. This data is available for bulk download on &lt;a href&#x3D;\&quot;https://www.kaggle.com/finnhub/reported-financials\&quot; target&#x3D;\&quot;_blank\&quot;&gt;Kaggle SEC Financials database&lt;/a&gt;.
1599
+ # SEC Filings
1600
+ # List company&#39;s filing. Limit to 250 documents at a time. This data is available for bulk download on &lt;a href&#x3D;\&quot;https://www.kaggle.com/finnhub/sec-filings\&quot; target&#x3D;\&quot;_blank\&quot;&gt;Kaggle SEC Filings database&lt;/a&gt;.
1361
1601
  # @param [Hash] opts the optional parameters
1362
- # @option opts [String] :symbol Symbol.
1602
+ # @option opts [String] :symbol Symbol. Leave &lt;code&gt;symbol&lt;/code&gt;,&lt;code&gt;cik&lt;/code&gt; and &lt;code&gt;accessNumber&lt;/code&gt; empty to list latest filings.
1363
1603
  # @option opts [String] :cik CIK.
1364
- # @option opts [String] :access_number Access number of a specific report you want to retrieve financials from.
1365
- # @option opts [String] :freq Frequency. Can be either &lt;code&gt;annual&lt;/code&gt; or &lt;code&gt;quarterly&lt;/code&gt;. Default to &lt;code&gt;annual&lt;/code&gt;.
1366
- # @return [Array<(FinancialsAsReported, Integer, Hash)>] FinancialsAsReported data, response status code and response headers
1367
- def financials_reported_with_http_info(opts = {})
1604
+ # @option opts [String] :access_number Access number of a specific report you want to retrieve data from.
1605
+ # @option opts [String] :form Filter by form. You can use this value &lt;code&gt;NT 10-K&lt;/code&gt; to find non-timely filings for a company.
1606
+ # @option opts [Date] :from From date: 2020-03-15.
1607
+ # @option opts [Date] :to To date: 2020-03-16.
1608
+ # @return [Array<(Array<Filing>, Integer, Hash)>] Array<Filing> data, response status code and response headers
1609
+ def filings_with_http_info(opts = {})
1368
1610
  if @api_client.config.debugging
1369
- @api_client.config.logger.debug 'Calling API: DefaultApi.financials_reported ...'
1611
+ @api_client.config.logger.debug 'Calling API: DefaultApi.filings ...'
1612
+ end
1613
+ # resource path
1614
+ local_var_path = '/stock/filings'
1615
+
1616
+ # query parameters
1617
+ query_params = opts[:query_params] || {}
1618
+ query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
1619
+ query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil?
1620
+ query_params[:'accessNumber'] = opts[:'access_number'] if !opts[:'access_number'].nil?
1621
+ query_params[:'form'] = opts[:'form'] if !opts[:'form'].nil?
1622
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
1623
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
1624
+
1625
+ # header parameters
1626
+ header_params = opts[:header_params] || {}
1627
+ # HTTP header 'Accept' (if needed)
1628
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1629
+
1630
+ # form parameters
1631
+ form_params = opts[:form_params] || {}
1632
+
1633
+ # http body (model)
1634
+ post_body = opts[:debug_body]
1635
+
1636
+ # return_type
1637
+ return_type = opts[:debug_return_type] || 'Array<Filing>'
1638
+
1639
+ # auth_names
1640
+ auth_names = opts[:debug_auth_names] || ['api_key']
1641
+
1642
+ new_options = opts.merge(
1643
+ :operation => :"DefaultApi.filings",
1644
+ :header_params => header_params,
1645
+ :query_params => query_params,
1646
+ :form_params => form_params,
1647
+ :body => post_body,
1648
+ :auth_names => auth_names,
1649
+ :return_type => return_type
1650
+ )
1651
+
1652
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1653
+ if @api_client.config.debugging
1654
+ @api_client.config.logger.debug "API called: DefaultApi#filings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1655
+ end
1656
+ return data, status_code, headers
1657
+ end
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&#39;s stock price in the upcoming 4 quarters. We make use of &lt;a href&#x3D; \&quot;https://sraf.nd.edu/textual-analysis/resources/\&quot; target&#x3D;\&quot;_blank\&quot;&gt;Loughran and McDonald Sentiment Word Lists&lt;/a&gt; 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
+
1723
+ # Financial Statements
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>
1725
+ # @param symbol [String] Symbol of the company: AAPL.
1726
+ # @param statement [String] Statement can take 1 of these values &lt;code&gt;bs, ic, cf&lt;/code&gt; for Balance Sheet, Income Statement, Cash Flow respectively.
1727
+ # @param freq [String] Frequency can take 1 of these values &lt;code&gt;annual, quarterly, ttm, ytd&lt;/code&gt;. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow.
1728
+ # @param [Hash] opts the optional parameters
1729
+ # @return [FinancialStatements]
1730
+ def financials(symbol, statement, freq, opts = {})
1731
+ data, _status_code, _headers = financials_with_http_info(symbol, statement, freq, opts)
1732
+ data
1733
+ end
1734
+
1735
+ # Financial Statements
1736
+ # &lt;p&gt;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 &lt;a href&#x3D;\&quot;#filings\&quot;&gt;SEC Filings&lt;/a&gt; and &lt;a href&#x3D;\&quot;#international-filings\&quot;&gt;International Filings&lt;/a&gt; endpoints.&lt;/p&gt;&lt;p&gt;&lt;i&gt;Wondering why our standardized data is different from Bloomberg, Reuters, Factset, S&amp;P or Yahoo Finance ? Check out our &lt;a href&#x3D;\&quot;/faq\&quot;&gt;FAQ page&lt;/a&gt; to learn more&lt;/i&gt;&lt;/p&gt;
1737
+ # @param symbol [String] Symbol of the company: AAPL.
1738
+ # @param statement [String] Statement can take 1 of these values &lt;code&gt;bs, ic, cf&lt;/code&gt; for Balance Sheet, Income Statement, Cash Flow respectively.
1739
+ # @param freq [String] Frequency can take 1 of these values &lt;code&gt;annual, quarterly, ttm, ytd&lt;/code&gt;. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow.
1740
+ # @param [Hash] opts the optional parameters
1741
+ # @return [Array<(FinancialStatements, Integer, Hash)>] FinancialStatements data, response status code and response headers
1742
+ def financials_with_http_info(symbol, statement, freq, opts = {})
1743
+ if @api_client.config.debugging
1744
+ @api_client.config.logger.debug 'Calling API: DefaultApi.financials ...'
1745
+ end
1746
+ # verify the required parameter 'symbol' is set
1747
+ if @api_client.config.client_side_validation && symbol.nil?
1748
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.financials"
1749
+ end
1750
+ # verify the required parameter 'statement' is set
1751
+ if @api_client.config.client_side_validation && statement.nil?
1752
+ fail ArgumentError, "Missing the required parameter 'statement' when calling DefaultApi.financials"
1753
+ end
1754
+ # verify the required parameter 'freq' is set
1755
+ if @api_client.config.client_side_validation && freq.nil?
1756
+ fail ArgumentError, "Missing the required parameter 'freq' when calling DefaultApi.financials"
1757
+ end
1758
+ # resource path
1759
+ local_var_path = '/stock/financials'
1760
+
1761
+ # query parameters
1762
+ query_params = opts[:query_params] || {}
1763
+ query_params[:'symbol'] = symbol
1764
+ query_params[:'statement'] = statement
1765
+ query_params[:'freq'] = freq
1766
+
1767
+ # header parameters
1768
+ header_params = opts[:header_params] || {}
1769
+ # HTTP header 'Accept' (if needed)
1770
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1771
+
1772
+ # form parameters
1773
+ form_params = opts[:form_params] || {}
1774
+
1775
+ # http body (model)
1776
+ post_body = opts[:debug_body]
1777
+
1778
+ # return_type
1779
+ return_type = opts[:debug_return_type] || 'FinancialStatements'
1780
+
1781
+ # auth_names
1782
+ auth_names = opts[:debug_auth_names] || ['api_key']
1783
+
1784
+ new_options = opts.merge(
1785
+ :operation => :"DefaultApi.financials",
1786
+ :header_params => header_params,
1787
+ :query_params => query_params,
1788
+ :form_params => form_params,
1789
+ :body => post_body,
1790
+ :auth_names => auth_names,
1791
+ :return_type => return_type
1792
+ )
1793
+
1794
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1795
+ if @api_client.config.debugging
1796
+ @api_client.config.logger.debug "API called: DefaultApi#financials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1797
+ end
1798
+ return data, status_code, headers
1799
+ end
1800
+
1801
+ # Financials As Reported
1802
+ # Get financials as reported. This data is available for bulk download on <a href=\"https://www.kaggle.com/finnhub/reported-financials\" target=\"_blank\">Kaggle SEC Financials database</a>.
1803
+ # @param [Hash] opts the optional parameters
1804
+ # @option opts [String] :symbol Symbol.
1805
+ # @option opts [String] :cik CIK.
1806
+ # @option opts [String] :access_number Access number of a specific report you want to retrieve financials from.
1807
+ # @option opts [String] :freq Frequency. Can be either &lt;code&gt;annual&lt;/code&gt; or &lt;code&gt;quarterly&lt;/code&gt;. Default to &lt;code&gt;annual&lt;/code&gt;.
1808
+ # @return [FinancialsAsReported]
1809
+ def financials_reported(opts = {})
1810
+ data, _status_code, _headers = financials_reported_with_http_info(opts)
1811
+ data
1812
+ end
1813
+
1814
+ # Financials As Reported
1815
+ # Get financials as reported. This data is available for bulk download on &lt;a href&#x3D;\&quot;https://www.kaggle.com/finnhub/reported-financials\&quot; target&#x3D;\&quot;_blank\&quot;&gt;Kaggle SEC Financials database&lt;/a&gt;.
1816
+ # @param [Hash] opts the optional parameters
1817
+ # @option opts [String] :symbol Symbol.
1818
+ # @option opts [String] :cik CIK.
1819
+ # @option opts [String] :access_number Access number of a specific report you want to retrieve financials from.
1820
+ # @option opts [String] :freq Frequency. Can be either &lt;code&gt;annual&lt;/code&gt; or &lt;code&gt;quarterly&lt;/code&gt;. Default to &lt;code&gt;annual&lt;/code&gt;.
1821
+ # @return [Array<(FinancialsAsReported, Integer, Hash)>] FinancialsAsReported data, response status code and response headers
1822
+ def financials_reported_with_http_info(opts = {})
1823
+ if @api_client.config.debugging
1824
+ @api_client.config.logger.debug 'Calling API: DefaultApi.financials_reported ...'
1825
+ end
1826
+ # resource path
1827
+ local_var_path = '/stock/financials-reported'
1828
+
1829
+ # query parameters
1830
+ query_params = opts[:query_params] || {}
1831
+ query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
1832
+ query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil?
1833
+ query_params[:'accessNumber'] = opts[:'access_number'] if !opts[:'access_number'].nil?
1834
+ query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil?
1835
+
1836
+ # header parameters
1837
+ header_params = opts[:header_params] || {}
1838
+ # HTTP header 'Accept' (if needed)
1839
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1840
+
1841
+ # form parameters
1842
+ form_params = opts[:form_params] || {}
1843
+
1844
+ # http body (model)
1845
+ post_body = opts[:debug_body]
1846
+
1847
+ # return_type
1848
+ return_type = opts[:debug_return_type] || 'FinancialsAsReported'
1849
+
1850
+ # auth_names
1851
+ auth_names = opts[:debug_auth_names] || ['api_key']
1852
+
1853
+ new_options = opts.merge(
1854
+ :operation => :"DefaultApi.financials_reported",
1855
+ :header_params => header_params,
1856
+ :query_params => query_params,
1857
+ :form_params => form_params,
1858
+ :body => post_body,
1859
+ :auth_names => auth_names,
1860
+ :return_type => return_type
1861
+ )
1862
+
1863
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1864
+ if @api_client.config.debugging
1865
+ @api_client.config.logger.debug "API called: DefaultApi#financials_reported\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1866
+ end
1867
+ return data, status_code, headers
1868
+ end
1869
+
1870
+ # Forex Candles
1871
+ # Get candlestick data for forex symbols.
1872
+ # @param symbol [String] Use symbol returned in &lt;code&gt;/forex/symbol&lt;/code&gt; endpoint for this field.
1873
+ # @param resolution [String] Supported resolution includes &lt;code&gt;1, 5, 15, 30, 60, D, W, M &lt;/code&gt;.Some timeframes might not be available depending on the exchange.
1874
+ # @param from [Integer] UNIX timestamp. Interval initial value.
1875
+ # @param to [Integer] UNIX timestamp. Interval end value.
1876
+ # @param [Hash] opts the optional parameters
1877
+ # @return [ForexCandles]
1878
+ def forex_candles(symbol, resolution, from, to, opts = {})
1879
+ data, _status_code, _headers = forex_candles_with_http_info(symbol, resolution, from, to, opts)
1880
+ data
1881
+ end
1882
+
1883
+ # Forex Candles
1884
+ # Get candlestick data for forex symbols.
1885
+ # @param symbol [String] Use symbol returned in &lt;code&gt;/forex/symbol&lt;/code&gt; endpoint for this field.
1886
+ # @param resolution [String] Supported resolution includes &lt;code&gt;1, 5, 15, 30, 60, D, W, M &lt;/code&gt;.Some timeframes might not be available depending on the exchange.
1887
+ # @param from [Integer] UNIX timestamp. Interval initial value.
1888
+ # @param to [Integer] UNIX timestamp. Interval end value.
1889
+ # @param [Hash] opts the optional parameters
1890
+ # @return [Array<(ForexCandles, Integer, Hash)>] ForexCandles data, response status code and response headers
1891
+ def forex_candles_with_http_info(symbol, resolution, from, to, opts = {})
1892
+ if @api_client.config.debugging
1893
+ @api_client.config.logger.debug 'Calling API: DefaultApi.forex_candles ...'
1894
+ end
1895
+ # verify the required parameter 'symbol' is set
1896
+ if @api_client.config.client_side_validation && symbol.nil?
1897
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.forex_candles"
1898
+ end
1899
+ # verify the required parameter 'resolution' is set
1900
+ if @api_client.config.client_side_validation && resolution.nil?
1901
+ fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.forex_candles"
1902
+ end
1903
+ # verify the required parameter 'from' is set
1904
+ if @api_client.config.client_side_validation && from.nil?
1905
+ fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.forex_candles"
1906
+ end
1907
+ # verify the required parameter 'to' is set
1908
+ if @api_client.config.client_side_validation && to.nil?
1909
+ fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.forex_candles"
1910
+ end
1911
+ # resource path
1912
+ local_var_path = '/forex/candle'
1913
+
1914
+ # query parameters
1915
+ query_params = opts[:query_params] || {}
1916
+ query_params[:'symbol'] = symbol
1917
+ query_params[:'resolution'] = resolution
1918
+ query_params[:'from'] = from
1919
+ query_params[:'to'] = to
1920
+
1921
+ # header parameters
1922
+ header_params = opts[:header_params] || {}
1923
+ # HTTP header 'Accept' (if needed)
1924
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1925
+
1926
+ # form parameters
1927
+ form_params = opts[:form_params] || {}
1928
+
1929
+ # http body (model)
1930
+ post_body = opts[:debug_body]
1931
+
1932
+ # return_type
1933
+ return_type = opts[:debug_return_type] || 'ForexCandles'
1934
+
1935
+ # auth_names
1936
+ auth_names = opts[:debug_auth_names] || ['api_key']
1937
+
1938
+ new_options = opts.merge(
1939
+ :operation => :"DefaultApi.forex_candles",
1940
+ :header_params => header_params,
1941
+ :query_params => query_params,
1942
+ :form_params => form_params,
1943
+ :body => post_body,
1944
+ :auth_names => auth_names,
1945
+ :return_type => return_type
1946
+ )
1947
+
1948
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1949
+ if @api_client.config.debugging
1950
+ @api_client.config.logger.debug "API called: DefaultApi#forex_candles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1951
+ end
1952
+ return data, status_code, headers
1953
+ end
1954
+
1955
+ # Forex Exchanges
1956
+ # List supported forex exchanges
1957
+ # @param [Hash] opts the optional parameters
1958
+ # @return [Array<String>]
1959
+ def forex_exchanges(opts = {})
1960
+ data, _status_code, _headers = forex_exchanges_with_http_info(opts)
1961
+ data
1962
+ end
1963
+
1964
+ # Forex Exchanges
1965
+ # List supported forex exchanges
1966
+ # @param [Hash] opts the optional parameters
1967
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
1968
+ def forex_exchanges_with_http_info(opts = {})
1969
+ if @api_client.config.debugging
1970
+ @api_client.config.logger.debug 'Calling API: DefaultApi.forex_exchanges ...'
1971
+ end
1972
+ # resource path
1973
+ local_var_path = '/forex/exchange'
1974
+
1975
+ # query parameters
1976
+ query_params = opts[:query_params] || {}
1977
+
1978
+ # header parameters
1979
+ header_params = opts[:header_params] || {}
1980
+ # HTTP header 'Accept' (if needed)
1981
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1982
+
1983
+ # form parameters
1984
+ form_params = opts[:form_params] || {}
1985
+
1986
+ # http body (model)
1987
+ post_body = opts[:debug_body]
1988
+
1989
+ # return_type
1990
+ return_type = opts[:debug_return_type] || 'Array<String>'
1991
+
1992
+ # auth_names
1993
+ auth_names = opts[:debug_auth_names] || ['api_key']
1994
+
1995
+ new_options = opts.merge(
1996
+ :operation => :"DefaultApi.forex_exchanges",
1997
+ :header_params => header_params,
1998
+ :query_params => query_params,
1999
+ :form_params => form_params,
2000
+ :body => post_body,
2001
+ :auth_names => auth_names,
2002
+ :return_type => return_type
2003
+ )
2004
+
2005
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2006
+ if @api_client.config.debugging
2007
+ @api_client.config.logger.debug "API called: DefaultApi#forex_exchanges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2008
+ end
2009
+ return data, status_code, headers
2010
+ end
2011
+
2012
+ # Forex rates
2013
+ # Get rates for all forex pairs. Ideal for currency conversion
2014
+ # @param [Hash] opts the optional parameters
2015
+ # @option opts [String] :base Base currency. Default to EUR.
2016
+ # @return [Forexrates]
2017
+ def forex_rates(opts = {})
2018
+ data, _status_code, _headers = forex_rates_with_http_info(opts)
2019
+ data
2020
+ end
2021
+
2022
+ # Forex rates
2023
+ # Get rates for all forex pairs. Ideal for currency conversion
2024
+ # @param [Hash] opts the optional parameters
2025
+ # @option opts [String] :base Base currency. Default to EUR.
2026
+ # @return [Array<(Forexrates, Integer, Hash)>] Forexrates data, response status code and response headers
2027
+ def forex_rates_with_http_info(opts = {})
2028
+ if @api_client.config.debugging
2029
+ @api_client.config.logger.debug 'Calling API: DefaultApi.forex_rates ...'
2030
+ end
2031
+ # resource path
2032
+ local_var_path = '/forex/rates'
2033
+
2034
+ # query parameters
2035
+ query_params = opts[:query_params] || {}
2036
+ query_params[:'base'] = opts[:'base'] if !opts[:'base'].nil?
2037
+
2038
+ # header parameters
2039
+ header_params = opts[:header_params] || {}
2040
+ # HTTP header 'Accept' (if needed)
2041
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2042
+
2043
+ # form parameters
2044
+ form_params = opts[:form_params] || {}
2045
+
2046
+ # http body (model)
2047
+ post_body = opts[:debug_body]
2048
+
2049
+ # return_type
2050
+ return_type = opts[:debug_return_type] || 'Forexrates'
2051
+
2052
+ # auth_names
2053
+ auth_names = opts[:debug_auth_names] || ['api_key']
2054
+
2055
+ new_options = opts.merge(
2056
+ :operation => :"DefaultApi.forex_rates",
2057
+ :header_params => header_params,
2058
+ :query_params => query_params,
2059
+ :form_params => form_params,
2060
+ :body => post_body,
2061
+ :auth_names => auth_names,
2062
+ :return_type => return_type
2063
+ )
2064
+
2065
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2066
+ if @api_client.config.debugging
2067
+ @api_client.config.logger.debug "API called: DefaultApi#forex_rates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2068
+ end
2069
+ return data, status_code, headers
2070
+ end
2071
+
2072
+ # Forex Symbol
2073
+ # List supported forex symbols.
2074
+ # @param exchange [String] Exchange you want to get the list of symbols from.
2075
+ # @param [Hash] opts the optional parameters
2076
+ # @return [Array<ForexSymbol>]
2077
+ def forex_symbols(exchange, opts = {})
2078
+ data, _status_code, _headers = forex_symbols_with_http_info(exchange, opts)
2079
+ data
2080
+ end
2081
+
2082
+ # Forex Symbol
2083
+ # List supported forex symbols.
2084
+ # @param exchange [String] Exchange you want to get the list of symbols from.
2085
+ # @param [Hash] opts the optional parameters
2086
+ # @return [Array<(Array<ForexSymbol>, Integer, Hash)>] Array<ForexSymbol> data, response status code and response headers
2087
+ def forex_symbols_with_http_info(exchange, opts = {})
2088
+ if @api_client.config.debugging
2089
+ @api_client.config.logger.debug 'Calling API: DefaultApi.forex_symbols ...'
2090
+ end
2091
+ # verify the required parameter 'exchange' is set
2092
+ if @api_client.config.client_side_validation && exchange.nil?
2093
+ fail ArgumentError, "Missing the required parameter 'exchange' when calling DefaultApi.forex_symbols"
2094
+ end
2095
+ # resource path
2096
+ local_var_path = '/forex/symbol'
2097
+
2098
+ # query parameters
2099
+ query_params = opts[:query_params] || {}
2100
+ query_params[:'exchange'] = exchange
2101
+
2102
+ # header parameters
2103
+ header_params = opts[:header_params] || {}
2104
+ # HTTP header 'Accept' (if needed)
2105
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2106
+
2107
+ # form parameters
2108
+ form_params = opts[:form_params] || {}
2109
+
2110
+ # http body (model)
2111
+ post_body = opts[:debug_body]
2112
+
2113
+ # return_type
2114
+ return_type = opts[:debug_return_type] || 'Array<ForexSymbol>'
2115
+
2116
+ # auth_names
2117
+ auth_names = opts[:debug_auth_names] || ['api_key']
2118
+
2119
+ new_options = opts.merge(
2120
+ :operation => :"DefaultApi.forex_symbols",
2121
+ :header_params => header_params,
2122
+ :query_params => query_params,
2123
+ :form_params => form_params,
2124
+ :body => post_body,
2125
+ :auth_names => auth_names,
2126
+ :return_type => return_type
2127
+ )
2128
+
2129
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2130
+ if @api_client.config.debugging
2131
+ @api_client.config.logger.debug "API called: DefaultApi#forex_symbols\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2132
+ end
2133
+ return data, status_code, headers
2134
+ end
2135
+
2136
+ # Fund Ownership
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.
2138
+ # @param symbol [String] Symbol of the company: AAPL.
2139
+ # @param [Hash] opts the optional parameters
2140
+ # @option opts [Integer] :limit Limit number of results. Leave empty to get the full list.
2141
+ # @return [FundOwnership]
2142
+ def fund_ownership(symbol, opts = {})
2143
+ data, _status_code, _headers = fund_ownership_with_http_info(symbol, opts)
2144
+ data
2145
+ end
2146
+
2147
+ # Fund Ownership
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 &lt;code&gt;13F form&lt;/code&gt;, &lt;code&gt;Schedule 13D&lt;/code&gt; and &lt;code&gt;13G&lt;/code&gt; for US market, &lt;code&gt;UK Share Register&lt;/code&gt; for UK market, &lt;code&gt;SEDI&lt;/code&gt; for Canadian market and equivalent filings for other international markets.
2149
+ # @param symbol [String] Symbol of the company: AAPL.
2150
+ # @param [Hash] opts the optional parameters
2151
+ # @option opts [Integer] :limit Limit number of results. Leave empty to get the full list.
2152
+ # @return [Array<(FundOwnership, Integer, Hash)>] FundOwnership data, response status code and response headers
2153
+ def fund_ownership_with_http_info(symbol, opts = {})
2154
+ if @api_client.config.debugging
2155
+ @api_client.config.logger.debug 'Calling API: DefaultApi.fund_ownership ...'
2156
+ end
2157
+ # verify the required parameter 'symbol' is set
2158
+ if @api_client.config.client_side_validation && symbol.nil?
2159
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.fund_ownership"
2160
+ end
2161
+ # resource path
2162
+ local_var_path = '/stock/fund-ownership'
2163
+
2164
+ # query parameters
2165
+ query_params = opts[:query_params] || {}
2166
+ query_params[:'symbol'] = symbol
2167
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2168
+
2169
+ # header parameters
2170
+ header_params = opts[:header_params] || {}
2171
+ # HTTP header 'Accept' (if needed)
2172
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2173
+
2174
+ # form parameters
2175
+ form_params = opts[:form_params] || {}
2176
+
2177
+ # http body (model)
2178
+ post_body = opts[:debug_body]
2179
+
2180
+ # return_type
2181
+ return_type = opts[:debug_return_type] || 'FundOwnership'
2182
+
2183
+ # auth_names
2184
+ auth_names = opts[:debug_auth_names] || ['api_key']
2185
+
2186
+ new_options = opts.merge(
2187
+ :operation => :"DefaultApi.fund_ownership",
2188
+ :header_params => header_params,
2189
+ :query_params => query_params,
2190
+ :form_params => form_params,
2191
+ :body => post_body,
2192
+ :auth_names => auth_names,
2193
+ :return_type => return_type
2194
+ )
2195
+
2196
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2197
+ if @api_client.config.debugging
2198
+ @api_client.config.logger.debug "API called: DefaultApi#fund_ownership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2199
+ end
2200
+ return data, status_code, headers
2201
+ end
2202
+
2203
+ # Indices 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>.
2205
+ # @param symbol [String] symbol
2206
+ # @param [Hash] opts the optional parameters
2207
+ # @return [IndicesConstituents]
2208
+ def indices_constituents(symbol, opts = {})
2209
+ data, _status_code, _headers = indices_constituents_with_http_info(symbol, opts)
2210
+ data
2211
+ end
2212
+
2213
+ # Indices Constituents
2214
+ # Get a list of index&#39;s constituents. A list of supported indices for this endpoint can be found &lt;a href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1Syr2eLielHWsorxkDEZXyc55d6bNx1M3ZeI4vdn7Qzo/edit?usp&#x3D;sharing\&quot; target&#x3D;\&quot;_blank\&quot;&gt;here&lt;/a&gt;.
2215
+ # @param symbol [String] symbol
2216
+ # @param [Hash] opts the optional parameters
2217
+ # @return [Array<(IndicesConstituents, Integer, Hash)>] IndicesConstituents data, response status code and response headers
2218
+ def indices_constituents_with_http_info(symbol, opts = {})
2219
+ if @api_client.config.debugging
2220
+ @api_client.config.logger.debug 'Calling API: DefaultApi.indices_constituents ...'
2221
+ end
2222
+ # verify the required parameter 'symbol' is set
2223
+ if @api_client.config.client_side_validation && symbol.nil?
2224
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.indices_constituents"
2225
+ end
2226
+ # resource path
2227
+ local_var_path = '/index/constituents'
2228
+
2229
+ # query parameters
2230
+ query_params = opts[:query_params] || {}
2231
+ query_params[:'symbol'] = symbol
2232
+
2233
+ # header parameters
2234
+ header_params = opts[:header_params] || {}
2235
+ # HTTP header 'Accept' (if needed)
2236
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2237
+
2238
+ # form parameters
2239
+ form_params = opts[:form_params] || {}
2240
+
2241
+ # http body (model)
2242
+ post_body = opts[:debug_body]
2243
+
2244
+ # return_type
2245
+ return_type = opts[:debug_return_type] || 'IndicesConstituents'
2246
+
2247
+ # auth_names
2248
+ auth_names = opts[:debug_auth_names] || ['api_key']
2249
+
2250
+ new_options = opts.merge(
2251
+ :operation => :"DefaultApi.indices_constituents",
2252
+ :header_params => header_params,
2253
+ :query_params => query_params,
2254
+ :form_params => form_params,
2255
+ :body => post_body,
2256
+ :auth_names => auth_names,
2257
+ :return_type => return_type
2258
+ )
2259
+
2260
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2261
+ if @api_client.config.debugging
2262
+ @api_client.config.logger.debug "API called: DefaultApi#indices_constituents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2263
+ end
2264
+ return data, status_code, headers
2265
+ end
2266
+
2267
+ # Indices Historical Constituents
2268
+ # Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC (S&P 500)</code>, <code>^NDX (Nasdaq 100)</code>, <code>^DJI (Dow Jones)</code>
2269
+ # @param symbol [String] symbol
2270
+ # @param [Hash] opts the optional parameters
2271
+ # @return [IndicesHistoricalConstituents]
2272
+ def indices_historical_constituents(symbol, opts = {})
2273
+ data, _status_code, _headers = indices_historical_constituents_with_http_info(symbol, opts)
2274
+ data
2275
+ end
2276
+
2277
+ # Indices Historical Constituents
2278
+ # Get full history of index&#39;s constituents including symbols and dates of joining and leaving the Index. Currently support &lt;code&gt;^GSPC (S&amp;P 500)&lt;/code&gt;, &lt;code&gt;^NDX (Nasdaq 100)&lt;/code&gt;, &lt;code&gt;^DJI (Dow Jones)&lt;/code&gt;
2279
+ # @param symbol [String] symbol
2280
+ # @param [Hash] opts the optional parameters
2281
+ # @return [Array<(IndicesHistoricalConstituents, Integer, Hash)>] IndicesHistoricalConstituents data, response status code and response headers
2282
+ def indices_historical_constituents_with_http_info(symbol, opts = {})
2283
+ if @api_client.config.debugging
2284
+ @api_client.config.logger.debug 'Calling API: DefaultApi.indices_historical_constituents ...'
2285
+ end
2286
+ # verify the required parameter 'symbol' is set
2287
+ if @api_client.config.client_side_validation && symbol.nil?
2288
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.indices_historical_constituents"
2289
+ end
2290
+ # resource path
2291
+ local_var_path = '/index/historical-constituents'
2292
+
2293
+ # query parameters
2294
+ query_params = opts[:query_params] || {}
2295
+ query_params[:'symbol'] = symbol
2296
+
2297
+ # header parameters
2298
+ header_params = opts[:header_params] || {}
2299
+ # HTTP header 'Accept' (if needed)
2300
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2301
+
2302
+ # form parameters
2303
+ form_params = opts[:form_params] || {}
2304
+
2305
+ # http body (model)
2306
+ post_body = opts[:debug_body]
2307
+
2308
+ # return_type
2309
+ return_type = opts[:debug_return_type] || 'IndicesHistoricalConstituents'
2310
+
2311
+ # auth_names
2312
+ auth_names = opts[:debug_auth_names] || ['api_key']
2313
+
2314
+ new_options = opts.merge(
2315
+ :operation => :"DefaultApi.indices_historical_constituents",
2316
+ :header_params => header_params,
2317
+ :query_params => query_params,
2318
+ :form_params => form_params,
2319
+ :body => post_body,
2320
+ :auth_names => auth_names,
2321
+ :return_type => return_type
2322
+ )
2323
+
2324
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2325
+ if @api_client.config.debugging
2326
+ @api_client.config.logger.debug "API called: DefaultApi#indices_historical_constituents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2327
+ end
2328
+ return data, status_code, headers
2329
+ end
2330
+
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.
2333
+ # @param symbol [String] Symbol of the company: AAPL.
2334
+ # @param [Hash] opts the optional parameters
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)
2340
+ data
2341
+ end
2342
+
2343
+ # Insider Transactions
2344
+ # Company insider transactions data sourced from &lt;code&gt;Form 3,4,5&lt;/code&gt;. This endpoint only covers US companies at the moment. Limit to 100 transactions per API call.
2345
+ # @param symbol [String] Symbol of the company: AAPL.
2346
+ # @param [Hash] opts the optional parameters
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 = {})
2351
+ if @api_client.config.debugging
2352
+ @api_client.config.logger.debug 'Calling API: DefaultApi.insider_transactions ...'
2353
+ end
2354
+ # verify the required parameter 'symbol' is set
2355
+ if @api_client.config.client_side_validation && symbol.nil?
2356
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.insider_transactions"
2357
+ end
2358
+ # resource path
2359
+ local_var_path = '/stock/insider-transactions'
2360
+
2361
+ # query parameters
2362
+ query_params = opts[:query_params] || {}
2363
+ query_params[:'symbol'] = symbol
2364
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
2365
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
2366
+
2367
+ # header parameters
2368
+ header_params = opts[:header_params] || {}
2369
+ # HTTP header 'Accept' (if needed)
2370
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2371
+
2372
+ # form parameters
2373
+ form_params = opts[:form_params] || {}
2374
+
2375
+ # http body (model)
2376
+ post_body = opts[:debug_body]
2377
+
2378
+ # return_type
2379
+ return_type = opts[:debug_return_type] || 'InsiderTransactions'
2380
+
2381
+ # auth_names
2382
+ auth_names = opts[:debug_auth_names] || ['api_key']
2383
+
2384
+ new_options = opts.merge(
2385
+ :operation => :"DefaultApi.insider_transactions",
2386
+ :header_params => header_params,
2387
+ :query_params => query_params,
2388
+ :form_params => form_params,
2389
+ :body => post_body,
2390
+ :auth_names => auth_names,
2391
+ :return_type => return_type
2392
+ )
2393
+
2394
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2395
+ if @api_client.config.debugging
2396
+ @api_client.config.logger.debug "API called: DefaultApi#insider_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2397
+ end
2398
+ return data, status_code, headers
2399
+ end
2400
+
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.
2403
+ # @param [Hash] opts the optional parameters
2404
+ # @option opts [String] :symbol Symbol. Leave empty to list latest filings.
2405
+ # @option opts [String] :country Filter by country using country&#39;s 2-letter code.
2406
+ # @return [Array<InternationalFiling>]
2407
+ def international_filings(opts = {})
2408
+ data, _status_code, _headers = international_filings_with_http_info(opts)
2409
+ data
2410
+ end
2411
+
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.
2414
+ # @param [Hash] opts the optional parameters
2415
+ # @option opts [String] :symbol Symbol. Leave empty to list latest filings.
2416
+ # @option opts [String] :country Filter by country using country&#39;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 = {})
2419
+ if @api_client.config.debugging
2420
+ @api_client.config.logger.debug 'Calling API: DefaultApi.international_filings ...'
2421
+ end
2422
+ # resource path
2423
+ local_var_path = '/stock/international-filings'
2424
+
2425
+ # query parameters
2426
+ query_params = opts[:query_params] || {}
2427
+ query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
2428
+ query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
2429
+
2430
+ # header parameters
2431
+ header_params = opts[:header_params] || {}
2432
+ # HTTP header 'Accept' (if needed)
2433
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2434
+
2435
+ # form parameters
2436
+ form_params = opts[:form_params] || {}
2437
+
2438
+ # http body (model)
2439
+ post_body = opts[:debug_body]
2440
+
2441
+ # return_type
2442
+ return_type = opts[:debug_return_type] || 'Array<InternationalFiling>'
2443
+
2444
+ # auth_names
2445
+ auth_names = opts[:debug_auth_names] || ['api_key']
2446
+
2447
+ new_options = opts.merge(
2448
+ :operation => :"DefaultApi.international_filings",
2449
+ :header_params => header_params,
2450
+ :query_params => query_params,
2451
+ :form_params => form_params,
2452
+ :body => post_body,
2453
+ :auth_names => auth_names,
2454
+ :return_type => return_type
2455
+ )
2456
+
2457
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2458
+ if @api_client.config.debugging
2459
+ @api_client.config.logger.debug "API called: DefaultApi#international_filings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2460
+ end
2461
+ return data, status_code, headers
2462
+ end
2463
+
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 &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp&#x3D;sharing\&quot;&gt;here&lt;/a&gt;.
2467
+ # @param [Hash] opts the optional parameters
2468
+ # @return [InvestmentThemes]
2469
+ def investment_themes(theme, opts = {})
2470
+ data, _status_code, _headers = investment_themes_with_http_info(theme, opts)
2471
+ data
2472
+ end
2473
+
2474
+ # Investment Themes (Thematic Investing)
2475
+ # &lt;p&gt;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.&lt;/p&gt;&lt;p&gt;This endpoint will help you get portfolios of different investment themes that are changing our life and are the way of the future.&lt;/p&gt;&lt;p&gt;A full list of themes supported can be found &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp&#x3D;sharing\&quot;&gt;here&lt;/a&gt;. The theme coverage and portfolios are updated bi-weekly by our analysts. Our approach excludes penny, super-small cap and illiquid stocks.&lt;/p&gt;
2476
+ # @param theme [String] Investment theme. A full list of themes supported can be found &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp&#x3D;sharing\&quot;&gt;here&lt;/a&gt;.
2477
+ # @param [Hash] opts the optional parameters
2478
+ # @return [Array<(InvestmentThemes, Integer, Hash)>] InvestmentThemes data, response status code and response headers
2479
+ def investment_themes_with_http_info(theme, opts = {})
2480
+ if @api_client.config.debugging
2481
+ @api_client.config.logger.debug 'Calling API: DefaultApi.investment_themes ...'
2482
+ end
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"
2486
+ end
2487
+ # resource path
2488
+ local_var_path = '/stock/investment-theme'
2489
+
2490
+ # query parameters
2491
+ query_params = opts[:query_params] || {}
2492
+ query_params[:'theme'] = theme
2493
+
2494
+ # header parameters
2495
+ header_params = opts[:header_params] || {}
2496
+ # HTTP header 'Accept' (if needed)
2497
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2498
+
2499
+ # form parameters
2500
+ form_params = opts[:form_params] || {}
2501
+
2502
+ # http body (model)
2503
+ post_body = opts[:debug_body]
2504
+
2505
+ # return_type
2506
+ return_type = opts[:debug_return_type] || 'InvestmentThemes'
2507
+
2508
+ # auth_names
2509
+ auth_names = opts[:debug_auth_names] || ['api_key']
2510
+
2511
+ new_options = opts.merge(
2512
+ :operation => :"DefaultApi.investment_themes",
2513
+ :header_params => header_params,
2514
+ :query_params => query_params,
2515
+ :form_params => form_params,
2516
+ :body => post_body,
2517
+ :auth_names => auth_names,
2518
+ :return_type => return_type
2519
+ )
2520
+
2521
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2522
+ if @api_client.config.debugging
2523
+ @api_client.config.logger.debug "API called: DefaultApi#investment_themes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2524
+ end
2525
+ return data, status_code, headers
2526
+ end
2527
+
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 &lt;code&gt;general, forex, crypto, merger&lt;/code&gt;.
2602
+ # @param [Hash] opts the optional parameters
2603
+ # @option opts [String] :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 &lt;code&gt;general, forex, crypto, merger&lt;/code&gt;.
2613
+ # @param [Hash] opts the optional parameters
2614
+ # @option opts [String] :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"
1370
2688
  end
1371
2689
  # resource path
1372
- local_var_path = '/stock/financials-reported'
2690
+ local_var_path = '/mutual-fund/country'
1373
2691
 
1374
2692
  # query parameters
1375
2693
  query_params = opts[:query_params] || {}
1376
- query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
1377
- query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil?
1378
- query_params[:'accessNumber'] = opts[:'access_number'] if !opts[:'access_number'].nil?
1379
- query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil?
2694
+ query_params[:'symbol'] = symbol
1380
2695
 
1381
2696
  # header parameters
1382
2697
  header_params = opts[:header_params] || {}
@@ -1387,15 +2702,16 @@ module FinnhubRuby
1387
2702
  form_params = opts[:form_params] || {}
1388
2703
 
1389
2704
  # http body (model)
1390
- post_body = opts[:body]
2705
+ post_body = opts[:debug_body]
1391
2706
 
1392
2707
  # return_type
1393
- return_type = opts[:return_type] || 'FinancialsAsReported'
2708
+ return_type = opts[:debug_return_type] || 'MutualFundCountryExposure'
1394
2709
 
1395
2710
  # auth_names
1396
- auth_names = opts[:auth_names] || ['api_key']
2711
+ auth_names = opts[:debug_auth_names] || ['api_key']
1397
2712
 
1398
2713
  new_options = opts.merge(
2714
+ :operation => :"DefaultApi.mutual_fund_country_exposure",
1399
2715
  :header_params => header_params,
1400
2716
  :query_params => query_params,
1401
2717
  :form_params => form_params,
@@ -1406,61 +2722,42 @@ module FinnhubRuby
1406
2722
 
1407
2723
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1408
2724
  if @api_client.config.debugging
1409
- @api_client.config.logger.debug "API called: DefaultApi#financials_reported\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2725
+ @api_client.config.logger.debug "API called: DefaultApi#mutual_fund_country_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1410
2726
  end
1411
2727
  return data, status_code, headers
1412
2728
  end
1413
2729
 
1414
- # Forex Candles
1415
- # Get candlestick data for forex symbols.
1416
- # @param symbol [String] Use symbol returned in &lt;code&gt;/forex/symbol&lt;/code&gt; endpoint for this field.
1417
- # @param resolution [String] Supported resolution includes &lt;code&gt;1, 5, 15, 30, 60, D, W, M &lt;/code&gt;.Some timeframes might not be available depending on the exchange.
1418
- # @param from [Integer] UNIX timestamp. Interval initial value.
1419
- # @param to [Integer] UNIX timestamp. Interval end value.
2730
+ # Mutual Funds Holdings
2731
+ # Get full Mutual Funds holdings/constituents.
1420
2732
  # @param [Hash] opts the optional parameters
1421
- # @return [ForexCandles]
1422
- def forex_candles(symbol, resolution, from, to, opts = {})
1423
- data, _status_code, _headers = forex_candles_with_http_info(symbol, resolution, from, to, opts)
2733
+ # @option opts [String] :symbol Fund&#39;s symbol.
2734
+ # @option opts [String] :isin Fund&#39;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&#x3D;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)
1424
2739
  data
1425
2740
  end
1426
2741
 
1427
- # Forex Candles
1428
- # Get candlestick data for forex symbols.
1429
- # @param symbol [String] Use symbol returned in &lt;code&gt;/forex/symbol&lt;/code&gt; endpoint for this field.
1430
- # @param resolution [String] Supported resolution includes &lt;code&gt;1, 5, 15, 30, 60, D, W, M &lt;/code&gt;.Some timeframes might not be available depending on the exchange.
1431
- # @param from [Integer] UNIX timestamp. Interval initial value.
1432
- # @param to [Integer] UNIX timestamp. Interval end value.
2742
+ # Mutual Funds Holdings
2743
+ # Get full Mutual Funds holdings/constituents.
1433
2744
  # @param [Hash] opts the optional parameters
1434
- # @return [Array<(ForexCandles, Integer, Hash)>] ForexCandles data, response status code and response headers
1435
- def forex_candles_with_http_info(symbol, resolution, from, to, opts = {})
2745
+ # @option opts [String] :symbol Fund&#39;s symbol.
2746
+ # @option opts [String] :isin Fund&#39;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&#x3D;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 = {})
1436
2750
  if @api_client.config.debugging
1437
- @api_client.config.logger.debug 'Calling API: DefaultApi.forex_candles ...'
1438
- end
1439
- # verify the required parameter 'symbol' is set
1440
- if @api_client.config.client_side_validation && symbol.nil?
1441
- fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.forex_candles"
1442
- end
1443
- # verify the required parameter 'resolution' is set
1444
- if @api_client.config.client_side_validation && resolution.nil?
1445
- fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.forex_candles"
1446
- end
1447
- # verify the required parameter 'from' is set
1448
- if @api_client.config.client_side_validation && from.nil?
1449
- fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.forex_candles"
1450
- end
1451
- # verify the required parameter 'to' is set
1452
- if @api_client.config.client_side_validation && to.nil?
1453
- fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.forex_candles"
2751
+ @api_client.config.logger.debug 'Calling API: DefaultApi.mutual_fund_holdings ...'
1454
2752
  end
1455
2753
  # resource path
1456
- local_var_path = '/forex/candle'
2754
+ local_var_path = '/mutual-fund/holdings'
1457
2755
 
1458
2756
  # query parameters
1459
2757
  query_params = opts[:query_params] || {}
1460
- query_params[:'symbol'] = symbol
1461
- query_params[:'resolution'] = resolution
1462
- query_params[:'from'] = from
1463
- query_params[:'to'] = to
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?
1464
2761
 
1465
2762
  # header parameters
1466
2763
  header_params = opts[:header_params] || {}
@@ -1471,15 +2768,16 @@ module FinnhubRuby
1471
2768
  form_params = opts[:form_params] || {}
1472
2769
 
1473
2770
  # http body (model)
1474
- post_body = opts[:body]
2771
+ post_body = opts[:debug_body]
1475
2772
 
1476
2773
  # return_type
1477
- return_type = opts[:return_type] || 'ForexCandles'
2774
+ return_type = opts[:debug_return_type] || 'MutualFundHoldings'
1478
2775
 
1479
2776
  # auth_names
1480
- auth_names = opts[:auth_names] || ['api_key']
2777
+ auth_names = opts[:debug_auth_names] || ['api_key']
1481
2778
 
1482
2779
  new_options = opts.merge(
2780
+ :operation => :"DefaultApi.mutual_fund_holdings",
1483
2781
  :header_params => header_params,
1484
2782
  :query_params => query_params,
1485
2783
  :form_params => form_params,
@@ -1490,33 +2788,39 @@ module FinnhubRuby
1490
2788
 
1491
2789
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1492
2790
  if @api_client.config.debugging
1493
- @api_client.config.logger.debug "API called: DefaultApi#forex_candles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2791
+ @api_client.config.logger.debug "API called: DefaultApi#mutual_fund_holdings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1494
2792
  end
1495
2793
  return data, status_code, headers
1496
2794
  end
1497
2795
 
1498
- # Forex Exchanges
1499
- # List supported forex exchanges
2796
+ # Mutual Funds Profile
2797
+ # Get mutual funds profile information. This endpoint covers US mutual funds only.
1500
2798
  # @param [Hash] opts the optional parameters
1501
- # @return [Array<String>]
1502
- def forex_exchanges(opts = {})
1503
- data, _status_code, _headers = forex_exchanges_with_http_info(opts)
2799
+ # @option opts [String] :symbol Fund&#39;s symbol.
2800
+ # @option opts [String] :isin Fund&#39;s isin.
2801
+ # @return [MutualFundProfile]
2802
+ def mutual_fund_profile(opts = {})
2803
+ data, _status_code, _headers = mutual_fund_profile_with_http_info(opts)
1504
2804
  data
1505
2805
  end
1506
2806
 
1507
- # Forex Exchanges
1508
- # List supported forex exchanges
2807
+ # Mutual Funds Profile
2808
+ # Get mutual funds profile information. This endpoint covers US mutual funds only.
1509
2809
  # @param [Hash] opts the optional parameters
1510
- # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
1511
- def forex_exchanges_with_http_info(opts = {})
2810
+ # @option opts [String] :symbol Fund&#39;s symbol.
2811
+ # @option opts [String] :isin Fund&#39;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 = {})
1512
2814
  if @api_client.config.debugging
1513
- @api_client.config.logger.debug 'Calling API: DefaultApi.forex_exchanges ...'
2815
+ @api_client.config.logger.debug 'Calling API: DefaultApi.mutual_fund_profile ...'
1514
2816
  end
1515
2817
  # resource path
1516
- local_var_path = '/forex/exchange'
2818
+ local_var_path = '/mutual-fund/profile'
1517
2819
 
1518
2820
  # query parameters
1519
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?
1520
2824
 
1521
2825
  # header parameters
1522
2826
  header_params = opts[:header_params] || {}
@@ -1527,15 +2831,16 @@ module FinnhubRuby
1527
2831
  form_params = opts[:form_params] || {}
1528
2832
 
1529
2833
  # http body (model)
1530
- post_body = opts[:body]
2834
+ post_body = opts[:debug_body]
1531
2835
 
1532
2836
  # return_type
1533
- return_type = opts[:return_type] || 'Array<String>'
2837
+ return_type = opts[:debug_return_type] || 'MutualFundProfile'
1534
2838
 
1535
2839
  # auth_names
1536
- auth_names = opts[:auth_names] || ['api_key']
2840
+ auth_names = opts[:debug_auth_names] || ['api_key']
1537
2841
 
1538
2842
  new_options = opts.merge(
2843
+ :operation => :"DefaultApi.mutual_fund_profile",
1539
2844
  :header_params => header_params,
1540
2845
  :query_params => query_params,
1541
2846
  :form_params => form_params,
@@ -1546,36 +2851,40 @@ module FinnhubRuby
1546
2851
 
1547
2852
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1548
2853
  if @api_client.config.debugging
1549
- @api_client.config.logger.debug "API called: DefaultApi#forex_exchanges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2854
+ @api_client.config.logger.debug "API called: DefaultApi#mutual_fund_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1550
2855
  end
1551
2856
  return data, status_code, headers
1552
2857
  end
1553
2858
 
1554
- # Forex rates
1555
- # Get rates for all forex pairs. Ideal for currency conversion
2859
+ # Mutual Funds Sector Exposure
2860
+ # Get Mutual Funds sector exposure data.
2861
+ # @param symbol [String] Mutual Fund symbol.
1556
2862
  # @param [Hash] opts the optional parameters
1557
- # @option opts [String] :base Base currency. Default to EUR.
1558
- # @return [Forexrates]
1559
- def forex_rates(opts = {})
1560
- data, _status_code, _headers = forex_rates_with_http_info(opts)
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)
1561
2866
  data
1562
2867
  end
1563
2868
 
1564
- # Forex rates
1565
- # Get rates for all forex pairs. Ideal for currency conversion
2869
+ # Mutual Funds Sector Exposure
2870
+ # Get Mutual Funds sector exposure data.
2871
+ # @param symbol [String] Mutual Fund symbol.
1566
2872
  # @param [Hash] opts the optional parameters
1567
- # @option opts [String] :base Base currency. Default to EUR.
1568
- # @return [Array<(Forexrates, Integer, Hash)>] Forexrates data, response status code and response headers
1569
- def forex_rates_with_http_info(opts = {})
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 = {})
1570
2875
  if @api_client.config.debugging
1571
- @api_client.config.logger.debug 'Calling API: DefaultApi.forex_rates ...'
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"
1572
2881
  end
1573
2882
  # resource path
1574
- local_var_path = '/forex/rates'
2883
+ local_var_path = '/mutual-fund/sector'
1575
2884
 
1576
2885
  # query parameters
1577
2886
  query_params = opts[:query_params] || {}
1578
- query_params[:'base'] = opts[:'base'] if !opts[:'base'].nil?
2887
+ query_params[:'symbol'] = symbol
1579
2888
 
1580
2889
  # header parameters
1581
2890
  header_params = opts[:header_params] || {}
@@ -1586,15 +2895,16 @@ module FinnhubRuby
1586
2895
  form_params = opts[:form_params] || {}
1587
2896
 
1588
2897
  # http body (model)
1589
- post_body = opts[:body]
2898
+ post_body = opts[:debug_body]
1590
2899
 
1591
2900
  # return_type
1592
- return_type = opts[:return_type] || 'Forexrates'
2901
+ return_type = opts[:debug_return_type] || 'MutualFundSectorExposure'
1593
2902
 
1594
2903
  # auth_names
1595
- auth_names = opts[:auth_names] || ['api_key']
2904
+ auth_names = opts[:debug_auth_names] || ['api_key']
1596
2905
 
1597
2906
  new_options = opts.merge(
2907
+ :operation => :"DefaultApi.mutual_fund_sector_exposure",
1598
2908
  :header_params => header_params,
1599
2909
  :query_params => query_params,
1600
2910
  :form_params => form_params,
@@ -1605,40 +2915,40 @@ module FinnhubRuby
1605
2915
 
1606
2916
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1607
2917
  if @api_client.config.debugging
1608
- @api_client.config.logger.debug "API called: DefaultApi#forex_rates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2918
+ @api_client.config.logger.debug "API called: DefaultApi#mutual_fund_sector_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1609
2919
  end
1610
2920
  return data, status_code, headers
1611
2921
  end
1612
2922
 
1613
- # Forex Symbol
1614
- # List supported forex symbols.
1615
- # @param exchange [String] Exchange you want to get the list of symbols from.
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.
1616
2926
  # @param [Hash] opts the optional parameters
1617
- # @return [Array<ForexSymbol>]
1618
- def forex_symbols(exchange, opts = {})
1619
- data, _status_code, _headers = forex_symbols_with_http_info(exchange, opts)
2927
+ # @return [NewsSentiment]
2928
+ def news_sentiment(symbol, opts = {})
2929
+ data, _status_code, _headers = news_sentiment_with_http_info(symbol, opts)
1620
2930
  data
1621
2931
  end
1622
2932
 
1623
- # Forex Symbol
1624
- # List supported forex symbols.
1625
- # @param exchange [String] Exchange you want to get the list of symbols from.
2933
+ # News Sentiment
2934
+ # Get company&#39;s news sentiment and statistics. This endpoint is only available for US companies.
2935
+ # @param symbol [String] Company symbol.
1626
2936
  # @param [Hash] opts the optional parameters
1627
- # @return [Array<(Array<ForexSymbol>, Integer, Hash)>] Array<ForexSymbol> data, response status code and response headers
1628
- def forex_symbols_with_http_info(exchange, opts = {})
2937
+ # @return [Array<(NewsSentiment, Integer, Hash)>] NewsSentiment data, response status code and response headers
2938
+ def news_sentiment_with_http_info(symbol, opts = {})
1629
2939
  if @api_client.config.debugging
1630
- @api_client.config.logger.debug 'Calling API: DefaultApi.forex_symbols ...'
2940
+ @api_client.config.logger.debug 'Calling API: DefaultApi.news_sentiment ...'
1631
2941
  end
1632
- # verify the required parameter 'exchange' is set
1633
- if @api_client.config.client_side_validation && exchange.nil?
1634
- fail ArgumentError, "Missing the required parameter 'exchange' when calling DefaultApi.forex_symbols"
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"
1635
2945
  end
1636
2946
  # resource path
1637
- local_var_path = '/forex/symbol'
2947
+ local_var_path = '/news-sentiment'
1638
2948
 
1639
2949
  # query parameters
1640
2950
  query_params = opts[:query_params] || {}
1641
- query_params[:'exchange'] = exchange
2951
+ query_params[:'symbol'] = symbol
1642
2952
 
1643
2953
  # header parameters
1644
2954
  header_params = opts[:header_params] || {}
@@ -1649,15 +2959,16 @@ module FinnhubRuby
1649
2959
  form_params = opts[:form_params] || {}
1650
2960
 
1651
2961
  # http body (model)
1652
- post_body = opts[:body]
2962
+ post_body = opts[:debug_body]
1653
2963
 
1654
2964
  # return_type
1655
- return_type = opts[:return_type] || 'Array<ForexSymbol>'
2965
+ return_type = opts[:debug_return_type] || 'NewsSentiment'
1656
2966
 
1657
2967
  # auth_names
1658
- auth_names = opts[:auth_names] || ['api_key']
2968
+ auth_names = opts[:debug_auth_names] || ['api_key']
1659
2969
 
1660
2970
  new_options = opts.merge(
2971
+ :operation => :"DefaultApi.news_sentiment",
1661
2972
  :header_params => header_params,
1662
2973
  :query_params => query_params,
1663
2974
  :form_params => form_params,
@@ -1668,38 +2979,38 @@ module FinnhubRuby
1668
2979
 
1669
2980
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1670
2981
  if @api_client.config.debugging
1671
- @api_client.config.logger.debug "API called: DefaultApi#forex_symbols\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2982
+ @api_client.config.logger.debug "API called: DefaultApi#news_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1672
2983
  end
1673
2984
  return data, status_code, headers
1674
2985
  end
1675
2986
 
1676
- # Fund Ownership
1677
- # Get a full list fund and institutional investors of a company in descending order of the number of shares held.
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.
1678
2989
  # @param symbol [String] Symbol of the company: AAPL.
1679
2990
  # @param [Hash] opts the optional parameters
1680
2991
  # @option opts [Integer] :limit Limit number of results. Leave empty to get the full list.
1681
- # @return [FundOwnership]
1682
- def fund_ownership(symbol, opts = {})
1683
- data, _status_code, _headers = fund_ownership_with_http_info(symbol, opts)
2992
+ # @return [Ownership]
2993
+ def ownership(symbol, opts = {})
2994
+ data, _status_code, _headers = ownership_with_http_info(symbol, opts)
1684
2995
  data
1685
2996
  end
1686
2997
 
1687
- # Fund Ownership
1688
- # Get a full list fund and institutional investors of a company in descending order of the number of shares held.
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 &lt;code&gt;13F form&lt;/code&gt;, &lt;code&gt;Schedule 13D&lt;/code&gt; and &lt;code&gt;13G&lt;/code&gt; for US market, &lt;code&gt;UK Share Register&lt;/code&gt; for UK market, &lt;code&gt;SEDI&lt;/code&gt; for Canadian market and equivalent filings for other international markets.
1689
3000
  # @param symbol [String] Symbol of the company: AAPL.
1690
3001
  # @param [Hash] opts the optional parameters
1691
3002
  # @option opts [Integer] :limit Limit number of results. Leave empty to get the full list.
1692
- # @return [Array<(FundOwnership, Integer, Hash)>] FundOwnership data, response status code and response headers
1693
- def fund_ownership_with_http_info(symbol, opts = {})
3003
+ # @return [Array<(Ownership, Integer, Hash)>] Ownership data, response status code and response headers
3004
+ def ownership_with_http_info(symbol, opts = {})
1694
3005
  if @api_client.config.debugging
1695
- @api_client.config.logger.debug 'Calling API: DefaultApi.fund_ownership ...'
3006
+ @api_client.config.logger.debug 'Calling API: DefaultApi.ownership ...'
1696
3007
  end
1697
3008
  # verify the required parameter 'symbol' is set
1698
3009
  if @api_client.config.client_side_validation && symbol.nil?
1699
- fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.fund_ownership"
3010
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.ownership"
1700
3011
  end
1701
3012
  # resource path
1702
- local_var_path = '/stock/fund-ownership'
3013
+ local_var_path = '/stock/ownership'
1703
3014
 
1704
3015
  # query parameters
1705
3016
  query_params = opts[:query_params] || {}
@@ -1715,15 +3026,16 @@ module FinnhubRuby
1715
3026
  form_params = opts[:form_params] || {}
1716
3027
 
1717
3028
  # http body (model)
1718
- post_body = opts[:body]
3029
+ post_body = opts[:debug_body]
1719
3030
 
1720
3031
  # return_type
1721
- return_type = opts[:return_type] || 'FundOwnership'
3032
+ return_type = opts[:debug_return_type] || 'Ownership'
1722
3033
 
1723
3034
  # auth_names
1724
- auth_names = opts[:auth_names] || ['api_key']
3035
+ auth_names = opts[:debug_auth_names] || ['api_key']
1725
3036
 
1726
3037
  new_options = opts.merge(
3038
+ :operation => :"DefaultApi.ownership",
1727
3039
  :header_params => header_params,
1728
3040
  :query_params => query_params,
1729
3041
  :form_params => form_params,
@@ -1734,43 +3046,47 @@ module FinnhubRuby
1734
3046
 
1735
3047
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1736
3048
  if @api_client.config.debugging
1737
- @api_client.config.logger.debug "API called: DefaultApi#fund_ownership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3049
+ @api_client.config.logger.debug "API called: DefaultApi#ownership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1738
3050
  end
1739
3051
  return data, status_code, headers
1740
3052
  end
1741
3053
 
1742
- # General News
1743
- # Get latest market news.
1744
- # @param category [String] This parameter can be 1 of the following values &lt;code&gt;general, forex, crypto, merger&lt;/code&gt;.
3054
+ # Pattern Recognition
3055
+ # Run pattern recognition algorithm on a symbol. Support double top/bottom, triple top/bottom, head and shoulders, triangle, wedge, channel, flag, and candlestick patterns.
3056
+ # @param symbol [String] Symbol
3057
+ # @param resolution [String] Supported resolution includes &lt;code&gt;1, 5, 15, 30, 60, D, W, M &lt;/code&gt;.Some timeframes might not be available depending on the exchange.
1745
3058
  # @param [Hash] opts the optional parameters
1746
- # @option opts [String] :min_id Use this field to get only news after this ID. Default to 0
1747
- # @return [Array<News>]
1748
- def general_news(category, opts = {})
1749
- data, _status_code, _headers = general_news_with_http_info(category, opts)
3059
+ # @return [PatternRecognition]
3060
+ def pattern_recognition(symbol, resolution, opts = {})
3061
+ data, _status_code, _headers = pattern_recognition_with_http_info(symbol, resolution, opts)
1750
3062
  data
1751
3063
  end
1752
3064
 
1753
- # General News
1754
- # Get latest market news.
1755
- # @param category [String] This parameter can be 1 of the following values &lt;code&gt;general, forex, crypto, merger&lt;/code&gt;.
3065
+ # Pattern Recognition
3066
+ # Run pattern recognition algorithm on a symbol. Support double top/bottom, triple top/bottom, head and shoulders, triangle, wedge, channel, flag, and candlestick patterns.
3067
+ # @param symbol [String] Symbol
3068
+ # @param resolution [String] Supported resolution includes &lt;code&gt;1, 5, 15, 30, 60, D, W, M &lt;/code&gt;.Some timeframes might not be available depending on the exchange.
1756
3069
  # @param [Hash] opts the optional parameters
1757
- # @option opts [String] :min_id Use this field to get only news after this ID. Default to 0
1758
- # @return [Array<(Array<News>, Integer, Hash)>] Array<News> data, response status code and response headers
1759
- def general_news_with_http_info(category, opts = {})
3070
+ # @return [Array<(PatternRecognition, Integer, Hash)>] PatternRecognition data, response status code and response headers
3071
+ def pattern_recognition_with_http_info(symbol, resolution, opts = {})
1760
3072
  if @api_client.config.debugging
1761
- @api_client.config.logger.debug 'Calling API: DefaultApi.general_news ...'
3073
+ @api_client.config.logger.debug 'Calling API: DefaultApi.pattern_recognition ...'
1762
3074
  end
1763
- # verify the required parameter 'category' is set
1764
- if @api_client.config.client_side_validation && category.nil?
1765
- fail ArgumentError, "Missing the required parameter 'category' when calling DefaultApi.general_news"
3075
+ # verify the required parameter 'symbol' is set
3076
+ if @api_client.config.client_side_validation && symbol.nil?
3077
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.pattern_recognition"
3078
+ end
3079
+ # verify the required parameter 'resolution' is set
3080
+ if @api_client.config.client_side_validation && resolution.nil?
3081
+ fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.pattern_recognition"
1766
3082
  end
1767
3083
  # resource path
1768
- local_var_path = '/news'
3084
+ local_var_path = '/scan/pattern'
1769
3085
 
1770
3086
  # query parameters
1771
3087
  query_params = opts[:query_params] || {}
1772
- query_params[:'category'] = category
1773
- query_params[:'minId'] = opts[:'min_id'] if !opts[:'min_id'].nil?
3088
+ query_params[:'symbol'] = symbol
3089
+ query_params[:'resolution'] = resolution
1774
3090
 
1775
3091
  # header parameters
1776
3092
  header_params = opts[:header_params] || {}
@@ -1781,15 +3097,16 @@ module FinnhubRuby
1781
3097
  form_params = opts[:form_params] || {}
1782
3098
 
1783
3099
  # http body (model)
1784
- post_body = opts[:body]
3100
+ post_body = opts[:debug_body]
1785
3101
 
1786
3102
  # return_type
1787
- return_type = opts[:return_type] || 'Array<News>'
3103
+ return_type = opts[:debug_return_type] || 'PatternRecognition'
1788
3104
 
1789
3105
  # auth_names
1790
- auth_names = opts[:auth_names] || ['api_key']
3106
+ auth_names = opts[:debug_auth_names] || ['api_key']
1791
3107
 
1792
3108
  new_options = opts.merge(
3109
+ :operation => :"DefaultApi.pattern_recognition",
1793
3110
  :header_params => header_params,
1794
3111
  :query_params => query_params,
1795
3112
  :form_params => form_params,
@@ -1800,43 +3117,46 @@ module FinnhubRuby
1800
3117
 
1801
3118
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1802
3119
  if @api_client.config.debugging
1803
- @api_client.config.logger.debug "API called: DefaultApi#general_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3120
+ @api_client.config.logger.debug "API called: DefaultApi#pattern_recognition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1804
3121
  end
1805
3122
  return data, status_code, headers
1806
3123
  end
1807
3124
 
1808
- # Investors Ownership
1809
- # Get a full list of shareholders/investors of a company in descending order of the number of shares held.
1810
- # @param symbol [String] Symbol of the company: AAPL.
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.
1811
3128
  # @param [Hash] opts the optional parameters
1812
- # @option opts [Integer] :limit Limit number of results. Leave empty to get the full list.
1813
- # @return [InvestorsOwnership]
1814
- def investors_ownership(symbol, opts = {})
1815
- data, _status_code, _headers = investors_ownership_with_http_info(symbol, opts)
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)
1816
3134
  data
1817
3135
  end
1818
3136
 
1819
- # Investors Ownership
1820
- # Get a full list of shareholders/investors of a company in descending order of the number of shares held.
1821
- # @param symbol [String] Symbol of the company: AAPL.
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.
1822
3140
  # @param [Hash] opts the optional parameters
1823
- # @option opts [Integer] :limit Limit number of results. Leave empty to get the full list.
1824
- # @return [Array<(InvestorsOwnership, Integer, Hash)>] InvestorsOwnership data, response status code and response headers
1825
- def investors_ownership_with_http_info(symbol, opts = {})
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 = {})
1826
3145
  if @api_client.config.debugging
1827
- @api_client.config.logger.debug 'Calling API: DefaultApi.investors_ownership ...'
3146
+ @api_client.config.logger.debug 'Calling API: DefaultApi.press_releases ...'
1828
3147
  end
1829
3148
  # verify the required parameter 'symbol' is set
1830
3149
  if @api_client.config.client_side_validation && symbol.nil?
1831
- fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.investors_ownership"
3150
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.press_releases"
1832
3151
  end
1833
3152
  # resource path
1834
- local_var_path = '/stock/investor-ownership'
3153
+ local_var_path = '/press-releases'
1835
3154
 
1836
3155
  # query parameters
1837
3156
  query_params = opts[:query_params] || {}
1838
3157
  query_params[:'symbol'] = symbol
1839
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
3158
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
3159
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
1840
3160
 
1841
3161
  # header parameters
1842
3162
  header_params = opts[:header_params] || {}
@@ -1847,15 +3167,16 @@ module FinnhubRuby
1847
3167
  form_params = opts[:form_params] || {}
1848
3168
 
1849
3169
  # http body (model)
1850
- post_body = opts[:body]
3170
+ post_body = opts[:debug_body]
1851
3171
 
1852
3172
  # return_type
1853
- return_type = opts[:return_type] || 'InvestorsOwnership'
3173
+ return_type = opts[:debug_return_type] || 'PressRelease'
1854
3174
 
1855
3175
  # auth_names
1856
- auth_names = opts[:auth_names] || ['api_key']
3176
+ auth_names = opts[:debug_auth_names] || ['api_key']
1857
3177
 
1858
3178
  new_options = opts.merge(
3179
+ :operation => :"DefaultApi.press_releases",
1859
3180
  :header_params => header_params,
1860
3181
  :query_params => query_params,
1861
3182
  :form_params => form_params,
@@ -1866,47 +3187,40 @@ module FinnhubRuby
1866
3187
 
1867
3188
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1868
3189
  if @api_client.config.debugging
1869
- @api_client.config.logger.debug "API called: DefaultApi#investors_ownership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3190
+ @api_client.config.logger.debug "API called: DefaultApi#press_releases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1870
3191
  end
1871
3192
  return data, status_code, headers
1872
3193
  end
1873
3194
 
1874
- # IPO Calendar
1875
- # Get recent and coming IPO.
1876
- # @param from [Date] From date: 2020-03-15.
1877
- # @param to [Date] To date: 2020-03-16.
3195
+ # Price Target
3196
+ # Get latest price target consensus.
3197
+ # @param symbol [String] Symbol of the company: AAPL.
1878
3198
  # @param [Hash] opts the optional parameters
1879
- # @return [IPOCalendar]
1880
- def ipo_calendar(from, to, opts = {})
1881
- data, _status_code, _headers = ipo_calendar_with_http_info(from, to, opts)
3199
+ # @return [PriceTarget]
3200
+ def price_target(symbol, opts = {})
3201
+ data, _status_code, _headers = price_target_with_http_info(symbol, opts)
1882
3202
  data
1883
3203
  end
1884
3204
 
1885
- # IPO Calendar
1886
- # Get recent and coming IPO.
1887
- # @param from [Date] From date: 2020-03-15.
1888
- # @param to [Date] To date: 2020-03-16.
3205
+ # Price Target
3206
+ # Get latest price target consensus.
3207
+ # @param symbol [String] Symbol of the company: AAPL.
1889
3208
  # @param [Hash] opts the optional parameters
1890
- # @return [Array<(IPOCalendar, Integer, Hash)>] IPOCalendar data, response status code and response headers
1891
- def ipo_calendar_with_http_info(from, to, opts = {})
3209
+ # @return [Array<(PriceTarget, Integer, Hash)>] PriceTarget data, response status code and response headers
3210
+ def price_target_with_http_info(symbol, opts = {})
1892
3211
  if @api_client.config.debugging
1893
- @api_client.config.logger.debug 'Calling API: DefaultApi.ipo_calendar ...'
1894
- end
1895
- # verify the required parameter 'from' is set
1896
- if @api_client.config.client_side_validation && from.nil?
1897
- fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.ipo_calendar"
3212
+ @api_client.config.logger.debug 'Calling API: DefaultApi.price_target ...'
1898
3213
  end
1899
- # verify the required parameter 'to' is set
1900
- if @api_client.config.client_side_validation && to.nil?
1901
- fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.ipo_calendar"
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"
1902
3217
  end
1903
3218
  # resource path
1904
- local_var_path = '/calendar/ipo'
3219
+ local_var_path = '/stock/price-target'
1905
3220
 
1906
3221
  # query parameters
1907
3222
  query_params = opts[:query_params] || {}
1908
- query_params[:'from'] = from
1909
- query_params[:'to'] = to
3223
+ query_params[:'symbol'] = symbol
1910
3224
 
1911
3225
  # header parameters
1912
3226
  header_params = opts[:header_params] || {}
@@ -1917,15 +3231,16 @@ module FinnhubRuby
1917
3231
  form_params = opts[:form_params] || {}
1918
3232
 
1919
3233
  # http body (model)
1920
- post_body = opts[:body]
3234
+ post_body = opts[:debug_body]
1921
3235
 
1922
3236
  # return_type
1923
- return_type = opts[:return_type] || 'IPOCalendar'
3237
+ return_type = opts[:debug_return_type] || 'PriceTarget'
1924
3238
 
1925
3239
  # auth_names
1926
- auth_names = opts[:auth_names] || ['api_key']
3240
+ auth_names = opts[:debug_auth_names] || ['api_key']
1927
3241
 
1928
3242
  new_options = opts.merge(
3243
+ :operation => :"DefaultApi.price_target",
1929
3244
  :header_params => header_params,
1930
3245
  :query_params => query_params,
1931
3246
  :form_params => form_params,
@@ -1936,46 +3251,40 @@ module FinnhubRuby
1936
3251
 
1937
3252
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1938
3253
  if @api_client.config.debugging
1939
- @api_client.config.logger.debug "API called: DefaultApi#ipo_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3254
+ @api_client.config.logger.debug "API called: DefaultApi#price_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1940
3255
  end
1941
3256
  return data, status_code, headers
1942
3257
  end
1943
3258
 
1944
- # Major Developments
1945
- # List latest major developments of a company going back 20 years with 12M+ data points. This data can be used to highlight the most significant events.
1946
- # @param symbol [String] Company symbol.
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
1947
3262
  # @param [Hash] opts the optional parameters
1948
- # @option opts [Date] :from From time: 2020-01-01.
1949
- # @option opts [Date] :to To time: 2020-01-05.
1950
- # @return [MajorDevelopments]
1951
- def major_developments(symbol, opts = {})
1952
- data, _status_code, _headers = major_developments_with_http_info(symbol, opts)
3263
+ # @return [Quote]
3264
+ def quote(symbol, opts = {})
3265
+ data, _status_code, _headers = quote_with_http_info(symbol, opts)
1953
3266
  data
1954
3267
  end
1955
3268
 
1956
- # Major Developments
1957
- # List latest major developments of a company going back 20 years with 12M+ data points. This data can be used to highlight the most significant events.
1958
- # @param symbol [String] Company symbol.
3269
+ # Quote
3270
+ # &lt;p&gt;Get real-time quote data for US stocks. Constant polling is not recommended. Use websocket if you need real-time updates.&lt;/p&gt;&lt;p&gt;Real-time stock prices for international markets are supported for Enterprise clients via our partner&#39;s feed. &lt;a href&#x3D;\&quot;mailto:support@finnhub.io\&quot;&gt;Contact Us&lt;/a&gt; to learn more.&lt;/p&gt;
3271
+ # @param symbol [String] Symbol
1959
3272
  # @param [Hash] opts the optional parameters
1960
- # @option opts [Date] :from From time: 2020-01-01.
1961
- # @option opts [Date] :to To time: 2020-01-05.
1962
- # @return [Array<(MajorDevelopments, Integer, Hash)>] MajorDevelopments data, response status code and response headers
1963
- def major_developments_with_http_info(symbol, opts = {})
3273
+ # @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
3274
+ def quote_with_http_info(symbol, opts = {})
1964
3275
  if @api_client.config.debugging
1965
- @api_client.config.logger.debug 'Calling API: DefaultApi.major_developments ...'
3276
+ @api_client.config.logger.debug 'Calling API: DefaultApi.quote ...'
1966
3277
  end
1967
3278
  # verify the required parameter 'symbol' is set
1968
3279
  if @api_client.config.client_side_validation && symbol.nil?
1969
- fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.major_developments"
3280
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.quote"
1970
3281
  end
1971
3282
  # resource path
1972
- local_var_path = '/major-development'
3283
+ local_var_path = '/quote'
1973
3284
 
1974
3285
  # query parameters
1975
3286
  query_params = opts[:query_params] || {}
1976
3287
  query_params[:'symbol'] = symbol
1977
- query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
1978
- query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
1979
3288
 
1980
3289
  # header parameters
1981
3290
  header_params = opts[:header_params] || {}
@@ -1986,15 +3295,16 @@ module FinnhubRuby
1986
3295
  form_params = opts[:form_params] || {}
1987
3296
 
1988
3297
  # http body (model)
1989
- post_body = opts[:body]
3298
+ post_body = opts[:debug_body]
1990
3299
 
1991
3300
  # return_type
1992
- return_type = opts[:return_type] || 'MajorDevelopments'
3301
+ return_type = opts[:debug_return_type] || 'Quote'
1993
3302
 
1994
3303
  # auth_names
1995
- auth_names = opts[:auth_names] || ['api_key']
3304
+ auth_names = opts[:debug_auth_names] || ['api_key']
1996
3305
 
1997
3306
  new_options = opts.merge(
3307
+ :operation => :"DefaultApi.quote",
1998
3308
  :header_params => header_params,
1999
3309
  :query_params => query_params,
2000
3310
  :form_params => form_params,
@@ -2005,36 +3315,36 @@ module FinnhubRuby
2005
3315
 
2006
3316
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2007
3317
  if @api_client.config.debugging
2008
- @api_client.config.logger.debug "API called: DefaultApi#major_developments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3318
+ @api_client.config.logger.debug "API called: DefaultApi#quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2009
3319
  end
2010
3320
  return data, status_code, headers
2011
3321
  end
2012
3322
 
2013
- # News Sentiment
2014
- # Get company's news sentiment and statistics. This endpoint is only available for US companies.
2015
- # @param symbol [String] Company symbol.
3323
+ # Recommendation Trends
3324
+ # Get latest analyst recommendation trends for a company.
3325
+ # @param symbol [String] Symbol of the company: AAPL.
2016
3326
  # @param [Hash] opts the optional parameters
2017
- # @return [NewsSentiment]
2018
- def news_sentiment(symbol, opts = {})
2019
- data, _status_code, _headers = news_sentiment_with_http_info(symbol, opts)
3327
+ # @return [Array<RecommendationTrend>]
3328
+ def recommendation_trends(symbol, opts = {})
3329
+ data, _status_code, _headers = recommendation_trends_with_http_info(symbol, opts)
2020
3330
  data
2021
3331
  end
2022
3332
 
2023
- # News Sentiment
2024
- # Get company&#39;s news sentiment and statistics. This endpoint is only available for US companies.
2025
- # @param symbol [String] Company symbol.
3333
+ # Recommendation Trends
3334
+ # Get latest analyst recommendation trends for a company.
3335
+ # @param symbol [String] Symbol of the company: AAPL.
2026
3336
  # @param [Hash] opts the optional parameters
2027
- # @return [Array<(NewsSentiment, Integer, Hash)>] NewsSentiment data, response status code and response headers
2028
- def news_sentiment_with_http_info(symbol, opts = {})
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 = {})
2029
3339
  if @api_client.config.debugging
2030
- @api_client.config.logger.debug 'Calling API: DefaultApi.news_sentiment ...'
3340
+ @api_client.config.logger.debug 'Calling API: DefaultApi.recommendation_trends ...'
2031
3341
  end
2032
3342
  # verify the required parameter 'symbol' is set
2033
3343
  if @api_client.config.client_side_validation && symbol.nil?
2034
- fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.news_sentiment"
3344
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.recommendation_trends"
2035
3345
  end
2036
3346
  # resource path
2037
- local_var_path = '/news-sentiment'
3347
+ local_var_path = '/stock/recommendation'
2038
3348
 
2039
3349
  # query parameters
2040
3350
  query_params = opts[:query_params] || {}
@@ -2049,15 +3359,16 @@ module FinnhubRuby
2049
3359
  form_params = opts[:form_params] || {}
2050
3360
 
2051
3361
  # http body (model)
2052
- post_body = opts[:body]
3362
+ post_body = opts[:debug_body]
2053
3363
 
2054
3364
  # return_type
2055
- return_type = opts[:return_type] || 'NewsSentiment'
3365
+ return_type = opts[:debug_return_type] || 'Array<RecommendationTrend>'
2056
3366
 
2057
3367
  # auth_names
2058
- auth_names = opts[:auth_names] || ['api_key']
3368
+ auth_names = opts[:debug_auth_names] || ['api_key']
2059
3369
 
2060
3370
  new_options = opts.merge(
3371
+ :operation => :"DefaultApi.recommendation_trends",
2061
3372
  :header_params => header_params,
2062
3373
  :query_params => query_params,
2063
3374
  :form_params => form_params,
@@ -2068,47 +3379,39 @@ module FinnhubRuby
2068
3379
 
2069
3380
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2070
3381
  if @api_client.config.debugging
2071
- @api_client.config.logger.debug "API called: DefaultApi#news_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3382
+ @api_client.config.logger.debug "API called: DefaultApi#recommendation_trends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2072
3383
  end
2073
3384
  return data, status_code, headers
2074
3385
  end
2075
3386
 
2076
- # Pattern Recognition
2077
- # Run pattern recognition algorithm on a symbol. Support double top/bottom, triple top/bottom, head and shoulders, triangle, wedge, channel, flag, and candlestick patterns.
2078
- # @param symbol [String] Symbol
2079
- # @param resolution [String] Supported resolution includes &lt;code&gt;1, 5, 15, 30, 60, D, W, M &lt;/code&gt;.Some timeframes might not be available depending on the exchange.
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.
2080
3389
  # @param [Hash] opts the optional parameters
2081
- # @return [PatternRecognition]
2082
- def pattern_recognition(symbol, resolution, opts = {})
2083
- data, _status_code, _headers = pattern_recognition_with_http_info(symbol, resolution, opts)
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)
2084
3395
  data
2085
3396
  end
2086
3397
 
2087
- # Pattern Recognition
2088
- # Run pattern recognition algorithm on a symbol. Support double top/bottom, triple top/bottom, head and shoulders, triangle, wedge, channel, flag, and candlestick patterns.
2089
- # @param symbol [String] Symbol
2090
- # @param resolution [String] Supported resolution includes &lt;code&gt;1, 5, 15, 30, 60, D, W, M &lt;/code&gt;.Some timeframes might not be available depending on the exchange.
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.
2091
3400
  # @param [Hash] opts the optional parameters
2092
- # @return [Array<(PatternRecognition, Integer, Hash)>] PatternRecognition data, response status code and response headers
2093
- def pattern_recognition_with_http_info(symbol, resolution, opts = {})
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 = {})
2094
3405
  if @api_client.config.debugging
2095
- @api_client.config.logger.debug 'Calling API: DefaultApi.pattern_recognition ...'
2096
- end
2097
- # verify the required parameter 'symbol' is set
2098
- if @api_client.config.client_side_validation && symbol.nil?
2099
- fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.pattern_recognition"
2100
- end
2101
- # verify the required parameter 'resolution' is set
2102
- if @api_client.config.client_side_validation && resolution.nil?
2103
- fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.pattern_recognition"
3406
+ @api_client.config.logger.debug 'Calling API: DefaultApi.revenue_breakdown ...'
2104
3407
  end
2105
3408
  # resource path
2106
- local_var_path = '/scan/pattern'
3409
+ local_var_path = '/stock/revenue-breakdown'
2107
3410
 
2108
3411
  # query parameters
2109
3412
  query_params = opts[:query_params] || {}
2110
- query_params[:'symbol'] = symbol
2111
- query_params[:'resolution'] = resolution
3413
+ query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
3414
+ query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil?
2112
3415
 
2113
3416
  # header parameters
2114
3417
  header_params = opts[:header_params] || {}
@@ -2119,15 +3422,16 @@ module FinnhubRuby
2119
3422
  form_params = opts[:form_params] || {}
2120
3423
 
2121
3424
  # http body (model)
2122
- post_body = opts[:body]
3425
+ post_body = opts[:debug_body]
2123
3426
 
2124
3427
  # return_type
2125
- return_type = opts[:return_type] || 'PatternRecognition'
3428
+ return_type = opts[:debug_return_type] || 'RevenueBreakdown'
2126
3429
 
2127
3430
  # auth_names
2128
- auth_names = opts[:auth_names] || ['api_key']
3431
+ auth_names = opts[:debug_auth_names] || ['api_key']
2129
3432
 
2130
3433
  new_options = opts.merge(
3434
+ :operation => :"DefaultApi.revenue_breakdown",
2131
3435
  :header_params => header_params,
2132
3436
  :query_params => query_params,
2133
3437
  :form_params => form_params,
@@ -2138,40 +3442,42 @@ module FinnhubRuby
2138
3442
 
2139
3443
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2140
3444
  if @api_client.config.debugging
2141
- @api_client.config.logger.debug "API called: DefaultApi#pattern_recognition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3445
+ @api_client.config.logger.debug "API called: DefaultApi#revenue_breakdown\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2142
3446
  end
2143
3447
  return data, status_code, headers
2144
3448
  end
2145
3449
 
2146
- # Price Target
2147
- # Get latest price target consensus.
2148
- # @param symbol [String] Symbol of the company: AAPL.
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>
2149
3452
  # @param [Hash] opts the optional parameters
2150
- # @return [PriceTarget]
2151
- def price_target(symbol, opts = {})
2152
- data, _status_code, _headers = price_target_with_http_info(symbol, opts)
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 &lt;code&gt;annual&lt;/code&gt; or &lt;code&gt;quarterly&lt;/code&gt;. Default to &lt;code&gt;annual&lt;/code&gt;
3456
+ # @return [SimilarityIndex]
3457
+ def similarity_index(opts = {})
3458
+ data, _status_code, _headers = similarity_index_with_http_info(opts)
2153
3459
  data
2154
3460
  end
2155
3461
 
2156
- # Price Target
2157
- # Get latest price target consensus.
2158
- # @param symbol [String] Symbol of the company: AAPL.
3462
+ # Similarity Index
3463
+ # &lt;p&gt;Calculate the textual difference between a company&#39;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&#39;s 10-K with 2018&#39;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&#39;s stock price in the upcoming 4 quarters.&lt;/p&gt;
2159
3464
  # @param [Hash] opts the optional parameters
2160
- # @return [Array<(PriceTarget, Integer, Hash)>] PriceTarget data, response status code and response headers
2161
- def price_target_with_http_info(symbol, opts = {})
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 &lt;code&gt;annual&lt;/code&gt; or &lt;code&gt;quarterly&lt;/code&gt;. Default to &lt;code&gt;annual&lt;/code&gt;
3468
+ # @return [Array<(SimilarityIndex, Integer, Hash)>] SimilarityIndex data, response status code and response headers
3469
+ def similarity_index_with_http_info(opts = {})
2162
3470
  if @api_client.config.debugging
2163
- @api_client.config.logger.debug 'Calling API: DefaultApi.price_target ...'
2164
- end
2165
- # verify the required parameter 'symbol' is set
2166
- if @api_client.config.client_side_validation && symbol.nil?
2167
- fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.price_target"
3471
+ @api_client.config.logger.debug 'Calling API: DefaultApi.similarity_index ...'
2168
3472
  end
2169
3473
  # resource path
2170
- local_var_path = '/stock/price-target'
3474
+ local_var_path = '/stock/similarity-index'
2171
3475
 
2172
3476
  # query parameters
2173
3477
  query_params = opts[:query_params] || {}
2174
- 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?
2175
3481
 
2176
3482
  # header parameters
2177
3483
  header_params = opts[:header_params] || {}
@@ -2182,15 +3488,16 @@ module FinnhubRuby
2182
3488
  form_params = opts[:form_params] || {}
2183
3489
 
2184
3490
  # http body (model)
2185
- post_body = opts[:body]
3491
+ post_body = opts[:debug_body]
2186
3492
 
2187
3493
  # return_type
2188
- return_type = opts[:return_type] || 'PriceTarget'
3494
+ return_type = opts[:debug_return_type] || 'SimilarityIndex'
2189
3495
 
2190
3496
  # auth_names
2191
- auth_names = opts[:auth_names] || ['api_key']
3497
+ auth_names = opts[:debug_auth_names] || ['api_key']
2192
3498
 
2193
3499
  new_options = opts.merge(
3500
+ :operation => :"DefaultApi.similarity_index",
2194
3501
  :header_params => header_params,
2195
3502
  :query_params => query_params,
2196
3503
  :form_params => form_params,
@@ -2201,40 +3508,46 @@ module FinnhubRuby
2201
3508
 
2202
3509
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2203
3510
  if @api_client.config.debugging
2204
- @api_client.config.logger.debug "API called: DefaultApi#price_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3511
+ @api_client.config.logger.debug "API called: DefaultApi#similarity_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2205
3512
  end
2206
3513
  return data, status_code, headers
2207
3514
  end
2208
3515
 
2209
- # Quote
2210
- # <p>Get real-time quote data for US stocks. Constant polling is not recommended. Use websocket if you need real-time update.</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>
2211
- # @param symbol [String] Symbol
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.
2212
3519
  # @param [Hash] opts the optional parameters
2213
- # @return [Quote]
2214
- def quote(symbol, opts = {})
2215
- data, _status_code, _headers = quote_with_http_info(symbol, opts)
3520
+ # @option opts [Date] :from From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
3521
+ # @option opts [Date] :to To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
3522
+ # @return [SocialSentiment]
3523
+ def social_sentiment(symbol, opts = {})
3524
+ data, _status_code, _headers = social_sentiment_with_http_info(symbol, opts)
2216
3525
  data
2217
3526
  end
2218
3527
 
2219
- # Quote
2220
- # &lt;p&gt;Get real-time quote data for US stocks. Constant polling is not recommended. Use websocket if you need real-time update.&lt;/p&gt;&lt;p&gt;Real-time stock prices for international markets are supported for Enterprise clients via our partner&#39;s feed. &lt;a href&#x3D;\&quot;mailto:support@finnhub.io\&quot;&gt;Contact Us&lt;/a&gt; to learn more.&lt;/p&gt;
2221
- # @param symbol [String] Symbol
3528
+ # Social Sentiment
3529
+ # &lt;p&gt;Get social sentiment for stocks on Reddit and Twitter. This endpoint is currently in Beta.&lt;/p&gt;
3530
+ # @param symbol [String] Company symbol.
2222
3531
  # @param [Hash] opts the optional parameters
2223
- # @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
2224
- def quote_with_http_info(symbol, opts = {})
3532
+ # @option opts [Date] :from From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
3533
+ # @option opts [Date] :to To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
3534
+ # @return [Array<(SocialSentiment, Integer, Hash)>] SocialSentiment data, response status code and response headers
3535
+ def social_sentiment_with_http_info(symbol, opts = {})
2225
3536
  if @api_client.config.debugging
2226
- @api_client.config.logger.debug 'Calling API: DefaultApi.quote ...'
3537
+ @api_client.config.logger.debug 'Calling API: DefaultApi.social_sentiment ...'
2227
3538
  end
2228
3539
  # verify the required parameter 'symbol' is set
2229
3540
  if @api_client.config.client_side_validation && symbol.nil?
2230
- fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.quote"
3541
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.social_sentiment"
2231
3542
  end
2232
3543
  # resource path
2233
- local_var_path = '/quote'
3544
+ local_var_path = '/stock/social-sentiment'
2234
3545
 
2235
3546
  # query parameters
2236
3547
  query_params = opts[:query_params] || {}
2237
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?
2238
3551
 
2239
3552
  # header parameters
2240
3553
  header_params = opts[:header_params] || {}
@@ -2245,15 +3558,16 @@ module FinnhubRuby
2245
3558
  form_params = opts[:form_params] || {}
2246
3559
 
2247
3560
  # http body (model)
2248
- post_body = opts[:body]
3561
+ post_body = opts[:debug_body]
2249
3562
 
2250
3563
  # return_type
2251
- return_type = opts[:return_type] || 'Quote'
3564
+ return_type = opts[:debug_return_type] || 'SocialSentiment'
2252
3565
 
2253
3566
  # auth_names
2254
- auth_names = opts[:auth_names] || ['api_key']
3567
+ auth_names = opts[:debug_auth_names] || ['api_key']
2255
3568
 
2256
3569
  new_options = opts.merge(
3570
+ :operation => :"DefaultApi.social_sentiment",
2257
3571
  :header_params => header_params,
2258
3572
  :query_params => query_params,
2259
3573
  :form_params => form_params,
@@ -2264,36 +3578,36 @@ module FinnhubRuby
2264
3578
 
2265
3579
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2266
3580
  if @api_client.config.debugging
2267
- @api_client.config.logger.debug "API called: DefaultApi#quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3581
+ @api_client.config.logger.debug "API called: DefaultApi#social_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2268
3582
  end
2269
3583
  return data, status_code, headers
2270
3584
  end
2271
3585
 
2272
- # Recommendation Trends
2273
- # Get latest analyst recommendation trends for a company.
2274
- # @param symbol [String] Symbol of the company: AAPL.
3586
+ # Dividends 2 (Basic)
3587
+ # Get global dividends data.
3588
+ # @param symbol [String] Symbol.
2275
3589
  # @param [Hash] opts the optional parameters
2276
- # @return [Array<RecommendationTrend>]
2277
- def recommendation_trends(symbol, opts = {})
2278
- data, _status_code, _headers = recommendation_trends_with_http_info(symbol, opts)
3590
+ # @return [Dividends2]
3591
+ def stock_basic_dividends(symbol, opts = {})
3592
+ data, _status_code, _headers = stock_basic_dividends_with_http_info(symbol, opts)
2279
3593
  data
2280
3594
  end
2281
3595
 
2282
- # Recommendation Trends
2283
- # Get latest analyst recommendation trends for a company.
2284
- # @param symbol [String] Symbol of the company: AAPL.
3596
+ # Dividends 2 (Basic)
3597
+ # Get global dividends data.
3598
+ # @param symbol [String] Symbol.
2285
3599
  # @param [Hash] opts the optional parameters
2286
- # @return [Array<(Array<RecommendationTrend>, Integer, Hash)>] Array<RecommendationTrend> data, response status code and response headers
2287
- def recommendation_trends_with_http_info(symbol, 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 = {})
2288
3602
  if @api_client.config.debugging
2289
- @api_client.config.logger.debug 'Calling API: DefaultApi.recommendation_trends ...'
3603
+ @api_client.config.logger.debug 'Calling API: DefaultApi.stock_basic_dividends ...'
2290
3604
  end
2291
3605
  # verify the required parameter 'symbol' is set
2292
3606
  if @api_client.config.client_side_validation && symbol.nil?
2293
- fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.recommendation_trends"
3607
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_basic_dividends"
2294
3608
  end
2295
3609
  # resource path
2296
- local_var_path = '/stock/recommendation'
3610
+ local_var_path = '/stock/dividend2'
2297
3611
 
2298
3612
  # query parameters
2299
3613
  query_params = opts[:query_params] || {}
@@ -2308,15 +3622,16 @@ module FinnhubRuby
2308
3622
  form_params = opts[:form_params] || {}
2309
3623
 
2310
3624
  # http body (model)
2311
- post_body = opts[:body]
3625
+ post_body = opts[:debug_body]
2312
3626
 
2313
3627
  # return_type
2314
- return_type = opts[:return_type] || 'Array<RecommendationTrend>'
3628
+ return_type = opts[:debug_return_type] || 'Dividends2'
2315
3629
 
2316
3630
  # auth_names
2317
- auth_names = opts[:auth_names] || ['api_key']
3631
+ auth_names = opts[:debug_auth_names] || ['api_key']
2318
3632
 
2319
3633
  new_options = opts.merge(
3634
+ :operation => :"DefaultApi.stock_basic_dividends",
2320
3635
  :header_params => header_params,
2321
3636
  :query_params => query_params,
2322
3637
  :form_params => form_params,
@@ -2327,7 +3642,7 @@ module FinnhubRuby
2327
3642
 
2328
3643
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2329
3644
  if @api_client.config.debugging
2330
- @api_client.config.logger.debug "API called: DefaultApi#recommendation_trends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3645
+ @api_client.config.logger.debug "API called: DefaultApi#stock_basic_dividends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2331
3646
  end
2332
3647
  return data, status_code, headers
2333
3648
  end
@@ -2371,15 +3686,16 @@ module FinnhubRuby
2371
3686
  form_params = opts[:form_params] || {}
2372
3687
 
2373
3688
  # http body (model)
2374
- post_body = opts[:body]
3689
+ post_body = opts[:debug_body]
2375
3690
 
2376
3691
  # return_type
2377
- return_type = opts[:return_type] || 'LastBidAsk'
3692
+ return_type = opts[:debug_return_type] || 'LastBidAsk'
2378
3693
 
2379
3694
  # auth_names
2380
- auth_names = opts[:auth_names] || ['api_key']
3695
+ auth_names = opts[:debug_auth_names] || ['api_key']
2381
3696
 
2382
3697
  new_options = opts.merge(
3698
+ :operation => :"DefaultApi.stock_bidask",
2383
3699
  :header_params => header_params,
2384
3700
  :query_params => query_params,
2385
3701
  :form_params => form_params,
@@ -2396,13 +3712,13 @@ module FinnhubRuby
2396
3712
  end
2397
3713
 
2398
3714
  # Stock Candles
2399
- # <p>Get candlestick data for stocks going back 25 years for US stocks.</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>
3715
+ # <p>Get candlestick data (OHLCV) for stocks
2400
3716
  # @param symbol [String] Symbol.
2401
3717
  # @param resolution [String] Supported resolution includes &lt;code&gt;1, 5, 15, 30, 60, D, W, M &lt;/code&gt;.Some timeframes might not be available depending on the exchange.
2402
3718
  # @param from [Integer] UNIX timestamp. Interval initial value.
2403
3719
  # @param to [Integer] UNIX timestamp. Interval end value.
2404
3720
  # @param [Hash] opts the optional parameters
2405
- # @option opts [String] :adjusted By default, &lt;code&gt;adjusted&#x3D;false&lt;/code&gt;. Use &lt;code&gt;true&lt;/code&gt; to get adjusted data.
3721
+ # @option opts [String] :adjusted DEPRECATED: this option has been deprecated. All Daily data will be adjusted for Splits and intraday data will remain unadjusted.
2406
3722
  # @return [StockCandles]
2407
3723
  def stock_candles(symbol, resolution, from, to, opts = {})
2408
3724
  data, _status_code, _headers = stock_candles_with_http_info(symbol, resolution, from, to, opts)
@@ -2410,13 +3726,13 @@ module FinnhubRuby
2410
3726
  end
2411
3727
 
2412
3728
  # Stock Candles
2413
- # &lt;p&gt;Get candlestick data for stocks going back 25 years for US stocks.&lt;/p&gt;&lt;p&gt;Real-time stock prices for international markets are supported for Enterprise clients via our partner&#39;s feed. &lt;a href&#x3D;\&quot;mailto:support@finnhub.io\&quot;&gt;Contact Us&lt;/a&gt; to learn more.&lt;/p&gt;
3729
+ # &lt;p&gt;Get candlestick data (OHLCV) for stocks
2414
3730
  # @param symbol [String] Symbol.
2415
3731
  # @param resolution [String] Supported resolution includes &lt;code&gt;1, 5, 15, 30, 60, D, W, M &lt;/code&gt;.Some timeframes might not be available depending on the exchange.
2416
3732
  # @param from [Integer] UNIX timestamp. Interval initial value.
2417
3733
  # @param to [Integer] UNIX timestamp. Interval end value.
2418
3734
  # @param [Hash] opts the optional parameters
2419
- # @option opts [String] :adjusted By default, &lt;code&gt;adjusted&#x3D;false&lt;/code&gt;. Use &lt;code&gt;true&lt;/code&gt; to get adjusted data.
3735
+ # @option opts [String] :adjusted DEPRECATED: this option has been deprecated. All Daily data will be adjusted for Splits and intraday data will remain unadjusted.
2420
3736
  # @return [Array<(StockCandles, Integer, Hash)>] StockCandles data, response status code and response headers
2421
3737
  def stock_candles_with_http_info(symbol, resolution, from, to, opts = {})
2422
3738
  if @api_client.config.debugging
@@ -2458,15 +3774,16 @@ module FinnhubRuby
2458
3774
  form_params = opts[:form_params] || {}
2459
3775
 
2460
3776
  # http body (model)
2461
- post_body = opts[:body]
3777
+ post_body = opts[:debug_body]
2462
3778
 
2463
3779
  # return_type
2464
- return_type = opts[:return_type] || 'StockCandles'
3780
+ return_type = opts[:debug_return_type] || 'StockCandles'
2465
3781
 
2466
3782
  # auth_names
2467
- auth_names = opts[:auth_names] || ['api_key']
3783
+ auth_names = opts[:debug_auth_names] || ['api_key']
2468
3784
 
2469
3785
  new_options = opts.merge(
3786
+ :operation => :"DefaultApi.stock_candles",
2470
3787
  :header_params => header_params,
2471
3788
  :query_params => query_params,
2472
3789
  :form_params => form_params,
@@ -2535,15 +3852,16 @@ module FinnhubRuby
2535
3852
  form_params = opts[:form_params] || {}
2536
3853
 
2537
3854
  # http body (model)
2538
- post_body = opts[:body]
3855
+ post_body = opts[:debug_body]
2539
3856
 
2540
3857
  # return_type
2541
- return_type = opts[:return_type] || 'Array<Dividends>'
3858
+ return_type = opts[:debug_return_type] || 'Array<Dividends>'
2542
3859
 
2543
3860
  # auth_names
2544
- auth_names = opts[:auth_names] || ['api_key']
3861
+ auth_names = opts[:debug_auth_names] || ['api_key']
2545
3862
 
2546
3863
  new_options = opts.merge(
3864
+ :operation => :"DefaultApi.stock_dividends",
2547
3865
  :header_params => header_params,
2548
3866
  :query_params => query_params,
2549
3867
  :form_params => form_params,
@@ -2559,6 +3877,91 @@ module FinnhubRuby
2559
3877
  return data, status_code, headers
2560
3878
  end
2561
3879
 
3880
+ # Historical NBBO
3881
+ # <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>
3882
+ # @param symbol [String] Symbol.
3883
+ # @param date [Date] Date: 2020-04-02.
3884
+ # @param limit [Integer] Limit number of ticks returned. Maximum value: &lt;code&gt;25000&lt;/code&gt;
3885
+ # @param skip [Integer] Number of ticks to skip. Use this parameter to loop through the entire data.
3886
+ # @param [Hash] opts the optional parameters
3887
+ # @return [HistoricalNBBO]
3888
+ def stock_nbbo(symbol, date, limit, skip, opts = {})
3889
+ data, _status_code, _headers = stock_nbbo_with_http_info(symbol, date, limit, skip, opts)
3890
+ data
3891
+ end
3892
+
3893
+ # Historical NBBO
3894
+ # &lt;p&gt;Get historical best bid and offer for US stocks, LSE, TSX, Euronext and Deutsche Borse.&lt;/p&gt;&lt;p&gt;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 &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;/dashboard/download\&quot;,&gt;here&lt;/a&gt;.&lt;/p&gt;
3895
+ # @param symbol [String] Symbol.
3896
+ # @param date [Date] Date: 2020-04-02.
3897
+ # @param limit [Integer] Limit number of ticks returned. Maximum value: &lt;code&gt;25000&lt;/code&gt;
3898
+ # @param skip [Integer] Number of ticks to skip. Use this parameter to loop through the entire data.
3899
+ # @param [Hash] opts the optional parameters
3900
+ # @return [Array<(HistoricalNBBO, Integer, Hash)>] HistoricalNBBO data, response status code and response headers
3901
+ def stock_nbbo_with_http_info(symbol, date, limit, skip, opts = {})
3902
+ if @api_client.config.debugging
3903
+ @api_client.config.logger.debug 'Calling API: DefaultApi.stock_nbbo ...'
3904
+ end
3905
+ # verify the required parameter 'symbol' is set
3906
+ if @api_client.config.client_side_validation && symbol.nil?
3907
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_nbbo"
3908
+ end
3909
+ # verify the required parameter 'date' is set
3910
+ if @api_client.config.client_side_validation && date.nil?
3911
+ fail ArgumentError, "Missing the required parameter 'date' when calling DefaultApi.stock_nbbo"
3912
+ end
3913
+ # verify the required parameter 'limit' is set
3914
+ if @api_client.config.client_side_validation && limit.nil?
3915
+ fail ArgumentError, "Missing the required parameter 'limit' when calling DefaultApi.stock_nbbo"
3916
+ end
3917
+ # verify the required parameter 'skip' is set
3918
+ if @api_client.config.client_side_validation && skip.nil?
3919
+ fail ArgumentError, "Missing the required parameter 'skip' when calling DefaultApi.stock_nbbo"
3920
+ end
3921
+ # resource path
3922
+ local_var_path = '/stock/bbo'
3923
+
3924
+ # query parameters
3925
+ query_params = opts[:query_params] || {}
3926
+ query_params[:'symbol'] = symbol
3927
+ query_params[:'date'] = date
3928
+ query_params[:'limit'] = limit
3929
+ query_params[:'skip'] = skip
3930
+
3931
+ # header parameters
3932
+ header_params = opts[:header_params] || {}
3933
+ # HTTP header 'Accept' (if needed)
3934
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3935
+
3936
+ # form parameters
3937
+ form_params = opts[:form_params] || {}
3938
+
3939
+ # http body (model)
3940
+ post_body = opts[:debug_body]
3941
+
3942
+ # return_type
3943
+ return_type = opts[:debug_return_type] || 'HistoricalNBBO'
3944
+
3945
+ # auth_names
3946
+ auth_names = opts[:debug_auth_names] || ['api_key']
3947
+
3948
+ new_options = opts.merge(
3949
+ :operation => :"DefaultApi.stock_nbbo",
3950
+ :header_params => header_params,
3951
+ :query_params => query_params,
3952
+ :form_params => form_params,
3953
+ :body => post_body,
3954
+ :auth_names => auth_names,
3955
+ :return_type => return_type
3956
+ )
3957
+
3958
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3959
+ if @api_client.config.debugging
3960
+ @api_client.config.logger.debug "API called: DefaultApi#stock_nbbo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3961
+ end
3962
+ return data, status_code, headers
3963
+ end
3964
+
2562
3965
  # Splits
2563
3966
  # Get splits data for stocks.
2564
3967
  # @param symbol [String] Symbol.
@@ -2612,15 +4015,16 @@ module FinnhubRuby
2612
4015
  form_params = opts[:form_params] || {}
2613
4016
 
2614
4017
  # http body (model)
2615
- post_body = opts[:body]
4018
+ post_body = opts[:debug_body]
2616
4019
 
2617
4020
  # return_type
2618
- return_type = opts[:return_type] || 'Array<Split>'
4021
+ return_type = opts[:debug_return_type] || 'Array<Split>'
2619
4022
 
2620
4023
  # auth_names
2621
- auth_names = opts[:auth_names] || ['api_key']
4024
+ auth_names = opts[:debug_auth_names] || ['api_key']
2622
4025
 
2623
4026
  new_options = opts.merge(
4027
+ :operation => :"DefaultApi.stock_splits",
2624
4028
  :header_params => header_params,
2625
4029
  :query_params => query_params,
2626
4030
  :form_params => form_params,
@@ -2637,20 +4041,26 @@ module FinnhubRuby
2637
4041
  end
2638
4042
 
2639
4043
  # Stock Symbol
2640
- # List supported stocks.
2641
- # @param exchange [String] Exchange you want to get the list of symbols from. List of exchanges with fundamental data can be found &lt;a href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp&#x3D;sharing\&quot; target&#x3D;\&quot;_blank\&quot;&gt;here&lt;/a&gt;.
4044
+ # 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>.
4045
+ # @param exchange [String] Exchange you want to get the list of symbols from. List of exchange codes can be found &lt;a href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp&#x3D;sharing\&quot; target&#x3D;\&quot;_blank\&quot;&gt;here&lt;/a&gt;.
2642
4046
  # @param [Hash] opts the optional parameters
2643
- # @return [Array<Stock>]
4047
+ # @option opts [String] :mic Filter by MIC code.
4048
+ # @option opts [String] :security_type Filter by security type used by OpenFigi standard.
4049
+ # @option opts [String] :currency Filter by currency.
4050
+ # @return [Array<StockSymbol>]
2644
4051
  def stock_symbols(exchange, opts = {})
2645
4052
  data, _status_code, _headers = stock_symbols_with_http_info(exchange, opts)
2646
4053
  data
2647
4054
  end
2648
4055
 
2649
4056
  # Stock Symbol
2650
- # List supported stocks.
2651
- # @param exchange [String] Exchange you want to get the list of symbols from. List of exchanges with fundamental data can be found &lt;a href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp&#x3D;sharing\&quot; target&#x3D;\&quot;_blank\&quot;&gt;here&lt;/a&gt;.
4057
+ # List supported stocks. We use the following symbology to identify stocks on Finnhub &lt;code&gt;Exchange_Ticker.Exchange_Code&lt;/code&gt;. A list of supported exchange codes can be found &lt;a href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp&#x3D;sharing\&quot; target&#x3D;\&quot;_blank\&quot;&gt;here&lt;/a&gt;. A list of supported CFD Indices can be found &lt;a href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1BAbIXBgl405fj0oHeEyRFEu8mW4QD1PhvtaBATLoR14/edit?usp&#x3D;sharing\&quot; target&#x3D;\&quot;_blank\&quot;&gt;here&lt;/a&gt;.
4058
+ # @param exchange [String] Exchange you want to get the list of symbols from. List of exchange codes can be found &lt;a href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp&#x3D;sharing\&quot; target&#x3D;\&quot;_blank\&quot;&gt;here&lt;/a&gt;.
2652
4059
  # @param [Hash] opts the optional parameters
2653
- # @return [Array<(Array<Stock>, Integer, Hash)>] Array<Stock> data, response status code and response headers
4060
+ # @option opts [String] :mic Filter by MIC code.
4061
+ # @option opts [String] :security_type Filter by security type used by OpenFigi standard.
4062
+ # @option opts [String] :currency Filter by currency.
4063
+ # @return [Array<(Array<StockSymbol>, Integer, Hash)>] Array<StockSymbol> data, response status code and response headers
2654
4064
  def stock_symbols_with_http_info(exchange, opts = {})
2655
4065
  if @api_client.config.debugging
2656
4066
  @api_client.config.logger.debug 'Calling API: DefaultApi.stock_symbols ...'
@@ -2665,6 +4075,9 @@ module FinnhubRuby
2665
4075
  # query parameters
2666
4076
  query_params = opts[:query_params] || {}
2667
4077
  query_params[:'exchange'] = exchange
4078
+ query_params[:'mic'] = opts[:'mic'] if !opts[:'mic'].nil?
4079
+ query_params[:'securityType'] = opts[:'security_type'] if !opts[:'security_type'].nil?
4080
+ query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
2668
4081
 
2669
4082
  # header parameters
2670
4083
  header_params = opts[:header_params] || {}
@@ -2675,15 +4088,16 @@ module FinnhubRuby
2675
4088
  form_params = opts[:form_params] || {}
2676
4089
 
2677
4090
  # http body (model)
2678
- post_body = opts[:body]
4091
+ post_body = opts[:debug_body]
2679
4092
 
2680
4093
  # return_type
2681
- return_type = opts[:return_type] || 'Array<Stock>'
4094
+ return_type = opts[:debug_return_type] || 'Array<StockSymbol>'
2682
4095
 
2683
4096
  # auth_names
2684
- auth_names = opts[:auth_names] || ['api_key']
4097
+ auth_names = opts[:debug_auth_names] || ['api_key']
2685
4098
 
2686
4099
  new_options = opts.merge(
4100
+ :operation => :"DefaultApi.stock_symbols",
2687
4101
  :header_params => header_params,
2688
4102
  :query_params => query_params,
2689
4103
  :form_params => form_params,
@@ -2700,7 +4114,7 @@ module FinnhubRuby
2700
4114
  end
2701
4115
 
2702
4116
  # Tick Data
2703
- # <p>Get historical tick data for US stocks from all 13 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. Data is updated at the end of each trading day.</p><p>Tick data from 1985 is available for Enterprise clients. <a href=\"mailto:support@finnhub.io\">Contact us</a> to learn more.</p>
4117
+ # <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>
2704
4118
  # @param symbol [String] Symbol.
2705
4119
  # @param date [Date] Date: 2020-04-02.
2706
4120
  # @param limit [Integer] Limit number of ticks returned. Maximum value: &lt;code&gt;25000&lt;/code&gt;
@@ -2713,7 +4127,7 @@ module FinnhubRuby
2713
4127
  end
2714
4128
 
2715
4129
  # Tick Data
2716
- # &lt;p&gt;Get historical tick data for US stocks from all 13 exchanges. You can send the request directly to our tick server at &lt;a href&#x3D;\&quot;https://tick.finnhub.io/\&quot;&gt;https://tick.finnhub.io/&lt;/a&gt; with the same path and parameters or get redirected there if you call our main server. Data is updated at the end of each trading day.&lt;/p&gt;&lt;p&gt;Tick data from 1985 is available for Enterprise clients. &lt;a href&#x3D;\&quot;mailto:support@finnhub.io\&quot;&gt;Contact us&lt;/a&gt; to learn more.&lt;/p&gt;
4130
+ # &lt;p&gt;Get historical tick data for global exchanges. You can send the request directly to our tick server at &lt;a href&#x3D;\&quot;https://tick.finnhub.io/\&quot;&gt;https://tick.finnhub.io/&lt;/a&gt; with the same path and parameters or get redirected there if you call our main server.&lt;/p&gt;&lt;p&gt;For US market, you can visit our bulk download page in the Dashboard &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;/dashboard/download\&quot;,&gt;here&lt;/a&gt; to speed up the download process.&lt;/p&gt;&lt;p&gt;Note that for Nasdaq Nordic and Baltic, you need to use ISIN instead of symbol to query tick data. &lt;/p&gt;&lt;table class&#x3D;\&quot;table table-hover\&quot;&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Exchange&lt;/th&gt; &lt;th&gt;Segment&lt;/th&gt; &lt;th&gt;Delay&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;US CTA/UTP&lt;/th&gt; &lt;td&gt;Full SIP&lt;/td&gt; &lt;td&gt;15 minute&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;TSX&lt;/th&gt; &lt;td&gt;&lt;ul&gt;&lt;li&gt;TSX&lt;/li&gt;&lt;li&gt;TSX Venture&lt;/li&gt;&lt;li&gt;Index&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;LSE&lt;/th&gt; &lt;td&gt;&lt;ul&gt;&lt;li&gt;London Stock Exchange (L)&lt;/li&gt;&lt;li&gt;LSE International (L)&lt;/li&gt;&lt;li&gt;LSE European (L)&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;15 minute&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;Euronext&lt;/th&gt; &lt;td&gt;&lt;ul&gt; &lt;li&gt;Euronext Paris (PA)&lt;/li&gt; &lt;li&gt;Euronext Amsterdam (AS)&lt;/li&gt; &lt;li&gt;Euronext Lisbon (LS)&lt;/li&gt; &lt;li&gt;Euronext Brussels (BR)&lt;/li&gt; &lt;li&gt;Euronext Oslo (OL)&lt;/li&gt; &lt;li&gt;Euronext London (LN)&lt;/li&gt; &lt;li&gt;Euronext Dublin (IR)&lt;/li&gt; &lt;li&gt;Index&lt;/li&gt; &lt;li&gt;Warrant&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;Deutsche Börse&lt;/th&gt; &lt;td&gt;&lt;ul&gt; &lt;li&gt;Frankfurt (F)&lt;/li&gt; &lt;li&gt;Xetra (DE)&lt;/li&gt; &lt;li&gt;Duesseldorf (DU)&lt;/li&gt; &lt;li&gt;Hamburg (HM)&lt;/li&gt; &lt;li&gt;Berlin (BE)&lt;/li&gt; &lt;li&gt;Hanover (HA)&lt;/li&gt; &lt;li&gt;Stoxx (SX)&lt;/li&gt; &lt;li&gt;TradeGate (TG)&lt;/li&gt; &lt;li&gt;Zertifikate (SC)&lt;/li&gt; &lt;li&gt;Index&lt;/li&gt; &lt;li&gt;Warrant&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class&#x3D;\&quot;text-blue\&quot;&gt;Nasdaq Nordic &amp; Baltic&lt;/th&gt; &lt;td&gt; &lt;ul&gt; &lt;li&gt;Copenhagen (CO)&lt;/li&gt; &lt;li&gt;Stockholm (ST)&lt;/li&gt; &lt;li&gt;Helsinki (HE)&lt;/li&gt; &lt;li&gt;Iceland (IC)&lt;/li&gt; &lt;li&gt;Riga (RG)&lt;/li&gt; &lt;li&gt;Tallinn (TL)&lt;/li&gt; &lt;li&gt;Vilnius(VS)&lt;/li&gt; &lt;li&gt;Fixed Income&lt;/li&gt; &lt;li&gt;Derivatives&lt;/li&gt; &lt;li&gt;Commodities&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt; &lt;td&gt;End-of-day&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
2717
4131
  # @param symbol [String] Symbol.
2718
4132
  # @param date [Date] Date: 2020-04-02.
2719
4133
  # @param limit [Integer] Limit number of ticks returned. Maximum value: &lt;code&gt;25000&lt;/code&gt;
@@ -2759,15 +4173,16 @@ module FinnhubRuby
2759
4173
  form_params = opts[:form_params] || {}
2760
4174
 
2761
4175
  # http body (model)
2762
- post_body = opts[:body]
4176
+ post_body = opts[:debug_body]
2763
4177
 
2764
4178
  # return_type
2765
- return_type = opts[:return_type] || 'TickData'
4179
+ return_type = opts[:debug_return_type] || 'TickData'
2766
4180
 
2767
4181
  # auth_names
2768
- auth_names = opts[:auth_names] || ['api_key']
4182
+ auth_names = opts[:debug_auth_names] || ['api_key']
2769
4183
 
2770
4184
  new_options = opts.merge(
4185
+ :operation => :"DefaultApi.stock_tick",
2771
4186
  :header_params => header_params,
2772
4187
  :query_params => query_params,
2773
4188
  :form_params => form_params,
@@ -2783,6 +4198,70 @@ module FinnhubRuby
2783
4198
  return data, status_code, headers
2784
4199
  end
2785
4200
 
4201
+ # Supply Chain Relationships
4202
+ # <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>
4203
+ # @param symbol [String] Symbol.
4204
+ # @param [Hash] opts the optional parameters
4205
+ # @return [SupplyChainRelationships]
4206
+ def supply_chain_relationships(symbol, opts = {})
4207
+ data, _status_code, _headers = supply_chain_relationships_with_http_info(symbol, opts)
4208
+ data
4209
+ end
4210
+
4211
+ # Supply Chain Relationships
4212
+ # &lt;p&gt;This endpoint provides an overall map of public companies&#39; key customers and suppliers. The data offers a deeper look into a company&#39;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.&lt;/p&gt;&lt;p&gt;We currently cover data for S&amp;P500 and Nasdaq 100 companies.&lt;/p&gt;
4213
+ # @param symbol [String] Symbol.
4214
+ # @param [Hash] opts the optional parameters
4215
+ # @return [Array<(SupplyChainRelationships, Integer, Hash)>] SupplyChainRelationships data, response status code and response headers
4216
+ def supply_chain_relationships_with_http_info(symbol, opts = {})
4217
+ if @api_client.config.debugging
4218
+ @api_client.config.logger.debug 'Calling API: DefaultApi.supply_chain_relationships ...'
4219
+ end
4220
+ # verify the required parameter 'symbol' is set
4221
+ if @api_client.config.client_side_validation && symbol.nil?
4222
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.supply_chain_relationships"
4223
+ end
4224
+ # resource path
4225
+ local_var_path = '/stock/supply-chain'
4226
+
4227
+ # query parameters
4228
+ query_params = opts[:query_params] || {}
4229
+ query_params[:'symbol'] = symbol
4230
+
4231
+ # header parameters
4232
+ header_params = opts[:header_params] || {}
4233
+ # HTTP header 'Accept' (if needed)
4234
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4235
+
4236
+ # form parameters
4237
+ form_params = opts[:form_params] || {}
4238
+
4239
+ # http body (model)
4240
+ post_body = opts[:debug_body]
4241
+
4242
+ # return_type
4243
+ return_type = opts[:debug_return_type] || 'SupplyChainRelationships'
4244
+
4245
+ # auth_names
4246
+ auth_names = opts[:debug_auth_names] || ['api_key']
4247
+
4248
+ new_options = opts.merge(
4249
+ :operation => :"DefaultApi.supply_chain_relationships",
4250
+ :header_params => header_params,
4251
+ :query_params => query_params,
4252
+ :form_params => form_params,
4253
+ :body => post_body,
4254
+ :auth_names => auth_names,
4255
+ :return_type => return_type
4256
+ )
4257
+
4258
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4259
+ if @api_client.config.debugging
4260
+ @api_client.config.logger.debug "API called: DefaultApi#supply_chain_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4261
+ end
4262
+ return data, status_code, headers
4263
+ end
4264
+
2786
4265
  # Support/Resistance
2787
4266
  # Get support and resistance levels for a symbol.
2788
4267
  # @param symbol [String] Symbol
@@ -2829,15 +4308,16 @@ module FinnhubRuby
2829
4308
  form_params = opts[:form_params] || {}
2830
4309
 
2831
4310
  # http body (model)
2832
- post_body = opts[:body]
4311
+ post_body = opts[:debug_body]
2833
4312
 
2834
4313
  # return_type
2835
- return_type = opts[:return_type] || 'SupportResistance'
4314
+ return_type = opts[:debug_return_type] || 'SupportResistance'
2836
4315
 
2837
4316
  # auth_names
2838
- auth_names = opts[:auth_names] || ['api_key']
4317
+ auth_names = opts[:debug_auth_names] || ['api_key']
2839
4318
 
2840
4319
  new_options = opts.merge(
4320
+ :operation => :"DefaultApi.support_resistance",
2841
4321
  :header_params => header_params,
2842
4322
  :query_params => query_params,
2843
4323
  :form_params => form_params,
@@ -2853,6 +4333,70 @@ module FinnhubRuby
2853
4333
  return data, status_code, headers
2854
4334
  end
2855
4335
 
4336
+ # Symbol Lookup
4337
+ # Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip.
4338
+ # @param q [String] Query text can be symbol, name, isin, or cusip.
4339
+ # @param [Hash] opts the optional parameters
4340
+ # @return [SymbolLookup]
4341
+ def symbol_search(q, opts = {})
4342
+ data, _status_code, _headers = symbol_search_with_http_info(q, opts)
4343
+ data
4344
+ end
4345
+
4346
+ # Symbol Lookup
4347
+ # Search for best-matching symbols based on your query. You can input anything from symbol, security&#39;s name to ISIN and Cusip.
4348
+ # @param q [String] Query text can be symbol, name, isin, or cusip.
4349
+ # @param [Hash] opts the optional parameters
4350
+ # @return [Array<(SymbolLookup, Integer, Hash)>] SymbolLookup data, response status code and response headers
4351
+ def symbol_search_with_http_info(q, opts = {})
4352
+ if @api_client.config.debugging
4353
+ @api_client.config.logger.debug 'Calling API: DefaultApi.symbol_search ...'
4354
+ end
4355
+ # verify the required parameter 'q' is set
4356
+ if @api_client.config.client_side_validation && q.nil?
4357
+ fail ArgumentError, "Missing the required parameter 'q' when calling DefaultApi.symbol_search"
4358
+ end
4359
+ # resource path
4360
+ local_var_path = '/search'
4361
+
4362
+ # query parameters
4363
+ query_params = opts[:query_params] || {}
4364
+ query_params[:'q'] = q
4365
+
4366
+ # header parameters
4367
+ header_params = opts[:header_params] || {}
4368
+ # HTTP header 'Accept' (if needed)
4369
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4370
+
4371
+ # form parameters
4372
+ form_params = opts[:form_params] || {}
4373
+
4374
+ # http body (model)
4375
+ post_body = opts[:debug_body]
4376
+
4377
+ # return_type
4378
+ return_type = opts[:debug_return_type] || 'SymbolLookup'
4379
+
4380
+ # auth_names
4381
+ auth_names = opts[:debug_auth_names] || ['api_key']
4382
+
4383
+ new_options = opts.merge(
4384
+ :operation => :"DefaultApi.symbol_search",
4385
+ :header_params => header_params,
4386
+ :query_params => query_params,
4387
+ :form_params => form_params,
4388
+ :body => post_body,
4389
+ :auth_names => auth_names,
4390
+ :return_type => return_type
4391
+ )
4392
+
4393
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4394
+ if @api_client.config.debugging
4395
+ @api_client.config.logger.debug "API called: DefaultApi#symbol_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4396
+ end
4397
+ return data, status_code, headers
4398
+ end
4399
+
2856
4400
  # Technical Indicators
2857
4401
  # 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>.
2858
4402
  # @param symbol [String] symbol
@@ -2924,15 +4468,16 @@ module FinnhubRuby
2924
4468
  form_params = opts[:form_params] || {}
2925
4469
 
2926
4470
  # http body (model)
2927
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'indicator_fields'])
4471
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'indicator_fields'])
2928
4472
 
2929
4473
  # return_type
2930
- return_type = opts[:return_type] || 'Object'
4474
+ return_type = opts[:debug_return_type] || 'Object'
2931
4475
 
2932
4476
  # auth_names
2933
- auth_names = opts[:auth_names] || ['api_key']
4477
+ auth_names = opts[:debug_auth_names] || ['api_key']
2934
4478
 
2935
4479
  new_options = opts.merge(
4480
+ :operation => :"DefaultApi.technical_indicator",
2936
4481
  :header_params => header_params,
2937
4482
  :query_params => query_params,
2938
4483
  :form_params => form_params,
@@ -2949,7 +4494,7 @@ module FinnhubRuby
2949
4494
  end
2950
4495
 
2951
4496
  # Earnings Call Transcripts
2952
- # <p>Get earnings call transcripts, audio and participants' list. This endpoint is only available for US companies. <p>17+ years of data is available with 170,000+ audio which add up to 6TB in size.</p>
4497
+ # <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>
2953
4498
  # @param id [String] Transcript&#39;s id obtained with &lt;a href&#x3D;\&quot;#transcripts-list\&quot;&gt;Transcripts List endpoint&lt;/a&gt;.
2954
4499
  # @param [Hash] opts the optional parameters
2955
4500
  # @return [EarningsCallTranscripts]
@@ -2959,7 +4504,7 @@ module FinnhubRuby
2959
4504
  end
2960
4505
 
2961
4506
  # Earnings Call Transcripts
2962
- # &lt;p&gt;Get earnings call transcripts, audio and participants&#39; list. This endpoint is only available for US companies. &lt;p&gt;17+ years of data is available with 170,000+ audio which add up to 6TB in size.&lt;/p&gt;
4507
+ # &lt;p&gt;Get earnings call transcripts, audio and participants&#39; list. This endpoint is only available for US, UK, and Candian companies. &lt;p&gt;15+ years of data is available with 220,000+ audio which add up to 7TB in size.&lt;/p&gt;
2963
4508
  # @param id [String] Transcript&#39;s id obtained with &lt;a href&#x3D;\&quot;#transcripts-list\&quot;&gt;Transcripts List endpoint&lt;/a&gt;.
2964
4509
  # @param [Hash] opts the optional parameters
2965
4510
  # @return [Array<(EarningsCallTranscripts, Integer, Hash)>] EarningsCallTranscripts data, response status code and response headers
@@ -2987,15 +4532,16 @@ module FinnhubRuby
2987
4532
  form_params = opts[:form_params] || {}
2988
4533
 
2989
4534
  # http body (model)
2990
- post_body = opts[:body]
4535
+ post_body = opts[:debug_body]
2991
4536
 
2992
4537
  # return_type
2993
- return_type = opts[:return_type] || 'EarningsCallTranscripts'
4538
+ return_type = opts[:debug_return_type] || 'EarningsCallTranscripts'
2994
4539
 
2995
4540
  # auth_names
2996
- auth_names = opts[:auth_names] || ['api_key']
4541
+ auth_names = opts[:debug_auth_names] || ['api_key']
2997
4542
 
2998
4543
  new_options = opts.merge(
4544
+ :operation => :"DefaultApi.transcripts",
2999
4545
  :header_params => header_params,
3000
4546
  :query_params => query_params,
3001
4547
  :form_params => form_params,
@@ -3012,7 +4558,7 @@ module FinnhubRuby
3012
4558
  end
3013
4559
 
3014
4560
  # Earnings Call Transcripts List
3015
- # List earnings call transcripts' metadata. This endpoint is only available for US companies.
4561
+ # List earnings call transcripts' metadata. This endpoint is available for US, UK and Canadian companies.
3016
4562
  # @param symbol [String] Company symbol: AAPL. Leave empty to list the latest transcripts
3017
4563
  # @param [Hash] opts the optional parameters
3018
4564
  # @return [EarningsCallTranscriptsList]
@@ -3022,7 +4568,7 @@ module FinnhubRuby
3022
4568
  end
3023
4569
 
3024
4570
  # Earnings Call Transcripts List
3025
- # List earnings call transcripts&#39; metadata. This endpoint is only available for US companies.
4571
+ # List earnings call transcripts&#39; metadata. This endpoint is available for US, UK and Canadian companies.
3026
4572
  # @param symbol [String] Company symbol: AAPL. Leave empty to list the latest transcripts
3027
4573
  # @param [Hash] opts the optional parameters
3028
4574
  # @return [Array<(EarningsCallTranscriptsList, Integer, Hash)>] EarningsCallTranscriptsList data, response status code and response headers
@@ -3050,15 +4596,16 @@ module FinnhubRuby
3050
4596
  form_params = opts[:form_params] || {}
3051
4597
 
3052
4598
  # http body (model)
3053
- post_body = opts[:body]
4599
+ post_body = opts[:debug_body]
3054
4600
 
3055
4601
  # return_type
3056
- return_type = opts[:return_type] || 'EarningsCallTranscriptsList'
4602
+ return_type = opts[:debug_return_type] || 'EarningsCallTranscriptsList'
3057
4603
 
3058
4604
  # auth_names
3059
- auth_names = opts[:auth_names] || ['api_key']
4605
+ auth_names = opts[:debug_auth_names] || ['api_key']
3060
4606
 
3061
4607
  new_options = opts.merge(
4608
+ :operation => :"DefaultApi.transcripts_list",
3062
4609
  :header_params => header_params,
3063
4610
  :query_params => query_params,
3064
4611
  :form_params => form_params,
@@ -3115,15 +4662,16 @@ module FinnhubRuby
3115
4662
  form_params = opts[:form_params] || {}
3116
4663
 
3117
4664
  # http body (model)
3118
- post_body = opts[:body]
4665
+ post_body = opts[:debug_body]
3119
4666
 
3120
4667
  # return_type
3121
- return_type = opts[:return_type] || 'Array<UpgradeDowngrade>'
4668
+ return_type = opts[:debug_return_type] || 'Array<UpgradeDowngrade>'
3122
4669
 
3123
4670
  # auth_names
3124
- auth_names = opts[:auth_names] || ['api_key']
4671
+ auth_names = opts[:debug_auth_names] || ['api_key']
3125
4672
 
3126
4673
  new_options = opts.merge(
4674
+ :operation => :"DefaultApi.upgrade_downgrade",
3127
4675
  :header_params => header_params,
3128
4676
  :query_params => query_params,
3129
4677
  :form_params => form_params,