# Polymarket Trades & Wallet Activity Scraper (`chainfeed/polymarket-trades-wallet-activity-scraper`) Actor

Scrapes real-time and recent trades from Polymarket's public Data API. Filter by wallet address, market slug, minimum USD size, side, and time window.

- **URL**: https://apify.com/chainfeed/polymarket-trades-wallet-activity-scraper.md
- **Developed by:** [Eduardo](https://apify.com/chainfeed) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Polymarket Trades & Wallet Activity Scraper

Pull real-time and recent trade data straight from [Polymarket](https://polymarket.com)'s
public Data API — no API key, no scraping the website, no rate-limit headaches.
Filter by wallet, market, minimum trade size, side, and time window, and get
clean, structured trade records in your Apify dataset.

### What it does

This Actor calls Polymarket's free, public `data-api.polymarket.com/trades`
endpoint and returns every matching trade as one dataset item, with sizes,
prices, and USD notional already computed for you. It's built for anyone who
wants Polymarket order-flow data without writing and maintaining their own API
client.

### Use cases

- **Whale watching** — pull every trade above a USD threshold (e.g. $10,000+)
  across all of Polymarket in the last few hours.
- **Wallet tracking** — monitor one or more specific wallets and see exactly
  what they're buying and selling, and when.
- **Market research** — pull all trades on a specific market (by slug) to
  study order flow, price action, or participant behavior.
- **Bot / pipeline input** — feed structured trade data into a downstream
  alerting, analytics, or trading pipeline on a schedule (Apify supports
  scheduled runs and webhooks out of the box).

### Input

All fields are optional — running with defaults fetches the most recent
trades platform-wide.

| Field | Type | Default | Description |
|---|---|---|---|
| `walletAddresses` | array of strings | `[]` (all wallets) | Only trades from these Polymarket wallets (`proxyWallet`). |
| `marketSlugs` | array of strings | `[]` (all markets) | Only trades on these markets, by slug. |
| `minUsdSize` | integer | `0` | Only trades worth at least this many USD (`shares × price`). |
| `side` | `"ANY"` \| `"BUY"` \| `"SELL"` | `"ANY"` | Only one side, or both. |
| `maxResults` | integer | `1000` | Cap on how many trades the run will save. |
| `hoursBack` | integer | `24` | Only trades from within this time window. `0` disables the time filter (bounded by the safety limit below). |

Example input:

```json
{
  "walletAddresses": [],
  "marketSlugs": [],
  "minUsdSize": 5000,
  "side": "BUY",
  "maxResults": 500,
  "hoursBack": 6
}
````

### Output

One dataset item per trade:

```json
{
  "tx_hash": "0xb3ffd32e25ca95d9f914bee335fb4586fbda2c1d1f2a02313e3fdce171795442",
  "wallet": "0x0e1005d2daaf1e01b357a9dedd032c283d75b1ff",
  "side": "BUY",
  "shares": 20.0,
  "price": 0.595,
  "usd_size": 11.9,
  "market_slug": "fifwc-esp-arg-2026-07-19-team-to-advance",
  "market_title": "Spain vs. Argentina: Team to Advance",
  "outcome": "Spain",
  "timestamp": 1784489479,
  "timestamp_iso": "2026-07-19T21:31:19+00:00",
  "condition_id": "0x4b045e092c3166aa29d4864c11dffe7e316daafdac5677f11aa5cd16065fd042",
  "event_slug": "fifwc-esp-arg-2026-07-19-more-markets",
  "polymarket_url": "https://polymarket.com/event/fifwc-esp-arg-2026-07-19-more-markets"
}
```

Note: some trades on combo / negRisk markets come back from the API with an
empty `market_slug`, `outcome`, and `event_slug` (and therefore an empty
`polymarket_url`). That's expected — those fields are simply not populated by
Polymarket for that trade type, not a parsing error.

### How filtering works

- `side` is filtered server-side by Polymarket's API.
- `walletAddresses` and `marketSlugs` are filtered by this Actor after
  fetching, because Polymarket's public API doesn't offer a reliable
  server-side filter by wallet (it silently ignores the filter for wallets
  with zero trade history) or by human-readable market slug (it only accepts
  an internal market ID). Filtering client-side avoids both issues.
- `minUsdSize` and `hoursBack` are always applied client-side.

### Known limits

- This Actor only reads Polymarket's **public** Data API. It does not require
  and does not accept any credentials.
- Polymarket's public API itself hard-caps pagination depth: it only allows
  reaching the most recent ~10,500 trades per query (the global feed, or one
  query per requested wallet) before returning an error, which this Actor
  detects and stops on cleanly. In practice this only matters for very narrow
  filters (e.g. a very high `minUsdSize` combined with a long `hoursBack`, or
  a low-activity market/wallet with a long lookback) — if you hit this limit,
  narrow `hoursBack` or run the Actor more frequently instead.
- If `ACTOR_MAX_PAID_DATASET_ITEMS` is set (Apify sets this automatically on
  pay-per-result runs), the Actor never pushes more items than that, even if
  `maxResults` is set higher.

### Pricing

This Actor is priced pay-per-result (~$1 per 1,000 trades returned). You're
only charged for dataset items actually produced — a run that filters down to
zero matching trades costs nothing beyond the (very small) platform run fee.

### Disclaimer

This Actor surfaces publicly available on-chain trade data from Polymarket's
own public API. It is provided for informational and research purposes only.
Nothing produced by this Actor is financial advice, and trade activity
(including from any specific wallet) is not a signal or recommendation to
buy, sell, or hold anything.

# Actor input Schema

## `walletAddresses` (type: `array`):

Only return trades made by these wallets (Polymarket proxyWallet address, e.g. 0xabc...). Leave empty to fetch trades from all wallets.

## `marketSlugs` (type: `array`):

Only return trades on these markets, identified by their Polymarket slug (e.g. "will-trump-win-the-2026-election"). Leave empty to fetch trades from all markets.

## `minUsdSize` (type: `integer`):

Only return trades worth at least this many USD (computed as shares \* price). Set to 0 to disable this filter.

## `side` (type: `string`):

Only return BUY or SELL trades, or ANY for both.

## `maxResults` (type: `integer`):

Maximum number of trades to save to the dataset. The run stops once this cap (or the Apify pay-per-result cap, if lower) is reached.

## `hoursBack` (type: `integer`):

Only return trades that happened within this many hours of now. Set to 0 to disable the time filter (limited by how far back the API pagination is walked).

## Actor input object example

```json
{
  "walletAddresses": [],
  "marketSlugs": [],
  "minUsdSize": 0,
  "side": "ANY",
  "maxResults": 1000,
  "hoursBack": 24
}
```

# 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("chainfeed/polymarket-trades-wallet-activity-scraper").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("chainfeed/polymarket-trades-wallet-activity-scraper").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 chainfeed/polymarket-trades-wallet-activity-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Polymarket Trades & Wallet Activity Scraper",
        "description": "Scrapes real-time and recent trades from Polymarket's public Data API. Filter by wallet address, market slug, minimum USD size, side, and time window.",
        "version": "0.1",
        "x-build-id": "AP2fGRCzZpH34I2qO"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/chainfeed~polymarket-trades-wallet-activity-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-chainfeed-polymarket-trades-wallet-activity-scraper",
                "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/chainfeed~polymarket-trades-wallet-activity-scraper/runs": {
            "post": {
                "operationId": "runs-sync-chainfeed-polymarket-trades-wallet-activity-scraper",
                "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/chainfeed~polymarket-trades-wallet-activity-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-chainfeed-polymarket-trades-wallet-activity-scraper",
                "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",
                "properties": {
                    "walletAddresses": {
                        "title": "Wallet addresses",
                        "type": "array",
                        "description": "Only return trades made by these wallets (Polymarket proxyWallet address, e.g. 0xabc...). Leave empty to fetch trades from all wallets.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "marketSlugs": {
                        "title": "Market slugs",
                        "type": "array",
                        "description": "Only return trades on these markets, identified by their Polymarket slug (e.g. \"will-trump-win-the-2026-election\"). Leave empty to fetch trades from all markets.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "minUsdSize": {
                        "title": "Minimum USD size",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return trades worth at least this many USD (computed as shares * price). Set to 0 to disable this filter.",
                        "default": 0
                    },
                    "side": {
                        "title": "Trade side",
                        "enum": [
                            "ANY",
                            "BUY",
                            "SELL"
                        ],
                        "type": "string",
                        "description": "Only return BUY or SELL trades, or ANY for both.",
                        "default": "ANY"
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of trades to save to the dataset. The run stops once this cap (or the Apify pay-per-result cap, if lower) is reached.",
                        "default": 1000
                    },
                    "hoursBack": {
                        "title": "Hours back",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return trades that happened within this many hours of now. Set to 0 to disable the time filter (limited by how far back the API pagination is walked).",
                        "default": 24
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
