curl and a Solana keypair. The same shape applies to native staking and USDC Earn.
You need a funded Solana wallet (at least the amount you want to stake plus a few thousand lamports for safety; Hubra covers gas, but you need the asset to stake itself). And a way to sign transactions locally.
1. Discover the strategies
sol-liquid-stake. (All four keys are live and agent-callable — including sol-leveraged-stake, which deposits SOL into raSOL Max. See Strategies → sol-leveraged-stake.)
2. Build the unsigned transaction
transaction, hubra_token, sanctumKind, and sanctum_order. You will pass all four back to /broadcast.
3. Sign the transaction
Using@solana/web3.js:
tx.sign([wallet]) only fills your wallet’s slot. The stake-account slot is pre-signed by Hubra’s server.
4. Broadcast
For Sanctum-routed flows (any liquid stake or instant native unstake), forward the Sanctum-specific fields:Adapting to other strategies
The shape is identical for all four agent-callable strategies. What changes:- Native stake (
sol-native-stake): the response includes a freshstakeAccountpubkey. Save it; you need it to deactivate or instant-unstake later. Broadcast viaroute: "rpc"for stake,route: "sanctum"for instant unstake. - Liquid stake (
sol-liquid-stake): Sanctum-routed always. - USDC Earn (
usdc-earn): broadcast viaroute: "rpc". Nosanctum_orderto forward. - Leveraged raSOL Max (
sol-leveraged-stake): depositamountin SOL — one tx does SOL → raSOL → raSOL Max LP. Unstake burns raSOL Max LP → raSOL (outputAsset: "SOL"adds a chained step to finish to SOL). Broadcast viaroute: "rpc".
Stake
POST /api/v1/stakeUnstake
POST /api/v1/unstakeWithdraw
POST /api/v1/withdrawBroadcast
POST /api/v1/broadcast