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

# Get daily stats

> Returns daily volume, fees, revenue, and open interest for a given time range.
Designed for DefiLlama integration.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/daily_stats
openapi: 3.1.0
info:
  title: Decibel Trading API
  description: >-
    RESTful API for Decibel. Provides read-only endpoints for market data,
    trading operations, positions, and analytics.
  contact:
    name: Decibel Team
    url: https://decibel.trade/
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.mainnet.aptoslabs.com/decibel
    description: Mainnet
  - url: https://api.testnet.aptoslabs.com/decibel
    description: Testnet
security:
  - bearerAuth: []
tags:
  - name: Market Data
    description: Market information and real-time data endpoints
  - name: User
    description: User information and account management
  - name: Account
    description: Account-specific endpoints and data
  - name: Trades
    description: Trading operations and history
  - name: Positions
    description: User position management
  - name: Orders
    description: Order management and history
  - name: TWAP
    description: Time-weighted average price orders
  - name: Bulk Orders
    description: Bulk order management
  - name: Vaults
    description: Vault operations and management
  - name: Analytics
    description: Analytics and performance metrics
  - name: Points
    description: Points-related account metrics
  - name: Trading Points
    description: Trading points endpoints
  - name: Trading Hz
    description: Trading Hz endpoints
  - name: Tier
    description: Tier information endpoints
  - name: Streaks
    description: User streak tracking endpoints
  - name: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
  - name: Affiliates
    description: Affiliate code and earnings endpoints
paths:
  /api/v1/daily_stats:
    get:
      tags:
        - Analytics
      summary: Get daily stats
      description: >-
        Returns daily volume, fees, revenue, and open interest for a given time
        range.

        Designed for DefiLlama integration.
      operationId: handle_daily_stats
      parameters:
        - name: start_timestamp
          in: query
          description: Start of the time range (UNIX seconds)
          required: true
          schema:
            type: integer
            format: int64
            minimum: 0
        - name: end_timestamp
          in: query
          description: End of the time range (UNIX seconds)
          required: true
          schema:
            type: integer
            format: int64
            minimum: 0
      responses:
        '200':
          description: Daily stats retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailyStatsDto'
        '400':
          description: Invalid parameters
        '500':
          description: Database error
components:
  schemas:
    DailyStatsDto:
      type: object
      description: Daily statistics for DefiLlama integration
      required:
        - daily_volume
        - daily_fees
        - daily_revenue
        - open_interest
      properties:
        daily_fees:
          type: number
          format: double
          description: Total fees collected in USD
        daily_revenue:
          type: number
          format: double
          description: Net revenue (fees minus rebates) in USD
        daily_volume:
          type: number
          format: double
          description: Total trading volume in USD
        open_interest:
          type: number
          format: double
          description: Total open interest in USD
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````