|
98 | 98 | # Get most active stocks by turnover amount |
99 | 99 | res = data_client.screener.get_most_active( |
100 | 100 | category="US_STOCK", |
101 | | - rank_type="TURNOVER", |
102 | | - sort_by="TURNOVER", |
| 101 | + rank_type="RELATIVE_VOLUME_10D", |
| 102 | + sort_by="RELATIVE_VOLUME_10D", |
103 | 103 | direction="DESC", |
104 | 104 | page_size=10 |
105 | 105 | ) |
|
116 | 116 | ) |
117 | 117 | if res.status_code == 200: |
118 | 118 | print('get_high_amplitude_stocks:', res.json()) |
| 119 | + |
| 120 | + # ------------------------------------------------------------------ |
| 121 | + # New endpoints. These rankings are not paginated and return top 200. |
| 122 | + # ------------------------------------------------------------------ |
| 123 | + |
| 124 | + # Get top gainers for today (new endpoint, no pagination) |
| 125 | + res = data_client.screener.list_gainers_losers( |
| 126 | + rank_type="DAY_1", |
| 127 | + category="US_STOCK", |
| 128 | + sort_by="CHANGE_RATIO", |
| 129 | + direction="DESC" |
| 130 | + ) |
| 131 | + if res.status_code == 200: |
| 132 | + print('list_gainers (day):', res.json()) |
| 133 | + |
| 134 | + # Get top losers for today (new endpoint, no pagination) |
| 135 | + res = data_client.screener.list_gainers_losers( |
| 136 | + rank_type="DAY_1", |
| 137 | + category="US_STOCK", |
| 138 | + sort_by="CHANGE_RATIO", |
| 139 | + direction="ASC" |
| 140 | + ) |
| 141 | + if res.status_code == 200: |
| 142 | + print('list_losers (day):', res.json()) |
| 143 | + |
| 144 | + # Get most active stocks by volume (new endpoint, no pagination) |
| 145 | + res = data_client.screener.list_most_active( |
| 146 | + category="US_STOCK", |
| 147 | + rank_type="VOLUME", |
| 148 | + sort_by="VOLUME", |
| 149 | + direction="DESC" |
| 150 | + ) |
| 151 | + if res.status_code == 200: |
| 152 | + print('list_most_active_by_volume:', res.json()) |
| 153 | + |
| 154 | + # Get high dividend rank list (new endpoint, no pagination) |
| 155 | + res = data_client.screener.list_high_dividend( |
| 156 | + category="US_STOCK", |
| 157 | + sort_by="YIELD", |
| 158 | + direction="DESC" |
| 159 | + ) |
| 160 | + if res.status_code == 200: |
| 161 | + print('list_high_dividend:', res.json()) |
| 162 | + |
| 163 | + # Get 52 week new highs (new endpoint, no pagination) |
| 164 | + res = data_client.screener.list_52whl( |
| 165 | + category="US_STOCK", |
| 166 | + rank_type="NEW_HIGH", |
| 167 | + sort_by="CHANGE_RATIO_52W", |
| 168 | + direction="DESC" |
| 169 | + ) |
| 170 | + if res.status_code == 200: |
| 171 | + print('list_52whl_new_high:', res.json()) |
0 commit comments