Build a low-float stock scanner with dilution-risk data
Build a small-cap watchlist with audited float, short interest, offering risk, and cash runway. Includes Python code, pagination, usage controls, and missing-data handling.
Build a watchlist, then inspect the financing context
Use AskEdgar’s Small-Cap Screener API to filter stocks by float, market cap, and short interest. Add Dilution Ratings to compare offering risk, cash runway, and the explanations behind each rating.
This walkthrough creates a research table for small-cap traders and developers. It sorts by float; it does not predict a squeeze, an offering date, or a profitable trade.
What the example does
- Finds actively trading stocks with market cap up to $500 million, float up to 10 million shares, and short float of at least 15%. These thresholds are editable example inputs.
- Reads every matching screener page within an explicit page budget before sorting.
- Selects the ten lowest-float results, then retrieves their current dilution ratings.
- Prints float, short interest as a percentage of float, offering risk, cash runway, and available share-count and capacity explanations.
Float, shares outstanding, and potential dilution measure different things. Keep them as separate fields. Use the Float & Shares Outstanding reference for share-structure data and the Warrants & Convertibles API for potential share supply.
Before you run it
Follow the Quickstart to obtain an API key and set ASKEDGAR_API_KEY in your server environment or secret manager. Save the code below as low_float_scanner.py and run python low_float_scanner.py. It uses only the Python standard library. Keep the API key server-side.
Paid requests use your API credits. Start with tight filters and a small enrichment count. The code stops on HTTP errors instead of silently treating failed requests as empty data.
Units, coverage, and missing values
- Short float is a fraction:
min_short_float=0.15means 15%, not 0.15%. Displayshort_float * 100with a percent sign. - Gain filters are percentages:
min_gain_7_day=30.0means a 30% gain. Do not apply the short-float conversion to every field. - Zero and unknown are different: display
nullas unavailable. Never turn a missing float, cash value, or rating into zero or Low risk. - Audited coverage: audited numeric coverage is limited to companies under $1 billion in market cap. Inspect response
messagenotes and retain unavailable values. - Freshness: filing-driven share-count updates and market, short-interest, and borrow data have different schedules. A fetch timestamp is not the observation time of every field.
See the Screener reference for field definitions and update details.
Runnable Python example
import json
import os
import warnings
from urllib.parse import urlencode
from urllib.request import Request, urlopen
BASE_URL = "https://eapi.askedgar.io"
def fetch_page(path, params):
key = os.environ["ASKEDGAR_API_KEY"]
request = Request(
f"{BASE_URL}{path}?{urlencode(params)}",
headers={"API-KEY": key},
)
# HTTP errors, including insufficient credits or rate limits, stop the run.
with urlopen(request, timeout=30) as response:
return json.load(response)
def get_records(path, filters, max_pages=20):
records = []
for page in range(1, max_pages + 1):
payload = fetch_page(path, {**filters, "page": page, "limit": 50})
if payload.get("status") != "success":
raise RuntimeError(payload.get("message") or "AskEdgar request failed")
if payload.get("message"):
warnings.warn(str(payload["message"]))
rows = payload.get("results")
if not isinstance(rows, list):
raise ValueError("Expected a results list")
records.extend(rows)
if payload.get("has_more") is False:
return records
if payload.get("has_more") is not True or not rows:
raise ValueError("Unexpected pagination; refusing partial results")
raise RuntimeError("Page budget reached. Tighten filters or raise max_pages deliberately.")
def format_number(value, decimals=0):
return "N/A" if value is None else f"{value:,.{decimals}f}"
def format_percent(value):
# short_float and ownership fields are fractions: 0.15 means 15%.
return "N/A" if value is None else f"{value * 100:.1f}%"
def select_candidates(stocks, top_n=10):
# Missing floats do not become zero or move to the top of the watchlist.
usable = [s for s in stocks if s.get("float") is not None]
return sorted(usable, key=lambda s: (s["float"], s["ticker"]))[:top_n]
def run_scanner():
filters = {
"max_market_cap": 500_000_000,
"max_float": 10_000_000,
"min_short_float": 0.15,
"isactivelytrading": "true",
}
stocks = get_records("/v1/screener", filters)
candidates = select_candidates(stocks, top_n=10)
print(f"Matched {len(stocks)} records; enriching {len(candidates)} lowest-float candidates.")
print("This order is a float sort, not a forecast or trade recommendation.")
for stock in candidates:
ratings = get_records("/v1/dilution-rating", {"ticker": stock["ticker"]})
if len(ratings) > 1:
raise ValueError(f"Multiple current ratings for {stock['ticker']}; inspect before selecting one")
rating = ratings[0] if ratings else {}
risk = rating.get("overall_offering_risk") or "N/A"
print(
f"{stock['ticker']:6s} | Float {format_number(stock.get('float')):>12s}"
f" | Short float {format_percent(stock.get('short_float')):>6s}"
f" | Offering risk {risk:>6s}"
f" | Cash months {format_number(rating.get('cash_remaining_months'), 1)}"
)
for label, value in [
("Offering capacity", rating.get("offering_ability_desc")),
("Outstanding-share explanation", stock.get("outstanding_shares_description")),
("Ownership source", stock.get("ownership_source_url")),
]:
if value:
print(f" {label}: {value}")
if __name__ == "__main__":
run_scanner()Read the results
The table is ordered by the lowest available float in the matching screen. A Low offering-risk rating is not proof of no future issuance; a High rating is not an offering timetable. Read offering_ability_desc and the underlying registration records to investigate shelf, ATM, and other registered financing capacity.
The script prints source explanations when available. It leaves unavailable fields as N/A, reports API response notes, and fails visibly if pagination exceeds the budget. It does not silently rank a partial first page as the full screen.
Change the screen for your workflow
- For a nano-cap watchlist, reduce
max_market_capandmax_float. - For recent runners, add
min_gain_7_dayand a volume filter documented in the Screener reference. - To research a new listing, use
exchange_listing_date_fromwhen you mean the symbol’s exchange listing date; this differs from an issuer’s IPO date. - For past events, use Historical Float instead of attaching today’s float to a historical trade. Check the historical endpoint’s date semantics before treating data as known at a past time.
Plan usage before expanding
The example requests 50 records per page with a maximum of 20 screener pages. It then enriches at most ten companies. Each additional page and enrichment can use credits; returned data size matters as well as request count. Tighten filters if the page-budget error occurs, or deliberately increase max_pages after checking your budget.
Use the free cost estimator for supported endpoint, ticker, date-range, and record-limit estimates. It does not accept every screener filter, so do not present an unfiltered estimate as an exact quote for this filtered workflow. Caching can reduce repeated requests; choose refresh intervals appropriate to each dataset.
Build this into your own app
Using AskEdgar’s Screener and Dilution Rating references, build a low-float research table for my watchlist. Use the documented units, load all matching pages within a visible budget, keep missing values distinct from zero, and let me sort by float or filter by offering risk. Show the rating explanations and available source links. Keep my API key in server-side secrets. Label ratings as research assessments, not predictions.
Start with the public dashboard starter in the Quickstart, or use the small-cap API guide to add warrants, convertibles, and other ticker research panels.
Updated about 1 month ago