Polymarket Data Layer for Openclaw

A unified data access layer providing seamless, multi-source intelligence for Polymarket trader positions, market metadata, and historical trade analytics.

cnica
v1.0.0
Apr 2, 2026
0
563
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install polymarket-predictradar-data-layer-skills

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install polymarket-predictradar-data-layer-skills using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Polymarket Data Layer?

The Polymarket Data Layer is a robust, shared infrastructure skill designed to streamline data retrieval for prediction market analysis. It eliminates the need for developers to manually manage complex MCP session handshakes or re-implement local caching logic, providing a standardized interface for fetching trader positions, leaderboard data, and market win-rate statistics. This Openclaw Skills component acts as a bridge between high-level AI agents and the underlying PredicTradar MCP Server.

By centralizing access to massive datasets—including nearly 300 million trade records and 30 million positions—it ensures data consistency across different workflows. Whether you are conducting deep-dive research into whale movements or monitoring active market trends, this skill provides the necessary SQL-powered tools and fallback mechanisms to maintain high availability and accuracy.

Polymarket Data Layer Use Cases

  • Tracking top-ranked traders and PnL leaderboards over specific time periods.
  • Analyzing historical trade data to identify smart-money movements and whale activity.
  • Retrieving real-time market metadata and aggregate statistics for specific condition IDs.
  • Exporting large-scale trading result sets via streamlined SQL query sessions.
  • Validating trader win-rates and portfolio health across multiple outcome types.

How Polymarket Data Layer Works

  1. The system initiates an MCP session handshake through a dedicated client wrapper, managing session IDs and initialization headers automatically.
  2. A primary request is sent to the PredicTradar MCP Server to fetch requested market or trader intelligence.
  3. If the primary service is degraded, the skill intelligently falls back to the Polymarket CLI or the direct Data API.
  4. For SQL-based needs, the skill executes a preview query for small datasets or opens a query stream for high-volume exports.
  5. Data is processed through local scripts like smartmoney.js or gamma-client.js to enrich raw market data with metadata and classifications.

Polymarket Data Layer Setup

Set your environment variables to connect to the primary data source:

export MCP_URL=https://api.predictradar.ai
export MCP_API_KEY=pr_public_predictradar

Integrate the client into your project:

const mcp = require("./polymarket-data-layer/scripts/mcp-client");
await mcp.initialize();

Polymarket Data Layer Data Schema & Taxonomy

The skill exposes two primary tables via high-level query tools:

Table Key Columns Purpose
trades condition_id, wallet_address, side, type, amount, price, traded_at Tracks all trade, mint, burn, and redeem actions.
positions wallet_address, avg_entry_price, unrealized_pnl, is_closed Maintains current and historical trader portfolio states.

All wallet addresses are normalized to lowercase for consistent SQL comparison.

Polymarket Data Layer Advanced Features

  • Automatic MCP session management and handshake handling via mcp-client.js.
  • Dual-mode SQL execution: run_query_preview for fast results and open_query_stream for large exports.
  • Built-in smart-money classification layer for identifying elite trading behavior.
  • Multi-tier fallback logic ensuring data availability during service interruptions.
  • File-backed local caching policy for optimized performance during repetitive metadata lookups.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*