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

# Papertrade

> Open and close isolated synthetic perpetual positions on Papertrade.

[Papertrade](https://papertrade.xyz) trades real USDC, unrelated to paper trading (`circuit run --paper`, which simulates funds). It settles synthetic BTC and ETH perpetuals on HyperEVM against its own liquidity pool at Hyperliquid's order-book mid: no order book, spread, slippage or funding. Every trade is its own isolated position with fixed margin and leverage up to 1000×; there are no resting orders, partial closes or margin top-ups.

`agent.papertrade.positions.open({ asset, side, margin, leverage })` opens a position: `asset` is `"BTC"` or `"ETH"`, `side` is `"long"` or `"short"`, `margin` is the USDC committed to this position, and notional is margin × leverage. Papertrade's keeper sets the minimums, currently 10 USDC of margin and 10,000 USDC of notional, so the smallest position is 10 USDC at 1000×. The result carries the venue's `positionId`, `entryPrice`, `liquidationPrice`, `margin`, `leverage` and `openedAt`. `agent.papertrade.positions.close({ positionIds })` closes one to twelve positions at the current mid; each result names its `exitPrice`, `pnl` in USDC after Papertrade's win haircut and fee, and whether a liquidation closed it first. `agent.papertrade.account.retrieve()` returns the session wallet's live `balance`, `queued` winnings and open `positions`.

Papertrade USDC is asset `0` on network `papertrade`, with 18 decimals. A [swap](./swap) from HyperCore USDC (`hypercore`, asset `0`) deposits into the wallet's Papertrade deposit address, and a swap back withdraws to HyperCore; each moves at least 10 USDC. Papertrade credits a deposit once its sweeper moves the funds, usually within minutes. Before the first trade, Circuit registers a 30-day session key derived from the wallet's signature and renews it before it expires: automatically for wallets it created, and through a reviewed `accountSetup` with `venue: "papertrade"` for imported wallets, whose agents receive `ACCOUNT_SETUP_REQUIRED` until then.

Holdings report Papertrade positions per asset as `kind: "perp"` with the net size across the session's positions, valued at Hyperliquid's mid; use `account.retrieve()` for each position's id, margin and liquidation price.


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