프로토타입 · 미리 보기: 공식 레지스트리의 모든 서버를 담고 있으며 30분마다 동기화해요. Google로 로그인하면 리뷰를 쓸 수 있어요.
PopNx MCPAI를 쓰는 사람을 위한 MCP 서버 · 쉬운 말로 설명해요

Polymarket Wallet Intelligence

제작자: aemery13버전 1.0.1i★ 0i컴퓨터 또는 클라우드
레지스트리 이름io.github.aemery13/polymarket-intel

설치 방법

개요

제작자가 쓴 설명(영어 원문)

Classify Polymarket wallets as human or bot, score their trading edge, read open positions.

할 수 있는 일

이 서버는 아직 쉬운 말로 된 요약을 쓰지 못했어요. 아래는 레지스트리에서 읽어 온 사실이에요.

  • 연결 방식: 컴퓨터 또는 클라우드
  • 전송 방식: stdio, Streamable HTTP
  • 카테고리: 암호화폐 및 블록체인
  • 입력해야 할 값: POLYMARKET_INTEL_API_KEY, X-API-Key

설치

쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.

검사 2/3 통과 · 내가 묻는 내용은 제작자 서버(polymarket-intel-production.up.railway.app)를 거쳐요

먼저: 어떤 AI를 쓰시나요?

쓰는 앱을 고르면 아래에 단계가 나옵니다.

Claude에 연결할 수 있어요 · 약 5분

Polymarket Wallet Intelligence 키가 필요해요 (제작자 사이트에서 가입, 비용이 들 수 있음) · claude.ai나 데스크톱 앱에서 한 번 설정하면 채팅에서 쓸 수 있어요 · 무료 계정은 1개까지

  1. Polymarket Wallet Intelligence에 가입하고 키 만들기

    제작자 사이트에서 가입하고 다음 단계에 쓸 API 키를 만드세요. 비용이 들 수 있어요.

    Polymarket Wallet Intelligence 사이트 열기 ↗

  2. Claude의 Connectors 페이지 열기

    CustomizeConnectors

    CustomizeConnectors1+ Add2https://…3Add4
  3. “+ Add” → “Add custom connector”를 누르고 이 2칸 채우기

    여기서 복사해 Claude의 같은 이름 칸에 붙여 넣고 Continue를 누르세요

    Name · 이름Polymarket Wallet Intelligence
    Remote MCP server URL · 주소https://polymarket-intel-production.up.railway.app/mcp

    Request headers에 이 이름과 값을 추가

    헤더 이름X-API-Key
    값<여기에 키 붙여 넣기>

    키는 앱 입력란에만 붙여 넣고, 채팅에 붙이거나 다른 사람에게 보내지 마세요

    Authentication은 Claude가 찾은 그대로 두고 Add를 누르세요

  4. 채팅에서 켜기

    +ConnectorsPolymarket Wallet Intelligence

  5. 해 보기

    Polymarket Wallet Intelligence을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ Claude가 Polymarket Wallet Intelligence을 쓰고 있다고 하거나 답에 Polymarket Wallet Intelligence 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 Anthropic 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

ChatGPT는 아직 Polymarket Wallet Intelligence에 연결할 수 없어요

Polymarket Wallet Intelligence는 연결할 때 내 키가 필요한데, OpenAI 도움말은 OAuth 로그인만 설명하고 우리가 확인한 키 입력 방법이 없어요

대신 이렇게 할 수 있어요

A · Polymarket Wallet Intelligence에 연결되는 앱 쓰기

  • Polymarket Wallet Intelligence 키가 필요해요 (제작자 사이트에서 가입, 비용이 들 수 있음) · claude.ai나 데스크톱 앱에서 한 번 설정하면 채팅에서 쓸 수 있어요 · 무료 계정은 1개까지
  • Polymarket Wallet Intelligence 키가 필요해요 (제작자 사이트에서 가입, 비용이 들 수 있음)
  • Polymarket Wallet Intelligence 키가 필요해요 (제작자 사이트에서 가입, 비용이 들 수 있음)
  • Polymarket Wallet Intelligence 키가 필요해요 (제작자 사이트에서 가입, 비용이 들 수 있음)

