Skip to main content
POST /api/v1/market/settle-market
Auth required: Yes (Admin / Resolver) Settles a prediction market by declaring the winning outcome. This triggers the on-chain resolution process, after which winning token holders can claim their rewards.
This is a privileged endpoint. Only authorized resolvers or admin accounts can settle markets.

Request Body

marketAddress
string
required
Market contract address to settle.
winningOptionAddress
string
required
Address of the option token that won (the correct outcome).
resolutionSource
string
URL or description of the data source used to determine the outcome.
resolutionNote
string
Additional notes about why this outcome was chosen.
userOperation
object
required
Signed ERC-4337 UserOperation for the on-chain settlement transaction.

Example

curl -X POST "https://api-staging.promethex.market/api/v1/market/settle-market" \
  -H "Authorization: Bearer $ADMIN_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "marketAddress": "0x1234...abcd",
    "winningOptionAddress": "0xaaaa...1111",
    "resolutionSource": "https://coingecko.com/btc-usd",
    "resolutionNote": "BTC/USD exceeded $100k on March 15, 2026",
    "userOperation": {
      "sender": "0x...",
      "nonce": "0x...",
      "callData": "0x...",
      "callGasLimit": "0x...",
      "verificationGasLimit": "0x...",
      "preVerificationGas": "0x...",
      "maxFeePerGas": "0x...",
      "maxPriorityFeePerGas": "0x...",
      "paymasterAndData": "0x...",
      "signature": "0x..."
    }
  }'

Response

{
  "code": 0,
  "data": {
    "opHash": "0xSettleOpHash...",
    "status": "settling"
  }
}
opHash
string
UserOperation hash for the settlement transaction.
status
string
Market status after settlement submission. Transitions from runningsettlingended.

Settlement Flow

Resolver                 PrometheX API            Blockchain
  │                          │                         │
  ├── POST /settle-market ─► │                         │
  │                          ├── Validate resolver     │
  │                          ├── Submit UserOp ──────► │
  │  ◄── { settling } ────── │                         │
  │                          │                         ├── Execute settlement
  │                          │                         ├── Mark winning option
  │                          │  ◄── Tx confirmed ──── │
  │                          ├── Update status: ended  │
  │                          ├── Notify users (SSE) ─► │

Market Status Transitions

FromToTrigger
runningsettlingSettlement transaction submitted
settlingendedOn-chain transaction confirmed
After settlement, winning token holders can claim their rewards. Trading is disabled once a market enters settling status.