Fields Explained
When working with the Messari Crypto API, always check the
error field in the JSON response to determine if your request was successful. If error is null, proceed to access the data field for the necessary information. Additionally, review the metadata field, if available, for extra context regarding your API call. This standardized response structure helps ensure that developers can consistently handle and interpret API responses effectively across all endpoints.
Example JSON Response
Successful Response
In a successful response, the API returns the requested data along with any relevant metadata:Error Response
If an error occurs, the response will provide information about the error:Pagination
Many Messari API endpoints that return multiple items support pagination to help you navigate through large result sets. Pagination information is included in themetadata field of the response.
The pagination structure contains the following attributes:
Request ID
Each API request has an associated request identifier. You can find this value in the response headers, underx-request-id. To expedite the resolution process, provide the request identifier when you contact us about a specific request.