B · 암호화폐 및 블록체인에서 ChatGPT에 연결되는 다른 서버

같은 분류에서 많이 쓰는 것 중 키 없이 주소만으로 연결되는 것을 골랐어요

Claude Code에 연결할 수 있어요 · 약 5분

Polymarket Wallet Intelligence 키가 필요해요 (제작자 사이트에서 가입, 비용이 들 수 있음)

  1. Polymarket Wallet Intelligence에 가입하고 키 만들기

    제작자 사이트에서 가입하고 다음 단계에 쓸 API 키를 만드세요. 비용이 들 수 있어요.

    Polymarket Wallet Intelligence 사이트 열기 ↗

  2. 터미널 열기

    Mac: Command+스페이스를 누르고 Terminal 입력 · Windows: PowerShell 열기

  3. 이 명령을 붙여 넣고 Enter

    claude mcp add --transport http polymarket-intel https://polymarket-intel-production.up.railway.app/mcp --header 'X-API-Key: your-value'

    Enter 전에 “your-value”를 내 키로 바꾸세요

    키는 앱 입력란에만 붙여 넣고, 채팅에 붙이거나 다른 사람에게 보내지 마세요

  4. Claude Code에서 /mcp 입력

    Polymarket Wallet Intelligence이 목록에 있고 연결됨으로 보이면 돼요

  5. 해 보기

    Polymarket Wallet Intelligence을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ Claude Code가 Polymarket Wallet Intelligence을 쓰고 있다고 하거나 답에 Polymarket Wallet Intelligence 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 Anthropic 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

Cursor에 연결할 수 있어요 · 약 5분

Polymarket Wallet Intelligence 키가 필요해요 (제작자 사이트에서 가입, 비용이 들 수 있음)

  1. Polymarket Wallet Intelligence에 가입하고 키 만들기

    제작자 사이트에서 가입하고 다음 단계에 쓸 API 키를 만드세요. 비용이 들 수 있어요.

    Polymarket Wallet Intelligence 사이트 열기 ↗

  2. 이 버튼으로 Cursor 열기

    Cursor에서 열기

    Cursor가 설치를 확인하면 Install을 누르세요

  3. 키 입력

    Polymarket Wallet Intelligence 설정에서 X-API-Key가 비어 있어요. 내 키를 넣고 저장하세요

    키는 앱 입력란에만 붙여 넣고, 채팅에 붙이거나 다른 사람에게 보내지 마세요

  4. Cursor에서 AI 채팅을 Agent 모드로 열기

  5. 해 보기

    Polymarket Wallet Intelligence을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ Cursor가 Polymarket Wallet Intelligence을 쓰고 있다고 하거나 답에 Polymarket Wallet Intelligence 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 Cursor 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

VS Code에 연결할 수 있어요 · 약 5분

Polymarket Wallet Intelligence 키가 필요해요 (제작자 사이트에서 가입, 비용이 들 수 있음)

  1. Polymarket Wallet Intelligence에 가입하고 키 만들기

    제작자 사이트에서 가입하고 다음 단계에 쓸 API 키를 만드세요. 비용이 들 수 있어요.

    Polymarket Wallet Intelligence 사이트 열기 ↗

  2. 이 버튼으로 VS Code 열기

    VS Code에서 열기

    VS Code가 설치를 확인하면 Install을 누르세요

  3. 키 입력

    Polymarket Wallet Intelligence 설정에서 X-API-Key가 비어 있어요. 내 키를 넣고 저장하세요

    키는 앱 입력란에만 붙여 넣고, 채팅에 붙이거나 다른 사람에게 보내지 마세요

  4. VS Code에서 AI 채팅을 Agent 모드로 열기

  5. 해 보기

    Polymarket Wallet Intelligence을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ VS Code가 Polymarket Wallet Intelligence을 쓰고 있다고 하거나 답에 Polymarket Wallet Intelligence 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 VS Code 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

Windsurf, Zed, Gemini CLI 같은 다른 MCP 앱은 추가 방법이 저마다 달라요. 앱 목록에서 확인하세요

