搜索

PythonReactSEOPDF
GitHub Skill

user-activity

Pull trading activity from Polymarket for any user

unarmedpuppy☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Polymarket User Activity Scraper

Pull trading activity from Polymarket's Data API for any user by username or wallet address.

Quick Start

# Analyze gabagool22's last 7 days of trading
python scripts/polymarket-user-activity.py gabagool22 --analyze

# Save to CSV
python scripts/polymarket-user-activity.py gabagool22 --days 7 --output data/gabagool22-trades.csv

# Save as JSON
python scripts/polymarket-user-activity.py gabagool22 --days 7 --output data/gabagool22-trades.json

# Use wallet address directly
python scripts/polymarket-user-activity.py 0x6031b6eed1c97e853c6e0f03ad3ce3529351f96d --analyze

Options

Option Description Default
user Username (e.g. gabagool22) or wallet address (0x...) Required
--days N Number of days of history to fetch 7
--limit N Maximum number of trades to fetch 10000
--output PATH Output file (CSV or JSON based on extension) None
--analyze Print analysis summary False
--json Output raw JSON to stdout False

Output Fields (CSV)

Field Description
datetime ISO timestamp
timestamp Unix timestamp
side BUY or SELL
outcome Up or Down
title Market question
size Number of shares
price Price per share
value size * price
slug Market URL slug
eventSlug Event identifier
conditionId Market condition hash
transactionHash On-chain tx hash
proxyWallet Trader wallet

Analysis Summary

The --analyze flag prints:

  • Total trade count (BUY/SELL breakdown)
  • Total volume in USD
  • Date range covered
  • Up/Down position breakdown
  • Price statistics (avg/min/max)
  • Top 5 markets by trade count

Example Analysis Output

============================================================
TRADE ANALYSIS SUMMARY
============================================================

Total trades: 847
  - BUY: 623
  - SELL: 224

Total volume: $42,350.00

Date range: 2024-12-08 09:15 to 2024-12-15 14:30
  (7 days)

Outcome breakdown:
  - UP positions: 412
  - DOWN positions: 435

Price stats:
  - Average: $0.485
  - Min: $0.08
  - Max: $0.92

Top 5 markets by trade count:
  - Bitcoin up or down? (Dec 15, 2:00 PM ET)... (45 trades, $1,250.00)
  - Ethereum up or down? (Dec 15, 10:00 AM ET)... (38 trades, $980.00)
  ...
============================================================

API Details

Uses the Polymarket Data API:

  • Base URL: https://data-api.polymarket.com
  • Endpoint: /trades?user={wallet}&limit={n}&offset={n}
  • Rate limited: 0.5s delay between paginated requests

Strategy Analysis Tips

To analyze a trader's strategy:

  1. Pull their recent trades:

    python scripts/polymarket-user-activity.py gabagool22 --days 7 --output data/trades.csv
    
  2. Look for patterns:

    • Average position size
    • Entry price ranges (do they buy near 0.50 or closer to extremes?)
    • How often they add to positions vs close them
    • Time patterns (when do they trade most actively?)
    • Up/Down bias (do they favor one direction?)
  3. Compare to market conditions:

    • Do they trade more during high volatility?
    • How do they handle losing positions?

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!