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

# Get Protocol Analytics

> Get protocol-wide metrics and analytics

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.strike.markets/analytics"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.strike.markets/analytics');
  const analytics = await response.json();

  console.log('Protocol metrics:', analytics);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get('https://api.strike.markets/analytics')
  analytics = response.json()

  print('Protocol metrics:', analytics)
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "totalVolume": "157500000.50",
    "totalFees": "315000.75",
    "treasuryBalance": "2847650.25",
    "activeUsers": 1247,
    "totalPositions": 3891
  }
  ```
</ResponseExample>

## Overview

Get comprehensive protocol-wide analytics and metrics for Strike Protocol. This endpoint provides key performance indicators, financial metrics, and user activity statistics that give insight into the overall health and growth of the protocol.

<Note>
  This endpoint does NOT require authentication and provides public protocol analytics for transparency and research purposes.
</Note>

## Response Fields

<ResponseField name="totalVolume" type="string">
  Cumulative trading volume across all markets since protocol inception (USD)
</ResponseField>

<ResponseField name="totalFees" type="string">
  Total trading fees collected by the protocol (USD)
</ResponseField>

<ResponseField name="treasuryBalance" type="string">
  Current protocol treasury balance available for payouts and operations (USD)
</ResponseField>

<ResponseField name="activeUsers" type="integer">
  Number of unique wallet addresses that have traded in the last 30 days
</ResponseField>

<ResponseField name="totalPositions" type="integer">
  Total number of positions ever created on the protocol (open + closed + settled)
</ResponseField>

## Metrics Explained

### Trading Volume

* **Definition**: Cumulative USD value of all positions opened
* **Calculation**: Sum of all position sizes across all markets and time periods
* **Significance**: Indicates overall protocol activity and adoption
* **Growth**: Higher volume suggests increasing usage and liquidity

### Fee Revenue

* **Definition**: Total fees collected from trading operations
* **Sources**: Position opening fees, closing fees, dynamic fees
* **Protocol share**: Fees fund treasury, development, and rewards
* **Sustainability**: Fee revenue indicates protocol's economic viability

### Treasury Balance

* **Definition**: Current funds available for position payouts
* **Purpose**: Ensures immediate settlement of winning positions
* **Management**: Automatically managed through fee collection and payouts
* **Health indicator**: Higher balance = better ability to handle large payouts

### Active Users

* **Time window**: Users who traded within last 30 days
* **Metric**: Unique wallet addresses with at least one position
* **Engagement**: Indicates current user retention and activity
* **Growth trends**: Rising active users suggests healthy adoption

### Position Count

* **Scope**: All positions created since protocol launch
* **Categories**: Includes open, closed, liquidated, and settled positions
* **Activity measure**: Higher count indicates more trading activity
* **Historical data**: Shows protocol usage trends over time

## Error Responses

<ResponseField name="503 Service Unavailable" type="object">
  Analytics service temporarily unavailable

  ```json theme={null}
  {
    "error": 503,
    "message": "Analytics service temporarily unavailable"
  }
  ```
</ResponseField>

## Related Endpoints

* **[Get Markets](/api-reference/market-data/markets)** - Market-specific data that contributes to protocol metrics
* **[Health Check](/api-reference/health/status)** - Technical health status of the API
* **[Get Positions](/api-reference/positions/get-positions)** - Individual positions that create protocol volume
* **[Dashboard](/api-reference/account/dashboard)** - User-level analytics and data

<Tip>
  Protocol analytics provide valuable insights into overall system health and growth. Use these metrics to understand trends, identify opportunities, and monitor the protocol's evolution over time.
</Tip>

<Info>
  Analytics data is updated continuously as users trade and interact with the protocol. Metrics may have slight delays due to data aggregation and processing requirements.
</Info>


## OpenAPI

````yaml GET /analytics
openapi: 3.1.0
info:
  title: Strike Protocol API
  description: >-
    Strike Protocol is a perpetual futures trading platform that allows users to
    trade with leverage (1-1000x) on various crypto assets. This API provides
    access to trading operations, account management, market data, analytics,
    and user systems.
  version: 1.0.0
  contact:
    name: Strike Protocol
    url: https://strike.markets
  license:
    name: MIT
servers:
  - url: https://api.strike.markets
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /analytics:
    get:
      summary: Get Protocol Analytics
      description: Get protocol-wide metrics and analytics
      operationId: getAnalytics
      responses:
        '200':
          description: Analytics retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProtocolMetricsResponse'
      security: []
components:
  schemas:
    ProtocolMetricsResponse:
      type: object
      properties:
        totalVolume:
          type: string
        totalFees:
          type: string
        treasuryBalance:
          type: string
        activeUsers:
          type: integer
        totalPositions:
          type: integer
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Strike Protocol API key authentication

````