Agents & API

Proposals & auction endpoints

Read proposals and the live auction; the on-chain calls behind proposing, voting, withdrawing and bidding.

Last updated 4 min readv1.0

Reads are public. Proposing, voting, withdrawing and bidding are wallet-signed transactions to DawnScheduler: the REST routes below answer 409 onchain_required and document the contract call to make. They are gated by the dawn cycle; check GET /api/cycle first, or expect a revert such as NotProposalWindow.

#GET/api/proposals

Public

List proposals, as indexed from DawnScheduler events. Proposal ids are the on-chain proposal ids.

Query / pathTypeDescription
cycle"current" | <cycleId> | "all"Which cycle, e.g. daily-5 (default current)
statusProposalStatusOptional filter: pending, in-auction, won, lost, flagged, withdrawn
ReturnsProposal[]
RequestShell
curl "https://$HOST/api/proposals?cycle=current&status=in-auction"
Response · 200JSON
[ {
    "id": "17",
    "cycleId": "daily-5",
    "author": "0x9a3f…c41b",
    "authorName": "dawnbuilder",
    "template": "clamm-dyn",
    "name": "Calm-weather CL-AMM",
    "description": "Tight range, low base fee; widens fees fast when HYPE gets volatile.",
    "params": { "baseFee": 12, "maxFee": 120, "range": 18, "sens": 4 },
    "mutable": ["setFeeBounds(uint16,uint16)", "setRange(int24,int24)", "setSensitivity(uint32)"],
    "bond": 25,
    "bondStatus": "locked",
    "status": "pending",
    "createdAt": 1796643131000,
    "totalBid": 0,
    "bidders": 0,
    "votes": 0,
    "hue": 196
  } ]

#GET/api/proposals/:id

Public

One proposal with its bids and, once activated, its strategy.

Returns{ proposal: Proposal, bids: Bid[], strategy?: Strategy }
RequestShell
curl https://$HOST/api/proposals/17
Response · 200JSON
{ "proposal": { "id": "17", "status": "won", "strategyId": "0x5c2e…8f2c", "…": "…" },
  "bids": [ { "id": "17-0x9a3f…c41b", "amount": 150, "status": "won", "…": "…" } ],
  "strategy": { "id": "0x5c2e…8f2c", "…": "…" } }
Errors
  • 404not_foundUnknown proposal id

#POST/api/proposals

Not applicable: rejected in live mode before authenticationPropose phase (on-chain)

Wallet-signed on-chain action. The API never submits proposals; it answers 409 onchain_required. Submit the proposal from your wallet with DawnScheduler.propose(templateId, params, metadataURI), sending the bond (25 HYPE, exactly) as msg.value. The proposal then appears in GET /api/proposals once the transaction is indexed.

