# Changelog

All notable changes to this package are documented in this file.

## 0.8.7 - 2026-05-28

### Added
- remove redis fields from response (eg latest_orders)

### Fixed
- Margin account `withdrawable_collateral` and the transfer-in/out responses' `new_withdrawable_collateral` now return the risk-bounded free collateral amount instead of `available_margin` alone.

Previously the field could overstate withdrawability when an account had realized PnL gains or lower live free collateral: equity-based `available_margin` includes PnL. Using the field as the Max amount for `POST /accounts/{id}/collateral/transfer-out` could fail risk validation.

Transfer-out no longer depends on a wallet-side margin collateral mirror. Validation uses the margin account's free collateral and collateral asset binding directly.

Affects: `GET /accounts`, `GET /accounts/{id}`, `POST /accounts/{id}/collateral/transfer-in`, `POST /accounts/{id}/collateral/transfer-out`.

- Position margin reduction now resolves the collateral asset from the margin bucket/default collateral asset instead of historical transfer ledger rows, and uses margin position/account state directly.

## 0.8.5 - 2026-05-25

### Added
- Add GET /api/v1/applications/stats endpoint exposing volume and fee aggregates for the authenticated application. Backend-auth only (Authorization: Bearer sk_...).

Query params:
- since (optional): ISO 8601 datetime to filter from. Omit for all-time.

Response: { volume, maker_fee, taker_fee, application_taker_fee, trade_count } — stats scoped to trades where the application's users were the taker.

## 0.8.4 - 2026-05-20

### Fixed
- Updated SDK to match 0.8.4 API changes

## 0.8.1 - 2026-05-12

### Fixed
- Retrigger release pipeline after 0.8.0 publish failure

## 0.8.0 - 2026-05-12

### Changed
- sdk update

## 0.7.8 - 2026-05-06

### Changed
- Synchronized repository metadata with the already-published 0.7.8 SDK release.