MCP를 쓰는 앱 모두 보기 →

웹으로 연결하는 앱용 주소

주소https://polymarket-intel-production.up.railway.app/mcp

JSON 설정은 아래 “개발자용”에 있어요

막혔나요? Polymarket Wallet Intelligence을 쓰는 사람에게 물어보세요💬 토론 →
개발자용: 터미널 명령과 JSON 설정

웹으로 연결

Claude Code

claude mcp add --transport http polymarket-intel https://polymarket-intel-production.up.railway.app/mcp --header 'X-API-Key: your-value'

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "polymarket-intel": {
      "url": "https://polymarket-intel-production.up.railway.app/mcp",
      "headers": {
        "X-API-Key": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "polymarket-intel": {
      "type": "http",
      "url": "https://polymarket-intel-production.up.railway.app/mcp",
      "headers": {
        "X-API-Key": "your-value"
      }
    }
  }
}

컴퓨터에 설치

Claude Code

claude mcp add polymarket-intel --env POLYMARKET_INTEL_API_KEY=your-value -- uvx polymarket-intel-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "polymarket-intel": {
      "command": "uvx",
      "args": [
        "polymarket-intel-mcp"
      ],
      "env": {
        "POLYMARKET_INTEL_API_KEY": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "polymarket-intel": {
      "command": "uvx",
      "args": [
        "polymarket-intel-mcp"
      ],
      "env": {
        "POLYMARKET_INTEL_API_KEY": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "polymarket-intel": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "polymarket-intel-mcp"
      ],
      "env": {
        "POLYMARKET_INTEL_API_KEY": "your-value"
      }
    }
  }
}

직접 입력할 값

  • POLYMARKET_INTEL_API_KEY 비밀 env
    Optional API key for higher rate limits and paid features. Anonymous access works at free-tier limits.
  • X-API-Key 비밀 HTTP header
    Optional API key for higher rate limits.

이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.

한눈에 보기

주간 다운로드i
14/주
라이선스i
라이선스 표시 없음
연결 방식
컴퓨터 또는 클라우드
전송 방식
stdio, streamable-http
최신 버전i
1.0.1
레지스트리 공개i
2026년 5월 10일
코드 마지막 변경i
2026년 5월 18일
제작자
aemery13
패키지
pypi: polymarket-intel-mcp
웹사이트
github.com
레지스트리 상태
활성

어떤 앱에서 쓸 수 있나요

이 서버의 연결 방식과 각 앱의 공식 문서를 바탕으로 했어요. 2026년 11월 10일 확인.

인터넷으로 연결하는 앱

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast

내 컴퓨터에서 실행하는 앱

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

모든 앱과 장단점 →

할 수 있는 일

마지막으로 점검했을 때 서버가 응답하지 않아서 도구를 읽지 못했어요.

기본 점검i

누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 11일 점검

  • ✓ 통과

    제작자와 저장소 일치

    레지스트리 이름이 GitHub 계정 aemery13 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요

  • ✓ 통과

    계속 관리되고 있음

    코드 마지막 변경: 6개월 전

  • … 아직 점검 안 함

    라이선스 있음

    아직 GitHub에서 이 저장소를 읽어 오지 않았어요

  • ✕ 실패

    엔드포인트 응답

    점검할 때 6초 안에 응답하지 않았어요

  • – 해당 없음

    OAuth로 로그인

    점검할 때 6초 안에 응답하지 않았어요

  • … 아직 점검 안 함

    도구 설명에 숨겨진 지시 없음

    아직 점검하지 않았어요. 엔드포인트를 점검할 때 도구 목록을 읽어요

토론

질문하고, 팁을 나누고, 안 되는 점을 알려 주세요. "도움이 됨"이 많은 순서예요.

아직 글이 없어요. 처음으로 질문하거나 공유해 보세요.

이곳의 글은 사용자가 쓴 것으로, PopNx 팀의 글이 아니에요.

Google로 로그인하고 글쓰기

사용자 리뷰

아직 리뷰가 없어요

Google로 로그인하고 리뷰 쓰기

