Ranked ticker-prefix symbol autocomplete (REQ-3.2).
GET
/api/symbols/search
const url = 'https://api.tradr.cloud/api/symbols/search';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tradr.cloud/api/symbols/searchReturns 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.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”q
string
Responses
Section titled “Responses”{ 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).