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.
amount of the strategy’s input asset. The returned transaction is base64-encoded:
- Unsigned for
sol-liquid-stakeandusdc-earn. - Partially signed for
sol-native-stake(the stake-account slot is pre-signed by the server; you only sign the wallet slot).
POST /api/v1/broadcast.
Request
| Field | Type | Required | Description |
|---|---|---|---|
strategy | "sol-native-stake" | "sol-liquid-stake" | "usdc-earn" | yes | Which strategy to stake into. |
wallet | string | yes | Solana wallet pubkey (base58) that will sign the transaction. |
amount | string | yes | Amount to stake, decimal string. |
Response — sol-native-stake
The server generates a fresh stake-account keypair and pre-signs that signature slot. The agent only signs as the wallet. Save the returned stakeAccount pubkey — you need it for future deactivate / withdraw / instant-unstake calls against this position.
route: "rpc" (no Sanctum involvement on the create + delegate path).
Response — sol-liquid-stake (Sanctum-routed)
route: "sanctum", the response also carries sanctumKind and sanctum_order. All three (hubra_token, sanctumKind, sanctum_order) must be passed back to /broadcast if you want Sanctum’s MEV-protected broadcaster. Sanctum’s execute endpoint validates the signed transaction against the original order and rejects mismatches.
Plain RPC (route: "rpc" at broadcast) works without the Sanctum-specific fields, but loses Sanctum’s broadcaster guarantees.
Response — usdc-earn (Voltr-routed)
sanctum_order. Broadcast via route: "rpc" — that is the only supported broadcast path for Voltr transactions.
The hubra_token
Every /stake (and /unstake) response includes a hubra_token HMAC’d over the message bytes of the unsigned transaction. POST /api/v1/broadcast requires this token and rejects any transaction that was not built by Hubra. Save it alongside the transaction and pass it back when broadcasting.
Tokens expire ~2 minutes after issue (matching Solana’s blockhash window). If your token expires, rebuild via /stake.
For the full mechanics, see Hubra token.
Examples
Errors
| Status | Slug | When |
|---|---|---|
400 | invalid_request | Missing or malformed fields. |
404 | not_found | Unknown strategy key. |
502 | upstream_error | Sanctum / Voltr could not build the transaction (wallet does not exist on-chain, no associated token account, insufficient liquidity for size). |
503 | service_unavailable | Strategy is announced but not live. |
See also
POST /unstake
Reverse the position.
POST /broadcast
Submit the signed transaction.
Hubra token
The HMAC gate.
Strategies
All strategy keys.