papertrade-sdk
papertrade-sdk is an unofficial TypeScript SDK for Papertrade, the fully on-chain synthetic perpetuals exchange on Hyperliquid's HyperEVM (chain 999). BTC and ETH trade up to 1000x leverage, settled at the Hyperliquid mid price.
Unofficial. An independent community project, not affiliated with or endorsed by Papertrade. 1000x leverage can lose your whole margin within seconds. Nothing here is financial advice.
What you get#
| Piece | What it does |
|---|---|
SDK (npm install papertrade-sdk viem) |
A typed client for every public read endpoint, the live wallet stream, EIP-712 signing for every intent, deposit builders and settlement math. Works in Node 20+, browsers, Bun, Deno and Cloudflare Workers. |
| Settlement math | Liquidation prices, winning and losing closes, liquidations, the PAPER mint curve and staking rewards. Checked against mainnet: 205 of 205 live bust prices, 15 of 15 leaderboard wins, and PaperStaking.pendingReward to the wei. |
MCP server at https://papertrade-sdk.pages.dev/mcp |
Seven read-only tools so any AI client can quote a position exactly, inspect a wallet, check protocol health and build unsigned EIP-712 payloads. See MCP server. |
| Playground on the home page | Run the SDK math in your browser against live prices and call every MCP tool from a console. |
| Docs and agent files | This site, plus llms.txt, llms-full.txt, an OpenAPI spec, an MCP server card and an A2A agent card. See Agent discovery. |
Where to start#
- Building an app: Quickstart, then the SDK reference.
- Using an AI assistant: Connect your AI.
- Understanding the numbers: Concepts and the full Protocol reference.
The Papertrade toolkit#
This SDK is the base of a suite of independent tools. Each one runs on its own, and all of them can open inside Papertrade OS.
- Terminal: non-custodial trading terminal.
- Analytics: TVL, volume, open interest, PAPER economics.
- Explorer: wallets, positions, intents, leaderboard.
- Liquidations: liquidation map and closest-to-bust feed.
- Yield: PAPER staking.
- Alerts: Telegram, Discord and webhook alerts.
- Copytrade: copy-trading with guardrails.
- x402: pay-per-call intelligence API.