# Polymarket Wallet P\&L Analyzer (`splendorous_astrolabe_xs9/polymarket-wallet-pnl`) Actor

Verified P\&L, win rate, and hedging profile for any Polymarket wallet. Honest coverage flags, neg-risk mint exclusion. Vet a trader before you copy them.

- **URL**: https://apify.com/splendorous\_astrolabe\_xs9/polymarket-wallet-pnl.md
- **Developed by:** [Public Signal Data](https://apify.com/splendorous_astrolabe_xs9) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$350.00 / 1,000 wallet analyzeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Polymarket Wallet P\&L Analyzer

> **Docs & recipes:** [pricing math, use-case playbooks and copy-paste API/MCP snippets](https://publicsignaldata.com/actors/polymarket-wallet-pnl/) · [practical guide](https://publicsignaldata.com/use-cases/market-intelligence/)

A **Polymarket wallet analyzer**: paste any wallet address and get a **reconstructed trading record** built purely from the public trade tape — realized **trader P\&L**, win rate over resolved markets, a per-market breakdown, category mix, average entry price, and how often the wallet plays both sides of the same market.

Built for **copy trading vetting**: found a wallet moving size on a whale tracker or a leaderboard? Run it through this analyzer before you even think about copying it — is the P\&L real, is the win rate built on resolved markets, and is the "trader" actually a hedger you should never follow?

### What makes this analysis trustworthy

Most "profit leaderboards" hide their method. This Actor is explicit about its accounting — and about its blind spots:

- **Net-position accounting** — BUYs and SELLs are aggregated per market and per outcome token; resolved markets settle remaining net shares at $1 (winner) / $0 (loser) using public on-chain resolutions.
- **Negative-risk mint detection** — wallets that acquire outcome shares through the neg-risk adapter show up on the tape as selling shares they never bought. Naively counting those sells fabricates profit. Markets where sell volume exceeds buy volume by 1.5× are flagged `excluded_mint` and kept out of realized P\&L.
- **Honest coverage flags** — the public tape caps pagination depth (~3,000 trades per query). If a wallet out-trades the cap, the report says so (`coverage_capped: true`) and states exactly which time span the stats cover, instead of silently pretending it's the full window.
- **Open positions never inflate P\&L** — unresolved markets are reported separately with net shares and cost basis; realized P\&L and win rate count only resolved markets.

### Output

One `summary` row (also stored as the run's `OUTPUT` record):

```json
{
  "record_type": "summary",
  "wallet": "0xd3bc202269d0bbd1a158264be8f7e1e0f9e45bd2",
  "window_days": 30,
  "trades_analyzed": 481,
  "markets_traded": 37,
  "realized_pnl_usd": 12840.55,
  "resolved_markets": 29,
  "wins": 19,
  "win_rate": 0.6552,
  "open_markets": 6,
  "mint_excluded_markets": 2,
  "two_sided_share": 0.081,
  "avg_entry_price": 0.6421,
  "category_mix": {"Crypto": 0.71, "Politics": 0.22, "Sports": 0.07},
  "coverage_capped": false,
  "earliest_trade_covered_utc": "2026-07-05T11:02:44+00:00"
}
```

Plus one flat `market` row per market traded:

| Field | Meaning |
|---|---|
| `status` | `resolved`, `open`, or `excluded_mint` |
| `buy_usd` / `sell_usd` | Gross flow in the window |
| `avg_entry_price` | Share-weighted average buy price |
| `net_shares` | Position remaining at resolution (or now, if open) |
| `realized_pnl_usd` | Settled P\&L (resolved markets only) |
| `win` | Whether the market ended profitable |
| `two_sided` | Wallet bought 2+ outcomes of this market (hedging/making) |

### Input

| Field | Default | Description |
|---|---|---|
| `wallet` | — (required) | 0x… Polymarket proxy wallet address |
| `days` | 30 | Analysis window |
| `include_open_positions` | true | Also output unresolved-market rows |

### Use cases

#### Copy-trading due diligence

Is that "hot" wallet actually profitable over resolved markets, or is its P\&L a minting artifact? Is it a hedger/market-maker you shouldn't follow? The `two_sided` flags answer that directly.

#### Leaderboard verification

Independently reconstruct claimed profits from public data instead of trusting a screenshot.

#### Research at scale

Feed a list of wallets from a whale-trades run, one Actor call each, and rank by realized P\&L and win rate.

### Using from Claude / AI agents (MCP)

Add Apify's MCP server (`https://mcp.apify.com`) to Claude, Cursor, or any MCP-capable client and your agent can vet a trader with real numbers mid-conversation:

```json
{
  "tool": "polymarket-wallet-pnl",
  "input": { "wallet": "0xd3bc202269d0bbd1a158264be8f7e1e0f9e45bd2", "days": 30 }
}
```

*"Is wallet 0xd3bc… worth copying?"* — one call returns realized P\&L, win rate, hedging share, and the coverage caveats an honest answer needs.

### Data source and fair use

Only Polymarket's **public, unauthenticated** APIs are used (trade tape + market resolutions). No keys, no login. Addresses analyzed are already public on polymarket.com. Results are estimates reconstructed from public fills; deposits/withdrawals, rewards, and off-tape transfers are out of scope by design.

### Pricing

Pay per event: one flat fee per wallet analyzed. No surprises — the price is the same whether the wallet has 5 trades or 3,000.

# Actor input Schema

## `wallet` (type: `string`):

The Polymarket proxy wallet address to analyze (0x…, 40 hex characters). You can copy it from any Polymarket profile URL or from a whale-trades dataset.

## `days` (type: `integer`):

How many days of trading history to analyze, counting back from now.

## `include_open_positions` (type: `boolean`):

Also output rows for markets that have not resolved yet (net shares and cost basis). Open positions never count toward realized P\&L or win rate.

## Actor input object example

```json
{
  "wallet": "0x2c569ec85a1530896995089c74663e8351aaab7c",
  "days": 30,
  "include_open_positions": true
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "wallet": "0x2c569ec85a1530896995089c74663e8351aaab7c"
};

// Run the Actor and wait for it to finish
const run = await client.actor("splendorous_astrolabe_xs9/polymarket-wallet-pnl").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "wallet": "0x2c569ec85a1530896995089c74663e8351aaab7c" }

# Run the Actor and wait for it to finish
run = client.actor("splendorous_astrolabe_xs9/polymarket-wallet-pnl").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "wallet": "0x2c569ec85a1530896995089c74663e8351aaab7c"
}' |
apify call splendorous_astrolabe_xs9/polymarket-wallet-pnl --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,splendorous_astrolabe_xs9/polymarket-wallet-pnl"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Ua1GAWAFABj8Agc8d/builds/dhcexXtGTLf0QKXe5/openapi.json
