Longbridge OpenAPI C++ SDK
fundamental_context.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "async_result.hpp"
4 #include "callback.hpp"
5 #include "config.hpp"
6 #include "types.hpp"
7 #include <optional>
8 
10 
11 namespace longbridge {
12 namespace fundamental {
13 
15 {
16  IncomeStatement = 0,
17  BalanceSheet = 1,
18  CashFlow = 2,
19  All = 3,
20 };
22 {
23  Annual = 0,
24  SemiAnnual = 1,
25  Q1 = 2,
26  Q2 = 3,
27  Q3 = 4,
28  QuarterlyFull = 5,
29 };
30 
33 {
34 private:
35  const lb_fundamental_context_t* ctx_;
36 
37 public:
44 
45  static FundamentalContext create(const Config& config);
46 
48  void financial_report(const std::string& symbol, FinancialReportKind kind, std::optional<FinancialReportPeriod> period,
50 
52  void institution_rating(const std::string& symbol,
54 
56  void institution_rating_detail(const std::string& symbol,
58 
60  void dividend(const std::string& symbol,
62 
64  void dividend_detail(const std::string& symbol,
66 
68  void forecast_eps(const std::string& symbol,
70 
72  void valuation(const std::string& symbol,
74 
76  void valuation_history(const std::string& symbol,
78 
80  void company(const std::string& symbol,
82 
84  void shareholder(const std::string& symbol,
86 
88  void fund_holder(const std::string& symbol,
90 
92  void corp_action(const std::string& symbol,
94 
96  void invest_relation(const std::string& symbol,
98 
100  void operating(const std::string& symbol,
102 
104  void consensus(const std::string& symbol,
106 
108  void industry_valuation(const std::string& symbol,
110 
112  void industry_valuation_dist(const std::string& symbol,
114 
116  void executive(const std::string& symbol,
118 
120  void buyback(const std::string& symbol,
122 
124  void ratings(const std::string& symbol,
126 };
127 
128 } // namespace fundamental
129 } // namespace longbridge
Definition: config.hpp:16
Fundamental data context.
Definition: fundamental_context.hpp:33
void consensus(const std::string &symbol, AsyncCallback< FundamentalContext, FinancialConsensus > callback) const
Get consensus estimates.
void operating(const std::string &symbol, AsyncCallback< FundamentalContext, OperatingList > callback) const
Get operating metrics.
void financial_report(const std::string &symbol, FinancialReportKind kind, std::optional< FinancialReportPeriod > period, AsyncCallback< FundamentalContext, FinancialReports > callback) const
Get financial reports — list_json is a JSON string.
void invest_relation(const std::string &symbol, AsyncCallback< FundamentalContext, InvestRelations > callback) const
Get investor relations data.
void dividend_detail(const std::string &symbol, AsyncCallback< FundamentalContext, DividendList > callback) const
Get detailed dividend information.
void industry_valuation_dist(const std::string &symbol, AsyncCallback< FundamentalContext, IndustryValuationDist > callback) const
Get industry valuation distribution.
void executive(const std::string &symbol, AsyncCallback< FundamentalContext, ExecutiveList > callback) const
Get executive info.
void valuation_history(const std::string &symbol, AsyncCallback< FundamentalContext, ValuationHistoryResponse > callback) const
Get historical valuation.
FundamentalContext & operator=(const FundamentalContext &ctx)
void company(const std::string &symbol, AsyncCallback< FundamentalContext, CompanyOverview > callback) const
Get company overview.
FundamentalContext(const FundamentalContext &ctx)
void ratings(const std::string &symbol, AsyncCallback< FundamentalContext, StockRatings > callback) const
Get stock ratings.
void shareholder(const std::string &symbol, AsyncCallback< FundamentalContext, ShareholderList > callback) const
Get major shareholders.
FundamentalContext(const lb_fundamental_context_t *ctx)
void institution_rating_detail(const std::string &symbol, AsyncCallback< FundamentalContext, InstitutionRatingDetail > callback) const
Get historical analyst rating details.
void industry_valuation(const std::string &symbol, AsyncCallback< FundamentalContext, IndustryValuationList > callback) const
Get industry valuation.
void buyback(const std::string &symbol, AsyncCallback< FundamentalContext, BuybackData > callback) const
Get buyback data.
void valuation(const std::string &symbol, AsyncCallback< FundamentalContext, ValuationData > callback) const
Get valuation metrics.
void forecast_eps(const std::string &symbol, AsyncCallback< FundamentalContext, ForecastEps > callback) const
Get EPS forecasts.
static FundamentalContext create(const Config &config)
void dividend(const std::string &symbol, AsyncCallback< FundamentalContext, DividendList > callback) const
Get dividend history.
FundamentalContext(FundamentalContext &&ctx)
void corp_action(const std::string &symbol, AsyncCallback< FundamentalContext, CorpActions > callback) const
Get corporate actions.
void institution_rating(const std::string &symbol, AsyncCallback< FundamentalContext, InstitutionRating > callback) const
Get analyst ratings.
void fund_holder(const std::string &symbol, AsyncCallback< FundamentalContext, FundHolders > callback) const
Get fund and ETF holders.
struct lb_fundamental_context_t lb_fundamental_context_t
Definition: fundamental_context.hpp:9
FinancialReportPeriod
Definition: fundamental_context.hpp:22
FinancialReportKind
Definition: fundamental_context.hpp:15
Definition: alert_context.hpp:9
std::function< void(AsyncResult< Ctx, T >)> AsyncCallback
Definition: async_result.hpp:48