Skip to main content
AboutWorkExperienceLogHireResume
  1. Home
  2. /
  3. Log
  4. /
  5. An HTTP 413 that the CUSIP resolver reported as 27 unknown securities

25–26 Aug 2026/Andria Systems

An HTTP 413 that the CUSIP resolver reported as 27 unknown securities

Andria’s first real pricing run resolved none of 27 CUSIPs. The API had rejected the batch size, and the error handler turned the rejection into “no match”.

0 of 27CUSIPs resolved while a rejected request read as “unmapped”; 82.1% coverage after the fix

Written up 22 Nov 2026

Context

Andria’s signals come from 13F holdings, which identify each security by CUSIP, and the backtest needs a ticker to price them. The first mapper had an 11-entry hand-written override table and downloaded SEC’s company_tickers_exchange.json. That file maps the CIKs of filers to tickers, not the CUSIPs of what they hold, so beyond the overrides it could resolve nothing in the INFOTABLE rows. I replaced it with OpenFIGI’s mapping endpoint, which takes CUSIPs directly, in batches.

Symptom

The first run against real filings sent a batch of 27 CUSIPs and resolved none of them, and pricing coverage across the signals fell to 3.6%. Nothing raised and the run finished. The only visible effect was a coverage figure that looked like a data problem.

Investigation

Twenty-seven misses out of twenty-seven is not what obscure securities look like; it is what a failed request looks like. The resolver wrapped each POST in except Exception, logged a warning and substituted an empty result for every CUSIP in the batch, so a rejected request and a CUSIP OpenFIGI has never heard of both came out as None. Sending the same request directly returned HTTP 413, “Request may only contain 10 mapping jobs”. I had sized batches from the 100 identifiers per request that some documentation gives; the keyless endpoint allows 10.

Fix

Batches are now 10 CUSIPs, 2.5 seconds apart to stay under the keyless limit of about 25 requests a minute. Every answer, hit or miss, is written to a Parquet cache so no CUSIP is queried twice, and among OpenFIGI’s per-exchange listings the resolver prefers the US composite, then the primary venues. Coverage on the re-run was 82.1%.

Reading the override table during the same change turned up a worse error. The entry labelled META was keyed on 57636Q104, which is Mastercard’s Class A CUSIP. An unmapped CUSIP drops out of the backtest; a wrongly mapped one is priced with another company’s history, and nothing downstream can tell. The key became 30303M102.

Status

Open. A check on 22 November 2026, running every override through OpenFIGI and the CUSIP check-digit calculation, found two more bad entries. 882508104, labelled TSM, is Texas Instruments. 912797LA1, labelled SPY, fails its check digit (the computed digit is 3) and OpenFIGI rejects it; its issuer prefix is the one US Treasury bills use. Neither CUSIP appears in the 144 published signals, so no reported figure changes, but the table meant to be the high-confidence path is not. The broad except is also still there, so a rate-limit response would again read as a batch of unknown securities. Both need fixing in the repository, with a test that validates every override’s check digit.

Of the 28 CUSIPs behind the published signals, 22 resolve, covering 127 of 144 signals. The other six are unknown to OpenFIGI by CUSIP and by ISIN, and none was guessed.

Sources

  • Commit 79341bc: OpenFIGI resolver and override correction
  • andria/data/cusip_mapper.py at that commit

Read the Andria Systems case study

OlderEvery memory figure after the first benchmark read 0 MB
NewerThe full pipeline froze the machine because two things could not spill
HomeProjectsAboutExperienceLogHireContactResumeGitHubLinkedIn
© 2026 Bhargav Kr Nath