# Managing Orders

PaperMarket keeps a full record of every order you submit and lets you see which ones are still open and which ones are already fully filled.\
This section explains how to review your orders, understand their status and cancel any remaining size when you no longer want it in the simulation.

All order management happens inside PaperMarket.\
Open orders exist only in the PaperMarket database and are never placed on Polymarket.

### Orders view

Alongside the trade panel and portfolio you can open an orders view for your account.\
This view shows a table of your orders with information such as

* time when the order was created
* market and token YES or NO
* side buy or sell
* requested size
* filled size
* remaining size if any
* price and order type
* current status

You can usually filter this table to focus on open orders only or to review all past orders including completed ones.

### Order statuses

Each order in PaperMarket can move through several states depending on how much of it was filled

* open the order has remaining size that is still active in the system
* partially filled some size was executed but a remainder is still open
* filled the full requested size was executed
* canceled the remaining size was explicitly canceled by the user

For market orders and limit orders with immediate or cancel behaviour the system either fills what is possible right away or leaves the unfilled part with a final status.\
For good till cancel limit orders any remaining size stays in the open or partially filled state until it is matched or canceled.

### Partially filled orders

Because PaperMarket uses the live Polymarket order book, an order can fill only partly at the time of the request.

This can happen when

* the requested size is larger than the size that is currently available at acceptable prices
* your virtual cash does not cover the full requested size for a buy
* your position size is smaller than the requested size for a sell

In these cases the backend creates trades for the executed part and leaves the remainder as an open order if the order is good till cancel.\
The orders view shows both the original requested size and the filled size so that you can see how much demand is still outstanding.

### Canceling open orders

If you no longer want the remaining size of an order to be available in the simulation you can cancel it.

From the orders view

1. Find the order you want to cancel.
2. Check that its status is open or partially filled.
3. Use the cancel control in the same row.

When you cancel an order the backend marks the remaining size as canceled and updates the status.\
The already executed trades are not reversed and your positions and cash balance remain unchanged by the cancellation because they were already updated at the time of each trade.

Canceling an order only affects the part that was still waiting to be filled.

### Updating an order

PaperMarket does not modify open orders in place on the Polymarket side because all orders live inside the simulation.

To change the behaviour of an order you typically

* cancel the remaining size of the old order
* submit a new order with the updated size and price

This keeps the history clear and makes it easy to see which trades came from which intention.

### How orders interact with positions

Orders and positions are related but not the same thing

* orders describe what you want to do
* trades show what was actually executed
* positions show the net result of all trades

An open order does not change your position until some part of it is filled and recorded as one or more trades.\
Once trades are created your position in the corresponding YES or NO token is adjusted and your portfolio view updates to reflect the new size and average entry price.

Managing orders through the orders view helps you control which intentions remain active in the simulation without losing the history of what has already been executed.


---

# 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/using-papermarket/managing-orders.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.
