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

# Review a trader's history

> Compare a wallet's daily P&L, recorded large trades, and fills in one market.

Use this recipe to investigate a wallet's past results before adding it to a follow list. You will read its daily profit and loss (P\&L), recorded large trades, and stored fills for one market.

These records do not calculate what copying the wallet would have earned. Your entry price, timing, fees, and available liquidity would differ.

You need a [Pro API key](/authentication) and Python with `requests` installed. Run `python -m pip install requests` if needed. The snippets on this page share the variables defined in step 1.

<span id="1-read-the-profit-and-loss-series" />

## 1. Read the daily P\&L

[Trader P\&L](/api-reference/endpoint/get-trader-pnl) returns a daily series and summary statistics. A known wallet with no series returns `200` with an empty structured result. An identifier that does not resolve to a wallet returns `404`.

| Field | What it tells you |
| - | - |
| `entries` | Daily values, oldest first. `daily_change` is present; `cumulative_profit` can be absent. |
| `stats` | Results for all history (`all`) and the last 90, 30, and 7 days (`d90`, `d30`, `d7`). |
| `drawdown` | The daily decrease from the wallet's previous P\&L peak. |
| `monthly`, `year_totals` | The same series grouped by month and year. |
| `freshness_at` | When the series was rebuilt. `null` means it has not been rebuilt. |

```python theme={null}
import os

import requests

BASE = "https://api.0xinsider.com/api/v1"
H = {"Authorization": f"Bearer {os.environ['OXINSIDER_API_KEY']}"}

addr = "0x204f72f35326db932158cba6adff0b9a1da95e14"
def get(path, **params):
    response = requests.get(f"{BASE}{path}", params=params, headers=H, timeout=30)
    response.raise_for_status()
    return response.json()


pnl = get(f"/trader/{addr}/pnl")["data"]

print("as of:", pnl["freshness_at"])
print("all-time:", pnl["stats"]["all"]["current"])
print("last 30 days:", pnl["stats"]["d30"]["change"])

for entry in pnl["entries"][-10:]:
    # cumulative_profit is left out of the JSON on a day with no value for it.
    print(entry["date"], entry.get("cumulative_profit"), entry["daily_change"])

for point in pnl["drawdown"][-3:]:
    print(point["date"], point["cumulative_profit"], point["drawdown"])
```

The helper calls `raise_for_status()` before reading the body. Authentication and availability failures therefore stop the script instead of appearing as an empty result.

For a smaller response, the endpoint also supports a UTC date window through `from` and `to`, and selected result sections through `sections`. See the endpoint reference for their format.

<span id="2-read-the-stored-large-trades" />

## 2. Read the recorded large trades

[Large trades history](/api-reference/endpoint/get-large-trades-history) returns stored large trades for the wallet, newest first. It does not contain every Polymarket fill.

| Parameter | What to send |
| - | - |
| `trader` | The wallet address or username. An unseen wallet returns an empty list. |
| `from`, `to` | RFC3339 timestamps. `from` is included; `to` is excluded and must be later. |
| `min_size` | The minimum trade value in USD. The default is \$5,000. |
| `limit` | Up to 100 trades per page. The default is 20. |
| `cursor` | The previous page's `next_cursor`. Keep the other filters unchanged. |

```python theme={null}
fills = []
cursor = None
while True:
    params = {
        "trader": addr,
        "from": "2026-01-01T00:00:00Z",
        "to": "2026-06-01T00:00:00Z",
        "limit": 100,
    }
    if cursor:
        params["cursor"] = cursor
    page = get("/large-trades/history", **params)
    fills += page["data"]
    if not page["has_more"]:
        break
    cursor = page["next_cursor"]

for tr in fills:
    print(
        tr["traded_at"], tr["side"], tr["outcome"], tr["size_usd"],
        "@", tr["price"], tr["market"]["title"],
    )
```

The response is marked `meta.completeness.status: "best_effort"`. A gap in these records means coverage may be missing; it does not prove the wallet stopped trading.

<span id="3-rebuild-one-market-position" />

## 3. Inspect one market's fills

Take `market.condition_id` from a trade you want to investigate. Pass it to [Position timeline](/api-reference/endpoint/get-position-timeline) with the wallet address.

```bash theme={null}
curl -H "Authorization: Bearer $OXINSIDER_API_KEY" \
  "https://api.0xinsider.com/api/v1/trader/0x204f72f35326db932158cba6adff0b9a1da95e14/position-timeline?condition_id=0x123...&limit=100"
```

| Field | What it means |
| - | - |
| `running_amount` | The share balance after the fill, based on stored fills including earlier pages. |
| `running_avg_price` | The buy-weighted average price of stored fills. Selling does not change it. |
| `amount_delta` | The change in shares, positive for a buy and negative for a sell. |
| `usdc_notional` | The fill's USD value, always positive. |

`running_amount` excludes splits, merges, redemptions, and neg-risk conversions. It is not a complete statement of the wallet's holdings. `running_avg_price` can also differ from Polymarket's current average price.

Timelines are available only for wallets that 0xinsider tracks closely. A `404` with `trader_not_tracked` means no timeline is available; repeating the same request will not create one.

<span id="4-compare-the-two-views" />

## 4. Compare the records

1. Group the large trades by the UTC date in `traded_at`.
2. Match each date to the daily P\&L entry with the same `date`.
3. For a large daily change, inspect the timeline for each market traded that day.

A P\&L change without a matching large trade can be expected. P\&L covers the wallet's positions, while the trade history contains only the large trades 0xinsider recorded.

<span id="what-this-does-not-do" />

<span id="related" />

## Limits

* This recipe reviews historical results. It does not simulate your own copy-trading returns.
* It does not list all closed positions. A timeline covers one wallet and market.
* A timeline's `token_id` can be `null` when the market's token ID is unavailable.
* For a downloadable dataset, read [Trader export snapshot](/api-reference/endpoint/get-trader-export-snapshot) and [Submit a trader export](/api-reference/endpoint/submit-trader-export).
* The API does not place orders.

Use [Copy-trade signals](/recipes/copy-trade) to build a follow list from these records.


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