# TypeScript SDK — Predictions: Positions & Terms

Query open and settled positions, and manage prediction markets terms acceptance. All methods are on `client.predictions`. See the [patterns guide](/tools/typescript-sdk/patterns) for the recommended terms-acceptance flow.

### getPositions

`POST /v1/prediction-markets/positions` · Authenticated

Retrieve your current open prediction market positions. Despite being a POST endpoint, parameters are passed as **query params**. Returns a `PositionsResponse` with a `.positions` array and `.total` count.

```ts
// All positions
const result = await client.predictions.getPositions();

// Filter by event with pagination and sort
const filtered = await client.predictions.getPositions({
  eventTicker: "FEDJAN26",
  limit: 50,
  offset: 0,
  sort: "-positionValue",
});

for (const pos of filtered.positions ?? []) {
  console.log(pos.symbol, pos.totalQuantity, pos.avgPrice, pos.outcome);
}

console.log(filtered.total); // total position count
```

**Sort options:** `"positionValue"`, `"+positionValue"`, `"-positionValue"`, `"unrealizedPnl"`, `"+unrealizedPnl"`, `"-unrealizedPnl"`, `"expiryDate"`, `"+expiryDate"`, `"-expiryDate"`. Prefix `+` for ascending, `-` for descending.

> **Note** — Although this uses POST on the wire, the SDK passes `eventTicker`, `limit`, `offset`, and `sort` as query parameters, not a request body. POST endpoints are never automatically retried by the SDK.

### getSettledPositions

`POST /v1/prediction-markets/positions/settled` · Authenticated

Retrieve your settled (resolved) prediction market positions. Despite being a POST endpoint, parameters are **query params**. Returns a `SettledPositionsResponse` with a `.positions` array and `.total` count.

```ts
const settled = await client.predictions.getSettledPositions({
  eventTicker: "FEDJAN26",
  limit: 20,
  sort: "-date",
  withCashOuts: true,
});

for (const pos of settled.positions) {
  console.log(pos.instrumentSymbol, pos.payout, pos.resolutionSide, pos.netProfit);
}

// Cash-outs (only present when withCashOuts: true)
if (settled.cashOuts) {
  for (const co of settled.cashOuts) {
    console.log(co.instrumentSymbol, co.proceeds, co.netProfit);
  }
}
```

**Sort options:** `"date"`, `"-date"`, `"payout"`, `"+payout"`, `"-payout"`. A bare field name defaults to descending.

> **Note** — Although this uses POST on the wire, the SDK passes parameters as query parameters. POST endpoints are never automatically retried by the SDK.

### acceptPredictionMarketsTerms

`POST /v1/prediction-markets/terms/accept` · Authenticated

Accept the latest prediction markets terms of service. This is a POST mutation — never automatically retried. You must call this before placing orders if you haven't already accepted.

```ts
const result = await client.predictions.acceptPredictionMarketsTerms();
console.log(result.success); // true
```

### getPredictionMarketsTerms

`GET /v1/prediction-markets/terms` · Public

Retrieve the current prediction markets terms of service. Returns a `PredictionMarketsTerms` object with `termsType`, `version`, `content`, and `updatedAt` fields.

```ts
const terms = await client.predictions.getPredictionMarketsTerms();

console.log(terms.version);   // e.g. 3
console.log(terms.content);   // terms text
console.log(terms.updatedAt); // ISO 8601 timestamp
```

> **Auto-retry** — This GET endpoint automatically retries on 429/502/503/504 status codes.

### getPredictionMarketsTermsStatus

`GET /v1/prediction-markets/terms/status` · Authenticated

Check whether the authenticated account has accepted the latest terms. Returns a `PredictionMarketsTermsStatus` object. This is the same check the SDK runs automatically before `placeOrder` and `placeOrderBatch`.

```ts
const status = await client.predictions.getPredictionMarketsTermsStatus();

console.log(status.hasAcceptedLatest); // boolean
console.log(status.acceptedVersion);   // number | null
console.log(status.latestVersion);     // number | null

if (!status.hasAcceptedLatest) {
  await client.predictions.acceptPredictionMarketsTerms();
}
```

> **Auto-retry** — This GET endpoint automatically retries on transient failures.

> **Tip** — You don't normally need to call this directly. `placeOrder` and `placeOrderBatch` check terms automatically and throw `AcceptTermsRequired` if not accepted. See the [patterns guide](/tools/typescript-sdk/patterns) for the recommended flow.

## What's next

- [Events & Discovery](/tools/typescript-sdk/reference/predictions/events-and-discovery) — browse and search prediction market events
- [Order Management](/tools/typescript-sdk/reference/predictions/order-management) — place, cancel, and query orders
- [Combos](/tools/typescript-sdk/reference/predictions/combos) — multi-leg combo instruments
- [Volume & Metrics](/tools/typescript-sdk/reference/predictions/volume-and-metrics) — daily/hourly volume and per-event share metrics
- [Request Validation](/tools/typescript-sdk/deep-dives/request-validation) — how client-side validation works