암호화폐 및 블록체인 카테고리의 다른 서버와 비교i

  • 이 카테고리의 다른 서버 1640개 중 0%보다 스타가 많아요
  • 이 카테고리의 다른 서버 1640개 중 15%보다 최근에 레지스트리에 공개됐어요
  • 기본 점검 결과가 이 카테고리의 다른 서버 1640개 중 48%와 같거나 더 좋아요

레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.

자주 묻는 질문

Polymarket Wallet Intelligence, 안전한가요?

해당하는 기본 점검 3개 중 2개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.

어떤 키나 코드가 필요한가요?

입력해야 할 값: POLYMARKET_INTEL_API_KEY, X-API-Key

내 컴퓨터에서 실행되나요, 클라우드에서 실행되나요?

둘 다 가능해요. 내 컴퓨터에 설치해도 되고, 클라우드 버전에 연결해도 돼요.

아직 관리되고 있나요?

GitHub 저장소는 마지막으로 6개월 전 변경됐고, 최신 버전(1.0.1)은 6개월 전 레지스트리에 올라왔어요.

어떤 앱에서 쓸 수 있나요?

Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. URL로 연결되므로 원격 MCP를 지원하는 앱에서도 쓸 수 있어요. 예: ChatGPT Business 이상.

대신 쓸 수 있는 건 뭐가 있나요?

같은 카테고리에는: Solana MCP by Vybe, Oracle3 prediction-market arbitrage checks, Polymarket Paper Trader

대안

같은 카테고리에서 다른 제작자가 만든 서버예요. 스타 순으로 정렬했어요.

카드 보는 법:↓ 주간 다운로드i★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i

Solana MCP by Vybe

Solana MCP developer toolkit: wallets, trades, markets, PnL, transfers, onchain, swaps & API tools.

제작자: vybenetwork널리 사용됨★ 2.6천 저장소 전체의 별6개월 전 업데이트

클라우드에서 실행

Oracle3 prediction-market arbitrage checks

Kalshi and Polymarket data, venue fees, no-arbitrage checks and paper execution for AI agents.

제작자: YichengYang-Ethan성장 중↓ 35/주★ 56841일 전 업데이트

내 컴퓨터에서 실행

Polymarket Paper Trader

Polymarket paper trading for AI agents: $10k paper money, real order books, official fees.

제작자: agent-next성장 중↓ 226/주★ 50326일 전 업데이트

내 컴퓨터에서 실행

제작자의 README

README 열기

제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.

Polymarket Wallet Intelligence

An MCP server and REST API that classifies Polymarket wallets as human or bot, scores their trading edge from 0–10, and streams their current open positions. Built for AI agents on copy-trading and signal-following stacks.

# Use it from any MCP client (Claude Desktop, Cursor, etc.)

pip install polymarket-intel-mcp polymarket-intel-mcp

Or call the hosted REST API directly

curl https://polymarket-intel-production.up.railway.app/wallet/0xf1528f12e645462c344799b62b1b421a6a4c64aa

## How this fits with other Polymarket MCP servers

Status

Latest: v1.2 (May 2026) — classifier improved to distinguish active human grinders from HFT bots. See release notes and v1.3 backlog issue for what's next.

A daily snapshot job runs at 08:00 UTC and re-scores the top 50 leaderboard wallets, building a historical dataset of classification stability over time.

There are several MCP servers covering Polymarket, each at a different layer:

ServerWhat it doesWhen to use it
polymarket-intel (this)Wallet intelligence — classify human vs bot, score trading edge, read open positionsDeciding *whose* signals to follow
graph-polymarket-mcpMarket data via The Graph subgraphs (20 tools, 8 subgraphs)Reading raw on-chain market data
whitmorelabs/polymarket-mcpSlippage, liquidity, arbitrage, price feedsPricing your own trades
joinQuantish/polymarketSelf-hosted trading agentRunning an autonomous bot

These complement each other. A copy-trading agent would use polymarket-intel to filter wallets worth following, then graph-polymarket-mcp to read the markets those wallets are betting on, then whitmorelabs/polymarket-mcp to size its own entries.

