Auctions
Get Auction
Read one auction batch and its result
GET
/
orderbooks
/
stocks
/
api
/
order-books
/
{orderBookId}
/
auctions
/
{auctionId}
curl "https://api.trusset.org/orderbooks/stocks/api/order-books/clx_ob_stock_003/auctions/clx_auction_76" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/order-books/${orderBookId}/auctions/${auctionId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (data?.status === 'CLEARED') console.log('cleared at', data.clearingPrice);
{
"success": true,
"data": {
"id": "clx_auction_76",
"orderBookId": "clx_ob_stock_003",
"startedAt": "2025-06-15T11:55:00.000Z",
"endsAt": "2025-06-15T12:00:00.000Z",
"status": "CLEARED",
"clearingPrice": "182200000",
"matchedVolume": "7000000",
"orderCount": 5,
"createdAt": "2025-06-15T11:55:00.000Z",
"updatedAt": "2025-06-15T12:00:02.000Z"
}
}
{
"success": true,
"data": null
}
Returns a single auction on a book, live or historical. Once the batch has cleared, this is where the uniform clearing price and the matched volume are published.
data is null when no auction with that ID exists on that book. The endpoint does not distinguish a wrong ID from an auction that belongs to a different book.
How the clearing price is chosen
At the end of a batch the engine considers every distinct price present in the collected orders and computes how much volume would trade at each. It picks the price that maximizes matched volume; ties are broken by the smaller order imbalance, then by proximity to the book’s reference price. Fills are then allocated at that single price by strict price then time priority, so an order that arrived earlier at the same price is filled first. Orders the batch could not fill either roll into the next batch or are cancelled, according to the book’sauctionRollUnmatched setting.
Path Parameters
string
required
Order book ID.
string
required
Auction ID, from Get Current Auction or an order’s
auctionId.Response Fields
object
null when the auction does not exist on that book.Show child attributes
Show child attributes
string
Auction ID.
string
Book the auction belongs to.
string
When collection opened.
string
When the batch closed, or is due to close.
string
COLLECTING, UNCROSSING, CLEARED or CANCELLED.string
Uniform execution price in order book units, or
null if the batch has not cleared or found no crossing.string
Base quantity matched, in order book units.
integer
Orders that took part in the clearing.
string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
curl "https://api.trusset.org/orderbooks/stocks/api/order-books/clx_ob_stock_003/auctions/clx_auction_76" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/order-books/${orderBookId}/auctions/${auctionId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (data?.status === 'CLEARED') console.log('cleared at', data.clearingPrice);
{
"success": true,
"data": {
"id": "clx_auction_76",
"orderBookId": "clx_ob_stock_003",
"startedAt": "2025-06-15T11:55:00.000Z",
"endsAt": "2025-06-15T12:00:00.000Z",
"status": "CLEARED",
"clearingPrice": "182200000",
"matchedVolume": "7000000",
"orderCount": 5,
"createdAt": "2025-06-15T11:55:00.000Z",
"updatedAt": "2025-06-15T12:00:02.000Z"
}
}
{
"success": true,
"data": null
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
INVALID_PARAM | 400 | orderBookId or auctionId is missing or longer than 100 characters |
ORDER_BOOK_NOT_FOUND | 404 | No such book on this instance, and not imported |
SERVICE_NOT_ENABLED | 403 | The Trading service is not enabled on this instance |
⌘I
curl "https://api.trusset.org/orderbooks/stocks/api/order-books/clx_ob_stock_003/auctions/clx_auction_76" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/order-books/${orderBookId}/auctions/${auctionId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (data?.status === 'CLEARED') console.log('cleared at', data.clearingPrice);
{
"success": true,
"data": {
"id": "clx_auction_76",
"orderBookId": "clx_ob_stock_003",
"startedAt": "2025-06-15T11:55:00.000Z",
"endsAt": "2025-06-15T12:00:00.000Z",
"status": "CLEARED",
"clearingPrice": "182200000",
"matchedVolume": "7000000",
"orderCount": 5,
"createdAt": "2025-06-15T11:55:00.000Z",
"updatedAt": "2025-06-15T12:00:02.000Z"
}
}
{
"success": true,
"data": null
}
