API Error Codes
Standard API error codes with descriptions. Read each code together with the response message.
HTTP Status Codes
The HTTP status code on the response indicates the general outcome of the request. Read it together with the response body for the exact condition.
| Status Code | Meaning |
|---|---|
| 200 | Request was successful. |
| 400 | Bad request. The request is invalid, or certain other errors. |
| 401 | Authorization error. The user could not be authenticated. |
| 403 | Permission error. The user does not have the necessary permissions. |
| 429 | Rate limit exceeded. The user has been blocked for exceeding the rate limit. |
| 500 | Internal server error. |
Application Error Codes
Read the error code together with the complete response message. The code identifies the category; the message explains the exact condition returned for the request.
| Code | Description |
|---|---|
| -8 | The access token has expired. Generate a valid token before sending the request again. |
| -15 | An invalid access token was provided. Check the token used in the request. |
| -16 | The server could not authenticate the user token. Verify the authentication details and try again after correcting them. |
| -17 | The access token is invalid or has expired. Complete the required authentication flow and use a valid token. |
| -50 | One or more request parameters are invalid. Read the message field for details about the affected input. |
| -51 | The Order ID is invalid while fetching or modifying an order. Check the Order ID and the operation being performed. |
| -53 | The Position ID is invalid. Check the current positions and use the correct Position ID. |
| -99 | The order placement was rejected. Read the rejection message in the API response before taking another action. |
| -300 | The symbol is invalid. Verify it through Appendix → Symbol Master. For direct URLs, URL-encode symbols containing special characters; FYERS SDKs handle this automatically. |
| -352 | The App ID is invalid. Check the App ID configured for the request. |
| -352 | No position is available to exit. Read the response message and request context to identify which -352 condition applies. |
| -429 | The API rate limit was exceeded for the applicable second, minute or day limit. Stop repeated calls, wait for the limit window and then retry. |
| 400 | The multi-leg order request contains invalid input. Review the required fields and values for every leg. |
The same error code may be used for more than one condition. Use the response message and API operation to identify the correct cause before retrying.
Last updated on