Errors

The CFX API uses conventional HTTP response codes to indicate the success or failure of an API request.

2xx Success

Codes in the 2xx range indicate success. Most commonly a successful response will be either:

CodeSummaryDescription
200OKThe request was successfully received, understood and processed.
201CREATEDThe request was successfully received, understood, processed and a resource has been created as a result.

Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.).

4xx Errors

Common 4xx error codes will be:

CodeSummaryDescription
400BAD REQUESTThe request could not be parsed or understood.
401UNAUTHORIZEDThe request contains no or invalid credentials.
403FORBIDDENThe authenticated user is not authorised to perform the action.
404NOT FOUNDThe requested resource could not be found.
429TOO MANY REQUESTSThe API user has hit an API or swap rate limit and can not be processed at this time.

Some 4xx error codes can be associated with valid negative user paths and are typically handled programatically by the API client.

5xx Errors

Codes in the 5xx range indicate an error occured within the CFX backend services. Errors of this nature are uncommon and we are constantly monitoring for them.