BETAThe Prediction Market API is currently in beta and subject to breaking changes as we continue to improve the product. If you have any feedback, please reach out in Discord.
Prerequisite
Before claiming payouts, ensure you have:- An API key from the Portal
- Opened positions and have settled in your favor
- Requires signing and transaction submission, install
@solana/web3.jsnpm library
Understanding Market Settlement
When a market closes, it goes through a settlement process:Market States
A resolved market stays
closed with its result set; there is no separate settled status.
Market Results
Position States After Settlement
Winning PayoutEach winning contract pays out exactly $1.00 (1,000,000 native token units for JupUSD or USDC). If you hold 10 YES contracts and the market resolves to YES, your payout is $10.00.There are no fees for claiming payouts.
If you do not manually claim a payout from a winning position within 24 hours of the market settling in your favor, your claimable position will be automatically claimed on your behalf by the keeper network. The payout will be credited to your account wallet, and the position will be marked as claimed.
- You can always claim manually as soon as your position is claimable.
- Auto-claim ensures you never lose out on winnings if you forget to claim.
- The payout amount is the same as a manual claim, and no fees are charged for auto-claiming.
- You can check your claim status after settlement and see the updated
claimed: truefield and your payout even if you did not claim manually.
Checking for Claimable Positions
Query your positions and filter for those that are claimable.Claiming a Payout
UsePOST /positions/{positionPubkey}/claim to create a claim transaction. Calling it before the market resolves returns 400 Market not settled yet.
Some markets settle automatically and do not need a claim. For those positions the endpoint returns a message saying no claim is required. Combined with the 24-hour auto-claim, you can always rely on winnings being credited without a manual claim.
Sign and Submit Claim Transaction
After receiving the claim response, sign and submit the transaction.Full Claim Code Example
Full Claim Code Example
Verifying the Claim
After claiming, you can verify by fetching the position again.Handling Lost Positions
When a market settles against your position, the contracts expire worthless. No action is needed - the position simply has no claimable value. Lost positions appear in your transaction history with theposition_lost event type.
Summary
What’s Next
Track your complete trading activity including claims, P&L, and transaction history.Position Data & History
Query positions, orders, and transaction history
Social Features
View profiles, leaderboards, and trade feeds
