majjha.developers
Open beta

Public beta: activity uses test Dots with no monetary value. There is no money in or out, and interfaces may change before launch.

Markets

A market is one tradable YES/NO question. Prices run from 0.01 to 0.99 and express the current implied probability. These endpoints cover discovery, order books, trades, comments, and price history.

List markets

Public
GET/api/markets

Returns markets with filtering and pagination. Default and cursor-filtered discovery calls use cursor pagination; pass `page` to request the classic page envelope.

Query parameters

  • categorystringqueryoptional

    Filter by category slug.

  • tagstringqueryoptional

    Filter by tag slug.

  • searchstringqueryoptional

    Full-text search over market titles.

  • statusstringqueryoptional

    Filter by market status. In page mode, `ALL` disables the public default of active markets only.

    ACTIVEALLCLOSEDRESOLVEDSUSPENDEDDRAFT
  • event_tickerstringqueryoptional

    Only markets in this event (switches to cursor mode).

  • series_tickerstringqueryoptional

    Only markets in this series (switches to cursor mode).

  • limitintegerqueryoptionaldefault: 20

    Page size. Max 100.

  • cursorstringqueryoptional

    Opaque cursor (cursor mode).

  • pageintegerqueryoptionaldefault: 1

    1-based page number (page mode).

Request

cURL
curl "https://api.majjha.fun/api/markets"

Response

200 OK
{
  "markets": [
    {
      "id": "mkt_btc5m_a1",
      "ticker": "BTC-5MIN-25JUN04T0900-Y",
      "eventTicker": "BTC-5MIN-25JUN04T0900",
      "title": "BTC above $68,500 at 09:05?",
      "description": "Resolves YES if BTC/USD is at or above the strike at 09:05 UTC.",
      "resolutionCriteria": "Coinbase BTC-USD spot at 09:05:00 UTC.",
      "categoryId": "cat_crypto",
      "status": "ACTIVE",
      "outcome": null,
      "closeDate": "2026-06-04T09:05:00Z",
      "lastYesPrice": "0.54",
      "lastNoPrice": "0.46",
      "volume": "12840.00",
      "liquidity": "3200.00",
      "marketType": "BINARY",
      "takerFeeBps": 0,
      "makerFeeBps": 0,
      "feesEnabled": false,
      "feeCategory": "none",
      "makerRebateBps": 0,
      "liquidityRewardsEnabled": true,
      "minIncentiveSize": "50.00000000",
      "maxIncentiveSpread": "0.03000000",
      "liquidityRewardPool": "250.00000000",
      "liquidityRewardMultiplier": "1.00000000",
      "tags": [
        { "slug": "bitcoin", "name": "Bitcoin" },
        { "slug": "crypto", "name": "Crypto" }
      ],
      "createdAt": "2026-06-04T09:00:00Z",
      "updatedAt": "2026-06-04T09:03:00Z"
    }
  ],
  "cursor": "mkt_btc5m_a0"
}
  • In cursor mode the response is `{ "cursor": string | null, "markets": [...] }` instead of the page envelope.
  • Calls without `page`, `category`, or `search` use cursor mode, including unparameterized `/api/markets` and `limit`-only discovery calls.
  • Pass `page` to use the legacy response envelope: `{ "markets": [...], "total": number, "page": number, "totalPages": number }`.
  • Official V1 production markets are fee-free: maker/taker/rebate bps are zero, `feesEnabled` is false, and `feeCategory` is `none`. The fields remain for wire compatibility.
  • `minIncentiveSize`, `maxIncentiveSpread`, and liquidity reward fields mirror the market-level reward config used by the scorecard endpoint.

Get market by slug (Gamma shape)

Public
GET/markets/slug/{slug}

Returns one Gamma-compatible market object by slug/ticker. Use `include_tag=false` for the lean detail shape.

Path parameters

  • slugstringpathrequired

    Market slug or ticker.

Query parameters

  • include_tagbooleanqueryoptionaldefault: true

    Set false to omit embedded tag arrays. Alias: `includeTag`.

Request

cURL
curl "https://api.majjha.fun/markets/slug/{slug}"

Response

