Integrate your AI agent with DeFi trading on Rigoblock smart pool vaults.
No API key needed — pay per request in USDC via the x402 protocol.
| Endpoint | Method | Price | What it returns |
|---|---|---|---|
/api/quote |
GET | $0.002 USDC | DEX price quote (no vault context needed) |
/api/chat |
POST | $0.01 USDC | AI-powered DeFi response (swap calldata, positions, analysis) |
Base URL: https://trader.rigoblock.com
Payments are in USDC on Base mainnet (eip155:8453) via the
x402 protocol. The Coinbase CDP facilitator at
api.cdp.coinbase.com handles verification and settlement.
curl https://trader.rigoblock.com/api/quote?sell=ETH&buy=USDC&amount=1&chain=base
# → 402 Payment Required (first call triggers x402 handshake)curl -X POST https://trader.rigoblock.com/api/chat \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "swap 1 ETH for USDC on Base"}],
"vaultAddress": "0xYourVault",
"chainId": 8453
}'
# → 402 Payment Required (first call triggers x402 handshake)Both endpoints return 402 on the first call. Your x402 client handles the
payment automatically and retries with the X-Payment header.
See examples/typescript/ and examples/python/ for complete working clients.
The full OpenAPI 3.1.0 spec is available at:
- Live: https://trader.rigoblock.com/openapi.json
- Local: openapi.json in this repo
Pay the x402 fee. No operator credentials needed.
Gets: Unsigned transaction data, price quotes, DeFi analysis. Cannot: Execute transactions on any vault.
The agent receives unsigned calldata. To execute it, the agent (or its operator) must sign and broadcast the transaction themselves.
Use cases:
- Price discovery across 7 chains
- Natural language → structured DeFi calldata
- Portfolio analysis and position queries (read-only)
- Strategy recommendations (analysis only)
Pay x402 fee AND provide operator auth credentials.
Gets: Everything in Tier 1, plus delegated (auto-execute) mode. Can: Trigger Rigoblock's agent wallet to execute trades on the authenticated vault.
Requirements:
operatorAddressmust be the vault owner on at least one supported chainauthSignaturemust be a valid EIP-191 signature of the auth message- The vault must have active delegation to the Rigoblock agent wallet
- The agent wallet must be authorized for the required function selector
Auth message format:
Welcome to Rigoblock Operator
Sign this message to verify your wallet and access your smart pool assistant.
| Chain | ID | Short name |
|---|---|---|
| Ethereum | 1 | ethereum |
| Base | 8453 | base |
| Arbitrum | 42161 | arbitrum |
| Optimism | 10 | optimism |
| Polygon | 137 | polygon |
| BNB Chain | 56 | bsc |
| Unichain | 130 | unichain |
Every transaction executed through delegated mode passes through:
- Operator Authentication — valid signature proving vault ownership
- Delegation Verification — on-chain delegation to the agent wallet
- Seven-Point Execution Validation — config, target, selector whitelist, simulation, gas caps
- NAV Guard (10% max loss) — simulates trade impact on vault NAV before broadcast
- Slippage Protection — default 1% tolerance
| Action | Why not |
|---|---|
| Drain vault assets | withdraw / transferOwnership selectors never delegated |
| Lose > 10% NAV in one trade | NAV guard blocks pre-broadcast |
| Bypass slippage | Enforced in swap calldata |
| Call arbitrary functions | Selector whitelist only |
| Target non-vault contracts | Target must equal vault address |
x402 settlement (USDC transfer) only occurs on 2xx responses:
| Response | Settlement |
|---|---|
| 200 OK | Settled — agent received value |
| 400 Bad Request | NOT settled — agent not charged |
| 401 Unauthorized | NOT settled — agent not charged |
| 500 Server Error | NOT settled — agent not charged |
This service is registered in the x402 Bazaar, Coinbase's discovery API for x402-enabled services.
MIT