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

# getNetworkBars

> Returns a network's stats for each hour or UTC day in a time range, for charts. getNetworkBars query reference: arguments and response fields.

`getNetworkBars` returns one network's activity as a time series, one bar per hour or per UTC day. Use it to chart how a chain's volume, trades, traders, new tokens, liquidity and stablecoin supply change over time. For a single "right now" snapshot across many networks, use [`filterNetworks`](https://docs.codex.io/api-reference/queries/filternetworks) instead.

## Use this data for

* **Network charts.** Plot daily volume, trades or active traders for a chain on a dashboard or network page.
* **Comparing chains over time.** Call it once per network with the same range and resolution, and line the bars up by `timestamp`.
* **Growth tracking.** Follow `tokensCreated`, `traders` and `stablecoinSupplyUsd` day by day to see whether a chain is gaining or losing activity.

## GraphQL

```
type Query {
  getNetworkBars(
    input: NetworkBarsInput!
  ): NetworkBarsResponse!
}

enum NetworkBarsResolution {
  hour1
  day1
}

type NetworkBar {
  timestamp: Int!
  volumeUsd: String!
  swaps: Int!
  chainTransactions: Int
  trades: Int
  tokensCreated: Int
  traders: Int
  traders24h: Int
  tokensTraded: Int
  tokensTraded24h: Int
  tokensGraduated: Int
  tokenSurvivalRate24h: Float
  liquidityUsd: String!
  stablecoinSupplyUsd: String
}

type NetworkBarsResponse {
  networkId: Int!
  resolution: NetworkBarsResolution!
  bars: [NetworkBar!]!
}

input NetworkBarsInput {
  networkId: Int!
  resolution: NetworkBarsResolution!
  from: Int!
  to: Int!
}
```

### Example

[Test this query in the Explorer →](https://docs.codex.io/explore.md)

Daily bars for Solana on November 7 and 8, 2026:

```graphql theme={null}
{
  getNetworkBars(
    input: {
      networkId: 1399811149
      resolution: day1
      from: 1794009600
      to: 1794182399
    }
  ) {
    networkId
    resolution
    bars {
      timestamp
      volumeUsd
      swaps
      trades
      traders
      traders24h
      tokensTraded
      tokensCreated
      chainTransactions
      liquidityUsd
      stablecoinSupplyUsd
    }
  }
}
```

### Usage Guidelines

* `resolution` is `hour1` or `day1`. Daily bars follow UTC days.
* One request can cover at most 200 bars (about 8 days of `hour1` bars, or 200 days of `day1` bars). A wider range returns an `OUT_OF_RANGE` error. Page through longer ranges with several requests.
* `timestamp` is the start of the bar. A bar is returned only after its hour or day has closed, so the current hour or day is not included.
* History starts in November 2026: the first `hour1` bar is 2026-11-06 19:00 UTC and the first `day1` bar is 2026-11-07. Earlier ranges return no bars for that period.
* An hour or day with no recorded data has no bar, so do not assume bars are evenly spaced. An unknown `networkId` returns an empty `bars` list, not an error.
* `swaps` counts each pool a trade touches, so a trade routed through two pools is two swaps. `trades` counts that trade once. Use `trades` for "number of trades" charts.
* `traders24h` and `tokensTraded24h` are rolling 24-hour counts ending at the bar's close. On `day1` bars they match `traders` and `tokensTraded`.
* Nullable fields are null when Codex could not count that stat for the whole bar. `traders` and `tokensTraded` are null on bars before 2026-11-07 21:00 UTC (hourly) and 2026-11-07 (daily).
* `volumeUsd`, `liquidityUsd` and `stablecoinSupplyUsd` are strings. Parse them as decimals.
* See the full list of network IDs on [Networks](https://docs.codex.io/networks.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.