---
description: "The HardBasis API changelog and deprecation policy: the additive-only /v1 covenant, deprecation windows, and removals only in /v2."
---

# Changelog & deprecation policy

## The compatibility covenant

`/v1` evolves **additively**. A response may gain a field and a request may gain
an optional one, at any time, without notice. So:

- **Ignore unknown fields.** A client that rejects a response because it carries
  a field the client has not seen will break on the next additive release. Parse
  what you need, ignore the rest.
- **Never depend on field order** or on the absence of a field.
- A field is **never removed or re-typed** in `/v1`. Removing or re-typing a
  field is a breaking change, and breaking changes only ever land under a new
  major version (`/v2`), never in place. A contract-snapshot test fails CI if a
  `/v1` field is removed or re-typed, so the covenant is enforced, not just
  promised.

The same rule governs the WebSocket protocol and the error-code enum: additive
only, versioned in the auth ack (`v`), removals deferred to a new major.

## Deprecation

When something must eventually go, it is deprecated first, not deleted. A
deprecated surface keeps working, is marked in this changelog and in the spec,
and is removed only after a notice window of **at least ninety days**, and only
in a new major version, never in `/v1`.

## Versioning

The `info.version` field in [`/openapi.json`](/openapi.json) tracks the **API
contract**, not our software release. Read it this way:

- A purely **additive** change within `/v1` (a new endpoint, a new optional
  field) bumps the **minor** (`1.1.0`, `1.2.0`, …).
- The **major** bumps only alongside a breaking `/v2` surface, and never before
  one exists.
- It is deliberately **not** the npm package version. SDK generators stamp
  `info.version` into the version of the client they emit, so it has to mean
  "which contract", not "which build of our server."

**Deployment status is never carried by the version string.** Whether a given
environment is live, and what code it runs, is told by the `servers` block and
by `GET /deployment`, not by `info.version`.

## Reading changes

The machine-readable source of truth is [`/openapi.json`](/openapi.json): diff
it between releases to see exactly what changed. Each reference page is stamped
with the contract version it documents, so you can tell whether the reference in
front of you describes the surface you are calling.

## Releases

Dated entries land here as the API changes. Today the public API is on testnet;
nothing here is an offer, a solicitation, or advice.

### 1.9.0 (2026-11-25)

Additive. The price a day ago, for a market's 24h change. `GET /v1/markets`
and `GET /v1/markets/:id` serve `refPriceQ8` and `refTsMs` on each market:
the index price at or before the instant a day before the payload was
built, read to the minute, and the instant that price is as of, the end of
the candle that holds it. The basis is oracle prints, never fills. The
WebSocket `stats` frame carries the same pair at the frame's build time. Both
are `null` together when the engine holds no print that old, as on a market
younger than a day. On a market that was closed a day ago the reference is
its last close, as of that close. Nothing was removed.

### 1.8.0 (2026-11-12)

Additive. Trading sessions on markets that follow the NASDAQ calendar, and
holds through a closed session. `GET /v1/markets` and `GET /v1/markets/:id`
serve `session` on each market: `null` on a market that is always open, else
`{ open, changesAtTsMs }`, whether the session is open and the instant that
next changes. The WebSocket `stats` frame carries the same object. A resting
limit order or entry trigger that would open exposure is no longer rejected
or cancelled while its market is closed: it is held, and `heldUntilTsMs`
serves the next session open on `GET /v1/orders` and `GET /v1/orders/:id`
rows, on entry trigger rows and on the `TriggerArmed` frame. While a session
is closed, an entry trigger, a bracket whose entry is a trigger and an
opening limit order are accepted where they were refused, and the
`POST /v1/orders` response serves `heldUntilTsMs` when what was placed
cannot fill before the open. Nothing placed while closed fills before it. A
market order that would open exposure is still refused while closed, and one
left unfilled across a closed session is rejected at the next open. A
trigger in `blocked` can be cancelled. `GET /v1/withdrawals` rows serve
`autoRefundAfterTsMs`, set while a Lightning withdrawal is queued in doubt:
from that time it is returned in full, with the reason
`lightning_invoice_expired`, if the provider still reports the payment
failed. The `WithdrawalQueued` frame carries the same field and can arrive
more than once for one withdrawal. `POST /v1/withdrawals` documents its
`409`, in the reference since 2026-11-08. No field, operation or code was
removed.

