🏪 Market

Access read-only market data—events, order books, token prices, and categories—to discover markets and display live pricing.

Market Service provides read-only access to market data with event details, lists of events, order books, token prices, and categories. You can use it to discover markets, display live pricing and liquidity.

🛠️ Functions

🧩 Types

📅 Event

Represents a prediction event that may contain one or more markets.

interface Event {
  id: number;
  createdAt: Date;
  title: string;
  description: string;
  status: MarketStatus;
  startDate: Date;
  endDate: Date;
  image: string;
  resolutionSource: string;
  volume: string;
  resolvedOn: Date | null;
  categoryIds: number[];
  fixtureId: string | null;
  isFavorite: number;
  markets: Market[];
}

Key Fields

FieldTypeDescription
idnumberUnique ID of the event
titlestringTitle of the event
statusstringCurrent event status
volumestringTotal Trading Volume ($)
marketsMarket[]Array of associated markets

📊 Market

Represents a specific tradeable question within an event.

interface Market {
  id: number;
  title: string;
  question: string;
  questionId: string;
  startDate: Date;
  endDate: Date;
  image: string;
  rules: string;
  volume: string;
  status: MarketStatus;
  resolvedAddress: string | null;
  resolvedOutcome: string | null;
  resolvedOutcomeId: string | null;
  resolvedOn: string | null;
  openOrderNumber: number;
  positions: MarketPosition[];
  conditionId: string;
  outcomes: MarketOutcome[];
}

Key Fields

FieldTypeDescription
idnumberUnique ID of the market
questionstringMarket's question
statusMarket StatusEnum indicating the status of the current market
volumestringTotal Trading Volume ($)
outcomesMarketOutcome[]Available outcomes to bet on
positionsMarketPosition[]Positions associated with this market

📦 Imports

These types can be imported from the Forkast SDK:

import {
  MarketOutcome,
  MarketPosition,
  MarketStatus,
} from "@forkastgg/client";