What it answers

  • "Is this trader a human or a bot?" — score_polymarket_wallet(wallet_address) → returns classification ∈ {human, bot, insufficient_data} plus a confidence score and reason codes.
  • "Do they actually have an edge?" — edge_score from 0–10, gated on net realised PnL so distributed-but-losing wallets don't get false positives.
  • "What are they betting on right now?" — get_open_positions(wallet_address) returns live positions sorted by size, refreshed every 30s.
  • "How has their edge changed over time?" — /wallet/{address}/history returns the score time series from the daily snapshots.

Why this exists

The Polymarket leaderboard is misleading. It includes unrealised PnL marked-to-current-price, so the names at the top are dominated by bots running structural arb plus a few wallets sitting on huge open positions that may never resolve in their favour. Agents that copy-trade naively from the leaderboard get burned.

This service runs every leaderboard wallet through behavioural fingerprinting (focus ratio, holding period, timing regularity, category concentration) plus PnL reconstruction from raw activity, and only surfaces traders that look like genuine humans with a real edge.

The dataset grows more valuable over time — every day the snapshot job runs, historical signals accumulate. Wallets that have been consistently above edge 7 for 90 days are a stronger signal than any single point-in-time score.

Distributed as both a REST API and an MCP server

SurfaceUse caseSetup
MCP serverAgent that needs tool-style accesspip install polymarket-intel-mcp
REST APICustom HTTP integration, dashboardscurl https://polymarket-intel-production.up.railway.app/...
Hosted MCPAgent on any MCP-compatible clientAdd https://polymarket-intel-production.up.railway.app/mcp to client config

Architecture

┌──────────────────────────────────────────────┐

│ core/ │ │ client.py — Polymarket data API client │ │ signals.py — pure signal calculators │ │ scorer.py — classifier + edge score │ │ models.py — Pydantic response schemas │ ├──────────────────────────────────────────────┤ │ db/ │ │ schema.sql — Postgres tables + indexes │ │ repository.py — Repository protocol + │ │ InMemoryRepository │ │ supabase_repo.py — Supabase impl │ │ converters.py — ScoreResult ↔ records │ ├──────────────────────────────────────────────┤ │ api/main.py — FastAPI HTTP server │ │ mcp_server/ — MCP server (stdio) │ │ scripts/ │ │ analyze_wallet.py — CLI │ │ snapshot_job.py — daily cron entry │ │ tests/ │ └──────────────────────────────────────────────┘

Core has no idea persistence exists. The API and snapshot job depend on the Repository protocol — Supabase in production, in-memory in tests and when env vars are unset. This is what makes the suite run without a database and what lets you swap Supabase for Neon, RDS, or anything else later by adding one file.

Quickstart

git clone <repo> && cd polymarket-intel

python -m venv .venv && source .venv/bin/activate pip install -r requirements-dev.txt pytest # 19 tests, all green

CLI
python scripts/analyze_wallet.py phonesculptor

python scripts/analyze_wallet.py 0xf1528f12e645462c344799b62b1b421a6a4c64aa --json

REST API
uvicorn api.main:app --reload --port 8000

open http://localhost:8000/docs

The API is split into a slow tier (cached aggressively, cheap, ideal for one-off discovery) and a fast tier (short cache, ideal for live copy-trading agents). The split exists because the underlying data has different freshness needs — a wallet's classification doesn't change minute-to-minute, but their open positions do.

TierMethodPathTTLNotes
slowGET/wallet/{address}1hScore blob — classification, edge_score, signals. No positions. Persisted to history (debounced).
fastGET/wallet/{address}/positions30sOpen positions only. No DB write per call.
—GET/wallet/{address}/historyDBScore time series
—GET/wallet/{address}/positions/historyDBPosition changes over time
—GET/wallet/by-username/{username}1hConvenience lookup
—GET/leaderboard?limit=5030mRaw Polymarket top traders
—GET/leaderboard/verified?min_edge=51hFiltered to scored humans
—GET/leaderboard/historical?date=…DBLeaderboard at any past date
—GET/snapshots/latestDBWhen did the cron last run?

