Errors
HTTP Status Codes
| Status | Description |
|---|---|
206 | Partial Content. At least one item failed. See failureResults in the response |
400 | Bad Request. The request is invalid (see the message), or a temporary processing error occurred. If the message isn't one of the validation messages below, retry later |
401 | Unauthorized. The X-SG-Authorization header is missing |
403 | Forbidden. The API key isn't recognised or has been revoked. On POST /public/portfolio-analysis, also returned when the Portfolio Analysis API isn't enabled for your account |
413 | Content Too Large. The request body is over 512 KB |
415 | Unsupported Media Type. Content-Type must be application/json |
429 | Too Many Requests. A rate limit was reached. See Quota |
5xx | Temporary server or network error. Retry with backoff |
Error Bodies
Most errors return a JSON body with an errorMessage:
json
{ "errorMessage": "You've reached the daily request limit" }Some errors return a standard problem-details body instead. This applies to 401, 415, and 400 for JSON that can't be parsed:
json
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
"title": "Unauthorized",
"status": 401,
"traceId": "00-…"
}A 403 for an unrecognised or revoked key has an empty body.
Request-Level Messages
| Status | errorMessage |
|---|---|
400 | The format of your request is invalid |
400 | Your request contains a duplicate request key ... |
400 | Our request contains an excessive number of items, which is beyond our supported limit (more than 200 identifiers) |
400 | Incorrect 'InstrumentType' format (Hot Stocks) |
400 | Incorrect 'CountryOfListing' format (Hot Stocks) |
403 / 400 | We're sorry, but you do not have the necessary permissions to access. ... The Portfolio Analysis API isn't enabled for your account. Returned as 403 by POST /public/portfolio-analysis and as 400 by the quota endpoint |
429 | Please be advised that you've exceeded the maximum request limit per minute |
429 | You've reached the daily request limit |
429 | The daily limit for requested items has been reached |
Item-Level Errors
Returned in failureResults[].errorMessage. When several format errors apply, they are joined with a comma.
errorMessage | Meaning |
|---|---|
Isin/CompositeBbgId/Ticker must be specified | The item has none of isin, compositeBbgId or ticker |
Incorrect 'ISIN' format | The ISIN isn't 12 uppercase characters in ISIN format |
Incorrect 'CompositeBbgid' format | The composite Bloomberg ID isn't 12 alphanumeric characters |
Incorrect 'Exchange' format | exchange isn't two uppercase letters |
Instrument was not identified | No security matches the identifiers you sent |
Missing instrument data in sharegain | We have no market data for this security within our freshness window (at least the last 2 business days) |
It seems that there's missing market data for this instrument | The security is identified, but its price is more than 2 business days old, its price can't be converted to USD, or no utilisation is available. Also returned for securities that aren't lendable |
Insufficient data - missing input | The security couldn't be identified from the data supplied |
See Market Data Freshness for which data gaps fail a security and which don't.
Support
📧 Email: support@sharegain.com