error code and a plain-English message.
Bad inputs, such as an unsupported value, return a validation error that names the problem. The API gives a clear coverage message instead of made-up data.
Examples
401, key missing
401, key not recognised
403, plan too low
error first.
429, too fast
A429 carries a Retry-After header with the seconds to wait. The body has error set to rate_limited and a scope that says which budget ran out:
An empty result is not an error
A200 with count of 0 means the record is not on file. It does not mean nobody filed. For example, an empty insider-trades list means no open-market trade is on file for that search. Read coverage in the response for what the dataset includes and leaves out.
Retry the safe way
- Stop a request that hangs. 20 seconds is a sensible timeout.
- After a
429, waitRetry-Afterseconds. Do not retry in a tight loop. - After a timeout, wait a few seconds and try once more. If it keeps failing, write to info@alphayou.net with the time and the address you called.
- Do not retry a
401,403,404or validation error. The same call will fail the same way.