Dutch Auctions
Wire Auction Module
Deploy a Dutch auction venue for a market and bind it, as unsigned transactions
POST
Builds the transactions that give a market its Dutch auction venue, the per-market contract on which auctions run. Call it twice. Without
moduleAddress it returns the contract-creation transaction for a new venue. With moduleAddress it returns the legs that bind that venue to the market and let the liquidation router and the collateral token accept it.
Nothing here turns auctions on. Once the legs are signed, the issuer enables useDutchAuction through Update Market Config, which the contract refuses while no venue is wired. A market that prices its collateral from a MARKET source cannot run Dutch auctions at all, and this call refuses it.
The market must have a lender of record. A market still seeking one has no admin that could sign the binding, so the call is refused with MARKET_PENDING_CURATOR.
Path Parameters
string
required
Market ID.
Body Parameters
string
Address of the venue you deployed from the first call’s transaction. Omit it to receive that deployment transaction. The venue must name this market, because each venue is bound to exactly one market in its constructor.
Deploy the Venue
WithoutmoduleAddress the response is SIGN_TRANSACTION with a contract creation. transaction carries only data, the venue’s bytecode followed by its constructor arguments: this market, its collateral token, its settlement token (stablecoin) and its collateral scale. It has no to, and unlike other writes it carries no value or chainId, so send it with a value of zero on the market’s chain.
Any wallet can deploy it, because the venue gains standing only when the market admin binds it. Read the new address from the deployment receipt’s contract address. There is no confirm call. The venue is not upgradeable, and a market that already names one is refused with MODULE_ALREADY_SET.
Bind and Authorize It
WithmoduleAddress the response is SIGN_TRANSACTIONS with the legs still missing, so a repeated call returns fewer or none. Each step is { key, to, data, description, value, chainId }, not the { action, transaction } shape other endpoints use. Each leg is signed by a different authority:
At most one of the last two appears, and only when the token refuses the venue today. When no transaction the API can build would admit it,
tokenAdmission.blocked says why, and the token issuer has to admit the venue on the token directly.
Passing a different moduleAddress replaces the market’s venue. The market accepts a replacement only while the current venue has no open auction, including an expired one not yet settled. The API does not check this, so setAuctionModule reverts on-chain in that case.
The auction endpoints under
/liquidations cache each market’s venue address for up to five minutes. For that long after a binding confirms, they can still answer with the previous venue, or as if none were wired. Get Auction Module reads the chain directly and shows the new venue at once.Response Fields
object
Update Market Config refuses to enable
useDutchAuction with AUCTION_VENUE_NOT_ADMITTED while the token refuses the venue, and with AUCTION_MODULE_NOT_SET while no venue is wired. The first is the API’s own check, because the contract’s configuration check never looks at the token. The contract does refuse the switch without a venue, and on a MARKET price source.