Response

The Transpose API has two types of response types: one for successes and one for errors. A success response will be returned on any request that completes successfully (even if no results are returned) along with a HTTP 200 status code. An error response will be returned on any request that fails, whether due to the client (i.e. you) or the server (i.e. us), along with a HTTP 4xx or 5xx status code.

Success Response

The success response will always obey the following top-level JSON structure:

NameTypeDescription
statusstringThe status of the response. Will be success for a success response.
countintegerThe number of results returned (matches the length of the results field).
nextstringA valid URL with a cursor key pointing to the next page of results.
resultslistA list of objects containing the results of the request.

Here is an example of an actual success response following this structure:

{
  "status": "success",
  "count": 1,
  "next": "https://api.transpose.io/v0/nft/collections-by-name?cursor=eyJzdWJzdH",
  "results": [{
    "account_address": "0x05a56E2D52c817161883f50c441c3228CFe54d9f",
    "created_timestamp": "2015-07-30T15:26:28Z",
    "account_type": "eoa",
    "eth_balance": 22429528978412558
  }]
}

Error Response

The error response will always obey the following top-level JSON structure:

NameTypeDescription
statusstringThe status of the response. Will be error for an error response.
messagestringA more descriptive error message explaining where the request failed.

Here is an example of an actual error response following this structure:

{
  "status": "error",
  "message": "Invalid value for contract_addresses: 0x12345"
}