> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goldsky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Activity

> Get Polymarket trade fills and other onchain events, newest first, for one wallet, one market token, or a time or block window.

```text theme={"dark"}
GET https://edge.goldsky.com/data/polymarket/activity
```

Returns Polymarket activity on Polygon, newest first: trade fills, plus splits, merges, and redeems. Each row is one side of one event, with the wallet, the outcome token, the price, the size in shares and USDC, and, on maker rows, the wallet on the other side. Use it to show a trader's history, follow the trades in one market, or watch for large fills.

## Parameters

Every parameter is optional, but a request must be narrow enough to answer quickly. Send at least one of:

* `address`
* `token_id`
* `start_block` and `end_block`, at most 300,000 blocks apart
* `start_time` and `end_time`, at most 7 days (604,800 seconds) apart

A request with none of these returns `400 MISSING_SELECTIVE_FILTER`, with one exception. A request with no parameters except `limit`, set to `100` or less, returns the newest activity across all of Polymarket. That form returns one page only: its `next_cursor` can't be followed, so add a filter to page further.

**address** `string`

Only return activity by this wallet: `0x` followed by 40 hex characters, in any case.

**token\_id** `string`

Comma-separated outcome token IDs. Only return activity in these tokens.

**event\_type** `string`

Comma-separated event types, such as `TRADE`. Values are case-sensitive and match `event_type` in the response.

**side** `string`

`BUY` or `SELL`. Case-sensitive.

**order\_type** `string`

`maker` or `taker`. Case-sensitive.

**start\_time** `string`

Only return activity at or after this time, as an RFC 3339 timestamp such as `2026-10-01T00:00:00Z` or as Unix seconds.

**end\_time** `string`

Only return activity at or before this time, in the same formats as `start_time`.

**start\_block** `integer`

Only return activity at or after this Polygon block. Can't be combined with `start_time` or `end_time`. Mixing the two returns `422 CONFLICTING_FILTERS`.

**end\_block** `integer`

Only return activity at or before this Polygon block.

**min\_amount\_usdc** `number`

Only return rows whose `amount_usdc` is at least this value.

**sort** `string` (default: block\_desc)

`block_desc`, the only order: newest block first.

**limit** `integer` (default: 100)

