Skip to main content

Overview

Manifold is a play-money prediction market platform that allows users to create and trade on markets using Mana (M$), the platform’s virtual currency. The Manifold market API provides access to a wide variety of user-generated prediction markets.

MarketType Enum

from prediction_market_agent_tooling.markets.markets import MarketType

market_type = MarketType.MANIFOLD

Market Class

ManifoldAgentMarket

The ManifoldAgentMarket class extends AgentMarket and provides Manifold-specific functionality.
from prediction_market_agent_tooling.markets.manifold.manifold import ManifoldAgentMarket

Core Methods

Get Markets

Retrieve available prediction markets from Manifold.
from prediction_market_agent_tooling.markets.agent_market import FilterBy, SortBy

markets = ManifoldAgentMarket.get_markets(
    limit=50,
    filter_by=FilterBy.OPEN,
    sort_by=SortBy.NEWEST
)
limit
int
Maximum number of markets to retrieve (default: 500)
filter_by
FilterBy
Filter markets by status (OPEN, RESOLVED, etc.)
sort_by
SortBy
Sort order (NEWEST, CLOSING_SOONEST, etc.)
markets
list[ManifoldAgentMarket]
List of market objects matching the query criteria

Get Binary Market

Retrieve a specific binary market by ID.
market = ManifoldAgentMarket.get_binary_market(
    id="manifold-market-id"
)
id
str
required
Manifold market ID (alphanumeric string)
market
ManifoldAgentMarket
Market object containing question, probabilities, and trading information

Buy Tokens

Purchase outcome tokens for a market.
market.buy_tokens(
    outcome="Yes",
    amount=USD(10)  # In Mana (M$)
)
outcome
str
required
Outcome to bet on (“Yes” or “No” for binary markets)
amount
USD
required
Amount to spend in Mana (M$)

Get Trade Balance

Get available Mana balance for trading.
balance = ManifoldAgentMarket.get_trade_balance(api_keys)
api_keys
APIKeys
required
API keys containing Manifold credentials
balance
USD
Available Mana balance for trading

Market Data Model

Market Properties

id
str
Manifold market ID
question
str
Market question text
description
str | None
Market description with resolution criteria
outcomes
list[str]
Available outcomes (e.g., [“Yes”, “No”] for binary markets)
p_yes
Probability
Current probability of “Yes” outcome (0.0 to 1.0)
volume
USD | None
Total trading volume in Mana
close_time
DatetimeUTC | None
When the market closes for trading
created_time
DatetimeUTC | None
When the market was created
url
str
Direct link to the market on Manifold
is_open
bool
Whether the market is currently open for trading
resolution
str | None
Final resolution outcome (if resolved)

Manifold-Specific Features

Play Money System

Manifold uses Mana (M$), a play-money currency. All trades are in Mana, which has no real-world value.
# Amounts are specified in Mana
market.buy_tokens(outcome="Yes", amount=USD(100))  # 100 Mana

Market Types

Manifold supports multiple market types:
  • Binary: Yes/No questions
  • Multiple Choice: Several possible outcomes
  • Free Response: Users can submit answers
  • Numeric: Predicting a numeric value

Question Rephrasing

Manifold allows market creators to rephrase questions, which can affect market tracking.
# Markets may have updated questions
original_question = "Original question text"
# Creator updates it later
market.question  # May be different from original

Real-World Examples

Replication Source

Manifold is commonly used as a source for replicating markets to other platforms.
from prediction_market_agent.agents.replicate_to_omen_agent.deploy import (
    DeployableReplicateToOmenAgent,
)

class DeployableReplicateToOmenAgent(DeployableAgent):
    def run(self, market_type: MarketType = MarketType.MANIFOLD) -> None:
        # Fetches markets from Manifold to replicate to Omen
        markets = get_binary_markets(
            1000,
            MarketType.MANIFOLD,
            filter_by=FilterBy.OPEN,
            sort_by=SortBy.CLOSING_SOONEST
        )

Benchmarking Agent Performance

Manifold is used for agent benchmarking due to its large number of markets.
# From think_thoroughly_agent benchmark
reference_markets = get_binary_markets(
    n=100,
    market_type=MarketType.MANIFOLD,
    filter_by=FilterBy.RESOLVED,
    sort_by=SortBy.NEWEST
)

Basic Trading Agent

from prediction_market_agent_tooling.deploy.agent import DeployableTraderAgent
from prediction_market_agent_tooling.markets.data_models import ProbabilisticAnswer

class MyManifoldAgent(DeployableTraderAgent):
    def answer_binary_market(self, market: AgentMarket) -> ProbabilisticAnswer | None:
        # Implement prediction logic
        return ProbabilisticAnswer(
            p_yes=Probability(0.6),
            confidence=0.75
        )

# Run on Manifold
agent = MyManifoldAgent()
agent.run(market_type=MarketType.MANIFOLD)

Platform Details

Filtering and Sorting

Filter Options

from prediction_market_agent_tooling.markets.agent_market import FilterBy

# Available filters
FilterBy.OPEN       # Only open markets
FilterBy.RESOLVED   # Only resolved markets

Sort Options

from prediction_market_agent_tooling.markets.agent_market import SortBy

# Available sort orders
SortBy.NEWEST           # Recently created
SortBy.CLOSING_SOONEST  # Closing soon
SortBy.NONE             # Default order

Resolved Markets

Access resolved markets for backtesting and evaluation.
resolved_markets = ManifoldAgentMarket.get_markets(
    limit=100,
    filter_by=FilterBy.RESOLVED,
    sort_by=SortBy.NEWEST
)

for market in resolved_markets:
    print(f"Question: {market.question}")
    print(f"Resolution: {market.resolution}")
    print(f"Final probability: {market.p_yes}")

Advantages

  • Large Market Volume: Thousands of active markets
  • Diverse Topics: Wide range of prediction topics
  • Low Barrier: Play money means no financial risk
  • Active Community: Strong user engagement
  • API Access: Well-documented REST API

Limitations

  • Play Money Only: No real financial incentives
  • Question Changes: Creators can rephrase questions
  • Resolution Trust: Relies on creator to resolve fairly
  • No Trading Fees: Different dynamics from real-money markets

Error Handling

try:
    market = ManifoldAgentMarket.get_binary_market(id=market_id)
    market.buy_tokens(outcome="Yes", amount=USD(50))
except Exception as e:
    logger.error(f"Manifold API error: {e}")

See Also

Build docs developers (and LLMs) love