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

# Time-bucketed analytics

> Returns volume, fills, fees and unique traders aggregated into time intervals (`1h`, `4h`, `1d`). Backed by a pre-aggregated materialized view for constant-time performance regardless of fill volume.

When filtering by multiple coins (e.g. `coin=10,11`) or by `outcome_id`, the response includes a `coin` field on each bucket so YES vs NO sides come back as separate rows: ready for stacked charts.



## OpenAPI

````yaml /api-reference/openapi-hip4.json get /hip4/analytics
openapi: 3.0.3
info:
  title: 'Hypedexer API: HIP-4 Prediction Markets'
  version: 1.0.0
  description: >-
    API to query indexed HIP-4 prediction market data on Hyperliquid.


    HIP-4 introduces on-chain prediction markets (outcome trading). This API
    indexes:

    - **Outcomes**: Prediction market outcome definitions with Yes/No sides,
    volume stats, and question linkage

    - **Questions**: Groups of related outcomes (e.g. "What will Hypurr eat?" →
    Akami, Otoro, Canned Tuna)

    - **Fills**: All executed trades on prediction markets (`#` coins) and
    outcome spot tokens (`@` coins)

    - **Providers**: Per-provider trading stats for permissionless venues (plus
    the legacy `oracle`)

    - **Deployers**: The permissionless deployer registry (venues, fee scales,
    delegations)

    - **Fees**: Aggregated fee breakdown per user, coin, and day

    - **Settlements**: Market resolution events

    - **Outcome Tokens**: Spot token metadata for tradeable outcome assets

    - **Fee Scales**: Governance events for global outcome fee configuration

    - **User Actions**: On-chain user actions (Split, Merge, Negate outcomes)


    > 


    ### Permissionless providers

    Since the permissionless-HIP4 network upgrade (2026-08-29), prediction
    markets can be deployed by third-party providers (a deployer address
    operating a named venue), not only by the Hyperliquid oracle. The API
    attributes every market, question and fill to its provider. Markets with no
    on-chain venue (pre-upgrade markets, and markets still emitted by the HL
    oracle pipeline) are reported under the reserved provider name `oracle` in
    aggregates: see [Permissionless providers and the oracle
    convention](/hip-4/overview#permissionless-providers-and-the-oracle-convention).


    ### Fee behavior

    - `#` prediction market fills currently have `fee = 0` (the
    `SetOutcomeFeeScale` governance action has not been activated)

    - `@` outcome token fills (spot) are charged normal spot fees (taker/maker
    rates)

    - `fee_usdc` is the fee normalized to USD equivalent


    ### Pagination

    All list endpoints support `limit` (default 100, max 10000;
    `/hip4/providers` and `/hip4/deployers`: max 1000) and `offset` (default 0).


    ### Time filters

    - `start` / `end` on fills: epoch **milliseconds**

    - `start` / `end` on `/hip4/providers`: **ISO datetime**

    - `start` / `end` on other endpoints: epoch **milliseconds**
servers:
  - url: https://api.hypedexer.com
    description: Mainnet
security:
  - X-API-Key: []
tags:
  - name: Analytics
    description: Time-bucketed prediction market analytics (volume, fills, fees, traders).
  - name: Providers
    description: Per-provider trading stats (permissionless venues + the legacy `oracle`).
  - name: Deployers
    description: Permissionless deployer registry (venues, fee scales, delegations).
  - name: Outcomes
    description: Prediction market outcome definitions and metadata.
  - name: Questions
    description: Prediction questions grouping multiple outcomes.
  - name: Fills
    description: Prediction market and outcome token fills.
  - name: Fees
    description: Aggregated fee analytics.
  - name: Settlements
    description: Market resolution events.
  - name: Outcome Tokens
    description: Spot token metadata for outcome assets.
  - name: Fee Scales
    description: Governance fee scale events.
  - name: User Actions
    description: On-chain user outcome actions.
paths:
  /hip4/analytics:
    get:
      tags:
        - Analytics
      summary: Time-bucketed analytics
      description: >-
        Returns volume, fills, fees and unique traders aggregated into time
        intervals (`1h`, `4h`, `1d`). Backed by a pre-aggregated materialized
        view for constant-time performance regardless of fill volume.


        When filtering by multiple coins (e.g. `coin=10,11`) or by `outcome_id`,
        the response includes a `coin` field on each bucket so YES vs NO sides
        come back as separate rows: ready for stacked charts.
      operationId: getAnalytics
      parameters:
        - name: interval
          in: query
          description: Bucket size
          schema:
            type: string
            enum:
              - 1h
              - 4h
              - 1d
            default: 1h
        - name: coin
          in: query
          description: >-
            Accepts a single coin ID or multiple comma-separated IDs for
            side-by-side comparison (e.g. `10` for one side, `10,11` for YES vs
            NO). The `#` prefix is optional.
          schema:
            type: string
        - name: outcome_id
          in: query
          description: Filter by outcome_id (auto-splits by coin in response)
          schema:
            type: integer
        - name: start
          in: query
          description: Start time (ISO datetime)
          schema:
            type: string
            format: date-time
        - name: end
          in: query
          description: End time (ISO datetime)
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          description: Max buckets returned
          schema:
            type: integer
            default: 168
            maximum: 2000
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - live
                      - not_yet_live
                  count:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsBucket'
              example:
                status: live
                count: 2
                data:
                  - bucket: '2026-05-03T12:00:00'
                    fills: 2580
                    volume: 159082
                    buy_volume: 121626
                    sell_volume: 37456
                    fees_usdc: 0.0324
                    unique_users: 204
                  - bucket: '2026-05-03T11:00:00'
                    fills: 1318
                    volume: 85035
                    buy_volume: 56899
                    sell_volume: 28137
                    fees_usdc: 0.4729
                    unique_users: 184
components:
  schemas:
    AnalyticsBucket:
      type: object
      properties:
        bucket:
          type: string
          description: Start of the time interval (ISO datetime)
        coin:
          type: string
          description: >-
            Only present when splitting by coin (multi-coin filter or
            `outcome_id`)
        fills:
          type: integer
          description: Number of fills in this bucket
        volume:
          type: number
          description: Total notional volume (sum of px × sz)
        buy_volume:
          type: number
          description: Notional volume on the buy side
        sell_volume:
          type: number
          description: Notional volume on the sell side
        fees_usdc:
          type: number
          description: Total fees in USD
        unique_users:
          type: integer
          description: Distinct traders in this bucket
  securitySchemes:
    X-API-Key:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Include in every request header as `X-API-Key: <your_key>`.'

````

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