Skip to content

screen

The screen.* commands list and run predefined Yahoo Finance equity screens. Use this namespace when the user asks for market lists such as gainers, undervalued stocks, or other predefined screen groups.

All examples use --output json so results are stable to parse in terminals, scripts, and automation workflows.

List predefined Yahoo equity screens.

finance screen.predefined lists predefined Yahoo equity screens. It returns ok, data, error, and warnings in JSON output. The result payload includes queries, count, source.

Use this command before finance screen.run when you do not know the exact predefined query key.

Terminal window
finance screen.predefined [--output json]

No arguments.

Terminal window
finance screen.predefined --output json

This output was generated with finance screen.predefined --output json.

{
"ok": true,
"data": {
"queries": [
{
"key": "aggressive_small_caps",
"name": "Aggressive Small Caps"
},
{
"key": "conservative_foreign_funds",
"name": "Conservative Foreign Funds"
},
{
"key": "day_gainers",
"name": "Day Gainers"
},
{
"key": "day_losers",
"name": "Day Losers"
},
{
"key": "growth_technology_stocks",
"name": "Growth Technology Stocks"
},
{
"key": "high_yield_bond",
"name": "High Yield Bond"
},
{
"key": "most_actives",
"name": "Most Actives"
},
{
"key": "most_shorted_stocks",
"name": "Most Shorted Stocks"
},
{
"key": "portfolio_anchors",
"name": "Portfolio Anchors"
},
{
"key": "small_cap_gainers",
"name": "Small Cap Gainers"
},
{
"key": "solid_large_growth_funds",
"name": "Solid Large Growth Funds"
},
{
"key": "solid_midcap_growth_funds",
"name": "Solid Midcap Growth Funds"
},
{
"key": "top_mutual_funds",
"name": "Top Mutual Funds"
},
{
"key": "undervalued_growth_stocks",
"name": "Undervalued Growth Stocks"
},
{
"key": "undervalued_large_caps",
"name": "Undervalued Large Caps"
}
],
"count": 15,
"source": "yfinance"
},
"error": null,
"warnings": []
}
FieldTypeDescription
okbooleanWhether the command completed successfully.
dataobject or nullCommand-specific result payload. It is null when ok is false.
errorstring or nullHuman-readable error message when ok is false; otherwise null.
warningsarrayNon-fatal warnings returned by the command.
data.countintegerNumber of records included in the adjacent result array.
data.queriesarrayPredefined screen query records.
data.queries[]objectPredefined screen query records.
data.sourcestringProvider or source identifier for the returned data.
data.queries[].keystringStable key that can be passed back to this namespace as an argument.
data.queries[].namestringHuman-readable screen name shown by Yahoo Finance.

Run a predefined Yahoo equity screen.

finance screen.run runs a predefined Yahoo equity screen. It returns ok, data, error, and warnings in JSON output. The result payload includes query, title, description, quotes, count, total, source.

Use this command after finance screen.predefined when you have a valid screen key and want the current quote rows for that screen.

Behavior details: Use screen.predefined to list available query keys. count is the maximum number of quotes requested.

Terminal window
finance screen.run QUERY [count=25 offset=0 sort_field=FIELD sort_asc=false] [--output json]
ArgumentRequiredDefaultAccepted valuesDescription
queryYesNoneStringQuery string or predefined query key accepted by this command.
countNo25IntegerMaximum number of records requested.
offsetNo0IntegerResult offset.
sort_ascNofalsetrue, falseSort ascending when set.
sort_fieldNoNoneStringProvider sort field. Leave unset to use the screen default.
Terminal window
finance screen.run day_gainers count=5 --output json

This output was generated with finance screen.run day_gainers count=5 --output json.

{
"ok": true,
"data": {
"query": "day_gainers",
"title": "Day Gainers",
"description": "Discover the equities with the greatest gains in the trading day.",
"quotes": [
{
"symbol": "POET",
"name": "POET Technologies Inc.",
"price": 20.57,
"change_pct": 43.1454,
"market_cap": 3141268992,
"volume": 117146094,
"sector": null,
"industry": null,
"exchange": "NCM"
},
{
"symbol": "ONDS",
"name": "Ondas Inc",
"price": 11.21,
"change_pct": 26.5237,
"market_cap": 5556201472,
"volume": 243177512,
"sector": null,
"industry": null,
"exchange": "NCM"
},
{
"symbol": "FRMI",
"name": "Fermi Inc.",
"price": 7.37,
"change_pct": 22.8333,
"market_cap": 4698921984,
"volume": 56463131,
"sector": null,
"industry": null,
"exchange": "NMS"
},
{
"symbol": "RDW",
"name": "Redwire Corporation",
"price": 13.99,
"change_pct": 22.0768,
"market_cap": 2782872832,
"volume": 63595271,
"sector": null,
"industry": null,
"exchange": "NYQ"
},
{
"symbol": "PCT",
"name": "PureCycle Technologies, Inc.",
"price": 12.39,
"change_pct": 21.4706,
"market_cap": 2240899584,
"volume": 15393242,
"sector": null,
"industry": null,
"exchange": "NCM"
}
],
"count": 5,
"total": 217,
"source": "yfinance"
},
"error": null,
"warnings": []
}
FieldTypeDescription
okbooleanWhether the command completed successfully.
dataobject or nullCommand-specific result payload. It is null when ok is false.
errorstring or nullHuman-readable error message when ok is false; otherwise null.
warningsarrayNon-fatal warnings returned by the command.
data.countintegerNumber of records included in the adjacent result array.
data.descriptionstringYahoo Finance description of what the screen selects.
data.querystringQuery key or search string used by the command.
data.quotesarrayScreen quote rows returned by the provider.
data.quotes[]objectScreen quote rows returned by the provider.
data.sourcestringProvider or source identifier for the returned data.
data.titlestringHuman-readable title for the selected screen.
data.totalintegerProvider-reported total result count when available.
data.quotes[].change_pctnumberPrice change as a decimal percentage value.
data.quotes[].exchangestringExchange code or market venue.
data.quotes[].industrystring or nullCompany industry classification when Yahoo returns it.
data.quotes[].market_capintegerMarket capitalization.
data.quotes[].namestringCompany or security name for the quote row.
data.quotes[].pricenumberPrice associated with the event, quote, summary row, or order.
data.quotes[].sectorstring or nullCompany sector when Yahoo returns it.
data.quotes[].symbolstringTicker symbol for the quote row.
data.quotes[].volumeintegerTrading volume.