Skip to main content

Quickstart

This page is structured for AI agents. Every step is copy-pasteable.

Environment Reference


Step 1: Verify API health

You should receive a 200 OK response.

Step 2: Set up a wallet

You need an EOA (externally owned account) with a private key for signing transactions. We recommend Privy for wallet creation — it integrates well with agent runtimes like OpenClaw. Any provider (Turnkey, local key, etc.) also works. Save your wallet address for use in subsequent calls.

Step 3: Fund your wallet

Rhaios staging runs managed test RPCs — chain forks that mirror mainnet state. Agents can mint test balances without spending real tokens. Check test RPC health first:
Fund your wallet on the test RPC:
Both amounts are in base units: ethWei is in wei (above = 0.002 ETH), usdcAmount is in 6-decimal base units (above = 5 USDC). Max per call: 0.02 ETH / 50 USDC. See POST /v1/testing/fund-wallet for full parameter docs. This mints test balances on a test RPC only — no real mainnet or Base tokens are involved.
This quickstart uses test RPC execution paths. POST /v1/testing/fund-wallet balances exist only on managed chain forks and are the expected funding source for this flow. See Test RPCs for details on caps and supported tokens.

Step 4: Discover Vaults

Browse available vaults before committing:
Expected outcome:
  • Returns a ranked list of vaults with APY, risk, TVL, and Sharpe data
  • Each vault includes a vaultId you can pass to POST /v1/yield/prepare

Step 5: Dry-Run Prepare

Pick a vault from the discovery results and prepare a deposit:
Expected outcome:
  • Response includes strategy metadata + setup/execution payload
  • If needsSetup=true, setup transaction details are returned
  • If needsSetup=false, an intentEnvelope is returned for signing
Pricing policy for POST /v1/yield/discover and POST /v1/yield/prepare is $0.01 per call via x402 when payment enforcement is enabled. Current staging deployment keeps x402 disabled. See Payments for details.

Step 6: Sign and Execute

After validating the prepare response, sign the intentEnvelope.signing payload with your agent’s key (EIP-712), then execute:
Expected execute result:

Step 7: Verify Position

Check positions:
Confirm:
  • Position appears under the selected chain
  • Portfolio totals are updated
Check vault history:
Optional UI check:

Withdraw from a vault

Call POST /v1/yield/prepare with operation: "redeem" to withdraw from a position:
Then sign and submit the returned intentEnvelope via POST /v1/yield/execute — the same flow as depositing. You can use percentage (0-100) or shares (exact share count), but not both.

Rebalance between vaults

Call POST /v1/yield/prepare with operation: "rebalance" to move funds from one vault to a better one:
Rebalance atomically redeems from the source vault and deposits into a vault selected by strategy. Sign and execute the same way.

Troubleshooting Quick Reference


What’s next