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

Successful HTTP Responses

CodeMeaningEndpoint(s)
200The request was successful.All endpoints.
201The order has been created.The /orders endpoint.

You can find an example of a successful response for each endpoint in the API reference.

Error HTTP Responses

CodeMessageMeaningEndpoint(s)
400Invalid queries, check 'errors' property for more info. See 400 Bad Request for more details.There is something wrong with your request. See the error for more details.All endpoints.
401API key is missing or invalid.Either the API key is invalid or it's missing when calling a protected endpoint.All endpoints.
403This request is forbidden.Your API key is disabled.All endpoints.
404Token not found.The provided combination of collection and tokenId was not found.The /tokens/refresh endpoint.
429Exceeds rate limit.You've exceeded your rate limit—your allowance for the number of API requests per minute.All endpoints.
500Internal server error.We're unable to process your request. Get in touch with us if you get this error.All endpoints.
503The service is running in read-only mode at the moment.We are performing a maintenance which requires to set the API to read-only mode.All POST requests.

400 Bad Request

Response schema:

{
  "success": false,
  "data": null,
  "message": "string",
  "errors": [ // Optional
    {
      "target": {},
      "value": {},
      "property": "string",
      "children": [],
      "constraints": {} // Optional
    }
  ]
}

This response can occur in two variants, as shown below. The first error response is strictly related to a type validation error; for example, the Ethereum address is invalid. While the second error format is generally about other non-type-related issues, for example, a duplicate MakerOrder or a missing approval.

In the following response example, a request was sent to the /orders endpoint with invalid parameters; the startTime was set to 1 and the pagination[first] to ABCD.

https://api.looksrare.org/api/v1/orders?isOrderAsk=true&nonce=8&startTime=1&pagination[first]=ABCD

{
  "success": false,
  "data": null,
  "message": "Invalid queries, check 'errors' property for more info.",
  "errors": [
    {
      "target": {
        "isOrderAsk": true,
        "nonce": {
          "type": "BigNumber",
          "hex": "0x08"
        },
        "pagination": {
          "first": null
        },
        "startTime": {
          "type": "BigNumber",
          "hex": "0x01"
        }
      },
      "value": {
        "type": "BigNumber",
        "hex": "0x01"
      },
      "property": "startTime",
      "children": [],
      "constraints": {
        "isTimestamp": "startTime must be a valid timestamp in seconds"
      }
    },
    {
      "target": {
        "isOrderAsk": true,
        "nonce": {
          "type": "BigNumber",
          "hex": "0x08"
        },
        "pagination": {
          "first": null
        },
        "startTime": {
          "type": "BigNumber",
          "hex": "0x01"
        }
      },
      "value": {
        "first": null
      },
      "property": "pagination",
      "children": [
        {
          "target": {
            "first": null
          },
          "value": null,
          "property": "first",
          "children": [],
          "constraints": {
            "isNumber": "first must be a number conforming to the specified constraints"
          }
        }
      ]
    }
  ]
}

As shown above, with this type of error:

  • success will be set to false.
  • data will be set to null.
  • message will be set to Invalid queries, check 'errors' property for more info.
  • errors will contain an object for each invalid parameter in your request. (optional)

An error object has the following properties:

  • target will contain all the request's parameters.
  • value will contain the value which is causing the error.
  • property will contain the invalid property.
  • children will contain an error object for each error if the property value is an object.
  • constraints will contain an object with a property for each constraint that was not met. (optional)

Other errors messages

In some cases, when sending requests to the /orders endpoint, the 400 error can differ from the above format.

For example:

{
  "success": false,
  "data": null,
  "message": "Cannot query Orders with a nonce without a signer."
}

Possible message values:

  • Cannot query Orders with a tokenId without a collection.
  • Cannot query Orders with a nonce without a signer.
  • This strategy is deprecated
  • tokenId is missing
  • Signature and Signer do not match.
  • Token does not exist.
  • Collection does not exist.
  • Duplicated order payload.
  • Duplicated order (nonce) payload.
  • Invalid order payload {ERROR_CODE_STRING}.

All the possible ERROR_CODE_STRING values can be found here: Order Validation Errors

For example:

{
  "success": false,
  "data": null,
  "message": "Invalid order payload (NONCE_BELOW_MIN_ORDER_NONCE)."
}

All other error responses

Response schema:

{
  "success": false,
  "data": null,
  "name": "string", // Optional
  "message": "string"
}