Response Status
The result of requests to J-Quants API is indicated by HTTP status codes.
If the request is successful, 200 is returned, and if an error occurs, error codes in the 400 or 500 range are returned.
The error response Body may contain a JSON object with error details.
Status Code List
| Status Code | Name | Description |
|---|---|---|
| 200 | OK | The request was successful. |
| 210 | No Content (Partial) | Data could not be retrieved due to reasons such as being outside the available time window or non-existent issue codes (used in some APIs such as the Morning Session Stock Prices (OHLC) API). |
| 400 | Bad Request | Request parameters are invalid or required parameters are missing. |
| 403 | Forbidden | Access permission is denied. The message differs depending on the cause; see Causes of 403 Forbidden and what to do for details. |
| 429 | Too Many Requests | The number of requests exceeded the limit (rate limit). No Retry-After header is included, so do not retry immediately; wait at least one minute (about two minutes to be certain) before resuming requests. See Rate Limits for details. |
| 500 | Internal Server Error | An error occurred on the server. Please retry after some time. |
Causes of 403 Forbidden and what to do
A 403 is returned for several reasons, and the response message differs depending on the cause.
The incoming api key is invalid or expired.— Returned when the API key value cannot be recognized as a valid key. See the FAQ "I'm getting a 403 error with an 'invalid or expired' message.".- Access to data or endpoints not included in your subscription plan — See APIs and Data Storage Period by Subscription for what is available under your plan.
- An incorrect URL or HTTP method — Check the request format in Quickstart. If you are using V1 endpoints, see also Migration from V1 to V2.
When No Matching Data Exists
If no data matches the specified search conditions, the API does not return an error. A response with status code 200 and an empty array in data is returned. In this case, no pagination_key is set.
{
"data": []
}
Example Error Message
When an error occurs, details are returned in JSON format as shown below. Note that while the error response body may contain a message, it is not guaranteed to always be included.
{
"message": "This API requires at least 1 parameter as follows; date, code"
}