> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polynode.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# REST API

> REST endpoints for crypto market discovery, oracle candles, historical ticks, price-to-beat, and active short-form markets.

REST endpoints for crypto prediction market data. All endpoints require an API key.

## Authentication

Pass your API key via query parameter or header:

```bash theme={null}
# Query parameter
curl "https://api.polynode.dev/v1/crypto/markets?key=YOUR_API_KEY"

# Header
curl -H "x-api-key: YOUR_API_KEY" "https://api.polynode.dev/v1/crypto/markets"
```

***

## GET /v1/crypto/markets

All crypto prediction markets with liquidity, volume, and open interest.

**Cache:** 3 minutes

```bash theme={null}
curl "https://api.polynode.dev/v1/crypto/markets?key=YOUR_API_KEY"
```

<Expandable title="Response">
  ```json theme={null}
  {
    "events": [
      {
        "id": "238474",
        "slug": "what-price-will-bitcoin-hit-in-march-2026",
        "title": "What price will Bitcoin hit in March?",
        "startDate": "2026-03-01T05:20:27.791222Z",
        "endDate": "2026-04-01T04:00:00Z",
        "active": true,
        "volume": 88886711.74,
        "volume24hr": 5733750.73,
        "liquidity": 6074250.39,
        "openInterest": 12827944.10,
        "seriesSlug": "bitcoin-hit-price-monthly",
        "markets": [
          {
            "id": "1629442",
            "question": "$100,000?",
            "conditionId": "0x...",
            "outcomes": ["Yes", "No"],
            "outcomePrices": [0.045, 0.955],
            "volume": 24084104.74,
            "liquidity": 2028310.67,
            "active": true,
            "closed": false,
            "groupItemTitle": "↑ 150,000"
          }
        ]
      }
    ]
  }
  ```
</Expandable>

***

## GET /v1/crypto/candles

5-minute OHLC candles from PolyNode's live Chainlink tick archive. Returns \~2.5 hours of history (30 candles).

**Cache:** \~5 seconds

| Parameter | Required | Description                                                                                           |
| --------- | -------- | ----------------------------------------------------------------------------------------------------- |
| `symbol`  | Yes      | Asset symbol or feed name: `BTC`, `ETH`, `SOL`, `BNB`, `XRP`, `DOGE`, `HYPE`, or names like `BTC/USD` |

```bash theme={null}
curl "https://api.polynode.dev/v1/crypto/candles?symbol=BTC&key=YOUR_API_KEY"
```

<Note>
  REST candle symbols accept both bare asset symbols like `BTC` and feed names like `BTC/USD`. WebSocket Chainlink subscriptions use feed names such as `BTC/USD`.
</Note>

<Expandable title="Response">
  ```json theme={null}
  {
    "candles": [
      {
        "time": 1774665300,
        "open": 65954.03,
        "high": 65992.01,
        "low": 65947.14,
        "close": 65949.69
      }
    ]
  }
  ```
</Expandable>

***

## GET /v1/crypto/ticks

Historical 1-second ticks for the same crypto feeds available on the `price_feed` WebSocket stream. Use this to backfill a chart window before switching to live WebSocket updates.

**Range:** up to 24 hours per request

