Errors
In this guide, we will talk about what happens when something goes wrong while you work with the API. Mistakes happen, and mostly they will be yours, not ours. Let's look at some status codes and error types you might encounter.
Status codes
Here is a list of the different categories of status codes returned by the Investment API. Use these to understand if a request was successful.
- Name
200 - OK
- Type
- Description
Everything worked as expected.
- Name
201 - Created
- Type
- Description
A successful response of CREATE requests.
- Name
204 - No Content
- Type
- Description
A successful response of UPDATE or DELETE requests.
- Name
400 - Bad Request
- Type
- Description
The request was unacceptable, often due to missing a required parameter.
- Name
401 - Unauthorized
- Type
- Description
username or password or bearer-token invalid.
- Name
403 - Forbidden
- Type
- Description
The API key doesn't have permissions to perform the request.
- Name
404 - Not Found
- Type
- Description
The requested resource doesn't exist.
- Name
422 - Unprocessable Entity
- Type
- Description
Validation Fails.
- Name
429 - Too Many Requests
- Type
- Description
Hit the API too quickly. We recommend an exponential backoff of your requests.
- Name
500 - Internal Server Error
- Type
- Description
Something went wrong on server.
Error Response
<span><span style="color: var(--shiki-color-text)">{</span></span> <span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">"code"</span><span style="color: var(--shiki-token-punctuation)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">401</span><span style="color: var(--shiki-token-punctuation)">,</span></span> <span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">"status"</span><span style="color: var(--shiki-token-punctuation)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">"Unauthorized"</span><span style="color: var(--shiki-token-punctuation)">,</span></span> <span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">"message"</span><span style="color: var(--shiki-token-punctuation)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">"Authentication credentials is invalid."</span></span> <span><span style="color: var(--shiki-color-text)">}</span></span> <span></span>