Skip to Content
Finkhoz

Errors

What each error means and when to retry.

All errors use the same JSON format:

{
  "status": "Unprocessable Entity",
  "errors": ["invalid tab, must be one of gainers, losers, fifty-two-week-high, fifty-two-week-low"]
}
  • status is the HTTP status text.
  • errors is a list of messages explaining what went wrong. Messages are usually strings. A few validation errors (for example page=0 on news) return an object instead:
{
  "status": "Unprocessable Entity",
  "errors": [{ "field": "marketNewsQuery.Page", "tag": "min", "value": "1" }]
}

Status codes

StatusMeaningWhat to doRetry?
200SuccessRead data–
400Invalid request, for example an exchange other than NSE/BSE or a missing required parameterFix the requestNo
401Missing, invalid or revoked API keyCheck your Authorization header and keyNo
403IP address not approved, or account disabledAsk Finkhoz to approve your IPNo
404Unknown endpoint, an unknown or private basket or trade idea, or no report for a basketCheck the path and IDNo
422A parameter value is not allowed, for example an unknown tab or size above 100Use an allowed value (see the API reference)No
429Rate limit exceededWait Retry-After secondsYes, after waiting
502The data service is temporarily unavailableRetry laterYes, with backoff
504The data service took too long to respondRetry laterYes, with backoff

Retry with backoff means waiting longer after each failed attempt, for example 1, 2, then 4 seconds, and giving up after a few tries.

Empty results are not errors

If a stock token is unknown, analytics endpoints return 200 with an empty list:

{ "status": "success", "data": [] }

Check that data is not empty before reading from it.

News endpoints are slightly different: an empty page leaves out data completely, so treat a missing data as an empty list.

Getting help

When contacting Finkhoz about an error, include:

  • the endpoint and parameters you called,
  • the time of the request (with time zone),
  • the full error response.

Never include your API key in support requests.

On this page