🚧 Coming Soon
The Messages API is currently being updated to support the new report-focused approach. Check back soon for the latest endpoints.
The Messages API is currently being updated to support the new report-focused approach. Check back soon for the latest endpoints.
Overview
The messages endpoint allows you to submit natural language queries about blockchain data. The API processes messages asynchronously, providing a more robust way to handle longer-running queries.Request Flow
- Submit your query using the
/v1/messages
endpoint - Receive a
processingId
to track your request - Poll the
/v1/messages/{processingId}/status
endpoint to get the final result
Examples
Submitting a Query
Checking Status and Getting Results
Response Statuses
The status endpoint can return the following statuses:PENDING
: The message has been received and is waiting to be processedPROCESSING
: The message is currently being processedFINISHED
: Processing is complete and the result is availableERROR
: An error occurred during processing
Error Handling
When an error occurs, the status response will include anerrorMessage
field with details about what went wrong. Common error scenarios include:
- Invalid API key
- Malformed query
- Processing timeout
- Internal server errors
Best Practices
- Always implement proper error handling and retry logic
- Use appropriate polling intervals (2-3 seconds recommended)
- Set reasonable timeouts for your application
- Store the
processingId
for later reference if needed - Consider implementing a webhook system for production applications
Authorizations
Body
application/json
A natural language query about cryptocurrency prices
Example:
"Get the current price of ETH"