Skip to main content
POST
Builds the transactions that post the sale recipient’s standing bid on the market’s liquidation router, or withdraw it, and confirms them with txHash. The bid is a price factor of the oracle price with an expiry. In atomic mode every liquidation sells the seized collateral to the sale recipient at that bid, and Sell Pending Liquidation sells an open record at it. Only the sale recipient can bid: the router refuses any other sender. The money stays in the sale recipient’s wallet. The router takes the payment from its allowance on the settlement asset only when a liquidation sells to it. Send allowance to add the approve step, and keep the allowance bounded and the expiry short. A bid above 0, or a non-zero allowance, is built only where the atomic sale is offered: on a market priced from a live market price whose realization path is EXCHANGE_SALE, as saleBasis on Get Atomic Sale reports. Anywhere else no sale buys at a standing bid, so the call answers 409 ATOMIC_SALE_UNAVAILABLE and builds nothing. Withdrawing with 0, with allowance 0 to revoke the approval as well, stays available on every market. See Withdraw and Revoke.
A bid below 100 percent costs the borrower a larger seizure. The market seizes enough collateral at the bid price to cover the debt and the liquidation charge. The pool is made whole either way, and the borrower loses the difference.

Path Parameters

string
required
The market’s record ID, as id on List Markets, not its contract address. See Market IDs.

Body Parameters

integer
The bid as basis points of the oracle price: 9500 to 20000, 95 to 200 percent. 0 withdraws the bid. It must also reach the market’s sale floor, which is its auctionMinPremium held between 95 and 100 percent. Required when building calldata.
integer
Unix time in seconds the bid expires. Required for a bid above 0, and at least 60 seconds ahead of now, because the router refuses a bid that has already expired. Ignored when withdrawing with 0.
string
The settlement asset amount, as a decimal string, the router may take from the sale recipient. When it differs from the allowance now set, the response adds the approve step. Where the current allowance is not zero, it adds an approve to zero first, because tokens such as USDT refuse to change one non-zero allowance to another. Omit it to keep the allowance as it is.
string
The wallet you intend to sign with. A wallet other than the sale recipient is refused with NOT_SALE_RECIPIENT.
string
Hash of the mined setSaleBid transaction, or of the approve that sets the router’s allowance to zero when confirmWith is approve. Send it to confirm; the bid is then read from the router’s SaleBidSet event. Omit it to receive the calldata.

Withdraw and Revoke

Send priceFactorBps: 0 with allowance: "0" to withdraw the bid and revoke the router’s allowance together. The response builds only the steps that change something:
  • The approve step reads as a revocation, for example “Revoke the liquidation router’s USDC allowance of 869.5 USDC, so it can no longer take funds from the sale recipient”. It is left out when no allowance is left.
  • The setSaleBid(0) step is built only when the sale recipient has a standing bid, or when the bid could not be read.
When the revocation is the only step, confirmWith is approve. Confirm with the hash of that approve transaction. The answer carries allowanceRevoked: true, bid: null, currentBid: null and the live allowance. When the sale recipient has no standing bid and no allowance is left to revoke, nothing is built. The call answers 409 SALE_BID_UNCHANGED with details: { bidSet: false, allowance }.

Response Fields

The calldata response:
object
The confirmed response carries txHash, signedBy, bidder, bid as the transaction set it, currentBid as the router holds it now, allowance ({ amount, raw } or null) and routerAddress. bid and currentBid carry priceFactorBps, priceFactorE18, validUntil, validUntilIso, set, live and expired. A confirmed revocation carries allowanceRevoked: true, with bid and currentBid null. The bid is written to the audit log as LENDING_SALE_BID_SET, and so is a revocation, with allowanceRevoked: true.

Warnings

Error Codes

Confirming with txHash can also return any transaction verification error.