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
There is no
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:Referral attribution
A referral code on a stake call credits the staking wallet to the code’s owner. This is not authentication — it’s attribution, and it’s entirely optional. Hubra partners (protocols, devs, creators) get a code from partner.hubra.app that resolves to their payout wallet, but any referrer’s code works — a partner is just a referrer. Pass it onPOST /api/v1/stake, either as a referral_code body field or an X-Referral-Code header:
400 invalid_request; one that doesn’t resolve returns 404 not_found.
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.