Skip to main content
A wallet with USDC and a few lines of code. That’s all you need to query smart money data across Polymarket, Hyperliquid, and Meteora. Pick a payment protocol that fits your stack.

What You’re Building Toward

Here’s an AI agent querying Polymarket smart money data in real time:

Payment Flow (All Protocols)

Every protocol follows the same settle-after-execute pattern. The server holds your signed transaction and only broadcasts it on-chain after a successful query with data.
CLIENT                          SERVER                          BLOCKCHAIN
  |                               |                               |
  |  1. GET /api/v1/endpoint      |                               |
  |------------------------------>|                               |
  |                               |                               |
  |  2. 402 + price + challenges  |                               |
  |  (x402, Tempo, Solana)        |                               |
  |<------------------------------|                               |
  |                               |                               |
  |  3. Sign USDC transfer        |                               |
  |  (NO broadcast)               |                               |
  |                               |                               |
  |  4. Re-send + signed tx       |                               |
  |------------------------------>|                               |
  |                               |  5. Validate tx               |
  |                               |  6. Run query                 |
  |                               |                               |
  |                               |--- fail/empty? DISCARD tx --->|
  |  error, no charge             |                               |
  |<------------------------------|                               |
  |                               |                               |
  |                               |--- success? Broadcast tx ---->|
  |                               |                    USDC moves |
  |  8. 200 + data + receipt      |<------------------------------|
  |<------------------------------|                               |
If the query fails (timeout, server error, empty results), the signed transaction is discarded and you are never charged. You only pay for successful responses with data.

Choose Your Protocol

Your First Query

Fetch trending Polymarket markets:
const { data, price } = await paidFetch(
  "/api/v1/markets/trending?timeframe=24h&limit=5"
);
console.log(`Paid $${price} USDC for ${(data as any[]).length} markets`);
POST endpoint (smart money intelligence for a specific market):
const { data } = await paidFetch("/api/v1/markets/intelligence", {
  method: "POST",
  body: { condition_id: "0xabc123...", top_n_wallets: 10 },
});

Session Memory for Agents

If your agent runs across multiple sessions, persist setup details to avoid re-reading the full spec every time. Store in ~/.claude/agents/metengine-memory.md:
  • Wallet address and balance verification status
  • Working bootstrap code snippet
  • Last 10 endpoint calls with latency and cost
  • Any quirks or fallback strategies discovered
This cuts token overhead by roughly 80% on subsequent sessions.

Error Handling

StatusMeaningAction
402Payment requiredNormal first step. Parse and sign.
200SuccessData returned. Payment settled.
504TimeoutNo charge. Retry with narrower parameters or use a fallback endpoint.
503/429Rate limitNo charge. Back off per Retry-After header.
500Server errorNo charge. Some endpoints have known fallbacks (see Endpoints).

Next Steps

Browse All Endpoints

74 endpoints with pricing, parameters, and known quirks per platform.

Full Specification

Complete skill spec with every parameter, fallback, and integration pattern.