Why 30s on positions and not faster? Polygon block time is ~2s and Polymarket's activity index lags a few seconds. Polling below 10s gets you no fresher data, just rate-limit errors. 30s is the sweet spot for cost/freshness/upstream-friendliness.

Why debounced DB writes? A trading agent may hit /wallet/{address} thousands of times an hour. Writing a row per call would bloat history with near-duplicate snapshots. The score endpoint persists at most once per wallet per hour. The daily snapshot job guarantees coverage of the top 50 regardless of API traffic.

MCP server (Claude Desktop, Cursor, Continue)
python mcp_server/server.py

Then drop mcp_server/claude_desktop_config.example.json into your Claude Desktop config and edit the absolute path.

The server exposes four tools:

  • score_polymarket_wallet(wallet_address) — full score
  • score_polymarket_user(username) — lookup by display name
  • get_polymarket_leaderboard(limit) — raw leaderboard
  • get_open_positions(wallet_address) — fast snapshot of live bets

Scoring methodology

Bot triggers (any one fires → bot)
SignalThresholdSource
Focus ratio> 12Hubble Research, validated empirically
Median hold time< 60sHFT / MEV pattern
Timing CV< 0.3 (n≥100)Scheduled trading

Soft signals stack: crypto-market-maker pattern, > 200 trades/day, etc.

Edge score (0–10) for humans
Hard gate: net realised PnL ≤ 0  →  capped at 2.0

Hard gate: < 10 winning markets → capped at 3.0

35% PnL magnitude (log-scaled) 25% win rate (capped at 70%) 15% PnL distribution (penalises top-1 concentration) 15% sample size (winning markets, capped at 50) 10% win/loss ratio (capped at 3x)

Net PnL is the hard gate so wallets like neutralwave23 — many distributed tiny wins masking $375k of losses — are correctly flagged as poor.

PnL reconstruction
money_in   = sum(BUY usdcSize per conditionId)

money_out = sum(SELL usdcSize) + sum(REDEEM usdcSize) pnl = money_out - money_in

status: REDEEM exists → won SELL exists, no REDEEM → exited no SELL, no REDEEM, last trade > 7 days old → lost no SELL, no REDEEM, last trade within 7 days → open

Why activity rather than the positions endpoint: positions vanish from the API after redeem, so any naive analysis using /positions undercounts wins. Always reconstruct from /activity?type=TRADE + /activity?type=REDEEM (separate calls — comma-joined types return 400).

Persistence (Supabase)

The historical dataset is the moat. Every day the snapshot job pulls the leaderboard, scores the top N wallets, and persists three things: the score itself (wallet_scores), the wallet's open positions at that moment (open_position_snapshots), and the leaderboard as it stood (leaderboard_snapshots). After 90 days you can answer questions no one else can: "who has been consistently above edge 7 for the last quarter?", "which wallets just entered the top 50?", "show me everyone who held YES on this market three days before resolution."

Setup
# 1. Create a Supabase project, get the URL and service_role key

cp .env.example .env # fill in SUPABASE_URL and SUPABASE_KEY

2. Apply the schema (Supabase dashboard → SQL editor → paste db/schema.sql → run)

Or via psql:

psql "$DATABASE_URL" -f db/schema.sql

3. Run the snapshot job once to verify it writes:

python scripts/snapshot_job.py --top 10

If SUPABASE_URL and SUPABASE_KEY are unset, both the API and the snapshot job fall back to an in-memory repository — the suite still passes, the API still serves live scoring, but history endpoints will be empty until you wire up Supabase.

Daily snapshot job

Schedule python scripts/snapshot_job.py --top 50 daily (Railway cron, GitHub Actions, or Supabase pg_cron triggering an edge function — your call). The job is idempotent: running twice creates two snapshots, which is fine — history queries pick the closest one.

python scripts/snapshot_job.py --top 50              # production

python scripts/snapshot_job.py --top 5 --dry-run # local testing, no writes

Each run records an audit row in snapshot_runs with start/finish times, wallets scored, and error count.

Schema

앞부분만 보여 드려요. 나머지는 저장소에서 읽어 보세요