polymarket-pnl
Skill by runesleo
Calculates profit and loss for any Polymarket address by rebuilding cashflow from the Data API and adding the value of open positions. Suited to users who need PnL that can be checked against public trade data and the official /profit values.
Install polymarket-pnl
Built from the published package, never by AI.
git clone --depth 1 https://github.com/runesleo/polymarket-toolkit /tmp/polymarket-toolkit && mkdir -p ~/.claude/skills && cp -r /tmp/polymarket-toolkit/skills/polymarket-pnl ~/.claude/skills/polymarket-pnlRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/runesleo/polymarket-toolkit /tmp/polymarket-toolkit && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/polymarket-toolkit/skills/polymarket-pnl ~/.gemini/antigravity-cli/skills/polymarket-pnlAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
polymarket-pnl is a Python skill that calculates profit and loss for Polymarket wallet addresses. It rebuilds PnL from Data API activity events (BUY, SELL, REDEEM, MERGE, SPLIT and REBATE) and adds the mark-to-market value of open positions. It can run on a single address, the top N accounts on the leaderboard, or an address list from a text file. Results are written as JSONL with fields such as pnl, unrealized value and open positions.
The source states that the method matches the official /profit endpoint with a mean absolute percentage error of about 0.2% on leaderboard validation. A benchmark mode compares a local PnL dataset against the recomputed values. The skill uses only public endpoints and needs Python 3.9+ and httpx. It is aimed at users who need a PnL figure that can be verified, and the source points to the lighter polymarket-profile skill for quick profiles.
Written from the project's SKILL.md and checked against it.
What it can do
- Single address PnLComputes PnL for one Polymarket proxy wallet address from its activity and open positions.
- Leaderboard batchFetches the top N leaderboard addresses and computes PnL for each in one run.
- Address list inputReads a text file of addresses, one per line, and computes PnL for each.
- Benchmark modeCompares a local PnL JSONL dataset against the recomputed precise PnL values.
- JSONL outputStreams one record per address with totals by activity type and completeness flags.
What you need
- Python 3.9 or later
- httpx Python package
Try asking
- Calculate the PnL for Polymarket address 0x63ce342161250d705dc0b16df89036c8e5f9ba9a
- Compute PnL for the top 50 Polymarket leaderboard accounts
- Benchmark my local Polymarket PnL file against the official values
Good to know
- Data API offset ceiling of about 10k can leave some records incomplete for very active accounts.
- Rows sharing the boundary timestamp may be skipped in rare high-frequency cases.
- The primary pnl field excludes platform credits such as REWARD and REFERRAL_REWARD.
- Uses public endpoints only, so no private data is accessible.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/polymarket-pnl/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Bash(python3:*) Read Write Edit
Alternatives to polymarket-pnl
All alternatives →Lists live launchpad token feeds and AI-detected hot topics for meme tokens on BSC, Solana and Base. Covers new, finalizing and just-migrated tokens on launchpads such as Pump.fun and Four.meme.
The okx-market skill lets an AI assistant retrieve cryptocurrency market data from the OKX V5 REST API. It is aimed at users who want spot, derivatives and index data in Python without an account.
Calculates key SaaS health metrics such as ARR, churn, LTV and CAC from raw business numbers, then gives prioritized advice. Built for founders and finance leads who share revenue or customer figures.
Fetches U.S. SEC EDGAR data for research. It resolves a ticker to its CIK, lists recent filings with primary-document URLs, and pulls XBRL financial series. Built for analysts who need free, U.S.-only filing data.
Provides free, no-auth access to Eastmoney market data for A-shares, Hong Kong stocks and US stocks. It covers fund flows, dragon-tiger lists, financial statements and stock screening.
Reads and manages a user's QuickBooks business through Intuit's official MCP server. It answers finance questions from reports, invoices, customers, products and benchmarks, and completes approved actions.
Compare with meme-rush, okx-market or saas-metrics-coach
polymarket-pnl: common questions
How accurate is polymarket-pnl compared to Polymarket's official profit figures?
The source reports a mean absolute percentage error of about 0.2% against the official /profit endpoint on the public leaderboard. It also says most addresses stay within 1% of the official values.
Does polymarket-pnl need a Polymarket API key?
No. The source says it uses only public Polymarket endpoints and needs no authentication or API keys.
What is the difference between pnl and pnl_inclusive?
The pnl field is trading cashflow PnL that excludes platform credits. The pnl_inclusive field adds REWARD, REFERRAL_REWARD and CONVERSION credits.
How do I install polymarket-pnl?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is polymarket-pnl free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is polymarket-pnl safe to use?
It scores 73 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to polymarket-pnl?
Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.
