> For the complete documentation index, see [llms.txt](https://docs.strikelabs.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.strikelabs.app/quickstart.md).

# Quickstart

Everything on this page is exercised by the venue's own test suite. If a snippet here stops working, a test goes red before the docs ship.

## 1. Check the venue

The API is `https://api.strikelabs.app`. Before anything else, ask it what it is:

```bash
curl -s https://api.strikelabs.app/healthz
```

```json
{ "ok": true, "quoteSessionRegistration": "idempotent-attempt-v1", "fundingMode": "deposits" }
```

`fundingMode` decides how the rest of this page behaves, so read it first rather than discovering the difference from a 404:

| MODE       | BALANCES                                                                                 | SIGNING                                                               | MONEY ENDPOINTS                                                               |
| ---------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `paper`    | Free test cash. No real money anywhere.                                                  | Optional unless the operator forced it on.                            | `/v1/withdraw` and `/v1/reserves` do not exist — they answer `404 not found`. |
| `deposits` | Real USDC. Accounts start at **zero**; cash arrives only from a confirmed vault deposit. | **Mandatory.** An unsigned write is refused, whatever token you send. | Routed.                                                                       |

## 2. Find something to trade

Three reads, no authentication. Start with the listing universe:

```bash
curl -s https://api.strikelabs.app/v1/meta
```

```json
{
  "instruments": [ { "symbol": "BTC", "spot": 95120.5, "feedFresh": true } ],
  "pendingReview": []
}
```

Then the live series for a symbol, to pick an expiry. Expect this to be large — a symbol carrying daily, weekly and monthly expiries across a full strike ladder has well over a thousand series — so group by `expiryTs` rather than rendering it whole:

```bash
curl -s "https://api.strikelabs.app/v1/series?symbol=BTC"
```

```json
{
  "series": [
    {
      "seriesId": "BTC-1786492800-C-95000",
      "sid": 259,
      "symbol": "BTC",
      "expiryTs": 1786492800,
      "expiryCutoffMs": 1786492800000,
      "strike": 95000,
      "right": "C"
    }
  ]
}
```

{% hint style="info" %}
**Persist `seriesId`, never `sid`**

`seriesId` is canonical and stable for the life of the contract. `sid` is a process-local integer alias that exists for the maker's binary wire, and **a venue restart may renumber it**. Store the string and re-resolve.
{% endhint %}

Then the chain for one expiry, which is what you actually quote off:

```bash
curl -s "https://api.strikelabs.app/v1/chain?symbol=BTC&expiryTs=1786492800"
```

Each row carries a `strike` and a `call`/`put` pair, either of which may be `null` if nothing is listed at that strike. `mid` is the venue's mark — the book midpoint, or the single resting side if only one rests — and is `null` when there is no mark. `iv` and `delta` are annotations the market maker attached; they are informational, not venue-computed, and are `0` when unannotated.

## 3. Sign in with a wallet

Two steps. Fetch a challenge, sign it with the wallet key using EIP-191 `personal_sign`, and post it back for a bearer token:

```bash
curl -s "https://api.strikelabs.app/v1/auth/challenge?address=0xYourAddress"
```

```json
{ "message": "Strike: sign in to prove you own this address.\n\nAddress: 0x…\nNonce: 4f3c1d9e8a7b6c5d" }
```

```bash
curl -s -X POST https://api.strikelabs.app/v1/auth/verify \
  -H 'content-type: application/json' \
  -d '{"address":"0xYourAddress","signature":"0x…"}'
```

The token authenticates **reads**. Send it as `x-paper-token: <token>`, or as `Authorization: Bearer <token>`. It does not authorise writes once signing is mandatory — for that you need a session key.

## 4. Approve a session key

A wallet prompt per order is intolerable for trading, so the wallet signs exactly one thing: an approval naming a keypair you generated and an expiry. That key then signs every write with no further prompts. It is scoped to one account, cannot approve another key, and dies at its expiry — at most 30 days out.

The approval text is fixed and must be reproduced byte for byte. [Signing](/api-reference/signing.md) has the exact bytes and worked golden vectors you can verify offline, and [Session keys](/api-reference/session-keys.md) shows the registration request. The wallet key signs the approval once and is never sent anywhere; only the session key signs from then on.

{% hint style="warning" %}
**What a session key can and cannot do**

It places orders, cancels, flips margin, and — in `deposits` mode — **requests withdrawals**. A withdrawal can only ever pay the account's own linked wallet address, which is what bounds the loss if a key leaks, but a leaked key can move money. Treat it like an API secret with withdrawal rights.

The approval prompt your wallet displays still reads *"It cannot withdraw funds"*. In `deposits` mode that sentence is **no longer accurate**, and we would rather tell you here than let you infer it. It is recorded for the operator to correct in the wallet text.
{% endhint %}

## 5. Place an order

`qty` and `price` go on the wire as decimals, but the signature covers the **micros** (1e-6) the engine matches on — [Signing](/api-reference/signing.md) shows the conversion, and the venue rebuilds the envelope from its own micros so a rounding disagreement fails loudly instead of mis-pricing the order. Once you have signed the envelope:

```bash
curl -s -X POST https://api.strikelabs.app/v1/order \
  -H 'content-type: application/json' \
  -H 'x-paper-token: <token>' \
  -d '{
    "seriesId": "BTC-1786492800-C-95000",
    "side": "buy",
    "qty": 1,
    "price": 1250.0,
    "sessionKey": "0x<session key address>",
    "nonce": 1755800000123,
    "signature": "0x<65-byte signature>"
  }'
```

{% hint style="info" %}
**A rejected order is not an error envelope**

It comes back `400` with the *normal* order shape: `status: "rejected"` and a human-readable `reason`. Branch on the presence of `status`, not on the status code. [Errors and limits](/api-reference/errors.md) lists every reason.
{% endhint %}

Every write echoes your full account back, so you never need to poll `/v1/me` after trading. Omit `price` entirely for a market order — note that `price: 0` is a real limit price at zero and a different signed envelope.

## 6. Read your account, then cancel

Reads take the bearer token:

```bash
curl -s https://api.strikelabs.app/v1/me \
  -H 'authorization: Bearer <token>'
curl -s https://api.strikelabs.app/v1/fills \
  -H 'authorization: Bearer <token>'      # newest first, up to 500
```

Cancelling is a signed write like ordering: `POST /v1/cancel` with a `symbols` list scoping it — `["BTC"]` pulls one symbol's orders, an empty list the whole account. [Exchange endpoint](/api-reference/exchange.md) has the body. The cancel scope is signed, so a signature naming one symbol cannot be widened into a whole-account cancel. `openOrders` is capped at 500 rows while `openOrderCount` stays exact.

## 7. Withdraw

`POST /v1/withdraw`, signed with your session key, with the amount in the body. The response names the payout:

```json
{ "id": 41, "state": "requested", "address": "0x…" }
```

There is no destination argument. The venue pays only the address your account signed in with — an address in the request would be one the signature does not cover. The gate is `buyingPower − alreadyPending`, never equity, so margin backing an open short is not withdrawable.

This **requests**. The operator commits the payout on chain, and then you claim it yourself, with your own gas. [Money lifecycle](/protocol/custody.md) is the page to read before you rely on any of this — including what custody actually means.

## Next

* [Signing](/api-reference/signing.md) — The scheme end to end, with the golden vectors a client author can verify against before sending a single request.
* [Money lifecycle](/protocol/custody.md) — Deposit, withdraw, claim. Who signs what, why claiming needs gas, and the custody model stated plainly.
* [Market structure](/protocol/market-structure.md) — Expiries, settlement, the oracle's refusal semantics, and how margin is computed.
* [Errors and limits](/api-reference/errors.md) — Every error shape the venue returns, every order-reject reason, and the published rate limits.

***

The API is governed by [an OpenAPI contract](/api-reference/openapi.md) checked against the venue's real route table on every build. Operator and maker endpoints exist and are token-gated; they are classified there with the reason each is excluded.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.strikelabs.app/quickstart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
