Skip to main content
POST
Places a market sell on behalf of a liquidated borrower. This is the liquidation path, not a trading path: the order is always a SELL, always MARKET, always IOC, and it is exempt from the reference price band so a forced sale cannot be blocked by a band the liquidation itself moved. The endpoint requires the Lending service in addition to Trading, and only the owning instance may call it. The book must be its own, ACTIVE, and settling on-chain; anything else returns ORDER_BOOK_NOT_FOUND.
The fill is matched and recorded, but the custody transfer behind it needs a signature from the custody settlement operator that Trusset cannot produce. Settlement therefore fails, the settlement record is written as FAILED, and the trades are marked FAILED with the reason. Failed trades are excluded from last price, volume and trade counts, so the tape is not polluted, but the position is not actually liquidated on chain. Treat this endpoint as unavailable for commodity books until an operator-signed settlement path returns.

Body Parameters

string
required
Book to sell into. Must belong to your instance, be ACTIVE, and settle on-chain.
string
required
Wallet whose position is being sold. Recorded as the order’s owner.
string
required
Base quantity to sell, in order book units, as a digit-only string.
string
Free-text reason recorded on the order, up to 256 characters. Defaults to LIQUIDATION_PRIORITY.

Response Fields

Returns 201.
object
Because the order is IOC, anything the book cannot absorb immediately is cancelled rather than rested. A book with no bids leaves filledQuantity at 0.

Error Codes