Grat’s relay is a standard REST API. Any programming language that can make HTTP requests can integrate directly with Grat. No dedicated SDK is required to start sponsoring transactions.Documentation Index
Fetch the complete documentation index at: https://grat.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Sponsoring a Transaction
To sponsor a transaction, send a POST request to the/v1/sponsor endpoint with the base64-encoded XDR.
Language Examples
Endpoints Summary
| Endpoint | Method | Description |
|---|---|---|
/v1/sponsor | POST | Wrap and submit a transaction. |
/v1/simulate | POST | Simulate a Soroban transaction. |
/v1/estimate | POST | Get fee estimates for a transaction. |
/health | GET | Check relay health and status. |
Error Handling
When an error occurs, the API returns a JSON object with a standardized format.Retry Logic
If you are implementing your own integration, we recommend retrying requests that return the following status codes:- 429 Too Many Requests: Use the value in the
Retry-Afterheader. - 503 Service Unavailable: Use exponential backoff (e.g., 1s, 2s, 4s).
Tips
- Idempotency: Use the
X-Idempotency-Keyheader to safely retry requests without risk of double-submission. - Rate Limits: Pay attention to rate limit headers in the response to avoid 429 errors.
- Stroops: All fee values in the API are represented in stroops (1 XLM = 10,000,000 stroops).
Do you need a dedicated SDK for your programming language? Open a feature request on our GitHub repository.