Dutch Auctions
Get Loan Auction
Find the auction currently open against a loan
GET
/
lending-external-securities-v2
/
api
/
liquidations
/
{marketId}
/
loan-auction
/
{loanId}
curl "https://api.trusset.org/lending-external-securities-v2/api/liquidations/{marketId}/loan-auction/7" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/liquidations/${marketId}/loan-auction/${loanId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const auctionOpen = data.auction !== null;
{
"success": true,
"data": {
"loanId": "7",
"auction": {
"auctionId": "3",
"loanId": "7",
"borrower": "0x7d2e9B4c1A8f03e6B5D9c2A7F4e18B06c3D5a92F",
"collateralRemaining": "120.0",
"debtRemaining": "11540.1",
"currentPrice": "112.18",
"endTime": 1718449200,
"active": true,
"expired": false,
"biddable": true,
"settleable": false,
"phase": "RUNNING",
"venueAddress": "0x5c3e8a91d2f04b7e6a1c9d38f0b2e47a6d15c8e3"
}
}
}
{
"success": true,
"data": {
"loanId": "7",
"auction": null
}
}
{
"success": false,
"error": {
"code": "INVALID_LOAN_ID",
"message": "Valid loan ID required"
}
}
Looks up the Dutch auction the market’s auction venue holds open against a specific loan. Use it to show a borrower that their collateral is being auctioned, or to check a loan before liquidating it again.
A loan carries at most one open auction at a time. While it is open, the market refuses
liquidate, addCollateral, withdrawCollateral and borrowMore on that loan, and an expired auction keeps blocking them until it is settled through Settle Expired Auction. Repayment stays available.
Path Parameters
string
required
integer
required
On-chain loan ID. Must be a positive integer.
Response Fields
object
Show child attributes
Show child attributes
string
The loan ID from the path, echoed back.
object
The open auction, with the same fields as Get Auction including
phase and venueAddress, or null when there is none.This is a live lookup, not a history. The venue unlinks a loan from its auction when the last unit sells or when the expired auction is settled, so a loan auctioned yesterday returns
auction: null today. An auction that has passed its end time without settlement is still linked and comes back with phase: "EXPIRED". To inspect a finished auction, query it by ID through Get Auction.auction: null also answers a market with no auction venue wired and a venue that could not be read. Confirm the venue through Get Auction Module before treating null as proof that no auction exists.curl "https://api.trusset.org/lending-external-securities-v2/api/liquidations/{marketId}/loan-auction/7" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/liquidations/${marketId}/loan-auction/${loanId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const auctionOpen = data.auction !== null;
{
"success": true,
"data": {
"loanId": "7",
"auction": {
"auctionId": "3",
"loanId": "7",
"borrower": "0x7d2e9B4c1A8f03e6B5D9c2A7F4e18B06c3D5a92F",
"collateralRemaining": "120.0",
"debtRemaining": "11540.1",
"currentPrice": "112.18",
"endTime": 1718449200,
"active": true,
"expired": false,
"biddable": true,
"settleable": false,
"phase": "RUNNING",
"venueAddress": "0x5c3e8a91d2f04b7e6a1c9d38f0b2e47a6d15c8e3"
}
}
}
{
"success": true,
"data": {
"loanId": "7",
"auction": null
}
}
{
"success": false,
"error": {
"code": "INVALID_LOAN_ID",
"message": "Valid loan ID required"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
MISSING_MARKET_ID | 400 | The market ID is longer than 100 characters |
NO_MARKET_ADDRESS | 400 | The market has no on-chain address recorded |
INVALID_LOAN_ID | 400 | loanId is not a positive integer |
MARKET_NOT_FOUND | 404 | No market with this ID on your instance |
⌘I
curl "https://api.trusset.org/lending-external-securities-v2/api/liquidations/{marketId}/loan-auction/7" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/liquidations/${marketId}/loan-auction/${loanId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const auctionOpen = data.auction !== null;
{
"success": true,
"data": {
"loanId": "7",
"auction": {
"auctionId": "3",
"loanId": "7",
"borrower": "0x7d2e9B4c1A8f03e6B5D9c2A7F4e18B06c3D5a92F",
"collateralRemaining": "120.0",
"debtRemaining": "11540.1",
"currentPrice": "112.18",
"endTime": 1718449200,
"active": true,
"expired": false,
"biddable": true,
"settleable": false,
"phase": "RUNNING",
"venueAddress": "0x5c3e8a91d2f04b7e6a1c9d38f0b2e47a6d15c8e3"
}
}
}
{
"success": true,
"data": {
"loanId": "7",
"auction": null
}
}
{
"success": false,
"error": {
"code": "INVALID_LOAN_ID",
"message": "Valid loan ID required"
}
}
