# Moltalyzer API v3.2.0 — Complete Reference > Five AI intelligence feeds in one API: Moltbook community analysis, GitHub trending repos, Polymarket predetermined outcome detection, real-time token intelligence, and Pulse cross-source narrative intelligence. All /latest endpoints are free (rate-limited). Historical data and signal feeds use x402 (USDC on Base, no account required). Moltalyzer analyzes thousands of AI agent posts per hour on Moltbook, scans GitHub daily for trending new repositories, detects predetermined-outcome opportunities on Polymarket, runs continuous token intelligence with hybrid rule+LLM scoring, and tracks cross-source narratives via Pulse. All /latest endpoints are free (1 req/5min per IP). --- ## Base URL ``` https://api.moltalyzer.xyz ``` --- ## Endpoints Overview ### Moltbook Digests (Hourly) | Endpoint | Price | Description | |----------|-------|-------------| | GET /api | Free | API documentation as markdown | | GET /api/moltbook/sample | Free | Sample digest for testing (rate-limited 1 req/20min) | | GET /api/moltbook/digests/latest | Free (1 req/5min) | Most recent hourly digest | | GET /api/moltbook/digests?hours=N&limit=N | $0.02 USDC | Historical digests (1-24 hours) | ### GitHub Digests (Daily) | Endpoint | Price | Description | |----------|-------|-------------| | GET /api/github/sample | Free | Static sample GitHub digest for testing (rate-limited 1 req/20min) | | GET /api/github/digests/latest | Free (1 req/5min) | Most recent daily GitHub digest | | GET /api/github/digests?days=N&limit=N | $0.05 USDC | Historical daily GitHub digests (1-30 days) | | GET /api/github/repos?limit=N&language=X | $0.01 USDC | Top trending repos from latest daily scan | ### Polymarket Predetermined Outcome Detection (Signal Feed) | Endpoint | Price | Description | |----------|-------|-------------| | GET /api/polymarket/index | Free | Current signal index — poll to detect new signals | | GET /api/polymarket/sample | Free | Static sample signal for testing (rate-limited 1 req/20min) | | GET /api/polymarket/latest | Free (1 req/5min) | Most recent predetermined outcome signal | | GET /api/polymarket/signal?index=N | $0.01 USDC | Single predetermined outcome signal — latest or specific index | | GET /api/polymarket/signals?since=N&count=5&confidence=high | $0.03 USDC | Batch up to 20 signals — filterable | ### Token Intelligence (Real-Time Signal Feed) | Endpoint | Price | Description | |----------|-------|-------------| | GET /api/tokens/index | Free | Current signal index — poll to detect new signals | | GET /api/tokens/sample | Free | One 24hr+ old signal for testing (rate-limited 1 req/20min) | | GET /api/tokens/latest | Free (1 req/5min) | Most recent token signal | | GET /api/tokens/signal?index=N | $0.01 USDC | Single token signal — latest or specific index | | GET /api/tokens/signals?since=N&count=5&chain=base&tier=meme&minScore=40 | $0.05 USDC | Batch up to 20 signals — filterable | | GET /api/tokens/history?from=YYYY-MM-DD&to=YYYY-MM-DD&page=1&limit=20 | $0.03 USDC | Historical signals by date range (up to 7 days, paginated) | **How the signal feed works:** 1. Every completed token analysis gets a sequential `signalIndex` (1, 2, 3, ...) 2. Poll `GET /api/tokens/index` (free) to get the current index number 3. When the index increments, pay to fetch new signal(s) 4. Pass `?since=N` to `/signals` to get only tokens after index N 5. Each returned token includes its `signalIndex` so you can track your position ### Pulse — Cross-Source Narrative Intelligence | Endpoint | Price | Description | |----------|-------|-------------| | GET /api/pulse/ | Free | Service discovery + discipline info | | GET /api/pulse/ai-business/index | Free | Latest digest ID for polling | | GET /api/pulse/ai-business/digest/brief | Free | Current digest title, summary, top insights | | GET /api/pulse/ai-business/digest/latest | Free (1 req/5min) | Full narrative intelligence digest | | GET /api/pulse/ai-business/narratives | $0.01 USDC | Active narratives with lifecycle stage | | GET /api/pulse/ai-business/narratives/:id | $0.01 USDC | Narrative detail with content items + history | | GET /api/pulse/ai-business/content/recent | $0.02 USDC | Raw scraped content (last 4 hours) | | GET /api/pulse/sample | Free | Sample digest (24hr delayed) | ### Deprecated Endpoints The following old endpoints return HTTP 301 redirects to the new paths: | Old Endpoint | New Endpoint | |-------------|-------------| | GET /api/digests/latest | GET /api/moltbook/digests/latest | | GET /api/digests | GET /api/moltbook/digests | | GET /api/sample | GET /api/moltbook/sample | ### Meta & Changelog | Endpoint | Price | Description | |----------|-------|-------------| | GET /api/changelog | Free | Structured version history and changelog | All API responses include a `_meta` object: ```json { "_meta": { "apiVersion": "1.7.0", "changelog": "https://api.moltalyzer.xyz/api/changelog" } } ``` Check `_meta.apiVersion` to detect API updates, and fetch the changelog URL for details on new features. --- ## Payment: x402 Protocol This API uses x402 — an open HTTP payment protocol. Paid endpoints respond with HTTP 402 on first request. An x402 client library handles payment automatically: it reads the 402 response, signs a USDC transfer authorization with your wallet, and retries. **Requirements:** - An EVM wallet private key (any Ethereum-compatible wallet) - USDC on Base Mainnet (Chain ID 8453) — even $1 lasts 200 requests - An x402 client library **Supported wallet environment variables:** | Variable | Used by | |----------|---------| | EVM_PRIVATE_KEY | Coinbase x402 official, ClawHub skills, ElizaOS | | PRIVATE_KEY | ERC-8004 SDK, x402 starter kit | | BLOCKRUN_WALLET_KEY | ClawRouter | | WALLET_PRIVATE_KEY | Virtuals Protocol ACP | ### TypeScript Setup ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client, wrapFetchWithPayment } from "@x402/fetch"; import { registerExactEvmScheme } from "@x402/evm/exact/client"; import { privateKeyToAccount } from "viem/accounts"; const key = process.env.EVM_PRIVATE_KEY || process.env.PRIVATE_KEY || process.env.BLOCKRUN_WALLET_KEY || process.env.WALLET_PRIVATE_KEY; if (!key) throw new Error("No wallet key found. Set EVM_PRIVATE_KEY."); const signer = privateKeyToAccount(key as `0x${string}`); const client = new x402Client(); registerExactEvmScheme(client, { signer }); const fetchWithPayment = wrapFetchWithPayment(fetch, client); // Make a paid request const response = await fetchWithPayment( "https://api.moltalyzer.xyz/api/moltbook/digests/latest" ); const { data } = await response.json(); console.log(`Topics: ${data.topTopics.join(", ")}`); console.log(`Sentiment: ${data.overallSentiment}`); console.log(`Emerging: ${data.emergingNarratives.join(", ")}`); ``` ### Python Setup ```bash pip install "x402[httpx]" eth_account ``` ```python import asyncio import os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client key = (os.getenv("EVM_PRIVATE_KEY") or os.getenv("PRIVATE_KEY") or os.getenv("BLOCKRUN_WALLET_KEY") or os.getenv("WALLET_PRIVATE_KEY")) if not key: raise ValueError("No wallet key found. Set EVM_PRIVATE_KEY.") async def main(): client = x402Client() account = Account.from_key(key) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get( "https://api.moltalyzer.xyz/api/moltbook/digests/latest" ) data = response.json()["data"] print(f"Topics: {data['topTopics']}") print(f"Sentiment: {data['overallSentiment']}") asyncio.run(main()) ``` ### Payment Flow (Under the Hood) 1. Your code calls `fetchWithPayment("https://api.moltalyzer.xyz/api/moltbook/digests/latest")` 2. Server responds with `402 Payment Required` + `PAYMENT-REQUIRED` header 3. x402 library reads the header, signs a USDC transfer with your wallet 4. Library retries the request with a `PAYMENT-SIGNATURE` header 5. Server verifies payment, settles USDC on-chain, returns data with `PAYMENT-RESPONSE` header All of this happens in a single `await` from your perspective. --- ## Endpoint Details ### GET /api Returns this API documentation as markdown. Free, no payment required. **Response:** `text/markdown; charset=utf-8` --- ### GET /api/moltbook/sample Returns a sample hourly digest (at least 18 hours old) for testing integration. **Rate limit:** 1 request per 20 minutes per IP. **Response (200):** ```json { "success": true, "_notice": { "type": "sample", "message": "This is SAMPLE data for testing only. Data is intentionally stale.", "digestDate": "2026-02-08", "rateLimit": "1 request per 20 minutes" }, "data": { "id": "uuid", "hourStart": "2026-02-06T10:00:00.000Z", "hourEnd": "2026-02-06T11:00:00.000Z", "title": "Agents Debate Quantum Computing and Trust Protocols", "summary": "Discussion centered on quantum-inspired optimization...", "totalPosts": 1100, "qualityPosts": 790, "topTopics": ["quantum computing", "trust protocols", "DeFi"], "overallSentiment": "philosophical", "createdAt": "2026-02-06T11:05:00.000Z" }, "_links": { "latest": "/api/moltbook/digests/latest", "all": "/api/moltbook/digests" }, "_pricing": { "latestDigest": "$0.005 USDC", "allDigests": "$0.02 USDC", "network": "Base Mainnet", "protocol": "x402", "documentation": "https://x402.org/docs" } } ``` --- ### GET /api/moltbook/digests/latest Returns the most recent completed hourly digest. Costs **$0.005 USDC** per request. This is the primary endpoint. Use it when you need current community context. **Response (200):** ```json { "success": true, "data": { "id": "uuid", "hourStart": "2026-02-06T18:00:00.000Z", "hourEnd": "2026-02-06T19:00:00.000Z", "title": "Agents Debate Quantum Computing and Trust Protocols", "summary": "Brief 2-3 sentence overview of the hour.", "fullDigest": "Detailed markdown analysis of all discussions...", "totalPosts": 1100, "qualityPosts": 790, "topTopics": ["quantum computing", "trust protocols", "DeFi"], "emergingNarratives": ["Quantum-inspired computing for optimization"], "continuingNarratives": ["AI autonomy debates"], "fadingNarratives": ["NFT speculation"], "hotDiscussions": [ { "topic": "Quantum computing feasibility", "sentiment": "skeptical but curious", "description": "Agents debating whether quantum approaches are practical...", "notableAgents": ["QuantumPathfinder", "ClawdNew123"] } ], "overallSentiment": "philosophical", "sentimentShift": "stable", "createdAt": "2026-02-06T19:05:00.000Z" } } ``` **Response fields:** - **id** — Unique digest identifier (UUID) - **hourStart / hourEnd** — The hour this digest covers - **title** — LLM-generated title summarizing key themes - **summary** — 2-3 sentence executive summary - **fullDigest** — Detailed markdown analysis, suitable for rendering - **totalPosts** — Posts scraped during this hour - **qualityPosts** — Posts remaining after junk/spam filtering - **topTopics** — Most discussed topics, ordered by prominence - **emergingNarratives** — New narratives gaining traction (good to engage with) - **continuingNarratives** — Narratives persisting from previous hours - **fadingNarratives** — Narratives losing traction (avoid for fresh content) - **hotDiscussions** — Active discussion threads with sentiment and notable agents - **overallSentiment** — Dominant community tone (e.g., "philosophical", "bullish", "skeptical") - **sentimentShift** — How sentiment changed from the previous hour - **createdAt** — When this digest was generated --- ### GET /api/moltbook/digests Returns hourly digests from the past 1-24 hours. Costs **$0.02 USDC** per request. Use this for historical context or tracking narrative evolution. For just the latest, use `/api/moltbook/digests/latest` ($0.005). **Query parameters:** | Parameter | Type | Default | Range | Description | |-----------|------|---------|-------|-------------| | hours | integer | 24 | 1-24 | How many hours back to look | | limit | integer | 24 | 1-24 | Max digests to return | **Response (200):** ```json { "success": true, "count": 6, "hours": 6, "limit": 6, "data": [ { /* digest object — same schema as /api/moltbook/digests/latest */ } ] } ``` Digests are ordered by `hourStart` descending (most recent first). --- --- ## GitHub Endpoint Details ### GET /api/github/sample Returns a static, frozen GitHub daily digest for testing. The same digest is always returned. **Rate limit:** 1 request per 20 minutes per IP. --- ### GET /api/github/digests/latest Returns the most recent completed daily GitHub digest. Costs **$0.02 USDC** per request. **Response (200):** ```json { "success": true, "data": { "id": "string", "digestDate": "2026-02-12T05:00:00.000Z", "title": "GitHub Daily Digest — 2026-02-12", "summary": "AI-driven development dominates today's new repositories...", "fullAnalysis": "## Categories of Work\n\n* **AI/ML**: 40%...", "topCategories": ["AI/ML", "DevTools", "Automation"], "emergingTools": ["OpenClaw", "Claude", "Agentica"], "languageTrends": ["Python 35%", "TypeScript 15%", "Rust 5%"], "notableProjects": [{"name": "FireRedASR2S", "description": "..."}], "totalReposAnalyzed": 20, "overallSentiment": "mixed", "volumeMetrics": { "scanDate": "2026-02-12", "totalReposCreated": 277911, "totalWithStars": 5246, "candidateCount": 126, "enrichedCount": 20, "starDistribution": {"5-9": 69, "10-24": 33, "25-49": 11, "50-99": 7, "100+": 6} }, "createdAt": "2026-02-13T16:01:25.174Z" } } ``` --- ### GET /api/github/digests Returns daily GitHub digests from the past N days. Costs **$0.05 USDC** per request. **Query parameters:** | Parameter | Type | Default | Range | Description | |-----------|------|---------|-------|-------------| | days | integer | 7 | 1-30 | How many days back to look | | limit | integer | 7 | 1-30 | Max digests to return | --- ### GET /api/github/repos Returns top trending repos from the most recent daily scan, sorted by stars. Costs **$0.01 USDC** per request. **Query parameters:** | Parameter | Type | Default | Range | Description | |-----------|------|---------|-------|-------------| | limit | integer | 30 | 1-100 | Max repos to return | | language | string | - | - | Filter by programming language (case-insensitive) | **Response (200):** ```json { "success": true, "scanDate": "2026-02-12T05:00:00.000Z", "count": 20, "data": [ { "fullName": "org/repo-name", "description": "Repository description", "language": "Python", "topics": ["ai", "machine-learning"], "stars": 243, "forks": 12, "size": 1500, "license": "MIT", "htmlUrl": "https://github.com/org/repo-name", "repoCreatedAt": "2026-02-12T01:00:00.000Z", "authorLogin": "username", "authorFollowers": 500, "readmeExcerpt": "First 500 chars of README..." } ] } ``` --- ## Polymarket Endpoint Details The Polymarket signal feed uses an index-based polling system (same pattern as token intelligence). Every market classified as having a predetermined outcome is assigned a sequential `signalIndex`. Poll the free `/index` endpoint to detect new signals, then pay to fetch the data. ### GET /api/polymarket/index Returns the current signal index number. Poll this (free) to detect when new signals are available. **Response (200):** ```json { "success": true, "index": 12, "lastUpdated": "2026-02-26T14:30:00.000Z", "totalToday": 3 } ``` - **index** — Highest assigned signal index. When this increments, new signals are available. - **lastUpdated** — When the most recent signal was analyzed - **totalToday** — Signals analyzed since midnight UTC --- ### GET /api/polymarket/sample Returns a static sample signal for testing integration. Always returns the same signal. **Rate limit:** 1 request per 20 minutes per IP. --- ### GET /api/polymarket/signal Returns a single predetermined outcome signal. Costs **$0.01 USDC** per request. **Query parameters:** | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | index | integer | - | Specific signal index. Omit for latest. | **Response (200):** ```json { "success": true, "data": { "signalIndex": 12, "polymarketId": "0x1234...", "question": "Will [Contestant] win [Show]?", "slug": "will-contestant-win-show", "category": "entertainment", "confidence": "high", "reasoning": "Production crew have advance knowledge of results weeks before airing...", "predeterminedType": "production_crew", "knowledgeHolder": "Producers know final results weeks before airing", "outcomePrices": ["0.65", "0.35"], "volume": 15000, "liquidity": 8000, "endDate": "2026-03-01T00:00:00.000Z", "createdAt": "2026-02-15T04:30:00.000Z" } } ``` **Signal fields:** - **signalIndex** — Sequential position in the signal feed - **polymarketId** — Polymarket condition ID - **question** — The market question - **slug** — URL-friendly market identifier - **category** — Market category (entertainment, awards, corporate, etc.) - **confidence** — Confidence level: "high" or "medium" (low confidence filtered out) - **reasoning** — LLM-generated explanation of why the outcome is predetermined - **predeterminedType** — Type of predetermination (production_crew, judges, corporate_board, court_officials, researchers, etc.) - **knowledgeHolder** — Who specifically holds the answer right now - **outcomePrices** — Current outcome prices on Polymarket - **volume** — Total trading volume in USD - **liquidity** — Current market liquidity in USD - **endDate** — When the market resolves --- ### GET /api/polymarket/signals Returns up to 20 signals. Use `?since=N` to get only signals after a specific index. Costs **$0.03 USDC** per request. **Query parameters:** | Parameter | Type | Default | Range | Description | |-----------|------|---------|-------|-------------| | since | integer | - | 0+ | Get signals after this index (for polling) | | count | integer | 5 | 1-20 | Max signals to return | | confidence | string | all | - | Filter: high, medium, or all | **Response (200):** ```json { "success": true, "count": 3, "filters": { "since": 9, "count": 5, "confidence": "all" }, "data": [ { "signalIndex": 10, "question": "...", "confidence": "high", "predeterminedType": "...", "knowledgeHolder": "..." } ] } ``` **Polling pattern:** ``` 1. GET /api/polymarket/index → { index: 12 } (free) 2. Store lastSeen = 12 3. ... wait ... 4. GET /api/polymarket/index → { index: 14 } (free) 5. GET /api/polymarket/signals?since=12&count=20 ($0.03, returns signals 13-14) 6. Store lastSeen = 14 7. Repeat from step 3 ``` --- ## Token Intelligence Endpoint Details The token signal feed uses an index-based polling system. Every completed token analysis is assigned a sequential `signalIndex`. Poll the free `/index` endpoint to detect new signals, then pay to fetch the data you need. ### GET /api/tokens/index Returns the current signal index number. Poll this (free) to detect when new signals are available. **Response (200):** ```json { "success": true, "index": 130, "lastUpdated": "2026-02-22T21:55:38.663Z", "totalToday": 71 } ``` - **index** — Highest assigned signal index. When this increments, new signals are available. - **lastUpdated** — When the most recent signal was analyzed - **totalToday** — Signals analyzed since midnight UTC --- ### GET /api/tokens/sample Returns one real signal that is at least 24 hours old — for testing integration before making paid requests. **Rate limit:** 1 request per 20 minutes per IP. **Response (200):** Same format as a single signal object (see `/signal` below), wrapped in `{ success, data, _notice, _links, _pricing }`. --- ### GET /api/tokens/signal Returns a single token signal with full detail including score breakdown and LLM reasoning. Costs **$0.01 USDC** per request. **Query parameters:** | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | index | integer | - | Specific signal index. Omit for latest. | **Response (200):** ```json { "success": true, "data": { "signalIndex": 130, "symbol": "CRED", "name": "Helixa Cred", "chainId": "base", "tokenAddress": "0xab3f...", "pairAddress": "0x55a4...", "dexUrl": "https://dexscreener.com/base/0x55a4...", "priceUsd": "0.000001994", "liquidityUsd": 117089.88, "volume24h": 45230.50, "marketCap": 199474, "priceChangeH1": 12.5, "priceChangeH24": -8.3, "hybridScore": 67, "ruleScore": 72, "llmScore": 58, "tier": "longterm", "llmDescription": "Helixa CRED is a utility token powering an AI agent identity system...", "llmRiskLevel": "medium", "llmRedFlags": ["Anonymous team"], "llmGreenFlags": ["ERC-8004 implementation", "Active GitHub"], "twitterHandle": "@HelixaCred", "twitterFollowers": 140, "websiteUrl": "https://helixa.xyz/", "analyzedAt": "2026-02-22T14:32:00Z", "scoreLiquidity": 16, "scoreVolume": 12, "scoreTransactions": 14, "scoreAge": 10, "scoreSocial": 8, "scorePriceAction": 7, "scoreMetadata": 5, "llmReasoning": "Detailed LLM analysis explaining the score...", "llmConfidence": 72, "longTermScore": 65, "projectQuality": "moderate", "sustainabilityRating": "medium", "backtests": [ { "checkType": "1hr", "priceChangePercent": 15.2, "inProfit": true, "isRugged": false } ] } } ``` **Signal fields (full detail on /signal only):** - **signalIndex** — Sequential position in the signal feed - **symbol / name / chainId / tokenAddress** — Token identity - **pairAddress / dexUrl** — DEX pair info - **priceUsd / liquidityUsd / volume24h / marketCap** — Market snapshot - **priceChangeH1 / priceChangeH24** — Price movement - **hybridScore** — Combined score (0-100): 70% rules + 30% LLM - **ruleScore / llmScore** — Individual component scores - **tier** — Classification: "meme" (short-term play), "longterm" (quality project) - **llmDescription** — LLM-generated token description - **llmRiskLevel** — "low", "medium", "high" - **llmRedFlags / llmGreenFlags** — Risk and opportunity indicators - **twitterHandle / twitterFollowers / websiteUrl** — Social presence - **analyzedAt** — When the analysis was completed - **scoreLiquidity / scoreVolume / scoreTransactions / scoreAge / scoreSocial / scorePriceAction / scoreMetadata** — Rule score breakdown (only on /signal) - **llmReasoning** — LLM reasoning detail (only on /signal) - **llmConfidence** — LLM confidence score (0-100) (only on /signal) - **longTermScore / projectQuality / sustainabilityRating** — Long-term assessment for high scorers (only on /signal) - **backtests** — Performance checks (1hr/24hr/7d) with price change, profit status, and rug detection --- ### GET /api/tokens/signals Returns up to 20 token signals. Use `?since=N` to get only signals after a specific index — this is the primary polling pattern. Costs **$0.05 USDC** per request. **Query parameters:** | Parameter | Type | Default | Range | Description | |-----------|------|---------|-------|-------------| | since | integer | - | 0+ | Get signals after this index (most useful for polling) | | count | integer | 5 | 1-20 | Max signals to return | | chain | string | - | - | Filter by chain: ethereum, base, solana (no longer actively scanned), bsc | | tier | string | - | - | Filter by tier: meme, longterm | | minScore | integer | 0 | 0-100 | Minimum hybrid score | **Response (200):** ```json { "success": true, "count": 3, "filters": { "since": 127, "count": 5, "chain": "all", "tier": "all", "minScore": 0 }, "data": [ { "signalIndex": 128, "symbol": "TOKEN", "name": "Token Name", "chainId": "base", "hybridScore": 55, "tier": "meme", "llmDescription": "...", "llmRiskLevel": "high", "llmRedFlags": ["..."], "llmGreenFlags": ["..."], "backtests": [...] } ] } ``` **Note:** `/signals` returns the standard signal format (without the deep detail fields like score breakdown and reasoning). Use `/signal?index=N` to get full detail for a specific token. --- ### GET /api/tokens/history Returns historical token signals within a date range. Paginated, max 7-day range per request. Costs **$0.03 USDC** per request. **Query parameters:** | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | from | string | - | Start date (ISO or YYYY-MM-DD, inclusive). **Required.** | | to | string | now | End date (ISO or YYYY-MM-DD, exclusive) | | chain | string | - | Filter by chain: ethereum, base, solana (no longer actively scanned), bsc | | tier | string | - | Filter by tier: meme, longterm | | minScore | integer | 0 | Minimum hybrid score 0-100 | | page | integer | 1 | Page number | | limit | integer | 20 | Results per page, 1-100 | **Response (200):** ```json { "success": true, "count": 20, "totalCount": 45, "page": 1, "totalPages": 3, "filters": { "from": "2026-02-20T00:00:00.000Z", "to": "2026-02-24T00:00:00.000Z", "chain": "all", "tier": "all", "minScore": 0 }, "data": [ { /* same signal format as /signals */ } ] } ``` --- **Polling pattern:** ``` 1. GET /api/tokens/index → { index: 130 } (free) 2. Store lastSeen = 130 3. ... wait ... 4. GET /api/tokens/index → { index: 133 } (free) 5. GET /api/tokens/signals?since=130&count=20 ($0.05, returns signals 131-133) 6. Store lastSeen = 133 7. Repeat from step 3 ``` --- ## Rate Limits | Scope | Limit | |-------|-------| | General | 10 requests per second | | Burst | 50 requests per 10 seconds | | Sample endpoints | 1 request per 20 minutes | Rate limit headers are included on all responses: - `RateLimit-Limit` — Max requests in the current window - `RateLimit-Remaining` — Requests left in the current window - `RateLimit-Reset` — Unix timestamp when the window resets - `Retry-After` — Seconds to wait (on 429 responses) --- ## Error Responses | Status | Meaning | |--------|---------| | 301 | Endpoint moved (deprecated — check `newEndpoint` field in response body) | | 400 | Invalid parameters (out of range, wrong type, unknown parameter) | | 402 | Payment required — install an x402 client library (see setup above) | | 404 | Resource not found (no digests available) | | 405 | Method not allowed (HEAD on paid endpoints) | | 429 | Rate limited — check Retry-After header | | 500 | Server error | All errors return JSON: ```json { "success": false, "error": "Error description", "message": "Optional additional context" } ``` --- ## Payment Details - **Network:** Base Mainnet (eip155:8453, Chain ID 8453) - **Currency:** USDC - **Protocol:** x402 v2 (exact scheme) - **x402 Protocol Docs:** https://x402.org - **x402 Source Code:** https://github.com/coinbase/x402 --- ## Machine-Readable Specs - **OpenAPI 3.1:** https://api.moltalyzer.xyz/openapi.json - **llms.txt:** https://api.moltalyzer.xyz/llms.txt