Skip to main content
This page takes you from a management key to your first order on Paper, our play-money exchange. Run the five steps in order, in one script.

Set up

Create a management key on Profile → Settings → Novig API, on paper.novig.com. If you have no Paper account yet, set one up first. Get a key walks you through it. Then point the samples at Paper and at your key:
The Python samples need two packages: pip install requests cryptography. The Node samples need Node 18 or later and no packages.

Save the signer

Save this helper as novig.py or novig.mjs. Its call function signs a request, sends it, and returns the parsed reply. The signature covers NOVIG-V3, the timestamp, the method, the path, the query, and a hash of the body. Sign a request explains each rule.
  • Pass query in canonical form: parameters sorted by name and percent-encoded.
  • With a P-256 key, the Node signer works as is. In Python, sign with private.sign(text.encode(), ECDSA(SHA256())).
  • For Rust, use the complete signer on Sign a request.

1. Test your signature

Send a body to POST /v3/echo:
Echo returns your body unchanged. A 200 means your host, key, clock, and signature are all correct. A 401 means one of them is wrong. Troubleshooting maps each error message to a fix.

2. Open a subaccount

Each subaccount trades with its own key. Generate a keypair for it:
macOS ships LibreSSL, which can’t generate an Ed25519 key. Use OpenSSL 3 instead: brew install openssl. Then send the public key to open the subaccount:
The keyId in the response identifies both the new trading key and the subaccount.

3. Fund the subaccount

Move $10 from your account into the subaccount:
A 202 means we accepted the transfer, not that the money moved. Before you place an order, check that its status is Applied.

4. Find a market

From here on, use the trading key. List five NFL markets and take the first outcome:
The catalog accepts only a trading or trading::read key. Catalog lists every filter.

5. Place an order

Bid on that outcome:
This order bids 10 contracts at 0.050, which costs $0.005. A 201 means we accepted the order, not that it’s on the book. The order rests when the open event arrives on the private stream.

Next