Rung 1
Make the first free call
Use public demo data to verify that Stackit exposes machine-readable treasury context before you ask a human for credentials.
curl -s https://www.stackit.ai/api/v1/public/liquidation-distance?ltv=40 | jq
Expected signal: "price_drop_to_liquidation_pct": 49.04
Rung 2
Connect to the MCP endpoint
The MCP endpoint exposes public read tools and sandbox previews. Live wallet actions return an auth-required response until bearer auth or x402 is configured.
claude mcp add stackit https://www.stackit.ai/api/mcp
Expected signal: Tool list includes get_market_rates, get_liquidation_distance, get_portfolio_state, preview_action, and gateway status.
Rung 3
Preview an action
Preview calls are deterministic sandbox responses. Unsafe requests return typed errors with safe_amount so an agent can adjust instead of guessing.
curl -s -X POST https://www.stackit.ai/api/v1/public/preview \
-H "Content-Type: application/json" \
-d '{"action":"borrow","amount":10000,"asset":"USDC","current_ltv":40}' | jqExpected signal: "approved": true
Rung 4
Run a sandbox transaction
Mint a temporary sandbox key, then run deposit, convert, borrow, and policy-state calls. Every sandbox response includes sandbox: true.
KEY=$(curl -s -X POST https://www.stackit.ai/api/v1/sandbox/keys | jq -r .key)
curl -s -X POST https://www.stackit.ai/api/v1/deposits \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -H "Idempotency-Key: demo-deposit-001" \
-d '{"amount_usdc":10000}' | jq
curl -s -X POST https://www.stackit.ai/api/v1/convert \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -H "Idempotency-Key: demo-convert-001" \
-d '{"amount_usdc":10000}' | jq
curl -s -X POST https://www.stackit.ai/api/v1/borrow \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -H "Idempotency-Key: demo-borrow-001" \
-d '{"amount_usdc":4000}' | jq
curl -s https://www.stackit.ai/api/v1/policy-state -H "Authorization: Bearer $KEY" | jqExpected signal: "sandbox": true
Rung 5
Request live access in-protocol
Graduation no longer requires leaving the protocol. Submit a live-access request with your operator's details; a human reviews it and contacts the operator with credentials. Poll the returned status_url. Wallet-sovereign agents can also pay per call today via x402 on Base Sepolia testnet (protocol v1, see /docs/x402); mainnet settlement activates with the Base deployment.
curl -s -X POST https://www.stackit.ai/api/v1/agents/apply \
-H "Content-Type: application/json" \
-d '{
"operator_name": "Ada Operator",
"operator_email": "ada@example.com",
"use_case": "Weekly USDC accumulation into BTC/ETH, borrow against collateral for compute costs",
"agent_name": "treasury-bot",
"agent_framework": "claude-agent-sdk",
"chain": "base"
}' | jq
curl -s https://www.stackit.ai/x402/prices.json | jq .settlementExpected signal: "status": "received" plus a status_url to poll
Rung 6
Run the wallet-sovereign loop
Register a treasury bound to your wallet with execution_mode 'wallet'. Actions then return unsigned transaction envelopes instead of executing; sign with your own wallet and relay. Execution is simulated today — the identical contract broadcasts real transactions at the Base launch.
RESP=$(curl -s -X POST https://www.stackit.ai/api/v1/treasuries \
-H "Content-Type: application/json" \
-d '{"wallet_address":"0x1111111111111111111111111111111111111111","preset":"balanced","execution_mode":"wallet"}')
KEY=$(echo $RESP | jq -r .api_key)
TX=$(curl -s -X POST https://www.stackit.ai/api/v1/deposits \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -H "Idempotency-Key: wallet-deposit-001" \
-d '{"amount_usdc":5000}' | jq -r .tx_id)
# sign with your wallet, then relay:
curl -s -X POST https://www.stackit.ai/api/v1/relay \
-H "Content-Type: application/json" -H "Idempotency-Key: wallet-relay-001" \
-d "{\"tx_id\":\"$TX\",\"signed_transaction\":\"0x<wallet-signed-hex>\"}" | jqExpected signal: "object": "relay_receipt" with "status": "confirmed"