Skip to main content
Glama
polystrike

polystrike

Polymarket Tweet Count API — Examples

Code examples for the Polystrike API: live tweet counters for Polymarket's Elon Musk and Ted Cruz tweet-count markets.

The free tier needs no key (100 requests/hour). One call gets you three counters per active market — Polystrike's independent 60-second count, the official XTracker settlement count, and the count shown on Polymarket's UI — plus the deltas between them:

curl https://polystrike.xyz/api/v1/meta/elon
{
  "timestamp": 1783363631650,
  "data": [
    {
      "event_id": 666466,
      "event_title": "Elon Musk # tweets July 6 - July 8, 2026?",
      "polymarket_xtracker_counter": 41,
      "real_counter": 44,
      "polymarket_ui_counter": 41,
      "settlement_delta": 3,
      "display_delta": 3,
      "internal_delta": 0
    }
  ]
}

Examples

Example

What it does

python/poll_counters.py

Poll both accounts, print counters + deltas (stdlib only)

typescript/pollCounters.ts

Same in TypeScript / Node 18+

mcp/claude_desktop_config.json

Connect Claude Desktop to the hosted MCP server

mcp-server/server.js

Local MCP server over the public REST API (Node 20+)

Related MCP server: twscrape-twitter-mcp

Local MCP server

mcp-server/server.js is a stdio MCP server that wraps the public REST API — the same tools as the hosted server, runnable locally:

npm install && node mcp-server/server.js

Free-tier tools need no key; free counters are delayed 30 minutes (every response says so in freshness_delay_sec). Set POLYSTRIKE_API_KEY to a Data key ($29/month, USDC on Polygon or Base, see https://polystrike.xyz/#pricing) for live counters, the WebSocket feed, full post archive, counter and price history, and bulk parquet.

Endpoints used

  • GET /api/v1/meta/elon — Elon Musk markets (free)

  • GET /api/v1/meta/cruz — Ted Cruz markets (free)

  • GET /api/v1/meta/{account}/tweets — recent tweet stream (free: last 15)

Full reference: API docs · OpenAPI spec · MCP setup guide

Notes on the data

  • The XTracker oracle is the settlement authority — Polymarket pays out on its number. Polystrike measures it faster (60s vs ~5min) but does not replace it.

  • Deleted tweets stay in Polystrike's count if captured before deletion; a settlement_delta driven by a deletion is not a real edge.

  • These are measurement tools, not a promise of profit.

MIT licensed.

Available Tools

8 tools
analyze_portfolioAnalyze wallet portfolioA

Analyze a Polymarket wallet's open positions across the active Elon tweet-count markets, with a model-based expected-value assessment per position. Elon markets only. Requires a PRO API key (POLYSTRIKE_API_KEY environment variable); fails with HTTP 402 without one. Read-only: it inspects publicly visible positions and returns analysis — it never places or modifies orders.

Inputs: wallet (required), bankroll.

check_healthCheck API healthA

Check that the Polystrike API is up and responding; returns a status payload with a server timestamp. Free tier, no API key required. Use to verify connectivity before assuming other tools are failing for data reasons.

Inputs: no named parameters.

get_crypto_metadataGet crypto market metadataA

Get metadata for Polystrike's tracked crypto prediction markets (market IDs and basic market info). Free tier, no API key required. The data array is empty when no crypto markets are currently tracked. For the main tweet-count markets use get_market_metadata.

Inputs: no named parameters.

get_market_metadataGet tweet-count market metadataA

Get live metadata for the active Polymarket tweet-count markets of one tracked account. Returns one entry per active market with its event_id, title, and three live counters: real_counter (Polystrike's independent 60-second count), polymarket_xtracker_counter (the official XTracker count that settlement pays out on), and polymarket_ui_counter (the number shown in Polymarket's UI), plus the deltas between them (deltas are null while an event is warming up). Free tier, no API key needed. Call this first to discover active markets and event IDs before using get_predictions or get_trading_signals. Read-only; makes a single HTTPS request to polystrike.xyz.

Inputs: account (required).

get_predictionsGet market predictionsA

Get Monte Carlo forecast data for the active tweet-count markets of a tracked account. The free tier (no key) returns a limited view; a PRO key (POLYSTRIKE_API_KEY environment variable) adds forecast percentiles (p5/p50/p95), per-bucket model probabilities, and posting velocity/sleep-schedule fields. Use this for market analysis; for concrete buy/sell recommendations use get_trading_signals instead. Read-only.

Inputs: account (required).

get_rebalancing_recommendationsGet rebalancing recommendationsA

Get concrete rebalancing actions (ADD_MORE or TRIM, with USD amounts) for a Polymarket wallet's positions in the active Elon tweet-count markets, based on current model signals. Only positions whose suggested adjustment exceeds the threshold are returned. Elon markets only. Requires a PRO API key (POLYSTRIKE_API_KEY environment variable); fails with HTTP 402 without one. Read-only — returns recommendations, never executes trades.

Inputs: wallet (required), bankroll (required), threshold.

get_recent_tweetsGet recent postsA

Get the most recent captured posts for a tracked account, newest first, with per-post metadata including whether each post counts toward the active tweet-count markets. Use it to understand posting pace and to verify what is being counted. The free tier returns the latest 15 posts and ignores pagination; with a PRO key (POLYSTRIKE_API_KEY environment variable) limit can go up to 100 and offset paginates. Read-only.

Inputs: account (required), limit, offset.

get_trading_signalsGet trading signalsA

Get actionable BUY/SELL signals with Kelly-criterion bet sizing for a tracked account's tweet-count markets. Each signal carries its strategy context, e.g. BUY TWO_BUCKET (predicted bucket plus lower adjacent) or BUY SINGLE_BUCKET (high-conviction single bet), and a suggested stake for the given bankroll. Requires a PRO API key in the POLYSTRIKE_API_KEY environment variable; without one the call fails with HTTP 402 and an explanatory message. Informational only — this tool never places orders and is not financial advice.

Inputs: account (required), bankroll, only_with_signals.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool targets a distinct aspect: predictions, metadata, tweets, signals, crypto metadata, portfolio analysis, rebalancing, and health. No two tools have overlapping purposes.

    Naming Consistency4/5

    All tools use snake_case with verb_noun pattern (mostly 'get_'), but 'check_health' uses a different verb. Still highly consistent and predictable.

    Tool Count5/5

    8 tools is well-scoped for a specialized prediction market API, covering all necessary operations without bloat.

    Completeness5/5

    Covers all key operations: discovery, forecasting, signals, portfolio analysis, rebalancing, and health. Intentionally read-only, so no gaps for its stated purpose.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Remote MCP / x402 / USDC / Base / Solana / OpenAPI / Google ADK / Gemini Xcatcher is an agent-first Remote MCP server (Streamable HTTP) for high-throughput crawling of fresh/latest posts across large sets of X (Twitter) usernames. It supports x402 pay-as-you-go top-ups using USDC on Base and Solana.
      9
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server to read X (Twitter) posts, threads, replies, quotes, and search using your own logged-in session, no API key required.
      8
      52 PyPI
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Twitter/X MCP server for the API v2, enabling users to manage profiles, posts, likes, retweets, and follows through natural language using a stateless Streamable HTTP transport with OAuth user access token authentication.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Live X/Twitter search and AI trend digests without an API key, charging per call in USDC via x402. Enables real-time tweet search and AI summaries inside MCP clients.
      51 npm
      1
      MIT