During development, you can use the developer endpoints
without an API key. For production use, request an API key
for higher rate limits.
Set up
Imports, env config, and the wallet/connection used across every step.
Imports, env, and wallet
Imports, env, and wallet
Fetch Wallet Token Accounts
Fetch SPL token accounts for the wallet and keep only non-zero balances.
Outcome tokens are Token-2022 mints.
Fetch Token Accounts
Fetch Token Accounts
Filter for Outcome Mints
Filter the wallet mints down to prediction market outcome tokens using the
Metadata API.
Filter Outcome Mints
Filter Outcome Mints
Fetch Market Details in Batch
Pull market metadata for those outcome mints so you can label YES/NO and
display event and market context.
Fetch Markets Batch
Fetch Markets Batch
Related Resources
Find Markets
Discover markets by category, tag, status, or series.
Bulk Fetch Markets
Hydrate multiple markets and outcome mints in one call.
Buy Outcome Tokens
Open a prediction market position from any input token.
Reclaim Rent
Close empty outcome token accounts and reclaim SOL rent.