These are the cross-cutting rules. Read them once; they apply to every endpoint.Documentation Index
Fetch the complete documentation index at: https://docs.hubra.app/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
Content type
Every request and successful response usesapplication/json.
application/problem+json (RFC 9457). See Errors for the format.
Decimal amounts
All amounts are passed and returned as decimal strings, not floats."1.5", get back "1.7234", and the server handles the unit math.
Versioning
Every response includes:/api/v2. The v1 surface is committed to API stability for the duration of its deployed life.
CORS
Read endpoints (GET) accept any origin:
OPTIONS) return 204 with the same headers and an empty body.
HTTP methods
| Method | Used for |
|---|---|
GET | Public reads (strategies, APY history, health) |
POST | All writes; also any read that takes a request body (e.g., quotes) |
OPTIONS | CORS preflight |
PUT, PATCH, or DELETE in the v1 surface.
Caching
Read endpoints areforce-dynamic server-side (no Next.js caching of the response). Upstream data (Sanctum APY, validator APY, Voltr stats) has its own cache windows; expect those to refresh on the order of a few minutes.
If you need the freshest possible APY, hit /api/v1/strategies directly rather than reading from a cached client.
Error format
Errors follow RFC 9457 problem-details:type, not on title. The type slug is stable; the title is human-friendly and may evolve. See Errors for the full slug list.
Rate limiting
There is currently no rate limit on the v1 surface. As the API matures, per-IP soft limits will be applied. When that ships, responses will includeRateLimit-* headers (RFC 9331).
For high-volume callers, contact hello@hubra.app to discuss.
Idempotency
Write endpoints acceptIdempotency-Key: <uuid> and replay the same response for that key within a 24-hour window. This matters for agent retries, where a network blip might cause a double-build of the same transaction.
Authentication
There is none on the v1 surface. The on-chain signature on the actual stake transaction is the only authorization that matters. Any caller can build an unsigned transaction; only the wallet that owns the input asset can sign it. If a future version adds API keys, the auth header will be:What’s next
Strategies
The strategy registry.
Errors
Problem-details and how to branch on slug.
Hubra token
The HMAC gate on /broadcast.
Glossary
Solana / staking terminology.