# Polymarket Wallet X-Ray (`mo_khairy/polymarket-wallet-xray`) Actor

Reverse-engineer any Polymarket wallet or top trader: strategy label, skill vs luck tests, whether it still works, rebate vs trading profit, and a leaderboard PnL reality check. Public data, no API key.

- **URL**: https://apify.com/mo_khairy/polymarket-wallet-xray.md
- **Developed by:** [Mohamed Khairy](https://apify.com/mo_khairy) (community)
- **Categories:** Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$30.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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Polymarket Wallet X-Ray: strategy, skill vs luck, and "does it still work?"

Paste a Polymarket wallet, username or profile URL, or ask for this month's top traders. For each wallet you get:

1. **What it does.** A strategy label, such as pair trading, two-sided market making, near-certainty buying or longshot buying, plus tags. Each tag shows the numbers that triggered it.
2. **Skill or luck?** A bootstrap confidence interval on profit per position, a "remove the 5 biggest wins" check, and a price-calibration test. A wallet that pays 60¢ and wins 60% of the time has no edge.
3. **Does it still work?** PnL over the last 30 days vs the rest of the window, drawdown, worst day, monthly PnL, and days since the last trade.
4. **Where the money comes from.** Trading profit is split from maker rebates and rewards. Some top wallets make nearly all their money from rebates.
5. **Leaderboard reality check.** The leaderboard's PnL figure is compared with the wallet's own PnL history. They often disagree by millions.

Everything comes from Polymarket's public Data API and Gamma API. You don't need an API key or a login, and the Actor never places orders.

### Use cases

- **Copy-trading due diligence.** Before you follow a wallet, check whether its record is an edge or a lucky streak, and whether it still works.
- **Finding bots.** Spot automated pair traders, market makers and near-certainty sniping bots, and see what each one trades.
- **Research and content.** Write up "what the top 10 Polymarket traders actually do" from structured output.
- **Monitoring.** Schedule a run weekly and watch wallets move from *Still working* to *Fading*.

### Input

| Field | What it does |
|---|---|
| `wallets` | Addresses (`0x…`), usernames, or profile URLs (`polymarket.com/@name`, `polymarket.com/profile/0x…`) |
| `leaderboardPeriod` | `none`, `day`, `week`, `month` or `all`. Adds the top traders for that period |
| `leaderboardCount` | How many leaderboard wallets to analyze (1–100) |
| `leaderboardSortBy` | `PNL` or `VOLUME` |
| `lookbackDays` | How far back to read trades and settled positions (default 90) |
| `maxTrades`, `maxPositions` | Caps per wallet. Very active bots can have hundreds of thousands of trades |
| `includeMakerTrades` | Include maker fills. Leave this on, or limit-order bots look almost empty |
| `saveMarkdownReport` | Also save a readable report per wallet |

```json
{
  "wallets": ["0x8dxd", "https://polymarket.com/profile/0x111f73e91f85b6fe4de1ddec3de2fe32122e355b"],
  "leaderboardPeriod": "month",
  "leaderboardCount": 10
}
```

### Output

Each wallet produces one dataset item. The **Overview** table shows the verdicts. The full item also has every feature, the skill statistics, monthly PnL, the income breakdown and warnings.

```json
{
  "name": "Papeasy",
  "leaderboardRank": 3,
  "primaryStrategy": "Two-sided quoting in short Up/Down markets (likely market maker)",
  "strategyTags": ["up-down-market-maker", "automated", "holds-to-resolution", "rebate-earner"],
  "evidence": {
    "rebate-earner": "rebates and rewards ($1,180) exceed trading PnL ($178) over the window"
  },
  "skillVerdict": "Can't tell from luck",
  "stillWorksVerdict": "Still working: profitable over the last 30 days",
  "incomeBreakdown": { "tradingPnlUsd": 178, "rebatesAndRewardsUsd": 1180, "totalPnlUsd": 1358 },
  "leaderboardCheck": { "period": "month", "leaderboardPnlUsd": 2170396, "pnlHistoryUsd": 841 },
  "warnings": ["Leaderboard shows $2,170,396 PnL for the month, but the wallet's own PnL history shows $841 for the same period."],
  "reportUrl": "https://api.apify.com/v2/key-value-stores/.../records/REPORT-0x111f..."
}
```

With `saveMarkdownReport` on, each wallet also gets a readable report in the key-value store under `REPORT-<wallet>`. Its link is in `reportUrl`.

### Strategy tags

| Tag | Rule (simplified) |
|---|---|
| `pair-trade` | ≥50% of volume in crypto Up/Down markets. Buys both sides in ≥50% of them, roughly balanced |
| `up-down-market-maker` | ≥50% in crypto Up/Down. Buys both sides in ≥25% of them. ≥200 trades per active day |
| `speed-trade` | ≥60% in crypto Up/Down, one side only. ≥100 trades per day. Holds. Buys mostly below 95¢ |
| `fair-value-model` | ≥40% in "above $X" crypto markets. ≥70% of buys priced 20–95¢. Holds |
| `near-certainty-buyer` | ≥40% of buy dollars above 95¢ |
| `longshot-buyer` | ≥40% of buy dollars below 20¢ |
| `active-trader` | ≥35% of volume is sells |
| `automated` | Trades in ≥20 of 24 UTC hours and makes ≥50 trades per active day |
| `holds-to-resolution` | <5% of volume is sells |
| `concentrated` | ≥30% of volume in one market |
| `rebate-earner` | Maker rebates and rewards are larger than trading PnL over the window |

A wallet with fewer than 50 trades in the window gets no strategy label.

### Pricing

Pay per event: you pay once per wallet analyzed. Wallets that fail, such as a username that doesn't exist, are not charged. Set a spending limit on the run and the Actor stops when it reaches it.

### Limits

- `speed-trade` is inferred from the shape of the trades. Confirming it would need exchange prices at each fill time.
- When `maxTrades` is hit, only the most recent trades are fingerprinted, and `warnings` says so.
- Some wallets move shares by merges, splits or conversions that don't appear in the trades feed. The Actor warns when trades look too few for the positions.
- Market types come from matching market titles and slugs.
- Past results say nothing about future returns. This is not investment advice.

### FAQ

**Why doesn't the PnL match the leaderboard?** The leaderboard's PnL figure often disagrees with the wallet's own PnL history. One wallet showed +$2.2M for the month on $475k of volume. The Actor reports both and uses the PnL history (`economic_pnl`, which includes rebates and open positions) for its verdicts.

**Can I analyze a wallet by username?** Yes. Usernames must match exactly. If there's no exact match, the error lists close matches.

# Actor input Schema

## `wallets` (type: `array`):

Polymarket proxy wallet addresses (0x...), usernames, or profile URLs (polymarket.com/@name or polymarket.com/profile/0x...). Leave empty if you use the leaderboard option below.

## `leaderboardPeriod` (type: `string`):

Pull the top wallets from Polymarket's public leaderboard for this period and analyze each one. 'none' analyzes only the wallets above.

## `leaderboardCount` (type: `integer`):

Number of top wallets to take from the leaderboard.

## `leaderboardSortBy` (type: `string`):

Rank the leaderboard by profit or by volume.

## `lookbackDays` (type: `integer`):

How far back to read trades and closed positions.

## `maxTrades` (type: `integer`):

Cap on trades read per wallet. High-frequency bots can have hundreds of thousands; the fingerprint is stable well before that.

## `maxPositions` (type: `integer`):

Cap on closed and settled positions read for the skill-vs-luck test.

## `includeMakerTrades` (type: `boolean`):

Polymarket's trades feed returns only taker fills by default. Bots that post limit orders would look nearly empty without this.

## `bootstrapSamples` (type: `integer`):

Resamples used for the confidence interval on average profit per position.

## `saveMarkdownReport` (type: `boolean`):

Also store a human-readable report per wallet in the key-value store.

## `concurrency` (type: `integer`):

How many wallets to analyze at the same time.

## Actor input object example

```json
{
  "wallets": [
    "0xf0318c32136c2db7fec88b84869aee6a1106c80c",
    "0x111f73e91f85b6fe4de1ddec3de2fe32122e355b"
  ],
  "leaderboardPeriod": "none",
  "leaderboardCount": 10,
  "leaderboardSortBy": "PNL",
  "lookbackDays": 90,
  "maxTrades": 20000,
  "maxPositions": 10000,
  "includeMakerTrades": true,
  "bootstrapSamples": 2000,
  "saveMarkdownReport": true,
  "concurrency": 3
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `reports` (type: `string`):

No description

# 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 = {
    "wallets": [
        "0xf0318c32136c2db7fec88b84869aee6a1106c80c",
        "0x111f73e91f85b6fe4de1ddec3de2fe32122e355b"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mo_khairy/polymarket-wallet-xray").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 = { "wallets": [
        "0xf0318c32136c2db7fec88b84869aee6a1106c80c",
        "0x111f73e91f85b6fe4de1ddec3de2fe32122e355b",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mo_khairy/polymarket-wallet-xray").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 '{
  "wallets": [
    "0xf0318c32136c2db7fec88b84869aee6a1106c80c",
    "0x111f73e91f85b6fe4de1ddec3de2fe32122e355b"
  ]
}' |
apify call mo_khairy/polymarket-wallet-xray --silent --output-dataset

```

## MCP server setup

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

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/HePp6ghWLdkFlHmwS/builds/lQX3Ifsjkq5bxb2mC/openapi.json
