|
2 | 2 |
|
3 | 3 | import com.webull.openapi.core.common.dict.Category; |
4 | 4 | import com.webull.openapi.core.common.dict.ContractType; |
| 5 | +import com.webull.openapi.core.common.dict.FiftyTwoWeekRankType; |
| 6 | +import com.webull.openapi.core.common.dict.FinancialReportType; |
| 7 | +import com.webull.openapi.core.common.dict.IndustryComparisonSortBy; |
| 8 | +import com.webull.openapi.core.common.dict.MarketSectorAggType; |
| 9 | +import com.webull.openapi.core.common.dict.MarketSectorPeriod; |
| 10 | +import com.webull.openapi.core.common.dict.ScreenerOrderBy; |
| 11 | +import com.webull.openapi.core.common.dict.SortDirection; |
5 | 12 | import com.webull.openapi.core.common.dict.Timespan; |
6 | 13 | import com.webull.openapi.core.http.HttpApiConfig; |
7 | 14 | import com.webull.openapi.core.logger.Logger; |
@@ -158,6 +165,110 @@ public static void main(String[] args) { |
158 | 165 | OptionTick OptionTicks = dataClient.getOptionTicks("AAPL260522C00300000", Category.US_OPTION.name(), 30); |
159 | 166 | logger.info("Option Ticks: {}", OptionTicks); |
160 | 167 |
|
| 168 | + // Get capital flow data (default 5 days) |
| 169 | + List<CapitalFlow> capitalFlow = dataClient.getCapitalFlow("AAPL", Category.US_STOCK.name(), null); |
| 170 | + logger.info("Capital Flow (default 5 days): {}", capitalFlow); |
| 171 | + |
| 172 | + // Get capital flow data with specific count |
| 173 | + List<CapitalFlow> capitalFlow3 = dataClient.getCapitalFlow("AAPL", Category.US_STOCK.name(), 3); |
| 174 | + logger.info("Capital Flow (3 days): {}", capitalFlow3); |
| 175 | + |
| 176 | + // Get industry comparison (default sort by EPS_TTM) |
| 177 | + IndustryComparison industryComparison = dataClient.getIndustryComparison("AAPL", Category.US_STOCK.name(), null); |
| 178 | + logger.info("Industry Comparison (default EPS_TTM): {}", industryComparison); |
| 179 | + |
| 180 | + // Get industry comparison sorted by PE_TTM |
| 181 | + IndustryComparison industryComparisonPe = dataClient.getIndustryComparison("AAPL", Category.US_STOCK.name(), IndustryComparisonSortBy.PE_TTM.name()); |
| 182 | + logger.info("Industry Comparison (PE_TTM): {}", industryComparisonPe); |
| 183 | + |
| 184 | + // Get earnings calendar |
| 185 | + List<EarningsCalendar> earningsCalendar = dataClient.getEarningsCalendar("AAPL", Category.US_STOCK.name()); |
| 186 | + logger.info("Earnings Calendar: {}", earningsCalendar); |
| 187 | + |
| 188 | + // Get dividend calendar |
| 189 | + List<DividendCalendar> dividendCalendar = dataClient.getDividendCalendar("AAPL", Category.US_STOCK.name()); |
| 190 | + logger.info("Dividend Calendar: {}", dividendCalendar); |
| 191 | + |
| 192 | + // Get forecast EPS |
| 193 | + List<ForecastEps> forecastEps = dataClient.getForecastEps("AAPL", Category.US_STOCK.name()); |
| 194 | + logger.info("Forecast EPS: {}", forecastEps); |
| 195 | + |
| 196 | + // Get SEC filings |
| 197 | + SecFilings secFilings = dataClient.getSecFilings("AAPL", Category.US_STOCK.name()); |
| 198 | + logger.info("SEC Filings: {}", secFilings); |
| 199 | + |
| 200 | + // Get fund splits |
| 201 | + List<FundSplit> fundSplits = dataClient.getFundSplits("QQQ", Category.US_STOCK.name()); |
| 202 | + logger.info("Fund Splits: {}", fundSplits); |
| 203 | + |
| 204 | + // Get fund rating |
| 205 | + List<FundRating> fundRating = dataClient.getFundRating("QQQ", Category.US_STOCK.name()); |
| 206 | + logger.info("Fund Rating: {}", fundRating); |
| 207 | + |
| 208 | + // Get fund performance |
| 209 | + FundPerformance fundPerformance = dataClient.getFundPerformance("QQQ", Category.US_STOCK.name()); |
| 210 | + logger.info("Fund Performance: {}", fundPerformance); |
| 211 | + |
| 212 | + // Get fund net value (default 5 records) |
| 213 | + List<FundNetValue> fundNetValue = dataClient.getFundNetValue("QQQ", Category.US_STOCK.name(), null, null); |
| 214 | + logger.info("Fund Net Value: {}", fundNetValue); |
| 215 | + |
| 216 | + // Get fund holdings |
| 217 | + List<FundHolding> fundHoldings = dataClient.getFundHoldings("QQQ", Category.US_STOCK.name()); |
| 218 | + logger.info("Fund Holdings: {}", fundHoldings); |
| 219 | + |
| 220 | + // Get fund files |
| 221 | + List<FundFile> fundFiles = dataClient.getFundFiles("QQQ", Category.US_STOCK.name()); |
| 222 | + logger.info("Fund Files: {}", fundFiles); |
| 223 | + |
| 224 | + // Get fund dividends |
| 225 | + List<FundDividend> fundDividends = dataClient.getFundDividends("QQQ", Category.US_STOCK.name(), 1, 10); |
| 226 | + logger.info("Fund Dividends: {}", fundDividends); |
| 227 | + |
| 228 | + // Get fund brief |
| 229 | + FundBrief fundBrief = dataClient.getFundBrief("QQQ", Category.US_STOCK.name()); |
| 230 | + logger.info("Fund Brief: {}", fundBrief); |
| 231 | + |
| 232 | + // Get fund allocation |
| 233 | + List<FundAllocation> fundAllocation = dataClient.getFundAllocation("QQQ", Category.US_STOCK.name()); |
| 234 | + logger.info("Fund Allocation: {}", fundAllocation); |
| 235 | + |
| 236 | + // Get financial indicators (quarterly, default 5) |
| 237 | + FinancialIndicators indicators = dataClient.getFinancialsIndicators("AAPL", Category.US_STOCK.name(), FinancialReportType.QUARTERLY.name(), 5); |
| 238 | + logger.info("Financial Indicators: {}", indicators); |
| 239 | + |
| 240 | + // Get income statement (quarterly, default 5) |
| 241 | + List<FinancialIncome> incomeStatements = dataClient.getFinancialsIncome("AAPL", Category.US_STOCK.name(), FinancialReportType.QUARTERLY.name(), 5); |
| 242 | + logger.info("Income Statements: {}", incomeStatements); |
| 243 | + |
| 244 | + // Get cash flow statement (quarterly, default 5) |
| 245 | + List<FinancialCashflow> cashflows = dataClient.getFinancialsCashflow("AAPL", Category.US_STOCK.name(), FinancialReportType.QUARTERLY.name(), 5); |
| 246 | + logger.info("Cash Flow Statements: {}", cashflows); |
| 247 | + |
| 248 | + // Get balance sheet (quarterly, default 5) |
| 249 | + List<FinancialBalanceSheet> balanceSheets = dataClient.getFinancialsBalanceSheet("AAPL", Category.US_STOCK.name(), FinancialReportType.QUARTERLY.name(), 5); |
| 250 | + logger.info("Balance Sheets: {}", balanceSheets); |
| 251 | + |
| 252 | + // Get financial alert |
| 253 | + FinancialAlert financialAlert = dataClient.getFinancialsAlert("AAPL", Category.US_STOCK.name()); |
| 254 | + logger.info("Financial Alert: {}", financialAlert); |
| 255 | + |
| 256 | + // Get market sectors |
| 257 | + List<MarketSector> marketSectors = dataClient.getMarketSectors(Category.US_STOCK.name(), MarketSectorAggType.MARKET_VALUE.name(), MarketSectorPeriod.D1.name(), 1, 10, SortDirection.DESC.name()); |
| 258 | + logger.info("Market Sectors: {}", marketSectors); |
| 259 | + |
| 260 | + // Get market sector detail |
| 261 | + MarketSectorDetail sectorDetail = dataClient.getMarketSectorsDetail("6391", Category.US_STOCK.name(), MarketSectorPeriod.D1.name(), 1, 10, ScreenerOrderBy.CHANGE_RATIO.name(), SortDirection.DESC.name()); |
| 262 | + logger.info("Market Sector Detail: {}", sectorDetail); |
| 263 | + |
| 264 | + // Get high dividend stocks |
| 265 | + HighDividendResponse highDividend = dataClient.getHighDividend(Category.US_STOCK.name(), ScreenerOrderBy.YIELD.name(), 1, 10, SortDirection.DESC.name()); |
| 266 | + logger.info("High Dividend Stocks: {}", highDividend); |
| 267 | + |
| 268 | + // Get 52-week new high stocks |
| 269 | + FiftyTwoWeekResponse newHighs = dataClient.get52Whl(FiftyTwoWeekRankType.NEW_HIGH.name(), Category.US_STOCK.name(), ScreenerOrderBy.CHANGE_RATIO_52W.name(), 1, 10, SortDirection.DESC.name()); |
| 270 | + logger.info("52-Week New Highs: {}", newHighs); |
| 271 | + |
161 | 272 |
|
162 | 273 | // // get end of day market |
163 | 274 | // List<EodBars> eodBars = IDataClient.getEodBars(instrumentIds, "2023-01-01", 10); |
|
0 commit comments