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

> ## Agent Instructions
> The Markdown of an API reference page leaves out the OpenAPI schema.
> Every object an endpoint returns or a webhook carries, with each field's type, presence and meaning, is on https://docs.0xinsider.com/api-reference/objects.md.
> The full OpenAPI 3.1 spec names each operation's and each webhook's exact parameters, request body and response schema: https://docs.0xinsider.com/api-reference/openapi.json.

# Market wallets in and out

> See which wallets put the most money into one market and which took the most out, over the last 24 hours or 7 days.

Use this endpoint to see who is moving money in one market right now. It returns the wallets with the largest net buying and the largest net selling over the window, and the window's totals over every wallet that traded. These are the same numbers the Wallets In / Out panel shows a Pro viewer on the 0xinsider market page, and they are live.

A wallet's net is its buys minus its sells across both outcomes, in USD. A net buyer is not necessarily on the Yes side. To see which outcome a wallet holds, use [Market holders](https://docs.0xinsider.com/api-reference/endpoint/get-market-holders.md).

## Parameters

| Parameter | Meaning |
| - | - |
| `condition_id` | Polymarket's own ID for the market, or the market's `mkt_` ID. |
| `window` | Optional. `24h` (the default) or `7d`. Any other value answers `400` with `error.param` `window`. |

## Key response fields

| Field | Meaning |
| - | - |
| `window_start`, `window_end` | The window's bounds. `window_end` is the time of the read. |
| `summary.wallets_in`, `summary.wallets_out` | How many wallets have a positive net and how many have a negative net in the window. They count every wallet, not only the listed ones. |
| `summary.net_usd` | The sum of every wallet's net in the window. A wallet that bought and sold the same amount nets zero and is on neither side. |
| `net_buyers` | Up to 25 wallets with the largest positive net, largest first. |
| `net_sellers` | Up to 25 wallets with the largest negative net, most negative first. |
| `net_buyers[].address`, `display_name`, `grade` | The wallet, the name the site shows, and today's [grade](https://docs.0xinsider.com/concepts/grades.md). `grade` is `null` for an ungraded wallet. |
| `net_buyers[].net_usd` | The wallet's buys minus its sells in the window, in USD. It counts the matched amount and leaves out fees. |
| `net_buyers[].trades` | The wallet's fills in this market in the window. |
| `net_buyers[].last_traded_at` | The wallet's newest trade on any market, at or before `window_end`. |

## Example

```bash theme={null}
curl -sS \
  -H "Authorization: Bearer $OXINSIDER_API_KEY" \
  'https://api.0xinsider.com/api/v1/market/0x6e988ea96e8f18fb71f7635bbedb07cda76063ad6c496eaa5bd468a59013cc0e/wallets-in-out?window=7d'
```

## Freshness

The numbers are cached for 60 seconds. Send the last `ETag` as `If-None-Match`, and you get a `304` with an empty body when nothing changed.

## What it does not return

* A market 0xinsider does not track. That is a `404` with `error.param` `condition_id`. A market outside sports and esports is a `404` with `error.reason` `market_out_of_scope`.
* Windows other than 24 hours and 7 days.
* More than 25 wallets per side. The `summary` counts cover the rest.


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.0xinsider.com/llms.txt).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.