> For the complete documentation index, see [llms.txt](https://dev.strixlab.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.strixlab.io/resources/changelog.md).

# SDK Changelog

Versioning follows [semver](https://semver.org/). Pin a version in production and read this page before upgrading.

{% updates %}
{% update date="2026-08-20" %}

## 0.2.1

**Fixed — `orders.placeMarket()` now works.** It previously posted fields the venue never accepted, so every market order failed validation. It now sends what the venue reads, and returns `{ order, executionPlan }` — the execution plan being what the API actually sends back.

No code change required: `amount` and `orderType` are still accepted and map onto `maxSpend`/`quantity` and `timeInForce` respectively.

```ts
// buy: cap the spend
await client.orders.placeMarket({ tokenId, side: 'BUY', maxSpend: 100 });
// sell: name the shares
await client.orders.placeMarket({ tokenId, side: 'SELL', quantity: 50, timeInForce: 'FAK' });
```

**Fixed — validation failures reject instead of throwing synchronously**, so a bot that wraps venue calls in `.catch()` logs a bad parameter rather than crashing on it.

**Added — the compiler now enforces that a market order carries a size.** Exactly one of `maxSpend` (BUY) or `quantity` (SELL) is required. Previously both were optional, so omitting the size failed only at runtime, against a live venue, on an order you believed you had placed.

**Added — `Order.holdQuantity`.** Always on the wire, simply missing from the type. Resting size is `quantity − filledQuantity − holdQuantity`; the two-term version overstates it whenever a settlement is in flight.

**Added — `strix-sdk/package.json` is an exported subpath**, for version-check scripts and bundler plugins that read a package's own manifest.
{% endupdate %}

{% update date="2026-08-11" %}

## 0.2.0

**Breaking — `baseUrl` is now required.** The client throws `StrixConfigError` when neither the option nor `STRIX_DEFAULT_BASE_URL` is set.

The build used to inline a staging default, so anyone who omitted `baseUrl` traded against **staging** with nothing to indicate it — and because the value was substituted at build time, no runtime environment variable could override it.

```ts
// before — silently staging
const client = new StrixClient({ apiKey, apiSecret, apiPassphrase });
// after
const client = new StrixClient({ baseUrl: 'https://api.strixlab.io/api', apiKey, apiSecret, apiPassphrase });
```

**Added — `portfolio.balances()`.** Spendable USDC and share counts per token in one call. Use it in a quoting loop: `summary()` and `positions()` replay your full trade ledger to compute P\&L, which a requote cycle never reads.

**Added — `client.wsUrl`**, so an operator can confirm at a glance which deployment they are pointed at.

**Fixed — order-book subscriptions keep their depth across a reconnect.** Resubscription re-sent everything at a hard-coded `depth: 50`, so a subscriber on `depth: 200` silently lost levels after any network blip. Depth is now tracked per token — deepest live subscriber wins — and replayed verbatim.
{% endupdate %}

{% update date="2026-07-11" %}

## 0.1.3

**Added — `orders.cancelBatch(orderHashes)`.** Cancel up to 100 specific orders in one round-trip, built for requote cycles and exempt from rate limiting. Returns `{ cancelled, failed }`, where `failed` counts orders already terminal or locked for in-flight settlement.
{% endupdate %}

{% update date="2026-05-30" %}

## 0.1.2

**Added — `strix-sdk/shared`.** A runtime-free, browser-safe entry point exposing the API entity types plus the pure convention helpers (`getTokenIds`, `OUTCOME_INDEX`). No HTTP, WebSocket or crypto runtime, so a frontend can import the same types and the same YES/NO mapping the SDK and your bot use.

**Fixed — `getTokenIds()` had YES and NO inverted.** Outcomes follow `outcomeIndex 0 = No`, `1 = Yes`, but the helper returned the index-0 token as `yesTokenId`. Anything pricing a side off YES was quoting the wrong leg.
{% endupdate %}

{% update date="2026-05-27" %}

## 0.1.0

First release. `StrixClient` with REST modules for events, markets, orders, order book, portfolio, positions, public data and referrals; WebSocket order-book, trades and user channels; HMAC signing helpers; `StrixApiError` / `StrixAuthError`; opt-in `nullOnError` and `retryOn429`; dual CJS + ESM builds with TypeScript declarations.
{% endupdate %}
{% endupdates %}


---

# 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://dev.strixlab.io/resources/changelog.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.
