Troubleshooting
Check your network setup
Section titled “Check your network setup”If you get certificate errors or other TLS/SSL errors, try running your code on a non-corporate network (for example 4G or a home network) without VPN. If that works, ask your IT team to allow the hostnames in Network requirements.
If you use a proxy, most HTTP clients read the HTTPS_PROXY environment variable:
export HTTPS_PROXY=http://proxy.example.com:8080To test the whole chain, see Check your connection.
Error responses
Section titled “Error responses”400 Bad Request
Section titled “400 Bad Request”The request is not valid. The message field in the JSON response says why. Common causes:
- An unknown parameter, for example
Unexpected key: [curve_type]. - A value that cannot be parsed, for example a duration with weeks (
P1W). functionwithoutfrequency, or the other way round.- More than the limit of 1,000,000 data points in one request
(
Too much data in request, adjust parameters to reduce size.). See Optimise your data queries.
401 Unauthorized
Section titled “401 Unauthorized”The request lacks valid authentication credentials. See Authentication.
403 Forbidden
Section titled “403 Forbidden”You do not have access to the curve, or to the requested period of data for the curve. A
common case is trial access to a curve while requesting data outside the trial period. Use
GET /curves/{id}/access to see your
access range for a curve.
A 403 on every request can also mean your access has been restricted because of excessive
usage. See Best practice.
The API does not say whether a 403 is about the curve or the period. This is deliberate:
more detail would let clients probe where we have data. Use the access endpoint instead.
If you need help, contact support with the curve you cannot access and the date range you are requesting.
404 Not Found
Section titled “404 Not Found”- With a message such as
No such curve: 123: the curve ID does not exist. Curve IDs can change, so look up the curve by name, see Curve types. - With an empty body: the request URL is too long. This happens when you search for many curve names in one request. Split the list into smaller batches, see Search for curves.