> ## 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.

# Aggregates sum over all campaigns; `claims` is paged by `limit` / `offset`.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/campaigns/account
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
  - name: Campaigns
    description: On-chain reward campaign endpoints
paths:
  /api/v1/campaigns/account:
    get:
      tags:
        - Campaigns
      summary: >-
        Aggregates sum over all campaigns; `claims` is paged by `limit` /
        `offset`.
      operationId: handle_account
      parameters:
        - name: account
          in: query
          description: >-
            User wallet address. `user=` is accepted as an alias for parity with
            sibling endpoints.
          required: true
          schema:
            type: string
          example: '0xb8a5788314451ce4d2fbbad32e1bad88d4184b73943b7fe5166eab93cf1a5a95'
        - name: pagination
          in: query
          required: true
          schema:
            type: object
            properties:
              limit:
                type: integer
                format: int32
                description: Maximum number of items to return per page (capped at 1000)
                maximum: 1000
                minimum: 0
              offset:
                type: integer
                format: int32
                description: >-
                  Number of items to skip before returning results (capped at
                  10000)
                maximum: 10000
                minimum: 0
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 10
            maximum: 200
            minimum: 0
          example: 100
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            maximum: 10000
            minimum: 0
          example: 0
      responses:
        '200':
          description: Per-user campaign state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserCampaigns'
        '400':
          description: Invalid address
        '500':
          description: Database error
components:
  schemas:
    UserCampaigns:
      type: object
      description: >-
        `ready_to_claim` excludes claims outside their claim window at fetch
        time.
      required:
        - lifetime_earned
        - ready_to_claim
        - total_claimed
        - breakdown_by_type
        - claims
        - total_claims
        - year_to_date
        - weekly_wow_bps
        - weekly_breakdown
      properties:
        breakdown_by_type:
          type: array
          items:
            $ref: '#/components/schemas/TypeBreakdown'
        claims:
          type: array
          items:
            $ref: '#/components/schemas/UserClaim'
        lifetime_earned:
          type: integer
          format: int64
          minimum: 0
        ready_to_claim:
          type: integer
          format: int64
          minimum: 0
        total_claimed:
          type: integer
          format: int64
          minimum: 0
        total_claims:
          type: integer
          format: int32
          description: Pre-pagination count of `claims`.
          minimum: 0
        weekly_breakdown:
          type: array
          items:
            $ref: '#/components/schemas/WeeklyEarning'
        weekly_wow_bps:
          type: integer
          format: int32
          description: >-
            Cumulative WoW: this_week_claims / (total_claimed −
            this_week_claims), in bps.

            Saturates at u32::MAX. 0 when prior cumulative is zero.
          minimum: 0
        year_to_date:
          type: integer
          format: int64
          minimum: 0
    TypeBreakdown:
      type: object
      required:
        - campaign_type
        - lifetime_earned
        - ready_to_claim
        - total_claimed
      properties:
        campaign_type:
          $ref: '#/components/schemas/CampaignType'
        lifetime_earned:
          type: integer
          format: int64
          minimum: 0
        ready_to_claim:
          type: integer
          format: int64
          minimum: 0
        total_claimed:
          type: integer
          format: int64
          minimum: 0
    UserClaim:
      type: object
      description: >-
        Metadata fields are inlined (not flattened) so utoipa generates a flat
        schema

        that matches the wire format.
      required:
        - campaign_id
        - campaign_type
        - status
        - title
        - reward_asset
        - start_ts_sec
        - end_ts_sec
        - claim_start_ts_sec
        - claim_end_ts_sec
        - total_funded
        - has_allocation
        - claimable_amount
        - claimed_amount
        - ready_to_claim
      properties:
        campaign_id:
          type: integer
          format: int64
          minimum: 0
        campaign_type:
          $ref: '#/components/schemas/CampaignType'
        claim_end_ts_sec:
          type: integer
          format: int64
          minimum: 0
        claim_start_ts_sec:
          type: integer
          format: int64
          minimum: 0
        claim_tx_hash:
          type:
            - string
            - 'null'
          description: Tx hash from the same argMax row as `claimed_at_ts_sec`.
        claimable_amount:
          type: integer
          format: int64
          minimum: 0
        claimed_amount:
          type: integer
          format: int64
          minimum: 0
        claimed_at_ts_sec:
          type:
            - integer
            - 'null'
          format: int64
          description: Latest claim's timestamp (argMax by event_uid).
          minimum: 0
        description:
          type:
            - string
            - 'null'
        end_ts_sec:
          type: integer
          format: int64
          minimum: 0
        has_allocation:
          type: boolean
        ready_to_claim:
          type: integer
          format: int64
          minimum: 0
        reward_asset:
          type: string
        start_ts_sec:
          type: integer
          format: int64
          minimum: 0
        status:
          $ref: '#/components/schemas/CampaignStatus'
        title:
          type: string
        total_funded:
          type: integer
          format: int64
          minimum: 0
    WeeklyEarning:
      type: object
      required:
        - week_start_ts_sec
        - reward_amount
      properties:
        reward_amount:
          type: integer
          format: int64
          description: Units follow the campaign's `reward_asset`.
          minimum: 0
        week_start_ts_sec:
          type: integer
          format: int64
          minimum: 0
    CampaignType:
      type: string
      description: u8 mapping mirrors `campaign_manager.move::campaign_type_to_u8`.
      enum:
        - fee_rebate
        - maker_incentive
        - liquidation_rebate
        - volume_milestone
        - first_funded_trial
    CampaignStatus:
      type: string
      description: >-
        Wire form: lowercase string in `campaign_status_updates.new_status`.
        Empty row →

        `Draft` (synthesized read-side, never written).
      enum:
        - draft
        - funded
        - active
        - expired
        - reclaimed
        - cancelled
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````