| Parameter | Required | Description                                                                |
| --------- | -------- | -------------------------------------------------------------------------- |
| `symbol`  | Yes      | Asset symbol: `BTC`, `ETH`, `SOL`, `BNB`, `XRP`, `DOGE`, `HYPE`            |
| `from`    | Yes      | Start of range as Unix milliseconds                                        |
| `to`      | Yes      | End of range as Unix milliseconds                                          |
| `limit`   | No       | Max ticks to return. Default 10000, max 100000                             |
| `source`  | No       | Optional source filter: `chainlink_data_streams` or `polymarket_chainlink` |

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.polynode.dev/v1/crypto/ticks?symbol=BTC&from=1780458961000&to=1780459082000&limit=5"
```

<Expandable title="Response">
  ```json theme={null}
  {
    "symbol": "BTC",
    "feed": "BTC/USD",
    "from": 1780458961000,
    "to": 1780459082000,
    "limit": 5,
    "count": 5,
    "truncated": true,
    "source": null,
    "ticks": [
      {
        "id": "1780458962000-0",
        "type": "price_feed",
        "feed": "BTC/USD",
        "timestamp": 1780458962,
        "timestamp_ms": 1780458962000,
        "source": "chainlink_data_streams",
        "data": {
          "feed": "BTC/USD",
          "price": 65869.02124677686,
          "bid": 65865.65936734258,
          "ask": 65870.4120597498,
          "timestamp": 1780458962
        }
      }
    ]
  }
  ```
</Expandable>

If `truncated` is `true`, request a narrower range or increase `limit`. BTC/USD can include more than one source for the same second; use the `source` parameter or deduplicate by `timestamp_ms` if your chart needs exactly one point per second.

***

## GET /v1/crypto/price

Open and close price for a specific crypto market window. Use this to get the "price to beat" for a short-form market.

**Cache:** 10 seconds

| Parameter  | Required | Description                                                     |
| ---------- | -------- | --------------------------------------------------------------- |
| `symbol`   | Yes      | Asset symbol: `BTC`, `ETH`, `SOL`, `BNB`, `XRP`, `DOGE`, `HYPE` |
| `window`   | Yes      | Unix epoch timestamp of the market window start                 |
| `interval` | No       | Market interval variant (e.g. `5m`, `15m`, `1h`, `4h`)          |

```bash theme={null}
curl "https://api.polynode.dev/v1/crypto/price?symbol=BTC&window=1774674000&key=YOUR_API_KEY"
```

<Expandable title="Response">
  ```json theme={null}
  {
    "openPrice": 66285.01,
    "closePrice": 66238.61,
    "timestamp": 1774674466843,
    "completed": false,
    "incomplete": true,
    "cached": false
  }
  ```
</Expandable>

The `openPrice` is the oracle price at market open. `closePrice` updates in real time until the window completes. `completed: true` means the market has resolved.

***

## GET /v1/crypto/active

Currently active 5-minute up-or-down markets for all 7 coins. Returns live market data with token IDs, outcomes, and current odds.

**Cache:** 30 seconds

```bash theme={null}
curl "https://api.polynode.dev/v1/crypto/active?key=YOUR_API_KEY"
```

<Expandable title="Response">
  ```json theme={null}
  {
    "markets": [
      {
        "id": "312746",
        "slug": "btc-updown-5m-1774674300",
        "title": "Bitcoin Up or Down - March 28, 1:05AM-1:10AM ET",
        "active": true,
        "closed": false,
        "startDate": "2026-03-27T05:16:04.211285Z",
        "endDate": "2026-03-28T05:10:00Z",
        "markets": [
          {
            "question": "Bitcoin Up or Down - March 28, 1:05AM-1:10AM ET",
            "conditionId": "0x...",
            "outcomes": "[\"Up\", \"Down\"]",
            "outcomePrices": [0.465, 0.535],
            "tokenId": "12345...",
            "active": true,
            "closed": false
          }
        ]
      }
    ],
    "count": 7,
    "windowStart": 1774674300
  }
  ```
</Expandable>

The `windowStart` field is the epoch timestamp of the current 5-minute window. New markets rotate every 5 minutes.

<Tip>
  Slug pattern is deterministic: `{coin}-updown-5m-{windowStart}`. You can compute the current window yourself with `Math.floor(Date.now() / 1000 / 300) * 300`. The SDK's `shortForm()` method handles this automatically with auto-rotation, enriched market data, and settlement streaming. See [Short-Form Markets](/sdks/short-form) for the interactive slug calculator and full reference.
</Tip>

***

## GET /v1/crypto/series

Recurring crypto market series (5m, 15m, 1h, 4h, daily, weekly, monthly patterns).

**Cache:** 5 minutes

```bash theme={null}
curl "https://api.polynode.dev/v1/crypto/series?key=YOUR_API_KEY"
```

<Expandable title="Response">
  ```json theme={null}
  {
    "series": [
      {
        "id": "10422",
        "slug": "xrp-up-or-down-15m",
        "title": "XRP Up or Down 15m",
        "recurrence": "15m",
        "active": true,
        "eventCount": null
      },
      {
        "id": "10065",
        "slug": "ethereum-neg-risk-weekly",
        "title": "Ethereum Neg Risk Weekly",
        "recurrence": "weekly",
        "active": true,
        "eventCount": null
      }
    ],
    "count": 7
  }
  ```
</Expandable>
