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
Market contract address to settle.
Address of the option token that won (the correct outcome).
URL or description of the data source used to determine the outcome.
Additional notes about why this outcome was chosen.
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"
}
}
UserOperation hash for the settlement transaction.
Market status after settlement submission. Transitions from running → settling → ended.
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
| From | To | Trigger |
|---|
running | settling | Settlement transaction submitted |
settling | ended | On-chain transaction confirmed |
After settlement, winning token holders can claim their rewards. Trading is disabled once a market enters settling status.