Prediction Market API
Initialize new prediction markets on-chain
Prediction Market API
The Prediction Market API provides utilities for initializing new prediction markets on-chain.
Access
Methods
initializeMarket
Initialize a new prediction market.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
marketTicker | string | Yes | Unique market ticker identifier |
userPublicKey | string | Yes | Initializer's wallet public key |
settlementMint | string | No | Settlement token (default: USDC) |
Returns:
Market initialization typically requires specific permissions or roles within the DFlow system. Contact DFlow for access to market creation.
Example
Initialize and Execute
Understanding Outcome Tokens
When a prediction market is initialized, two outcome tokens are created:
| Token | Purpose |
|---|---|
| YES Token | Redeemable for 1 unit if the outcome is YES |
| NO Token | Redeemable for 1 unit if the outcome is NO |
These tokens use the Solana TOKEN_2022 program and can be traded like any SPL token.