# Network Temperature

> One live level for how busy the Solana network is, the live SOL price, the method behind them, and the public endpoints.

Source: https://docs.constant-k.com/get-started/network-temperature/

Network Temperature reports how busy the Solana network is right now as one of three levels: Cool, Warm or Hot. This page covers the levels, the public endpoints and the method.

## Activity level

* One number for how busy the Solana network is right now: Cool (0), Warm (1), Hot (2).
* The level is live at [https://constant-k.com/network-temp/](https://constant-k.com/network-temp/) and in the bar at the top of every page.
* Users poll it to decide when to run their bots.

## API

| URL                                                    | Returns                                                                                                               | Cache    |
| :----------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------- | :------- |
| `https://constant-k.com/api/network-temp`              | `{"level": 0-2, "heat": %}` as JSON, e.g. `{"level":2,"heat":74}`                                                     | no-store |
| `https://constant-k.com/api/network-temp.json`         | level, label, heat %, per-region health, heat and measure (`src`), average slot time, epoch, updated time, stale flag | no-store |
| `https://constant-k.com/api/network-temp/history.json` | 72 hours of 1-minute points, each `[time, heat %, level]`                                                             | 30 s     |

No API key, no rate limit, CORS open. The level changes at most once a minute, so polling faster than every few seconds gains nothing.

```bash
curl -s https://constant-k.com/api/network-temp
curl -s https://constant-k.com/api/network-temp/history.json # 72 hours of 1-minute points
```

```bash
while true; do
  # the answer is JSON; jq .level picks the level
  if [ "$(curl -s https://constant-k.com/api/network-temp | jq .level)" = 2 ]; then
    ./bot
  fi
  sleep 5
done
```

The JSON endpoint answers with the current state. `spark` carries the last 6 hours of heat at 5-minute points for the bar's sparkline, truncated here:

```json
{
  "v": 1,
  "level": 2,
  "label": "Hot",
  "heat": 96,
  "regions": [
    { "id": "ny", "name": "New York", "health": "HEALTHY", "heat": 100, "src": "turbine-shreds" },
    { "id": "fra", "name": "Frankfurt", "health": "HEALTHY", "heat": 118, "src": "turbine-shreds" },
    { "id": "ams", "name": "Amsterdam", "health": "HEALTHY", "heat": 78, "src": "turbine-shreds" }
  ],
  "slot_ms": 214,
  "epoch": 1083,
  "epoch_pct": null,
  "updated": 1794353700,
  "stale": false,
  "spark": [95, 98, 102, 105, 107, 110]
}
```

```python title="network-temp.py"
import time
import requests

while True:
    d = requests.get("https://constant-k.com/api/network-temp", timeout=5).json()
    if d["level"] == 2:
        run_bot()
    time.sleep(5)
```

## Method

1. The signal is Solana block traffic: the block data each region's Solana node receives from the network, measured each minute in each of the 3 regions (Amsterdam, Frankfurt, New York). Today that is the shreds that arrive over Turbine; the measure is built to switch to Rotor when Solana's Alpenglow upgrade replaces Turbine. What constant-k sends to its users is not counted, so one user's large download does not move the level.
2. Each region is compared with its own last 3 days: its quiet level (the 5th percentile) and its hot level (the 99th percentile — the busiest \~43 minutes of the 3 days). Heat is where the current minute sits between quiet (0%) and hot (100%), capped at 120%. A percentile, not the single highest minute, so one freak spike does not set the bar.
3. Solana traffic grows and changes over time, so raw numbers drift. The 3-day scale moves with them, so heat is a level of activity, not a shred count.
4. The network heat is the median of the 3 region heats, so one region with bad data cannot move it. A region with no data, or with less than 24 hours of history, is left out; with 2 regions left, heat is their average.
5. Heat rises with the 10-minute average and falls with the 20-minute average, so it climbs quickly and cools at half that speed: `H = max(avg10, min(H_previous, avg20))`.
6. The baseline is refreshed every hour. The history graph uses the baseline that applied at each moment, so past points do not change.
7. If no data arrives, the API keeps the last level and the JSON shows `"stale": true`.

### Levels

| Level    | Heat          | Stays at this level until |
| :------- | :------------ | :------------------------ |
| Hot (2)  | 70% and above | it drops below 65%        |
| Warm (1) | 30% to 70%    | it drops below 27%        |
| Cool (0) | below 30%     | —                         |

The small gap between each level and its leaving point stops the level flickering at a boundary.

## SOL price

The bar and the Network Temperature page show the live SOL price in USDC, with a 24-hour chart.

* The price comes from constant-k's own Solana stream, not from an outside price service.
* It is taken from real SOL/USDC trades: the volume-weighted median of the trades in the last 5 seconds. Trades under 0.1 SOL are left out.
* A single trade more than 1% away from the current price is ignored. Three in a row are accepted, so a real jump comes through.
* If no trade arrives for 30 seconds, the price falls back to the median of the main public SOL/USDC pools.
* If no data arrives for 10 seconds, the JSON shows `"stale": true` and the price turns grey.

| URL                                                 | Returns                                                          | Cache    |
| :-------------------------------------------------- | :--------------------------------------------------------------- | :------- |
| `https://constant-k.com/api/sol-price`              | the SOL price in USDC, 2 decimals, as plain text                 | no-store |
| `https://constant-k.com/api/sol-price.json`         | price, fallback pool prices, slot, updated time (ms), stale flag | no-store |
| `https://constant-k.com/api/sol-price/history.json` | 24 hours of 1-minute points, each `[time, price]`                | 30 s     |

```bash
curl -s https://constant-k.com/api/sol-price
```

## Region health

The bar shows each region's health with the same check as the status page, [https://constant-k.com/rpc-status/](https://constant-k.com/rpc-status/): Healthy, Degraded (more than 10 slots behind), Unhealthy, Offline. It is not the benchmark result.

## Limits

* The level reflects Solana block traffic as constant-k's nodes receive it: how busy the network is, not what any one user does.
* A lasting change in how Solana builds or sends blocks can move it until the 3-day window catches up.
* It is a guide for timing, not a guarantee of landing or fees.
