|
1 | 1 | package com.webull.openapi.samples.data; |
2 | 2 |
|
| 3 | +import com.webull.openapi.core.common.dict.ActiveRankType; |
3 | 4 | import com.webull.openapi.core.common.dict.Category; |
4 | 5 | import com.webull.openapi.core.common.dict.ContractType; |
5 | 6 | import com.webull.openapi.core.common.dict.FiftyTwoWeekRankType; |
|
8 | 9 | import com.webull.openapi.core.common.dict.MarketSectorAggType; |
9 | 10 | import com.webull.openapi.core.common.dict.MarketSectorPeriod; |
10 | 11 | import com.webull.openapi.core.common.dict.ScreenerOrderBy; |
| 12 | +import com.webull.openapi.core.common.dict.ScreenerRankType; |
11 | 13 | import com.webull.openapi.core.common.dict.SortDirection; |
12 | 14 | import com.webull.openapi.core.common.dict.Timespan; |
13 | 15 | import com.webull.openapi.core.http.HttpApiConfig; |
@@ -270,6 +272,24 @@ public static void main(String[] args) { |
270 | 272 | FiftyTwoWeekResponse newHighs = dataClient.get52Whl(FiftyTwoWeekRankType.NEW_HIGH.name(), Category.US_STOCK.name(), ScreenerOrderBy.CHANGE_RATIO_52W.name(), 1, 10, SortDirection.DESC.name()); |
271 | 273 | logger.info("52-Week New Highs: {}", newHighs); |
272 | 274 |
|
| 275 | + // ==================== Screener ranking APIs (not paginated, returns top 200) ==================== |
| 276 | + |
| 277 | + // Get top gainers/losers ranking |
| 278 | + List<ScreenerStock> gainersLosersRank = dataClient.getGainersLosers(ScreenerRankType.DAY_1.name(), Category.US_STOCK.name(), ScreenerOrderBy.CHANGE_RATIO.name(), SortDirection.DESC.name()); |
| 279 | + logger.info("Gainers/Losers ranking (top 200): {}", gainersLosersRank); |
| 280 | + |
| 281 | + // Get most active stocks ranking |
| 282 | + List<ScreenerStock> mostActiveRank = dataClient.getMostActive(Category.US_STOCK.name(), ActiveRankType.VOLUME.name(), ScreenerOrderBy.VOLUME.name(), SortDirection.DESC.name()); |
| 283 | + logger.info("Most Active ranking (top 200): {}", mostActiveRank); |
| 284 | + |
| 285 | + // Get high dividend stocks ranking |
| 286 | + List<HighDividendStock> highDividendRank = dataClient.getHighDividend(Category.US_STOCK.name(), ScreenerOrderBy.YIELD.name(), SortDirection.DESC.name()); |
| 287 | + logger.info("High Dividend ranking (top 200): {}", highDividendRank); |
| 288 | + |
| 289 | + // Get 52-week high/low ranking |
| 290 | + List<FiftyTwoWeekStock> fiftyTwoWeekRank = dataClient.get52Whl(FiftyTwoWeekRankType.NEW_HIGH.name(), Category.US_STOCK.name(), ScreenerOrderBy.CHANGE_RATIO_52W.name(), SortDirection.DESC.name()); |
| 291 | + logger.info("52-Week High/Low ranking (top 200): {}", fiftyTwoWeekRank); |
| 292 | + |
273 | 293 | // Get option contracts |
274 | 294 | OptionContractQueryParam optionParam = new OptionContractQueryParam(); |
275 | 295 | optionParam.setCategory(Category.US_OPTION.name()); |
|
0 commit comments