Skip to main content

Up/Down Markets

GET /markets/updown
Both /markets/updown and /v1/markets/updown work — they share one handler and return the identical payload. The /v1/markets/updown alias is hidden from the OpenAPI schema (include_in_schema=False) but is a live, fully-functional route, so you can keep your /v1/... base path everywhere. The companion interval-discovery endpoint GET /v1/markets/updown/intervals is a regular versioned route.
Returns active up/down interval markets — short-term binary markets that resolve based on whether an asset’s price goes up or down within a specific time window.

Query Parameters

ParameterTypeDefaultDescription
assetstringallFilter by asset: BTC, ETH, SOL, XRP, SPX, NDX
intervalstringallFilter by interval: 5M, 15M, 1H, 4H, daily
limitint200Max results (1–500)
5M and 15M are subject to availability — see GET /v1/markets/updown/intervals to discover which intervals are currently active.

Request

# All active up/down markets
curl -H "X-API-Key: $API_KEY" \
  https://api.polysimulator.com/v1/markets/updown

# Filter by asset and interval
curl -H "X-API-Key: $API_KEY" \
  "https://api.polysimulator.com/v1/markets/updown?asset=BTC&interval=1H"
The un-versioned https://api.polysimulator.com/markets/updown form works identically if your existing code already uses it — same handler, same response.

Response

{
  "markets": [
    {
      "event_id": "evt_abc123",
      "condition_id": "0xabc123...",
      "slug": "btc-updown-1h-1770706800",
      "title": "BTC 1H Up/Down — March 15",
      "description": "Will BTC go up or down in the next hour?",
      "asset": "BTC",
      "interval": "1H",
      "time_range": "1:00 PM-2:00 PM ET",
      "date_display": "March 15",
      "start_date": "2026-03-15T13:00:00+00:00",
      "end_date": "2026-03-15T14:00:00Z",
      "active": true,
      "closed": false,
      "resolved": false,
      "tags": ["up-or-down", "bitcoin", "1h"],
      "markets": [
        {
          "id": "12345",
          "condition_id": "0xabc123...",
          "question": "Will Bitcoin go up or down in the next hour?",
          "outcomes": ["Up", "Down"],
          "outcome_prices": "[\"0.55\", \"0.45\"]",
          "token_ids": "71321045...,82432156..."
        }
      ],
      "live_price": {
        "buy": 0.55,
        "sell": 0.45,
        "updated_at": "2026-03-15T13:44:58Z"
      },
      "group_item_threshold": "98500.50",
      "image": "https://polymarket.com/images/btc.png",
      "icon": "https://polymarket.com/icons/btc.svg"
    }
  ],
  "grouped_by_asset": {
    "BTC": ["...(same shape as markets[])"],
    "ETH": ["..."]
  },
  "grouped_by_interval": {
    "1H": ["..."],
    "4H": ["..."]
  },
  "grouped_nested": {
    "BTC": { "1H": ["..."], "4H": ["..."] },
    "ETH": { "1H": ["..."] }
  },
  "total": 42,
  "interval_counts": { "5M": 0, "15M": 0, "1H": 12, "4H": 8, "daily": 6 },
  "asset_counts": { "BTC": 10, "ETH": 8, "SOL": 6 },
  "available_intervals": ["1H", "4H", "daily"],
  "available_assets": ["BTC", "ETH", "SOL", "XRP"],
  "crypto_prices": {
    "BTC": { "price": 98500.50, "change_24h": 2.3 },
    "ETH": { "price": 3850.25, "change_24h": -1.1 }
  },
  "timestamp": "2026-03-15T13:45:00Z",
  "cache_hit": true
}
FieldDescription
marketsArray of market entries (see fields below)
grouped_by_assetMarkets grouped by asset symbol (same shape as markets[])
grouped_by_intervalMarkets grouped by time interval
grouped_nestedMarkets nested by assetinterval
totalTotal number of markets returned
interval_countsCount of active markets per interval
asset_countsCount of active markets per asset
available_intervalsIntervals that have at least one active market
available_assetsAssets that have at least one active market
crypto_pricesCurrent reference prices for tracked assets
cache_hitWhether the result was served from cache

Market Entry Fields

FieldDescription
event_idPolymarket event ID
condition_idCondition ID of the first nested market
slugURL-safe slug for this market
titleDisplay title (e.g., “BTC 1H Up/Down — March 15”)
descriptionEvent description
assetAsset symbol: BTC, ETH, SOL, XRP, SPX, NDX
intervalTime interval: 5M, 15M, 1H, 4H, daily
start_dateCalculated interval start (ISO 8601)
end_dateResolution time (ISO 8601)
marketsNested array with condition_id, question, outcomes, outcome_prices (JSON string), token_ids
live_priceObject with buy, sell, updated_at — enriched from Redis in real time
group_item_thresholdStrike price parsed from the event title

Trading Up/Down Markets

Up/down markets work like any other market — use POST /v1/orders:
import requests, os

API_KEY = os.environ["POLYSIM_API_KEY"]
BASE = os.environ.get("POLYSIM_BASE_URL", "https://api.polysimulator.com")
HEADERS = {"X-API-Key": API_KEY, "Content-Type": "application/json"}

# 1. Find a BTC 1-hour market
updown = requests.get(
    f"{BASE}/v1/markets/updown",
    headers=HEADERS,
    params={"asset": "BTC", "interval": "1H"},
).json()

market = updown["markets"][0]
live = market.get("live_price", {})
print(f"{market['title']} — Up: {live.get('buy', 'N/A')}")

# 2. Buy "Up" if price is undervalued
#
# IMPORTANT: market orders require a ``price`` field (worst-price
# slippage cap, Polymarket-faithful). Without it, the API returns
# 400 ``Market orders require a 'price' field``.
#
# Also note: ``live_price.buy`` / ``live_price.sell`` are emitted as
# floats on ``/markets/updown`` — every other API surface uses string
# prices (see /concepts/string-numerics).
buy_price = float(live.get("buy", 1))
if buy_price < 0.45:
    # Worst-price BUY cap: 5% above live ask, hard-clamped at 0.99
    worst_buy = min(0.99, buy_price * 1.05)
    order = requests.post(
        f"{BASE}/v1/orders",
        headers=HEADERS,
        json={
            "market_id": market["condition_id"],
            "side": "BUY",
            "outcome": "Up",
            "quantity": "10",
            "order_type": "market",
            "price": str(worst_buy),  # Required — worst-price slippage cap
        },
    ).json()
    print(f"Order {order['order_id']}: {order['status']} @ {order['price']}")
Up/down markets have short lifespans (5 minutes to 24 hours). After expiry, prices may show invalid values (both outcomes at 100%). The API blocks BUY orders on expired markets but allows SELL orders for emergency position exit.

Next Steps