# About PaperMarket

PaperMarket is a web app that mirrors live Polymarket markets and lets traders practice with virtual dollars.\
The app reads market data from Polymarket and simulates all orders, positions and PnL on its own backend and database.

A user signs up with email and password and receives a virtual cash balance.\
They paste a Polymarket market link into the main page, see the live order book and chart for that market and place virtual orders that are matched against the current Polymarket book.

PaperMarket follows the same basic structure as Polymarket markets.\
Trades are expressed in prices between zero and one.\
Users trade YES and NO tokens for a selected Polymarket market.\
Every trade updates the user cash balance and their positions in a realistic way.

### Purpose of the app

The app is built for traders who want to test strategies on real Polymarket markets without putting real USDC at risk on every decision.

PaperMarket helps a trader

* explore how Polymarket markets move in real time
* test entries and exits with a live order book
* see how a sequence of trades affects balance, positions and PnL
* build a track record before moving to real stakes on Polymarket

The goal is to provide a training environment that feels close to real trading while staying fully virtual.

### How PaperMarket behaves

When a user submits an order the backend fetches the current order book for the chosen YES or NO token from the Polymarket CLOB endpoint.\
The app then simulates execution against that book and records the result in its own database.

For each order the system

* checks that the user has enough virtual cash for buys
* checks that the user has enough position size for sells
* matches the order against the live bids or asks in price and size
* stores the created order and the resulting trades
* updates positions and cash balance

There is no on chain interaction and no real funds move at any point.\
Everything happens inside the PaperMarket database while prices and order books are always taken from live Polymarket markets.

All trades and positions belong to the user account.\
A trader can sign in again on the same account see their open positions their closed trades and their PnL for every token they have traded in the simulation.


---

# 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/get-start/about-papermarket.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.