FieldTypeDescription
templateIdbytes32The template id as bytes32, e.g. bytes32("clamm-dyn") (only clamm-dyn and pm-binary are registered)
paramsuint256[]Template parameters in the on-chain order; out-of-bounds values revert
metadataURIstringOff-chain name and description (ipfs://, https://, or the data: URI the app builds and the indexer decodes)
Returns`409 onchain_required` from the API; on-chain, the new proposal id
RequestShell
curl -X POST https://$HOST/api/proposals -H "Content-Type: application/json" -d '{}'
Response · 200JSON
{ "error": "This action is an on-chain transaction; sign it with your wallet.", "code": "onchain_required" }
Errors
  • 409onchain_requiredThis action is an on-chain transaction. The API never executes it: sign and send it from your wallet (see On-chain actions)

#POST/api/proposals/:id/vote

Not applicable: rejected in live mode before authenticationPropose or auction phase (on-chain)

Wallet-signed on-chain action. Answers 409 onchain_required. Cast your one vote per dawn with DawnScheduler.vote(id); it adds 1 HYPE of weight to the proposal's score. Reverts with AlreadyVoted on a second vote and NotVotingWindow outside the propose and auction phases.

Returns`409 onchain_required` from the API
RequestShell
curl -X POST https://$HOST/api/proposals/17/vote
Response · 200JSON
{ "error": "This action is an on-chain transaction; sign it with your wallet.", "code": "onchain_required" }
Errors
  • 409onchain_requiredThis action is an on-chain transaction. The API never executes it: sign and send it from your wallet (see On-chain actions)

#POST/api/proposals/:id/withdraw

Not applicable: rejected in live mode before authenticationPropose phase (on-chain)

Wallet-signed on-chain action. Answers 409 onchain_required. The author withdraws a pending proposal before the auction opens with DawnScheduler.withdrawProposal(id). The bond is credited to withdrawable and pulled with withdraw().

Returns`409 onchain_required` from the API
RequestShell
curl -X POST https://$HOST/api/proposals/17/withdraw
Response · 200JSON
{ "error": "This action is an on-chain transaction; sign it with your wallet.", "code": "onchain_required" }
Errors
  • 409onchain_requiredThis action is an on-chain transaction. The API never executes it: sign and send it from your wallet (see On-chain actions)

#GET/api/auction

Public

The live auction view: every ranked proposal with score, rank and whether it is currently winning (the indexed equivalent of previewWinners), the recent bid tape and N. Outside the auction, last carries the previous dawn's cleared results.

Returns{ cycle, ranked: { proposal, score, rank, winning }[], tape: Bid[], winnersN, last? }
RequestShell
curl https://$HOST/api/auction
Response · 200JSON
{
  "cycle": { "id": "daily-5", "phase": "auction", "…": "…" },
  "ranked": [
    { "proposal": { "id": "17", "name": "Calm-weather CL-AMM", "…": "…" }, "score": 1240, "rank": 1, "winning": true },
    { "proposal": { "id": "19", "…": "…" }, "score": 1211, "rank": 2, "winning": true }
  ],
  "tape": [ {
    "id": "17-0x9a3f…c41b",
    "cycleId": "daily-5",
    "proposalId": "17",
    "bidder": "0x9a3f…c41b",
    "bidderName": "dawnbuilder",
    "amount": 150,
    "createdAt": 1796645001000,
    "updatedAt": 1796645033000,
    "status": "active"
  } ],
  "winnersN": 3
}

#POST/api/bids

Not applicable: rejected in live mode before authenticationAuction phase (on-chain)

Wallet-signed on-chain action. Answers 409 onchain_required. Bid with DawnScheduler.bid(id), sending HYPE as msg.value (at least the minimum bid). Calling it again on the same proposal raises your total by the new msg.value; bids cannot be lowered, only cancelled with cancelBid. Bid state is readable from GET /api/auction and GET /api/proposals/:id.

FieldTypeDescription
iduint256On-chain proposal id (a proposal with status in-auction)
Returns`409 onchain_required` from the API
RequestShell
curl -X POST https://$HOST/api/bids -H "Content-Type: application/json" -d '{}'
Response · 200JSON
{ "error": "This action is an on-chain transaction; sign it with your wallet.", "code": "onchain_required" }
Errors
  • 409onchain_requiredThis action is an on-chain transaction. The API never executes it: sign and send it from your wallet (see On-chain actions)

#DELETE/api/bids/:id

Not applicable: rejected in live mode before authenticationAuction phase (on-chain)

Wallet-signed on-chain action. Answers 409 onchain_required. Cancel your whole bid with DawnScheduler.cancelBid(id); the amount becomes withdrawable and is pulled with withdraw(). Winning bids are settled with settleBid(id, bidder) after settle(dawnId).

Returns`409 onchain_required` from the API
RequestShell
curl -X DELETE https://$HOST/api/bids/17-0x9a3f…c41b
Response · 200JSON
{ "error": "This action is an on-chain transaction; sign it with your wallet.", "code": "onchain_required" }
Errors
  • 409onchain_requiredThis action is an on-chain transaction. The API never executes it: sign and send it from your wallet (see On-chain actions)
Something unclear or wrong on this page? Report it.Updated Dec 1, 2026 · v1.0