DeveloperMarkets API

Markets API


GET /api/markets

Returns all markets, optionally filtered.

Query parameters:

ParameterTypeDescription
catstringFilter by category: crypto, soccer, etc.
leaguestringFilter by league: Bags.fm, etc.
statusstringFilter by status: active, resolved

Response:

[
  {
    "id": "bags-a1b2c3d4",
    "q": "Will $DFLASH graduate to DAMM v2 within 24 hours?",
    "cat": "crypto",
    "league": "Bags.fm",
    "yes": 35,
    "no": 65,
    "vol": "0",
    "traders": 0,
    "closes": "Jun 1, 2026",
    "closes_at": "2026-06-01T12:00:00Z",
    "status": "active",
    "source": "bags",
    "resolution_rule": "..."
  }
]

GET /api/markets/:id

Returns a single market by ID.

Path parameters:

ParameterDescription
:idMarket ID (e.g. bags-a1b2c3d4 or fees-e5f6g7h8)

Response: Same shape as individual item in /api/markets.


GET /api/markets/:id/history

Returns OHLCV price history for the market chart.

Query parameters:

ParameterTypeDefaultDescription
rangestring24HTime range: 1H, 6H, 24H, 7D, All

Response:

{
  "marketId": "bags-a1b2c3d4",
  "range": "24H",
  "points": [
    {
      "bucketAt": "2026-06-01T10:00:00Z",
      "openYesPrice": 48.2,
      "highYesPrice": 52.1,
      "lowYesPrice": 47.8,
      "closeYesPrice": 51.0,
      "openNoPrice": 51.8,
      "highNoPrice": 52.2,
      "lowNoPrice": 47.9,
      "closeNoPrice": 49.0,
      "volume": 145.50,
      "trades": 12
    }
  ]
}

Each point represents a 5-minute OHLCV candle.


POST /api/orders/quote

Get a trade quote without placing an order. No authentication required.

Request body:

{
  "marketId": "bags-a1b2c3d4",
  "side": "YES",
  "amount": 50
}

Response:

{
  "shares": 89.23,
  "fee": 0.25,
  "feeRate": 0.5,
  "avgPriceCents": 56.04,
  "startPriceCents": 55.0,
  "newYesPriceCents": 57.1,
  "newNoPriceCents": 42.9,
  "slippageBps": 189
}
FieldDescription
sharesNumber of shares you’d receive
feeFee amount in trade currency
feeRateFee rate as a decimal
avgPriceCentsAverage fill price (¢)
startPriceCentsPrice before your order
newYesPriceCentsYES price after your order
slippageBpsSlippage in basis points