Overview
Omen (also known as Presagio) is a decentralized prediction market platform on Gnosis Chain. The Omen market API provides access to binary and categorical prediction markets with full on-chain trading capabilities.MarketType Enum
Market Class
OmenAgentMarket
TheOmenAgentMarket class extends AgentMarket and provides Omen-specific functionality.
Core Methods
Get Markets
Retrieve available prediction markets from Omen.int
Maximum number of markets to retrieve
FilterBy
Filter markets by status (OPEN, RESOLVED, etc.)
SortBy
Sort order (CLOSING_SOONEST, NEWEST, HIGHEST_LIQUIDITY, etc.)
list[OmenAgentMarket]
List of market objects matching the query criteria
Get Binary Market
Retrieve a specific binary market by ID.str
required
Market address (checksummed Ethereum address)
OmenAgentMarket
Market object containing question, probabilities, and trading information
Buy Tokens
Purchase outcome tokens for a market.str
required
Outcome to bet on (“Yes” or “No” for binary markets)
USD
required
Amount to spend on tokens in USD
Sell Tokens
Sell outcome tokens from a market position.str
required
Outcome tokens to sell
OutcomeToken
required
Number of outcome tokens to sell
Get Token Balance
Check token balance for a specific outcome.str
required
User’s Ethereum address
str
required
Outcome to check balance for
OutcomeToken
Number of outcome tokens held
Get Positions
Retrieve all user positions across markets.str
required
User’s Ethereum address
bool
Only return positions in open markets
OutcomeToken
Minimum position size to include
list[Position]
List of user positions with market details and token amounts
Get Trade Balance
Get available trading balance.APIKeys
required
API keys containing wallet address
USD
Available balance for trading in USD
Market Data Model
Market Properties
str
Market address (Ethereum checksummed address)
str
Market question text
str | None
Additional market description or resolution criteria
list[str]
Available outcomes (e.g., [“Yes”, “No”] for binary markets)
Probability
Current probability of “Yes” outcome (0.0 to 1.0)
Probability
Alias for p_yes
Probability
Current probability of “No” outcome (1 - p_yes)
USD | None
Total trading volume
DatetimeUTC | None
When the market closes for trading
DatetimeUTC | None
When the market was created
str
Direct link to the market on Omen
bool
Whether the market is currently open for trading
str | None
Final resolution outcome (if resolved)
Omen-Specific Features
Market Creation
Create new prediction markets on Omen.Outcomes Constants
Subgraph Handler
Access raw Omen market data via GraphQL.Real-World Examples
Arbitrage Agent
The arbitrage agent finds correlated markets and places mirror bets.Microchain Agent
The microchain agent uses function calling to trade on Omen markets.Replication Agent
The replication agent copies markets from other platforms to Omen.Network Details
- Blockchain: Gnosis Chain (formerly xDai)
- Native Token: xDai (stablecoin pegged to USD)
- Collateral Tokens: xDai, sDAI, and other ERC-20 tokens
- Website: https://omen.eth.limo
- Subgraph: Omen uses The Graph protocol for market data