Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Proof-labs/trading-sdk/llms.txt

Use this file to discover all available pages before exploring further.

The Proof paper-trading competition runs on the real exchange — the same matching engine, margin system, and oracles as mainnet — but with virtual funds. Nothing is deposited, nothing is withdrawable, and no real money is at risk. You compete on a public PnL leaderboard for a prize pool and a Founding Trader credential.

How funding works

As a competition participant you do not generate your own keypair and you do not call the faucet directly. Both happen server-side, gated behind a single-use access code. One redemption gives you a freshly generated, already-funded private key. This is deliberate:
  • The faucet is only reachable by burning a valid access code — no participant holds a faucet token, so the funding endpoint cannot be spammed.
  • One account per person is enforced at the access-code level. Multiple accounts controlled by one person are grounds for disqualification.
  • Your starting balance is fixed and identical for everyone. There are no refills and no resets — you manage one bankroll for the whole contest.
This flow is not the same as the devnet faucet. Do not generate your own keypair and call faucet.dev.proof.trade/drip — that endpoint requires a privileged bearer token you will not have as a competition participant, and it will not be connected to your contest account. You must redeem an access code to receive your funded wallet.

Step 1 — Get an access code

Entry is free but gated — there is no open sign-up. Access codes are single-use and admit one participant. Get one through a direct invitation, or join the waitlist on the official contest page. You do not need to verify your identity to join or to trade — identity and eligibility checks happen only at the prize-payout step, for finishers in a prize position.

Step 2 — Redeem the code for a funded wallet

Redeem your code against the contest web app. This is not the gateway and not the SDK — it is a separate redemption endpoint. A single POST returns a funded private key:
curl -X POST https://<contest-site>/access-code/redeem \
  -H "Content-Type: application/json" \
  -d '{"code": "YOUR-ACCESS-CODE", "contact": {"email": "you@example.com"}}'
The contact object is optional. On success you receive HTTP 200:
{ "privateKeyHex": "abc123…", "address": "0x…" }
The server does everything atomically: reserves the code (making it single-use), generates an Ed25519 keypair, funds the derived address through the faucet, and returns the key. If funding fails, your code is automatically released so you can retry — a failed drip never burns a code.

Redemption error codes

Statuserror fieldMeaning
400bad_codeThe code is malformed (wrong length, invalid characters)
404invalid_codeThe code does not exist on this contest
409code_usedThe code has already been redeemed by someone
502funding_failedFaucet error — the code was released, retry the request
503redeem_disabled / funding_failedService not configured or faucet is offline

Step 3 — Save your private key

The privateKeyHex from Step 2 is your wallet. It is paper money and safe to save. Store it somewhere you control — there are no refills or resets, so this one key is your entire competition account for the duration of the contest.

Step 4 — Trade with the SDK

Your address is already funded by Step 2, so skip key generation and the faucet entirely. Load your key with hexToBytes() and trade:
import { ExchangeClient, hexToBytes, Side } from "@proof/trading-sdk";

const client = new ExchangeClient({ chainId: "exchange-devnet-1" });
client.setPrivateKey(hexToBytes("abc123…")); // privateKeyHex from Step 2

// Query the book and your account
const book = await client.queryOrderbook(1);
const account = await client.queryAccount("0x…"); // address from Step 2

// Place a limit order
await client.submitTx({
  type: "PlaceOrder",
  data: {
    market: 1,
    side: Side.Buy,
    price: 6675000,   // integer cents ($66,750.00)
    quantity: 1,      // integer contracts
  },
});
A result code of 0 means CheckTx passed. Non-zero codes are engine error codes — for example 12 (insufficient margin) or 21 (nonce collision, safe to retry). See the README for the full client API and unit conventions.

Programmatic and bot trading

Automated trading is explicitly permitted — Proof is built for it. The line is between automation and gaming (wash trading, self-dealing, collusion, multi-account/Sybil entries, mark manipulation), not between manual and bot. See AGENTS.md for guidance on driving the SDK from an AI agent, including agent-wallet delegation for keeping your competition key cold while a bot runs with a hot key.

Competition rules

Automated, API-driven, and algorithmic trading is permitted. There are no restrictions on strategy type or order frequency beyond the rate limits described below.
Maximum leverage is held to a conservative level to keep the leaderboard a contest of skill rather than a max-leverage lottery. The exact cap is published on the official contest page.
To qualify for final standings you must be genuinely active — more than a single trade. The principle is published; the exact threshold is blind during the contest to prevent gaming on the last day.
Rate limits exist to protect the infrastructure, not to ban automation. Error code 429 means you have exceeded the per-IP or per-key limit — back off and retry with exponential delay.
Wash trading, self-dealing, collusion across accounts, multi-account or Sybil entries, and deliberate mark-price manipulation are grounds for immediate disqualification and forfeiture of any prize.
The starting balance, exact dates, specific markets, prize breakdown, and full binding rules all live on the official contest page — that page governs. Read it before you enter.

Build docs developers (and LLMs) love