pen-to-squareDeveloper APIs, SDKs, and Market Embedding

How Foremarket becomes infrastructure, not just a destination.

Foremarket is designed to be embedded, not merely visited. Permissionless market creation is only powerful if it can be accessed programmatically by teams, protocols, and applications that already have users, context, and distribution. For that reason, Foremarket exposes its core primitives through explicit smart contract interfaces, SDKs, and data APIs.

At the lowest level, market creation is a contract call. Any application capable of constructing a valid MarketDefinition can deploy a market on behalf of its users:

createMarket(
  question,
  outcomes[],
  expiry_timestamp,
  resolution_rule,
  oracle_type,
  creator_bond,
  fee_parameters
)

There is no distinction between “first-party” and “third-party” markets. A market created via an SDK is identical to one created via the native UI. This guarantees neutrality and prevents platform capture.

On top of contracts, Foremarket provides SDKs that abstract away encoding, validation, and lifecycle management. These SDKs allow teams to:

  • Generate markets dynamically from application state

  • Attach contextual metadata (e.g. product version, governance proposal ID)

  • Track markets programmatically through state transitions

  • Resolve markets automatically when resolution data becomes available

For example, a DAO could spin up markets tied to governance outcomes directly from its governance interface, without requiring users to leave that environment. A sports platform could generate markets per match automatically. A DeFi protocol could create markets around protocol metrics or upgrade events.

Data access is equally critical. Foremarket exposes read-only APIs for:

  • Market discovery and indexing

  • Price and probability feeds

  • Volume, liquidity, and position data

  • Resolution and settlement events

These feeds are designed to be consumed by analytics platforms, dashboards, bots, and external UIs. Foremarket does not attempt to own the presentation layer. It owns the truth layer.

This architecture turns Foremarket into a market factory that other systems can plug into. Creation, trading, and resolution become composable building blocks rather than isolated features.

Permissionless creation is amplified when developers can integrate it seamlessly. Foremarket is built so that creating a prediction market is as easy as deploying a smart contract or opening a data stream.

Last updated