Rows per page, up to `1000`. See [pagination](https://docs.goldsky.com/feeds/api/overview.md#prediction-markets-and-chain-datasets).

**cursor** `string`

The `next_cursor` from a previous response.

## Response

**data** `object[]`

One entry per side of each event, newest first by `block_number`.

**properties**

**id** `string`

Event ID.

**block\_number** `integer`

Polygon block number of the event.

**block\_timestamp** `integer | null`

Block time, in Unix seconds.

**transaction\_hash** `string | null`

Transaction hash.

**address** `string | null`

The wallet this row belongs to, in lowercase.

**token\_id** `string | null`

Outcome token ID.

**event\_type** `string`

Event type, such as `TRADE`.

**side** `string`

`BUY` or `SELL`.

**order\_type** `string`

`maker` or `taker`.

**order\_id** `string | null`

Hash of the order.

**counterparty\_address** `string | null`

On a `maker` row, the wallet of the taker on the other side of the trade. Always `null` on a `taker` row, because a taker trades against the exchange, not against one wallet. To find a taker's makers, look for rows with the same `transaction_hash` and `token_id` and the opposite `side`.

**price** `number | null`

Fill price, between 0 and 1.

**amount\_shares** `number | null`

Number of outcome token shares.

**amount\_usdc** `number | null`

Value in USDC.

**fee** `number | null`

Fee paid by this side, in USDC. In the source data, some maker and taker pairs compute it on different bases, so treat it as approximate.

**builder** `string | null`

Builder address, if any.

**limit** `integer`

The page size used for this response.

**next\_cursor** `string | null`

Pass it as `cursor` to get the next page. `null` on the last page.

## How the data behaves

* **One trade, several rows.** A fill appears once for each side. The taker's row and each maker's row share a `transaction_hash` and `token_id`.
* **Amounts are plain numbers.** `price`, `amount_shares`, `amount_usdc`, and `fee` are JSON numbers already in shares and USDC, and `amount_usdc / amount_shares` equals `price`. [Positions](https://docs.goldsky.com/feeds/api/prediction-markets/positions.md) and [Balances](https://docs.goldsky.com/feeds/api/prediction-markets/balances.md) are different: they return strings in raw units of 10^6.
* **Timestamps are Unix seconds.** `block_timestamp` is an integer, not an RFC 3339 string as in the wallet feeds.
* **Recent results can change.** Responses for an open window carry `Cache-Control: public, max-age=2`. A request with `end_time` or `end_block` carries `public, max-age=300`.

## Errors

This endpoint returns the [same errors](https://docs.goldsky.com/feeds/api/overview.md#errors) as the other feeds. These are specific to it:

| Status | `code` | When |
| - | - | - |
| `400` | `MISSING_SELECTIVE_FILTER` | The request has none of the filters listed under [Parameters](#parameters). |
| `400` | `BAD_REQUEST` | `address` isn't 40 hex characters, a time isn't RFC 3339 or Unix seconds, `sort` isn't `block_desc`, or `cursor` was issued for a different `sort`. |
| `422` | `CONFLICTING_FILTERS` | The request mixes a time window with a block window. |

## Billing

With an API key, each row returned is one compute unit, at \$10 per million. An empty page is free. With [x402](https://docs.goldsky.com/feeds/api/overview.md#pay-per-request-with-x402), each request costs 10 atomic USDC (\$0.00001), however many rows it returns. See [Feeds pricing](https://docs.goldsky.com/pricing/summary.md#feeds).

## Example

Get the two most recent rows for a wallet:

```bash theme={"dark"}
curl -H "X-API-Key: $GOLDSKY_FEEDS_API_KEY" \
  "https://edge.goldsky.com/data/polymarket/activity?address=0x0000000000002d4249a9b7976dc47d3cff1a54a2&limit=2"
```

The response has this shape. The values are illustrative, and hashes and IDs are shortened:

```json theme={"dark"}
{
  "data": [
    {
      "block_number": 78412233,
      "id": "0x5f0c…",
      "transaction_hash": "0x5f0c…",
      "address": "0x0000000000002d4249a9b7976dc47d3cff1a54a2",
      "token_id": "10731…",
      "amount_usdc": 93.0,
      "amount_shares": 150.0,
      "price": 0.62,
      "event_type": "TRADE",
      "side": "BUY",
      "order_id": "0x9a41…",
      "counterparty_address": "0x7c3d…",
      "order_type": "maker",
      "fee": 0.0,
      "builder": null,
      "block_timestamp": 1793208713
    },
    {
      "block_number": 78412190,
      "id": "0x2b77…",
      "transaction_hash": "0x2b77…",
      "address": "0x0000000000002d4249a9b7976dc47d3cff1a54a2",
      "token_id": "10731…",
      "amount_usdc": 24.4,
      "amount_shares": 40.0,
      "price": 0.61,
      "event_type": "TRADE",
      "side": "SELL",
      "order_id": "0x41e8…",
      "counterparty_address": null,
      "order_type": "taker",
      "fee": 0.0,
      "builder": null,
      "block_timestamp": 1793208627
    }
  ],
  "next_cursor": "eyJzIjoiYmxvY2tfZGVzYyIsImIiOjc4NDEyMTkwLCJpIjoi...",
  "limit": 2
}
```


## Related topics

- [Movement sources for Turbo pipelines](https://docs.goldsky.com/turbo-pipelines/sources/movement.md)
- [Dynamic Tables](https://docs.goldsky.com/turbo-pipelines/transforms/dynamic-tables.md)
- [Pipeline cookbook](https://docs.goldsky.com/turbo-pipelines/reference/pipeline-cookbook.md)
- [Pricing: plans, metering, and product costs](https://docs.goldsky.com/pricing/summary.md)
- [Pipeline architecture patterns](https://docs.goldsky.com/turbo-pipelines/guides/architecture-patterns.md)
