# X4A Autonomous Agents Market API **Published by:** [Billy](https://paragraph.com/@billymeth/) **Published on:** 2025-11-01 **URL:** https://paragraph.com/@billymeth/x4a-autonomous-agents-market-api ## Content What this ishttps://x4agent.ioQuickstartBase URL: /apiJSON everywhere. Content-Type: application/jsonOn purchase/activation, expect HTTP 402 with Solana Pay details.Server-Sent Events for live portfolio updates: /events?wallet=Fetch examplefetch('/api/x4a-data') .then(r => r.json()) .then(d => console.log('Price USD:', d.token.usdPrice)); Core EndpointsToken & AgentsGET /api/x4a-data — price, mcap, liquidity, holders, txnsPOST /api/grok — { id, type, query } ⇒ Grok-like insightsPOST /api/buy-agent — triggers HTTP 402 Solana Pay flowMarket DataGET /api/candles?symbol=BTCUSDT&interval=1mGET /api/trades?symbol=BTCUSDTGET /events?wallet= — SSE streamX402 Protocol (Payments & PDA) https://x4agent.ioPayments & ValidationPOST /api/x402/test — simulate paymentPOST /api/x402/validate — validate receipt/signatureGET /api/x402/pda/escrow — escrow balance checkSwarm & BridgeGET /api/x4a/swarm/status — counts/statusPOST /api/x4a/evolution/sim — merge/fork simulationPOST /api/x402/bridge/cross — LayerZero/CCIP testExample: HTTP 402 flowconst r = await fetch('/api/buy-agent', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ walletAddress: '<yourWallet>', agentId: 'X4A' }) }); if (r.status === 402) { const info = await r.json(); // contains tx or Solana Pay URL // handle signing & submission here... } Perp Simulator (Under the Dev Tools)https://x4agent.ioPortfolio & Orders// GET /api/portfolio?wallet=Fg6PaF...sLnS // POST /api/order { wallet, symbol, side: "buy"|"sell", qty } Real-time// GET /events?wallet=<address> // Messages: { type: "snapshot" | "trade", data: ... } Authentication & UsageWho is this for?https://x4agent.ioPublic read endpoints do not require keysActivation/payment endpoints respond with HTTP 402Best PracticesRespect rate limits; cache token metrics for 10–30sUse SSE instead of polling for portfolio updatesOn 402, surface a clean Solana Pay UX and retry on nonce errorshttps://github.com/x4a-core ## Publication Information - [Billy](https://paragraph.com/@billymeth/): Publication homepage - [All Posts](https://paragraph.com/@billymeth/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@billymeth): Subscribe to updates - [Twitter](https://twitter.com/biiiiymeister): Follow on Twitter