# Polymarket Wallet PnL and Strategy Analyzer (`redfoxxie/polymarket-wallet-edge-audit`) Actor

Audit public Polymarket wallets with official position PnL, exact maker/taker inference, dynamic fee estimates, drawdown, profit concentration, behavior fingerprints, and explicit coverage warnings. Analyze up to 10 addresses per run without wallet credentials or API keys.

- **URL**: https://apify.com/redfoxxie/polymarket-wallet-edge-audit.md
- **Developed by:** [João Ferreira](https://apify.com/redfoxxie) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$190.00 / 1,000 wallet edge audits

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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

Unofficial independent tool. It is not affiliated with, sponsored by, or
endorsed by Polymarket.

Audit one to ten public Polymarket proxy wallets with **PnL, position risk,
maker/taker behavior, dynamic fee exposure, and profit concentration** in one
record per address. The Actor uses only public Gamma and Data APIs. It never
requests a private key, signs a transaction, places an order, or requires a
Polymarket API credential.

It is designed for Apify's **limited-permission** runtime and needs only its
default run storage plus public network access. Its pay-per-event, non-Standby
shape also meets the technical prerequisites for agentic-payment discovery if
Apify marks the published Actor as eligible.

### What can this Polymarket wallet analyzer do?

Wallet leaderboards can hide the mechanics behind a headline PnL number. This
Actor separates official public position accounting from independently derived
execution diagnostics and reports how much source history was actually covered.

Each paid wallet audit includes:

- open-position cost basis, current value, cash PnL, redeemable value, and rows;
- closed-position realized PnL, win share, profit factor, drawdown, and profit
  concentration;
- exact maker/taker inference by multiset subtraction of public all-trade and
  `takerOnly=true` samples;
- current per-market Gamma fee schedules, including rate and exponent;
- an estimated taker-fee total and its notional coverage, kept separate from
  official PnL;
- two-sided accumulation, longshot exposure, activity rate, and a descriptive
  behavior fingerprint;
- explicit truncation, fee-coverage, concentration, and copyability warnings.

The documented dataset schema makes audit records easy to export as JSON, CSV,
Excel, or consume through the Apify API and MCP/AI-agent integrations.

### Quick start

Paste one or more public proxy-wallet addresses into `wallets`:

```json
{
  "wallets": [
    "0x04b6d7e930cf9e493c5e6ef24b496294f95594c8"
  ],
  "tradeLimit": 1000,
  "closedPositionLimit": 500,
  "openPositionLimit": 500,
  "maxFeeMarkets": 250,
  "includeLeaderboard": true
}
````

One run can compare up to ten addresses. Increase the row limits for a deeper
sample, but read `data_quality` and `risk_flags` before interpreting the result.

### Search-ready examples

The publication bundle includes runnable tasks for auditing one public whale
wallet and comparing three wallets under the same accounting rules. The exact
inputs are versioned in `public_tasks.json`; none of the example addresses is
presented as a recommendation or a profitable wallet to copy.

### How maker/taker inference works

Polymarket's public trade endpoint can return all observed trades and a
taker-only subset. The Actor treats both responses as bounded multisets and
subtracts exact matching rows. Rows present in the taker-only sample are labeled
taker; residual rows are labeled maker. This is stronger than guessing from BUY
or SELL, but it remains an inference over the fetched public sample.

### How to interpret wallet PnL and fees

`closed_positions` and leaderboard values are official public PnL summaries.
`fee_sample` is a separate estimate for inferred taker rows whose current dynamic
fee schedules were resolved. The Actor deliberately does not subtract that
estimate from official PnL because doing so could double-count costs already
reflected by Polymarket's accounting.

A maker-heavy profitable wallet is not automatically copyable. A maker received
queue-priority fills that a later taker generally cannot reproduce at the same
price. Profit concentrated in a few markets is also less robust than the same
PnL spread across many independent outcomes. These conditions are surfaced as
flags rather than hidden.

### Pricing

Each successful `wallet_edge_audit` record costs **$0.19**. Invalid addresses
and failed audits are not charged. The price is per wallet, so an input containing
ten valid addresses has a maximum custom-event charge of $1.90. The launch uses
**Pay per event + usage** with no custom start fee; Apify platform usage is
billed separately by Apify to the account running the Actor.

### Limits, legality, and support

This tool describes public history; it does not recommend a wallet or claim
that past returns establish future edge. Public APIs may truncate history, and
dynamic fee coverage can be incomplete. Always inspect the attached data-quality
fields.

Users remain responsible for Polymarket's terms, geographic restrictions, and
applicable law. Report reproducible parsing, fee, or accounting issues through
the Actor's Apify Issues tab with the run ID and wallet address.

# Actor input Schema

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

One to ten public Polymarket proxy-wallet addresses. One paid audit record is produced per valid wallet.

## `tradeLimit` (type: `integer`):

Maximum all-trade rows used for maker/taker and behavior analysis.

## `closedPositionLimit` (type: `integer`):

Maximum recent closed-position rows used for realized PnL, drawdown, profit factor, and concentration analysis.

## `openPositionLimit` (type: `integer`):

Maximum public open-position rows used for current cost, value, PnL, redeemable, and locked-position summaries.

## `maxFeeMarkets` (type: `integer`):

Maximum distinct recent taker markets whose current Gamma fee schedule is resolved.

## `includeLeaderboard` (type: `boolean`):

Fetch public leaderboard values for additional context. These values remain separate from position-derived summaries.

## Actor input object example

```json
{
  "wallets": [
    "0x04b6d7e930cf9e493c5e6ef24b496294f95594c8"
  ],
  "tradeLimit": 1000,
  "closedPositionLimit": 500,
  "openPositionLimit": 500,
  "maxFeeMarkets": 250,
  "includeLeaderboard": true
}
```

# Actor output Schema

## `walletAudits` (type: `string`):

PnL, position, maker/taker, fee, concentration, behavior, and data-quality records.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("redfoxxie/polymarket-wallet-edge-audit").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 = {}

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

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

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

```

## CLI example

```bash
echo '{}' |
apify call redfoxxie/polymarket-wallet-edge-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=redfoxxie/polymarket-wallet-edge-audit",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Polymarket Wallet PnL and Strategy Analyzer",
        "description": "Audit public Polymarket wallets with official position PnL, exact maker/taker inference, dynamic fee estimates, drawdown, profit concentration, behavior fingerprints, and explicit coverage warnings. Analyze up to 10 addresses per run without wallet credentials or API keys.",
        "version": "0.1",
        "x-build-id": "2t1XQvf3Ca6USPwHj"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/redfoxxie~polymarket-wallet-edge-audit/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-redfoxxie-polymarket-wallet-edge-audit",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/redfoxxie~polymarket-wallet-edge-audit/runs": {
            "post": {
                "operationId": "runs-sync-redfoxxie-polymarket-wallet-edge-audit",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/redfoxxie~polymarket-wallet-edge-audit/run-sync": {
            "post": {
                "operationId": "run-sync-redfoxxie-polymarket-wallet-edge-audit",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "wallets"
                ],
                "properties": {
                    "wallets": {
                        "title": "Wallet addresses",
                        "minItems": 1,
                        "maxItems": 10,
                        "type": "array",
                        "description": "One to ten public Polymarket proxy-wallet addresses. One paid audit record is produced per valid wallet.",
                        "items": {
                            "type": "string",
                            "pattern": "^0x[a-fA-F0-9]{40}$"
                        }
                    },
                    "tradeLimit": {
                        "title": "Recent trade rows",
                        "minimum": 100,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum all-trade rows used for maker/taker and behavior analysis.",
                        "default": 1000
                    },
                    "closedPositionLimit": {
                        "title": "Closed position rows",
                        "minimum": 50,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Maximum recent closed-position rows used for realized PnL, drawdown, profit factor, and concentration analysis.",
                        "default": 500
                    },
                    "openPositionLimit": {
                        "title": "Open position rows",
                        "minimum": 50,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum public open-position rows used for current cost, value, PnL, redeemable, and locked-position summaries.",
                        "default": 500
                    },
                    "maxFeeMarkets": {
                        "title": "Dynamic fee schedules",
                        "minimum": 25,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum distinct recent taker markets whose current Gamma fee schedule is resolved.",
                        "default": 250
                    },
                    "includeLeaderboard": {
                        "title": "Include leaderboard snapshots",
                        "type": "boolean",
                        "description": "Fetch public leaderboard values for additional context. These values remain separate from position-derived summaries.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
