# Error Code

**Error Codes**

API.market uses standard HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate a clientside error, which means that failed given the information provided (e.g., a missing parameter, unauthorized access, etc.). Codes in the 5xx range indicate an error with API.market's servers (normally this shouldn't happen at all).

If the response code is not 200, it means the operation failed somehow and you may need to take an action accordingly. You can check the response (which will be in JSON format) for a field called **'message'** that briefly explains the error reported.

| Status Code             | Explanation                                                              |
| ----------------------- | ------------------------------------------------------------------------ |
| 400 - Bad Request       | The request was unacceptable, often due to missing a required parameter. |
| 401 - Unauthorized      | No valid API key provided.                                               |
| 404 - Not Found         | The requested resource doesn't exist.                                    |
| 429 - Too many requests | API request limit exceeded. See section Rate Limiting for more info.     |
| 5xx - Server Error      | We have failed to process your request. (You can contact us anytime)     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.api.market/error-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
