Package com.longbridge.fundamental
Class FundamentalContext
- java.lang.Object
-
- com.longbridge.fundamental.FundamentalContext
-
- All Implemented Interfaces:
AutoCloseable
public class FundamentalContext extends Object implements AutoCloseable
Fundamental data context — financial reports, analyst ratings, dividends, valuation, company overview and more.
-
-
Constructor Summary
Constructors Constructor Description FundamentalContext()
-
Method Summary
-
-
-
Method Detail
-
create
public static FundamentalContext create(Config config)
Create a FundamentalContext.- Parameters:
config- Config object- Returns:
- A FundamentalContext object
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getFinancialReport
public CompletableFuture<FinancialReports> getFinancialReport(String symbol, FinancialReportOptions opts) throws OpenApiException
Get financial reports.- Parameters:
symbol- Security symbol, e.g. "700.HK"opts- Options (kind, period); may be null- Returns:
- JSON string response
- Throws:
OpenApiException
-
getInstitutionRating
public CompletableFuture<InstitutionRating> getInstitutionRating(String symbol) throws OpenApiException
Get analyst ratings (latest + consensus summary).- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getInstitutionRatingDetail
public CompletableFuture<InstitutionRatingDetail> getInstitutionRatingDetail(String symbol) throws OpenApiException
Get historical analyst rating details.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getDividend
public CompletableFuture<DividendList> getDividend(String symbol) throws OpenApiException
Get dividend history.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getDividendDetail
public CompletableFuture<DividendList> getDividendDetail(String symbol) throws OpenApiException
Get detailed dividend information.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getForecastEps
public CompletableFuture<ForecastEps> getForecastEps(String symbol) throws OpenApiException
Get EPS forecasts.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getConsensus
public CompletableFuture<FinancialConsensus> getConsensus(String symbol) throws OpenApiException
Get financial consensus estimates.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getValuation
public CompletableFuture<ValuationData> getValuation(String symbol) throws OpenApiException
Get valuation metrics (PE / PB / PS / dividend yield).- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getValuationHistory
public CompletableFuture<ValuationHistoryResponse> getValuationHistory(String symbol) throws OpenApiException
Get historical valuation data.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getIndustryValuation
public CompletableFuture<IndustryValuationList> getIndustryValuation(String symbol) throws OpenApiException
Get industry peer valuation comparison.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getIndustryValuationDist
public CompletableFuture<IndustryValuationDist> getIndustryValuationDist(String symbol) throws OpenApiException
Get industry valuation distribution.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getCompany
public CompletableFuture<CompanyOverview> getCompany(String symbol) throws OpenApiException
Get company overview.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getExecutive
public CompletableFuture<ExecutiveList> getExecutive(String symbol) throws OpenApiException
Get executive and board member information.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getShareholder
public CompletableFuture<ShareholderList> getShareholder(String symbol) throws OpenApiException
Get major shareholders.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getFundHolder
public CompletableFuture<FundHolders> getFundHolder(String symbol) throws OpenApiException
Get fund and ETF holders.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getCorpAction
public CompletableFuture<CorpActions> getCorpAction(String symbol) throws OpenApiException
Get corporate actions.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getInvestRelation
public CompletableFuture<InvestRelations> getInvestRelation(String symbol) throws OpenApiException
Get investor relations data.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getOperating
public CompletableFuture<OperatingList> getOperating(String symbol) throws OpenApiException
Get operating metrics and financial report summaries.- Parameters:
symbol- Security symbol- Returns:
- JSON string response
- Throws:
OpenApiException
-
getBuyback
public CompletableFuture<BuybackData> getBuyback(String symbol) throws OpenApiException
Get buyback data.- Throws:
OpenApiException
-
getRatings
public CompletableFuture<StockRatings> getRatings(String symbol) throws OpenApiException
Get stock ratings.- Throws:
OpenApiException
-
getBusinessSegments
public CompletableFuture<BusinessSegments> getBusinessSegments(String symbol) throws OpenApiException
Get business segment breakdowns (latest snapshot).- Throws:
OpenApiException
-
getBusinessSegmentsHistory
public CompletableFuture<BusinessSegmentsHistory> getBusinessSegmentsHistory(BusinessSegmentsHistoryOptions opts) throws OpenApiException
Get historical business segment breakdowns.- Throws:
OpenApiException
-
getInstitutionRatingViews
public CompletableFuture<InstitutionRatingViews> getInstitutionRatingViews(String symbol) throws OpenApiException
Get historical institutional rating view time-series.- Throws:
OpenApiException
-
getIndustryRank
public CompletableFuture<IndustryRankResponse> getIndustryRank(IndustryRankOptions opts) throws OpenApiException
Get industry rank for a market.- Throws:
OpenApiException
-
getIndustryPeers
public CompletableFuture<IndustryPeersResponse> getIndustryPeers(IndustryPeersOptions opts) throws OpenApiException
Get the industry peer chain for a security or industry.- Throws:
OpenApiException
-
getFinancialReportSnapshot
public CompletableFuture<FinancialReportSnapshot> getFinancialReportSnapshot(FinancialReportSnapshotOptions opts) throws OpenApiException
Get a financial report snapshot (earnings snapshot).- Throws:
OpenApiException
-
getShareholderTop
public CompletableFuture<ShareholderTopResponse> getShareholderTop(String symbol) throws OpenApiException
Get top 20 major shareholders with multi-period holdings.- Throws:
OpenApiException
-
getShareholderDetail
public CompletableFuture<ShareholderDetailResponse> getShareholderDetail(ShareholderDetailOptions opts) throws OpenApiException
Get holding history and trade detail for a specific shareholder.- Throws:
OpenApiException
-
getValuationComparison
public CompletableFuture<ValuationComparisonResponse> getValuationComparison(ValuationComparisonOptions opts) throws OpenApiException
Get valuation comparison between a symbol and optional peer symbols.- Throws:
OpenApiException
-
getMacroeconomicIndicators
public CompletableFuture<MacroeconomicIndicatorListResponse> getMacroeconomicIndicators(String country, String keyword, Integer offset, Integer limit) throws OpenApiException
List macroeconomic indicators. country: ISO country code string (e.g. "US", "CN", "EU"); pass null for all countries.- Throws:
OpenApiException
-
getMacroeconomic
public CompletableFuture<MacroeconomicResponse> getMacroeconomic(String indicatorCode, String startDate, String endDate, Integer offset, Integer limit) throws OpenApiException
Get historical data for a macroeconomic indicator. startDate and endDate are date strings in "YYYY-MM-DD" format.- Throws:
OpenApiException
-
-