REST API
Wallet-scoped keys, permissions, and durable operation identifiers.
Use the Scalar API reference for endpoints. The OpenAPI document is available at /api/openapi.json. The base URL is https://paperterminal.xyz.
Authentication
Create a key in Account → API keys. It is returned once; only a hash is retained. Keys expire and can be revoked. Supply it in the Authorization: Bearer ... header. Never put it in a URL.
read: wallet state, orders, history, and fees.trade: opening/closing trades, copy settings, exits, staking, and claims.withdraw: outgoing withdrawals and wallet transfers.
Keys cannot export backups, unlock a signer, create wallets, or manage other keys. Those actions require an authenticated account session. A key is pinned to one wallet; using another wallet ID returns not found.
Requests are limited to 120 per minute per key or account session. A 429 response includes Retry-After. WebSocket polling uses that same budget.
Example
curl "$BASE_URL/api/v1/wallets/$WALLET_ID/positions" \
-H "Authorization: Bearer $PAPERTERMINAL_API_KEY"
curl "$BASE_URL/api/v1/wallets/$WALLET_ID/positions" \
-H "Authorization: Bearer $PAPERTERMINAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: strategy-decision-0001" \
-d '{"marketId":0,"margin":"10","leverage":100,"side":"long"}'Resolve the actual market ID and limits from the snapshot; the example is not a recommendation or a guarantee that the order meets current limits. Register the wallet's Papertrade session signing through the terminal before opening trades.
Human-facing amounts such as position margin and withdrawal amount are decimal strings. amountRaw on stake/unstake is an integer string with 18 decimals. Do not parse raw financial values into JavaScript floating-point numbers.
Position and order collections currently preserve protocol tuple shapes. The account snapshot includes the market configuration needed to interpret them. Use /wallets/{walletId}/records?cursor=... for durable cursor-paginated history. Command lists and UI snapshots are bounded; a normalized public SDK is not yet provided.
Durable commands
POST /wallets/{walletId}/commands exposes worker actions for bots, exits, reversals, copying, funding, and locking. Risk checks still run in the worker. This endpoint does not accept wallet passwords, private keys, or arbitrary JSON-RPC calls. Domain-specific resource endpoints are preferable for ordinary trades.
Keep response IDs and inspect commands/history after disconnects. Do not treat completed as filled, or unknown as failed.
Unattended automation and restart
The owner enables Keep automation running across restarts once in Account → Wallets → Trading access. This creates a server-encrypted signing authorization, explicitly permitting signing without the wallet password until revoked. Creating an API key alone does not grant this authorization.
GET /wallets/{walletId}/automation-access reports its status. Enabling/disabling it requires an owner account session; trading API keys cannot upload or retrieve keys. POST takes a browser-decrypted privateKey plus consent:true; DELETE removes the saved envelope. Deleting the grant disables future automatic unlock without unexpectedly stopping a currently running worker. Stop copying and lock the worker separately when immediate signing suspension is intended.
POST /wallets/{walletId}/restart requires trade permission and an idempotency key. It checkpoints, stops and starts the same owned worker. Copying stays on only if it was on. TP/SL, peak-profit protection and pending requests survive. Fresh venue data and uncertain-outcome reconciliation are required before acting. No fill-price or downtime-profit guarantee is possible.
The platform restores authorized workers even when no browser is open. Without a durable grant, the worker restores its data but remains unable to sign until the owner authorizes it.
Funding routes
Read Funding and withdrawals API for EVM/Solana quotes, external signing, direct Core/EVM routes, receipt polling and saved withdrawal controls. The Scalar reference exposes each supported resource. Route availability is determined by current provider quotes.