# Trade History

Trade history in PaperMarket is the log of everything that was actually executed in the simulation.\
It shows every fill with real prices and sizes taken from the live Polymarket order book at the moment of the trade.

Orders can be open or canceled.\
Trades are always final.\
They are the base layer that positions and PnL are built on.

### What trade history contains

The trade history view shows one row per executed trade.\
For each trade you normally see

* time when the trade was created
* market and question
* token YES or NO
* side buy or sell
* size of the trade
* execution price between zero and one
* notional value of the trade in virtual dollars

Depending on the interface it can also show a reference to the original order that produced the trade.

This table is read only.\
You cannot edit or delete trades from the interface.

### How trades are created

Trades are created only when an order is matched against the live Polymarket book on the backend.

When you submit an order the backend

* fetches the current order book for the selected token
* finds which price levels can be used for this order
* calculates how much size can be executed given your cash or position limits
* creates one or more trades for the executed part

If the order is larger than the available liquidity at acceptable prices the backend creates several trades at different prices.\
The remaining size either disappears for immediate or cancel orders or stays as an open order for good till cancel limit orders.

Every time you see a trade row in history it means that some part of an order really interacted with the live Polymarket book in the simulation.

### Relation to positions and PnL

Positions and PnL in PaperMarket are derived from trades.

For each token the backend

* uses trades to update the net position size
* uses trade prices to recalculate the average entry price
* updates the virtual cash balance according to buy and sell values

When you look at the portfolio view you see the summary.\
When you open trade history you see the exact sequence of steps that created this summary.

If you want to understand why a position has a specific average entry price or why your cash balance moved in a certain way you can follow the trades in time and reconstruct the path.

### Reviewing performance over time

Trade history is useful when you want to study your behaviour as a trader.

You can use it to

* see how often you trade in each market
* check whether you tend to buy into strength or buy into dips
* compare your entry prices to the chart and to the final outcome of the market
* identify trades that moved your PnL the most

Over longer periods the history becomes a personal record of how you used your virtual balance and how your strategy behaved in different conditions.

### Limitations of trade history

Trade history is part of the simulation environment only.

It does not include

* any trades that you make on real Polymarket markets through a wallet
* any fills from other accounts
* any information about other participants in the order book

PaperMarket keeps only your own simulated trades for this account.\
If you delete the account or if data is removed on the backend the corresponding trade history can also be removed.

The purpose of this view is to give you enough detail to learn from your own decisions before you place real USDC bets on Polymarket.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://papermarket.gitbook.io/papermarket/portfolio-and-account/trade-history.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