### 1.7.0 (2026-11-03)

Additive. Every account surface that serves a `linear_sats` size in contracts
now serves it in shares beside it, computed by the engine
(`contracts × shareScale`, an exact decimal string; `null` off `linear_sats`):
`sizeShares` on `GET /v1/orders` and `GET /v1/orders/:id` rows and on resting
and armed trigger rows, on `GET /v1/fills` entries (the fill's closed plus
opened contracts), and on `GET /v1/liquidations` entries with
`remainingSizeShares`. The WebSocket account channel's `Filled`,
`Liquidated` and `TriggerPlaced` frames carry the same keys. The event log is
unchanged. No field, operation or code was removed.

### 1.6.0 (2026-11-02)

Additive. `linear_sats` contract scale (ADR-0047 Amendment 1): the market
object gains `shareScale`, shares per contract as an exact decimal string
(`"1"` when the market sets none, `null` on inverse and quanto). Positions gain
`sizeShares` (`contracts × shareScale`, computed by the engine; `null` off
`linear_sats`). `POST /v1/orders` accepts `sizeShares` in place of `contracts`
on a `linear_sats` market; exactly one of the two is sent, and `contracts` is
otherwise unchanged. New error code `size_not_whole_contracts` (400) for a
size that is not a whole number of contracts; a fractional `contracts` on a
`linear_sats` market now carries this code instead of `validation`. No
`linear_sats` market is listed. No field, operation or code was removed.

### 1.5.0 (2026-10-23)

Additive. `GET /deployment` gains `buildSha`: the commit the running engine
was built from, or `null` when the build carries no stamp. The spec gains, for
agent clients: `x-hardbasis-scope` and `x-hardbasis-budget` on every
key-authed operation (the key scope it needs and the rate budget it draws);
a top-level `x-hardbasis-errors` map from each `ErrorCode` to its status(es),
whether the identical request may be retried, and its docs anchor; explicit
`<group>.<verb>` operationIds on eleven operations (for example
`orders.cancelAllAfter`, `usdhb.mint`); `x-hardbasis-idempotency-key`
(`order-id`, `quote-id` or `any`) on every operation that takes an
Idempotency-Key, `x-hardbasis-quote-ttl-ms` on `usdhb.quote` (the served
expiry field, `expiresAtMs`), and `x-hardbasis-consumes-quote: usdhb.quote`
on `usdhb.mint` and `usdhb.redeem`; and a `servers` entry that says what
testnet is (test sats, no value). No field, operation or code was removed.

### 1.4.0 (2026-08-20)

Additive. `GET /v1/markets/:id/candles`: each candle may carry
`volumeContracts`, fills-derived contracts traded in the bucket, the same
basis as `stats24h` (`basis: "fills"`), over exactly the bar's window. A
served value, including `"0"`, is the true sum; an absent field means the
deployment cannot tell (pre-launch index-history bars carry none). `prints`
is unchanged and remains a print count, not volume.

### 1.3.0 (2026-08-20)

Additive. `GET /v1/markets/:id/candles`: `limit` maximum raised from `1000` to
`1440`: one UTC day of the 1m base in a single request, which is exactly what
a full ninety-six-bar fifteen-minute frame aggregates from. Defaults unchanged.

### 1.2.0 (2026-08-20)

Additive. `GET /v1/markets/:id/candles` with `interval=86400`: each candle may
carry `seeded: true`, marking a pre-launch **index history** bar: daily OHLC
taken from the market's own oracle source before this venue's first print
(`prints` is `0` on such bars). A bar without the field is a real bar folded
from venue prints. Clients that render candles should render seeded bars
visibly distinct; clients that ignore unknown fields are unaffected. Only the
daily interval ever carries the field.

### 1.1.0 (2026-08-20)

Additive. `GET /v1/markets/:id/candles`:

- `interval` now also accepts `3600` and `86400` (seconds, as ever). These are
  permanent server-side rollups of the same oracle-print fold; `60` remains the
  default and keeps a retention window of four days. Aggregate intermediate
  frames (5m/15m/4h) client-side from the nearest served base.
- `limit` maximum raised from 96 to 1000. The default stays 96; requests that
  never send `limit` or `interval` see identical behavior to 1.0.0.
