Skip to content

Errors ​

HTTP Status Codes ​

StatusDescription
206Partial Content. At least one item failed. See failureResults in the response
400Bad 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
401Unauthorized. The X-SG-Authorization header is missing
403Forbidden. 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
413Content Too Large. The request body is over 512 KB
415Unsupported Media Type. Content-Type must be application/json
429Too Many Requests. A rate limit was reached. See Quota
5xxTemporary 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 ​

StatuserrorMessage
400The format of your request is invalid
400Your request contains a duplicate request key ...
400Our request contains an excessive number of items, which is beyond our supported limit (more than 200 identifiers)
400Incorrect 'InstrumentType' format (Hot Stocks)
400Incorrect 'CountryOfListing' format (Hot Stocks)
403 / 400We'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
429Please be advised that you've exceeded the maximum request limit per minute
429You've reached the daily request limit
429The 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.

errorMessageMeaning
Isin/CompositeBbgId/Ticker must be specifiedThe item has none of isin, compositeBbgId or ticker
Incorrect 'ISIN' formatThe ISIN isn't 12 uppercase characters in ISIN format
Incorrect 'CompositeBbgid' formatThe composite Bloomberg ID isn't 12 alphanumeric characters
Incorrect 'Exchange' formatexchange isn't two uppercase letters
Instrument was not identifiedNo security matches the identifiers you sent
Missing instrument data in sharegainWe 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 instrumentThe 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 inputThe 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

Sharegain API Documentation