Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 73
  • 204 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-pnl

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install polymarket-pnl in Claude Code

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

A

No 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 →

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.

polymarket-pnl Install

Add to stack

Loading.