Install
openclaw skills install @leftychris13/liquid-agent-stocksBuy, hold, rebalance and sell a basket of Coinbase tokenized US stocks (NVDA, AAPL, META, GOOGL) on Base from $1 through the free Liquid Agent API. Use when a user asks to invest in stocks, buy an index or ETF on-chain, put USDC into equities, check or rebalance a stock portfolio, or cash out of stocks.
openclaw skills install @leftychris13/liquid-agent-stocksOne HTTP API lets you open a self-custodied vault on Base that holds a band-rebalanced basket of Coinbase's tokenized NVDA, AAPL, META, GOOGL, buy in from $1 USDC, rebalance, and sell any block. No account, no API key, no project token, no oracle. The server never holds a key: every write returns an unsigned transaction that you sign with your own wallet and broadcast on Base.
Base URL: https://api.liquidagent.ai · Chain: Base mainnet (eip155:8453)
If the user wants a single individual stock rather than the four-stock basket, say so and offer the basket anyway; the vault always holds all four at the target weights.
eth_signTypedData_v4).0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913.POST /v1/gas {sender, calls:[tx]} → the 402 is the exact USDC quote (from $0.03) → pay it and repeat → sign the returned typedData (+ EIP-7702 authorization the first time) → POST them back to /v1/gas; the sponsor submits and pays the gas. Smart-wallet SDKs can use the same URL as an ERC-7677 paymaster. See examples/gasless.js.2000000 = $2.00. Weights are basis points summing to 10000.Always start with the free guide if anything is unclear: GET /v1/guide.
GET /v1/basket → constituents with live prices, fees, minDepositUsdc.GET /v1/quote?usdc=2000000 → shares, mintFeeUsdc, netUsdc. Show this to the user before spending.GET /v1/balance/<yourAddress>. If vaultCount > 0, use vaults[0].vault and skip step 4. Creating a second vault is almost never what the user wants.POST /v1/create-vault body {} → {to,data,value,chainId}. Sign, broadcast, wait for the receipt, then re-run step 3 to get the vault address.POST /v1/set-weights body {"vault":"0x…","weightsBps":[4000,2000,2000,2000]} → unsigned tx. Order is NVDA, META, AAPL, GOOGL. Each weight can move at most 2000 bps per call. Default is 2500 each.POST /v1/buy body {"vault":"0x…","usdc":"2000000","permit":true,"owner":"0xYourAddress"} → {typedData}.typedData off-chain with eth_signTypedData_v4 (free, no gas).POST /v1/buy again with {"vault":"0x…","usdc":"2000000","permit":{"deadline":<typedData.message.deadline>,"signature":"0x…"}} → ONE unsigned depositWithPermit tx. Sign and broadcast with gas limit ~3,000,000.approve step is needed. Omit permit entirely only if your wallet cannot sign typed data; then you get {steps:[approve, deposit]} to send in order.GET /v1/vault/<vault> → navUsdc, current vs target weightsBps, rebalanceNeeded.POST /v1/rebalance body {"vault":"0x…"} → unsigned tx. Only when rebalanceNeeded is true or after changing weights.POST /v1/redeem body {"vault":"0x…","shares":"<amount>","inKind":false} → unsigned tx that burns shares and pays USDC. inKind:true returns the raw stock tokens instead and works even if pricing is unavailable. shares comes from step 3.POST /v1/send body {"vault":"0x…","to":"0xRecipient","shares":"<amount>"} → unsigned tx. The recipient needs no vault and can redeem the shares themselves. Irreversible.Every unsigned tx has the shape {to, data, value, chainId}. Sign it with the wallet that owns the funds and submit with eth_sendRawTransaction to any Base RPC (for example https://mainnet.base.org).
API=https://api.liquidagent.ai
ME=0xYourAddress
VAULT=$(curl -s $API/v1/balance/$ME | jq -r '.vaults[0].vault')
# 1) get the permit to sign
curl -s -X POST $API/v1/buy -H 'content-type: application/json' \
-d "{\"vault\":\"$VAULT\",\"usdc\":\"5000000\",\"permit\":true,\"owner\":\"$ME\"}" > permit.json
# 2) sign permit.json .typedData with eth_signTypedData_v4 -> SIG, read DEADLINE from .typedData.message.deadline
# 3) get the single deposit tx
curl -s -X POST $API/v1/buy -H 'content-type: application/json' \
-d "{\"vault\":\"$VAULT\",\"usdc\":\"5000000\",\"permit\":{\"deadline\":$DEADLINE,\"signature\":\"$SIG\"}}"
# -> {to,data,value,chainId}: sign + broadcast with gas limit 3000000
These return HTTP 402 with an x402 v2 challenge. If your runtime can pay x402 (agentcash, an x402 fetch wrapper, or the OpenClaw x402 skill), just retry with payment. Everything above stays free.
GET /v1/signals — $0.04. The whole basket's rebalancing signal in one call: per-stock returns, volatility, RSI, trend, relative strength, correlation, and an inverse-volatility suggestedWeightsBps you can pass straight to /v1/set-weights. Add ?vault=<yours> for your drift.POST /v1/publish body {"vault":"0x…","label":"Alice's stocks"} — $0.25 flat. Mints a live shareable portfolio page at https://api.liquidagent.ai/v/<slug> for 24 hours; the user opens viewUrl with no wallet or login. Re-publish to keep it alive./v1/balance. Create a new one only if vaultCount is 0.More: https://api.liquidagent.ai/v1/guide (plain-English), https://api.liquidagent.ai/openapi.json (full spec), https://api.liquidagent.ai/llms.txt.