Auctions
Get Current Auction
Read the batch a book is currently collecting
GET
/
orderbooks
/
stocks
/
api
/
order-books
/
{orderBookId}
/
auctions
/
current
curl "https://api.trusset.org/orderbooks/stocks/api/order-books/clx_ob_stock_003/auctions/current" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/order-books/${orderBookId}/auctions/current`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (!data) console.log('no auction running');
else console.log('closes at', data.endsAt);
{
"success": true,
"data": {
"id": "clx_auction_77",
"orderBookId": "clx_ob_stock_003",
"startedAt": "2025-06-15T12:00:00.000Z",
"endsAt": "2025-06-15T12:05:00.000Z",
"status": "COLLECTING",
"clearingPrice": null,
"matchedVolume": "0",
"orderCount": 0,
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:00:00.000Z"
}
}
{
"success": true,
"data": null
}
Returns the auction a book is collecting into, or clearing right now. Applies to books running
PERIODIC_AUCTION, and to HYBRID books while the spread failover holds them in batch mode. See Trading modes.
data is null on a continuous book, and on a batching book between batches. That is the normal answer, not an error.
An auction in COLLECTING has no clearingPrice: the price is computed when the batch closes, from the whole set of orders, and is not published in advance. orderCount and matchedVolume are likewise filled in at clearing.
Path Parameters
string
required
Order book ID.
Response Fields
object
null when no auction is live.Show child attributes
Show child attributes
string
Auction ID. Pass it to Get Auction.
string
Book the auction belongs to.
string
When collection opened.
string
When the batch closes and uncrossing runs.
string
COLLECTING or UNCROSSING.string
null until the batch clears.string
"0" until the batch clears.integer
0 until the batch clears.string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
Orders routed into a batch rest with status
AUCTION_PENDING and carry the auction’s ID. They do not appear in the continuous depth and cannot match until the batch clears.curl "https://api.trusset.org/orderbooks/stocks/api/order-books/clx_ob_stock_003/auctions/current" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/order-books/${orderBookId}/auctions/current`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (!data) console.log('no auction running');
else console.log('closes at', data.endsAt);
{
"success": true,
"data": {
"id": "clx_auction_77",
"orderBookId": "clx_ob_stock_003",
"startedAt": "2025-06-15T12:00:00.000Z",
"endsAt": "2025-06-15T12:05:00.000Z",
"status": "COLLECTING",
"clearingPrice": null,
"matchedVolume": "0",
"orderCount": 0,
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:00:00.000Z"
}
}
{
"success": true,
"data": null
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
INVALID_PARAM | 400 | orderBookId 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/current" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/orderbooks/stocks/api/order-books/${orderBookId}/auctions/current`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (!data) console.log('no auction running');
else console.log('closes at', data.endsAt);
{
"success": true,
"data": {
"id": "clx_auction_77",
"orderBookId": "clx_ob_stock_003",
"startedAt": "2025-06-15T12:00:00.000Z",
"endsAt": "2025-06-15T12:05:00.000Z",
"status": "COLLECTING",
"clearingPrice": null,
"matchedVolume": "0",
"orderCount": 0,
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:00:00.000Z"
}
}
{
"success": true,
"data": null
}
