Hydra
API Reference

Retrieve top geopolitical prediction markets.

GET /public/markets

Returns the top 20 geopolitical prediction markets by trading volume from Polymarket. These are real-money prediction markets relevant to defense, geopolitics, and international affairs.

Request

GET https://api.hydra.fast/public/markets

Headers: None required

Query Parameters: None

Response

Status: 200 OK

Content-Type: application/json

{
  "data": [
    {
      "conditionId": "0xabc123...",
      "question": "Will Russia and Ukraine reach a ceasefire by July 2026?",
      "outcomePrices": {
        "Yes": 0.23,
        "No": 0.77
      },
      "volume": 4250000,
      "endDate": "2026-07-01T00:00:00.000Z"
    },
    {
      "conditionId": "0xdef456...",
      "question": "Will China impose a naval blockade on Taiwan in 2026?",
      "outcomePrices": {
        "Yes": 0.04,
        "No": 0.96
      },
      "volume": 1800000,
      "endDate": "2026-12-31T00:00:00.000Z"
    }
  ]
}

Response Fields

Field Type Description
conditionId string Polymarket condition identifier
question string Market question text
outcomePrices object Outcome name to price (probability) mapping, 0.0–1.0
volume number Total trading volume in USD
endDate string ISO 8601 market resolution date

Code Examples

cURL

curl https://api.hydra.fast/public/markets

JavaScript (fetch)

const response = await fetch('https://api.hydra.fast/public/markets');
const { data } = await response.json();

data.forEach(market => {
  const yesPrice = market.outcomePrices['Yes'];
  const pct = (yesPrice * 100).toFixed(1);
  const vol = (market.volume / 1_000_000).toFixed(1);
  console.log(`${market.question}`);
  console.log(`  Yes: ${pct}% | Volume: ${vol}M`);
});

Python (requests)

import requests

response = requests.get("https://api.hydra.fast/public/markets")
markets = response.json()["data"]

for market in markets:
    yes_price = market["outcomePrices"].get("Yes", 0)
    volume_m = market["volume"] / 1_000_000
    print(f"{market['question']}")
    print(f"  Yes: {yes_price:.1%} | Volume: ${volume_m:.1f}M")

Track price changes over time

const history = new Map();

async function trackMarkets() {
  const response = await fetch('https://api.hydra.fast/public/markets');
  const { data } = await response.json();

  data.forEach(market => {
    const prev = history.get(market.conditionId);
    const current = market.outcomePrices['Yes'];

    if (prev !== undefined && Math.abs(current - prev) > 0.02) {
      const direction = current > prev ? 'UP' : 'DOWN';
      const delta = ((current - prev) * 100).toFixed(1);
      console.log(`[${direction}] ${market.question} (${delta > 0 ? '+' : ''}${delta}pp)`);
    }

    history.set(market.conditionId, current);
  });
}

// Poll every 5 minutes
setInterval(trackMarkets, 5 * 60 * 1000);
trackMarkets();

Notes

  • Returns the top 20 markets sorted by trading volume
  • Markets are sourced from Polymarket via 15-minute polling
  • Price values represent implied probabilities (0.0 = 0%, 1.0 = 100%)
  • For real-time market updates and signal correlations, use the WebSocket Stream