Skip to content

Manifold

Manifold is a prediction market platform. Bruin supports Manifold as a public read-only source for Ingestr assets, allowing you to ingest market, bet, comment, group, user, portfolio, transaction, league, and boost history data into your data warehouse.

No API key is required for the supported Manifold tables.

Configuration

Step 1: Add a connection to .bruin.yml file

Add a manifold connection to the connections section of your .bruin.yml file:

yaml
connections:
  manifold:
    - name: "manifold"

Manifold supports optional URI filters. Add them with query_params when a table needs a single value:

yaml
connections:
  manifold:
    - name: "manifold-bitcoin-search"
      query_params:
        term: "bitcoin"
        sort: "newest"

    - name: "manifold-market"
      query_params:
        market_id: "YOUR_MARKET_ID"

For repeated URI parameters, such as the ids parameter used by market_probabilities, use query_param_lists:

yaml
connections:
  manifold:
    - name: "manifold-probabilities"
      query_param_lists:
        ids:
          - "MARKET_ID_1"
          - "MARKET_ID_2"

The keys in query_params and query_param_lists are passed through to ingestr as Manifold URI query parameters. Use the exact parameter name from the table list below, including camelCase names such as userId, contractSlug, and groupId.

Step 2: Create an asset file for data ingestion

To ingest data from Manifold, create an asset configuration file such as assets/manifold.asset.yml:

yaml
name: raw.manifold_markets
type: ingestr
connection: duckdb-default

parameters:
  source_connection: manifold
  source_table: "markets"

  destination: duckdb
  • name: The name of the asset.
  • type: Set this to ingestr.
  • connection: The destination connection where the data will be stored.
  • source_connection: The name of the Manifold connection defined in .bruin.yml.
  • source_table: The Manifold table to ingest.
  • destination: The destination platform.

For filtered tables, reference the connection that carries the relevant Manifold URI parameters:

yaml
name: raw.manifold_bitcoin_search
type: ingestr
connection: duckdb-default

parameters:
  source_connection: manifold-bitcoin-search
  source_table: "search_markets"

  destination: duckdb

Available Source Tables

TableRequired URI paramsOptional URI paramsPKInc KeyInc StrategyDetails
markets-sort, order, userId, groupIdidcreatedTimemergePublic market list.
search_markets-term, sort, filter, creatorId, contractType, topicSlug, minLiquidity, maxLiquidityidcreatedTimemergeSearch and filter markets. Supports interval end as beforeTime.
market_by_idmarket_id-id-replaceFull market by id.
market_by_slugcontract_slug-id-replaceFull market by slug.
market_probabilitymarket_id---replaceCurrent probability for one market. Multiple choice market details are returned in raw.
market_probabilitiesids---replaceCurrent probabilities for up to 100 market ids. Repeat ids with query_param_lists.
market_positionsmarket_idorder, top, bottom, userId, answerId--replacePosition information for one market.
bets-userId, username, contractId, contractSlug, kinds, orderidcreatedTimemergePublic bets. Supports interval pushdown.
comments-contractId, contractSlug, userId, orderidcreatedTimemergePublic comments.
groups-availableToUserIdidcreatedTimemergePublic groups/topics. Supports interval end as beforeTime.
group_by_sluggroup_slug---replaceOne group by slug.
group_by_idgroup_id---replaceOne group by id.
users--id-replacePublic users.
user_by_usernameusername-id-replacePublic user by username.
user_by_iduser_id-id-replacePublic user by id.
user_portfoliouserId---replaceCurrent public portfolio metrics for a user.
user_portfolio_historyuserId, period-timestamptimestampmergeHistorical portfolio metrics. period is daily, weekly, monthly, or allTime.
user_contract_metricsuserIdorder, perAnswer--replaceUser contract metrics with market contracts.
transactions-token, toId, fromId, categoryidcreatedTimemergePublic transactions. Supports interval pushdown.
leagues-userId, season, cohort--replacePublic league standings.
boost_history-contractId, postId, userId, includePendingidcreatedTimemergeContract and post boost history.

Interval Behavior

Manifold intervals are creation-time filters for the tables that support them. bets and transactions pass both interval start and interval end to the Manifold API. search_markets and groups pass only interval end as beforeTime. Other tables do not have a documented API-side interval filter.

Using incremental intervals for market discovery can miss markets that were created outside the interval but updated inside it. The Manifold API exposes update timestamps, but the documented ingestr source does not provide updated-time start and end filters.

Step 3: Run asset to ingest data

bash
bruin run assets/manifold.asset.yml

As a result of this command, Bruin will ingest data from the selected Manifold table into your destination database.