Skip to content

Ranked ticker-prefix symbol autocomplete (REQ-3.2).

GET
/api/symbols/search
curl --request GET \
--url https://api.tradr.cloud/api/symbols/search

Returns up to 10 NYSE/NASDAQ symbols whose ticker starts with the query prefix q, ranked exact-match-first, then by ascending ticker length, then alphabetically. q is sanitized to [A-Z.-]{0,16} (trimmed, uppercased); a normalized-empty q returns { results: [] } without a database prefix scan, and likewise before the reference table is first populated. Read-only and side-effect-free (CSRF-safe GET); never calls the quote provider (REQ-3.6). Requires an authenticated session.

q
string
/^[A-Z.-]{0,16}$/

{ results: SymbolSearchItem[] } — [] for an empty query or before first population.

Query out of charset or longer than 16 chars (VALIDATION_ERROR).

No authenticated session (UNAUTHORIZED).