POST /api/v1/market/claim-market-result
Auth required: Yes
Claims winnings from a settled prediction market. Burns the user’s winning option tokens and transfers base tokens (e.g., USDC) to their smart account at a 1:1 redemption ratio.
Request Body
Settled market contract address.
Winning option token address. Must be the option that resolved as correct.
Signed ERC-4337 UserOperation for the claim transaction. Show UserOperation fields
Encoded claim contract call.
Example
curl -X POST "https://api-staging.promethex.market/api/v1/market/claim-market-result" \
-H "Authorization: Bearer $PRIVY_JWT " \
-H "Content-Type: application/json" \
-d '{
"marketAddress": "0x1234...abcd",
"optionAddress": "0xaaaa...1111",
"userOperation": {
"sender": "0xSenderAddress...",
"nonce": "0x05",
"callData": "0xClaimCallData...",
"callGasLimit": "0x30000",
"verificationGasLimit": "0x20000",
"preVerificationGas": "0x10000",
"maxFeePerGas": "0x3B9ACA00",
"maxPriorityFeePerGas": "0x3B9ACA00",
"paymasterAndData": "0xPaymaster...",
"signature": "0xSignature..."
}
}'
Response
{
"code" : 0 ,
"data" : {
"opHash" : "0xClaimOpHash..."
}
}
UserOperation hash for the claim transaction. Track on-chain for confirmation.
Claim Flow
User PrometheX API Blockchain
│ │ │
├── POST /claim ─────────► │ │
│ ├── Validate market │
│ │ is settled │
│ ├── Submit UserOp ──────► │
│ ◄── { opHash } ──────── │ │
│ │ ├── Burn winning tokens
│ │ ├── Transfer USDC to user
│ │ ◄── Tx confirmed ──── │
│ ◄── SSE: asset_changed ── │ │
Important Notes
Only callable after a market has settled (status = ended). The optionAddress must be the winning outcome.
Winning tokens are redeemed at 1:1 for base tokens (1 winning token = 1 USDC unit)
Losing tokens are worthless and cannot be claimed
Claims are gasless — the paymaster covers gas fees
After confirmation, an SSE event user:asset_changed is emitted
You can verify claimability by checking market.status === 'ended' and confirming which option won