POST
/api/wallet-analysis$0.05📊 Wallet Analysis
Analyze any crypto wallet address to get a comprehensive overview of holdings, transaction history, realized/unrealized PnL, DeFi positions, and risk profile. Supports Ethereum, Base, Solana, and Polygon wallets.
Request Body
Response Fields
Code Examples
cURL
bash
curl -X POST https://sparkforge.sh/api/wallet-analysis \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <x402-payment-token>" \
-d '{
"address": "0x6dC88e65c36c256ed6937f83c4b22CBbBE1894FD",
"chain": "ethereum"
}'Python
python
import requests
response = requests.post(
"https://sparkforge.sh/api/wallet-analysis",
headers={"Content-Type": "application/json", "X-PAYMENT": "<token>"},
json={"address": "0x6dC88e65c36c256ed6937f83c4b22CBbBE1894FD", "chain": "ethereum"}
)
data = response.json()
print(f"Portfolio: ${data['balance_usd']:,.2f} | Risk: {data['risk_profile']}")TypeScript / Node.js
typescript
const res = await fetch402("https://sparkforge.sh/api/wallet-analysis", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
address: "0x6dC88e65c36c256ed6937f83c4b22CBbBE1894FD",
chain: "ethereum",
}),
});
const { balance_usd, tokens, risk_profile } = await res.json();Example Response
json
{
"address": "0x6dC88e65c36c256ed6937f83c4b22CBbBE1894FD",
"chain": "ethereum",
"balance_usd": 12450.00,
"tokens": [
{ "symbol": "ETH", "balance": "2.5", "value_usd": 8500 },
{ "symbol": "USDC", "balance": "3950", "value_usd": 3950 }
],
"risk_profile": "moderate",
"pnl_30d": 1240.50
}💳 Payment via x402
This endpoint costs $0.05 per call, paid in USDC on Base, Polygon, or Solana. Use the @x402/fetch library to handle payments automatically, or implement the x402 handshake manually.
bash
# Free demo mode (no payment)
curl https://sparkforge.sh/api/wallet-analysis?demo=true
# Or try via MCP (Claude Desktop, Cursor, Windsurf)
# Add to mcp config: { "url": "https://sparkforge.sh/api/mcp" }