> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kairos.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Show orders and positions

> A wallet's open orders and positions.

Two reads, by wallet address, covering every venue. They are private, so the wallet signs in once with Ethereum (SIWE) first.

```bash HTTP theme={null}
# Sign in once (a login action, one personal_sign), then:
curl "$BASE/v3/wallets/$WALLET/orders?open=true" -H "X-Kairos-Partner-Id: $PARTNER" -H "X-Kairos-Wallet-Api: 2" -H "Authorization: SIWE $TOKEN"
curl "$BASE/v3/wallets/$WALLET/positions" -H "X-Kairos-Partner-Id: $PARTNER" -H "X-Kairos-Wallet-Api: 2" -H "Authorization: SIWE $TOKEN"
```

```python Python theme={null}
from kairos_wallet import api, run, WALLET

token = run({"type": "login"})["token"]  # keep it: it lasts 24 hours
auth = {"Authorization": f"SIWE {token}"}
orders = api("GET", f"/v3/wallets/{WALLET}/orders?open=true", headers=auth)["orders"]
positions = api("GET", f"/v3/wallets/{WALLET}/positions", headers=auth)["positions"]
print(len(orders), len(positions["positions"]), len(positions["resolved"]))
```

```js JavaScript (SDK) theme={null}
const orders = await kairos.wallet.orders(wallet, { open: true })
const { positions, resolved } = await kairos.wallet.positions(wallet)
```

The first read asks the wallet for one `personal_sign` and keeps the token it gets back. Run [setup](https://docs.kairos.trade/wallets/trade.md) first: only a set-up wallet can sign in.

Every row has the same fields on every venue: `venue`, `market` (`venue:market_id`), `outcome`, prices 0–1 and sizes in shares. Drop `open: true` to include filled and cancelled orders. Orders are newest first; `limit` caps how many (default 50, up to 500). There is no cursor. Add `venue` to read one venue. `resolved` lists positions whose market resolved; `redeemable` is true for winners.

## The token

* It can only read this wallet's orders and positions. It can't trade.
* It lasts 24 hours (`expiresAt`). The SDK signs in again when it expires.
* Kairos checks it by signature alone and stores nothing, so it can't be revoked early. It just expires.
* To skip the prompt in a new session, keep the `{ token, expiresAt }` from `onLogin` and pass it back with `useCredentials`:

```js theme={null}
const kairos = createKairos({
  wallet: { baseUrl, partnerId, provider, onLogin: (wallet, credentials) => store.set(wallet, credentials) },
})
const saved = await store.get(wallet)
if (saved) kairos.wallet.useCredentials(wallet, saved)
```

## Without the SDK

Sign-in is an action like any other:

1. `POST /v3/actions` with `{ "wallet": "0x…", "action": { "type": "login" } }`. The step asks for `personal_sign`.
2. Pass `request` to the wallet and `POST /v3/actions/{id}` with `{ "signature": "0x…" }`.
3. The step is `done` with `result: { "token", "expiresAt" }`.
4. Send `Authorization: SIWE <token>` on the reads, along with `X-Kairos-Partner-Id`.

```bash theme={null}
curl "$BASE/v3/wallets/$WALLET/orders?open=true" \
  -H "X-Kairos-Partner-Id: $PARTNER" \
  -H "X-Kairos-Wallet-Api: 2" \
  -H "Authorization: SIWE $TOKEN"
```

A missing or expired token returns `401`: sign in again. Over HTTP, positions come nested as `{ "positions": { "positions", "resolved", "closed", "asOf" } }`, and either read may add `venueDetail` naming a venue that couldn't be read. Every field is in the [reference](https://docs.kairos.trade/wallets/reference.md#orders).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.