200 OK
{
  "id": "mkt_btc5m_a1",
  "question": "BTC above $68,500 at 09:05?",
  "slug": "BTC-5MIN-25JUN04T0900-Y",
  "outcomes": ["Yes", "No"],
  "outcomePrices": ["0.54", "0.46"],
  "active": true,
  "closed": false
}
  • Compatibility alias: `/api/gamma/markets/slug/{slug}`.

Get market description (Gamma shape)

Public
GET/markets/{id}/description

Returns the market description in the current Gamma-compatible `{ description }` envelope.

Path parameters

  • idstringpathrequired

    Market id, ticker, or slug.

Request

cURL
curl "https://api.majjha.fun/markets/{id}/description"

Response

200 OK
{
  "description": "Resolves YES if BTC/USD is at or above the strike at 09:05 UTC."
}
  • Compatibility alias: `/api/gamma/markets/{id}/description`.

Get market

Public
GET/api/markets/{ticker}

Returns a single market by ticker (or internal id), including detail fields like category and trade counts.

Path parameters

  • tickerstringpathrequired

    Market ticker or internal id.

Request

cURL
curl "https://api.majjha.fun/api/markets/{ticker}"

Response

200 OK
{
  "market": {
    "id": "mkt_btc5m_a1",
    "ticker": "BTC-5MIN-25JUN04T0900-Y",
    "eventTicker": "BTC-5MIN-25JUN04T0900",
    "title": "BTC above $68,500 at 09:05?",
    "description": "Resolves YES if BTC/USD is at or above the strike at 09:05 UTC.",
    "resolutionCriteria": "Coinbase BTC-USD spot at 09:05:00 UTC.",
    "categoryId": "cat_crypto",
    "category_name": "Crypto",
    "category_slug": "crypto",
    "status": "ACTIVE",
    "outcome": null,
    "closeDate": "2026-06-04T09:05:00Z",
    "lastYesPrice": "0.54",
    "lastNoPrice": "0.46",
    "volume": "12840.00",
    "liquidity": "3200.00",
    "marketType": "BINARY",
    "takerFeeBps": 0,
    "makerFeeBps": 0,
    "feesEnabled": false,
    "feeCategory": "none",
    "makerRebateBps": 0,
    "liquidityRewardsEnabled": true,
    "minIncentiveSize": "50.00000000",
    "maxIncentiveSpread": "0.03000000",
    "liquidityRewardPool": "250.00000000",
    "liquidityRewardMultiplier": "1.00000000",
    "trade_count": 318,
    "position_count": 64,
    "tags": [
      { "slug": "bitcoin", "name": "Bitcoin" },
      { "slug": "crypto", "name": "Crypto" }
    ],
    "createdAt": "2026-06-04T09:00:00Z",
    "updatedAt": "2026-06-04T09:03:00Z"
  }
}

Get market order book

Public
GET/api/markets/{ticker}/orderbook

Returns the current order book for a market: aggregated `bids` and `asks` levels plus convenience top-of-book fields. Prices and quantities are decimal strings.

Path parameters

  • tickerstringpathrequired

    Market ticker or internal id.

Request

cURL
curl "https://api.majjha.fun/api/markets/{ticker}/orderbook"

Response

200 OK
{
  "orderbook": {
    "bids": [
      { "price": "0.53", "quantity": "120", "order_count": 3 },
      { "price": "0.52", "quantity": "340", "order_count": 7 }
    ],
    "asks": [
      { "price": "0.55", "quantity": "90", "order_count": 2 },
      { "price": "0.56", "quantity": "210", "order_count": 5 }
    ],
    "best_bid": "0.53",
    "best_ask": "0.55",
    "spread": "0.02",
    "mid_price": "0.54"
  }
}
  • The WebSocket `orderbook.<market_id>` channel pushes this exact `data` shape on every change — see the WebSocket guide.

Get liquidity reward scorecard

Public
GET/api/markets/{ticker}/liquidity-rewards

Returns the current Polymarket-style liquidity reward scorecard for a market, based on resting maker orders near the midpoint. Scores are a live sample, not a settled payout ledger.

Path parameters

  • tickerstringpathrequired

    Market ticker or internal id.

Request

cURL
curl "https://api.majjha.fun/api/markets/{ticker}/liquidity-rewards"

Response

