Markets
A market is a single tradable YES/NO contract. Prices are quoted in dollars per contract from `0.01` to `0.99`; a winning contract settles at `1.00`. These endpoints expose market discovery plus public market data (order book, trades, price history).
List markets
Public/api/marketsReturns markets with filtering and pagination. Two pagination modes are supported: pass `cursor` (or `event_ticker` / `series_ticker`) for cursor pagination, otherwise classic `page`-based pagination is used.
Query parameters
categorystringqueryoptionalFilter by category slug.
searchstringqueryoptionalFull-text search over market titles.
statusstringqueryoptionalFilter by market status.
ACTIVECLOSEDRESOLVEDSUSPENDEDDRAFTevent_tickerstringqueryoptionalOnly markets in this event (switches to cursor mode).
series_tickerstringqueryoptionalOnly markets in this series (switches to cursor mode).
limitintegerqueryoptionaldefault: 20Page size. Max 100.
cursorstringqueryoptionalOpaque cursor (cursor mode).
pageintegerqueryoptionaldefault: 11-based page number (page mode).
Request
curl "https://api.majjha.com/api/markets"Response
{
"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",
"createdAt": "2026-06-04T09:00:00Z",
"updatedAt": "2026-06-04T09:03:00Z"
}
],
"total": 142,
"page": 1,
"totalPages": 8
}- →In cursor mode the response is `{ "cursor": string | null, "markets": [...] }` instead of the page envelope.
Get market
Public/api/markets/{ticker}Returns a single market by ticker (or internal id), including detail fields like category and trade counts.
Path parameters
tickerstringpathrequiredMarket ticker or internal id.
Request
curl "https://api.majjha.com/api/markets/{ticker}"Response
{
"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",
"trade_count": 318,
"position_count": 64,
"createdAt": "2026-06-04T09:00:00Z",
"updatedAt": "2026-06-04T09:03:00Z"
}
}Get market order book
Public/api/markets/{ticker}/orderbookReturns 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
tickerstringpathrequiredMarket ticker or internal id.
Request
curl "https://api.majjha.com/api/markets/{ticker}/orderbook"Response
{
"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 market trades
Public/api/markets/{ticker}/tradesReturns recent public trades (prints) for a single market, newest first.
Path parameters
tickerstringpathrequiredMarket ticker or internal id.
Query parameters
limitintegerqueryoptionaldefault: 50Max number of trades to return.
Request
curl "https://api.majjha.com/api/markets/{ticker}/trades"Response
{
"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 trades (exchange-wide)
Public/api/markets/tradesReturns a cursor-paginated, exchange-wide trade tape. Optionally filter by `ticker`. Useful for building a live ticker or backfilling price history.
Query parameters
tickerstringqueryoptionalRestrict the tape to a single market ticker.
limitintegerqueryoptionaldefault: 100Page size. Max 100.
cursorstringqueryoptionalOpaque cursor from the previous page.
Request
curl "https://api.majjha.com/api/markets/trades"Response
{
"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/api/markets/{ticker}/price-historyReturns a time series of YES-price ticks for charting a market.
Path parameters
tickerstringpathrequiredMarket ticker or internal id.
Query parameters
limitintegerqueryoptionaldefault: 500Max number of ticks, newest last.
Request
curl "https://api.majjha.com/api/markets/{ticker}/price-history"Response
{
"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/api/markets/{ticker}/analyzeReturns an AI-generated probability estimate and rationale for a market. Intended for research and UI surfacing — not financial advice.
Path parameters
tickerstringpathrequiredMarket ticker or internal id.
Request
curl "https://api.majjha.com/api/markets/{ticker}/analyze"Response
{
"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
}