200 OK
{
  "liquidityRewards": {
    "marketId": "mkt_btc5m_a1",
    "ticker": "BTC-5MIN-25JUN04T0900-Y",
    "config": {
      "enabled": true,
      "minIncentiveSize": "50.00000000",
      "maxIncentiveSpread": "0.03000000",
      "rewardPool": "250.00000000",
      "nativeRewardPool": "200.00000000",
      "sponsoredRewardPool": "50.00000000",
      "multiplier": "1.00000000"
    },
    "book": {
      "bestBid": "0.53",
      "bestAsk": "0.55",
      "spread": "0.02",
      "midPrice": "0.54"
    },
    "totalScore": "214.81481481",
    "makers": [
      {
        "userId": "usr_mm_1",
        "qOne": "100.00000000",
        "qTwo": "114.81481481",
        "rawScore": "100.00000000",
        "normalizedScore": "0.46551724",
        "estimatedReward": "116.37931000",
        "qualifyingOrderCount": 4
      }
    ]
  }
}
  • The current implementation scores the live in-memory order book. Epoch snapshots, daily payout automation, and historical allocations are separate reward-ledger work.
  • `rewardPool` is the combined active native + sponsor pool; `nativeRewardPool` and `sponsoredRewardPool` expose the source split used for settlement allocations.
  • For midpoints in the 10–90 range, single-sided liquidity can score at one-third weight; outside that range makers need both Q-one and Q-two depth.

Get market trades

Public
GET/api/markets/{ticker}/trades

Returns recent public trades (prints) for a single market, newest first.

Path parameters

  • tickerstringpathrequired

    Market ticker or internal id.

Query parameters

  • limitintegerqueryoptionaldefault: 50

    Page size. Max 500.

  • cursorstringqueryoptional

    Opaque cursor from the previous page's `cursor` field, for keyset pagination (older trades).

Request

cURL
curl "https://api.majjha.fun/api/markets/{ticker}/trades"

Response

200 OK
{
  "cursor": "eyJ0cyI6IDE3MTc0NTkzODB9",
  "trades": [
    {
      "id": "trd_9f2",
      "marketId": "mkt_btc5m_a1",
      "ticker": "BTC-5MIN-25JUN04T0900-Y",
      "side": "YES",
      "price": "0.54",
      "quantity": "25",
      "createdAt": "2026-06-04T09:03:11Z"
    }
  ]
}

List market comments

Public
GET/api/markets/{ticker}/comments

Returns recent visible public comments for a market, newest first.

Path parameters

  • tickerstringpathrequired

    Market ticker or internal id.

Query parameters

  • limitintegerqueryoptionaldefault: 30

    Page size. Max 100.

Request

cURL
curl "https://api.majjha.fun/api/markets/{ticker}/comments"

Response

200 OK
{
  "comments": [
    {
      "id": "cmt_a1",
      "market_id": "mkt_btc5m_a1",
      "user_id": "usr_42",
      "body": "Order book is leaning YES after that candle.",
      "created_at": "2026-06-04T09:03:30Z",
      "updated_at": "2026-06-04T09:03:30Z",
      "user_name": "Ari",
      "username": "ari"
    }
  ]
}

Create market comment

Requires auth
POST/api/markets/{ticker}/comments

Posts a comment to a market as the authenticated user. Comments must be 1–1000 characters and are limited to 5/minute and 40/hour per account. PredictMax also computes an advisory abuse score and places high-risk rows into the admin flagged queue without auto-hiding them.

Path parameters

  • tickerstringpathrequired

    Market ticker or internal id.

Body parameters

  • bodystringbodyrequired

    Comment text. Max 1000 characters.

Request

cURL
curl -X POST "https://api.majjha.fun/api/markets/{ticker}/comments" \
  -H "Authorization: Bearer $MAJJ_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "Order book is leaning YES after that candle."
  }'
Request body
{
  "body": "Order book is leaning YES after that candle."
}

Response

200 OK
{
  "comment": {
    "id": "cmt_a1",
    "market_id": "mkt_btc5m_a1",
    "user_id": "usr_42",
    "body": "Order book is leaning YES after that candle.",
    "created_at": "2026-06-04T09:03:30Z",
    "updated_at": "2026-06-04T09:03:30Z",
    "user_name": "Ari",
    "username": "ari"
  }
}
  • The market creator receives a best-effort in-app notification when another user comments.
  • Advisory anti-abuse scoring records `abuse_score`, `abuse_reasons`, and `auto_flagged_at` for admins only. The scorer combines text heuristics with contextual signals such as burst posting, duplicate bodies, recent auto-flags, and prior hidden comments.
  • Rate-limit failures return HTTP 429 with a JSON `error` field.

Report market comment

Requires auth
POST/api/markets/{ticker}/comments/{comment_id}/report

Reports a visible market comment for moderator review. Reports are idempotent per reporter/comment, self-reports are rejected, and report actions are limited to 20/hour.

Path parameters

  • tickerstringpathrequired

    Market ticker or internal id.

  • comment_idstringpathrequired

    Comment id returned by the comments list.

Body parameters

  • reasonstringbodyoptionaldefault: other

    Report reason.

    spamabusemisleadingharassmentother
  • detailsstringbodyoptional

    Optional moderator note. Max 500 characters.

Request

cURL
curl -X POST "https://api.majjha.fun/api/markets/{ticker}/comments/{comment_id}/report" \
  -H "Authorization: Bearer $MAJJ_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "misleading",
    "details": "Claims a resolved outcome before official source posts."
  }'
Request body
{
  "reason": "misleading",
  "details": "Claims a resolved outcome before official source posts."
}

Response

200 OK
{
  "report": {
    "id": "cmtr_123",
    "comment_id": "cmt_a1",
    "market_id": "mkt_btc5m_a1",
    "reporter_id": "usr_99",
    "reason": "misleading",
    "details": "Claims a resolved outcome before official source posts.",
    "status": "OPEN",
    "created_at": "2026-06-04T09:05:30Z",
    "updated_at": "2026-06-04T09:05:30Z"
  }
}

List trades (exchange-wide)

Public
GET/api/markets/trades

Returns a cursor-paginated, exchange-wide trade tape. Optionally filter by `ticker`. Useful for building a live ticker or backfilling price history.

Query parameters

  • tickerstringqueryoptional

    Restrict the tape to a single market ticker.

  • limitintegerqueryoptionaldefault: 100

    Page size. Max 100.

  • cursorstringqueryoptional

    Opaque cursor from the previous page.

Request

cURL
curl "https://api.majjha.fun/api/markets/trades"

Response

200 OK
{
  "cursor": "eyJ0cyI6IDE3MTc0NTkzODB9",
  "trades": [
    {
      "trade_id": "trd_9f2",
      "ticker": "BTC-5MIN-25JUN04T0900-Y",
      "price": "0.54",
      "count": "25",
      "taker_side": "yes",
      "created_at": "2026-06-04T09:03:11Z"
    }
  ]
}

Get price history

Public
GET/api/markets/{ticker}/price-history

Returns a time series of YES-price ticks for charting a market.

Path parameters

  • tickerstringpathrequired

    Market ticker or internal id.

Query parameters

  • limitintegerqueryoptionaldefault: 300

    Max number of ticks, newest last (up to 5000).

  • sinceintegerqueryoptional

    Only ticks at or after this unix-seconds timestamp — chart range windows.

  • fidelityintegerqueryoptional

    Downsample to one tick per this-many-minutes bucket (applied before limit, so limit caps buckets). Omit for raw ticks.

Request

cURL
curl "https://api.majjha.fun/api/markets/{ticker}/price-history"

Response

200 OK
{
  "ticks": [
    { "yes_price": "0.51", "created_at": "2026-06-04T09:00:30Z" },
    { "yes_price": "0.53", "created_at": "2026-06-04T09:01:30Z" },
    { "yes_price": "0.54", "created_at": "2026-06-04T09:03:00Z" }
  ]
}

Analyze market (AI)

Public
GET/api/markets/{ticker}/analyze

Returns an AI-generated probability estimate and rationale for a market. Intended for research and UI surfacing — not financial advice.

Path parameters

  • tickerstringpathrequired

    Market ticker or internal id.

Request

cURL
curl "https://api.majjha.fun/api/markets/{ticker}/analyze"

Response

200 OK
{
  "probability": 0.56,
  "confidence": "medium",
  "reasoning": "Spot has trended slightly above the strike with rising short-term momentum...",
  "keyFactors": ["short-term momentum", "thin order book above strike"],
  "marketSentiment": "leaning YES",
  "recommendation": "Slight edge to YES at current price",
  "currentPrice": 0.54
}