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

# Developer earnings summary

> Success-fee totals from recorded weekly payouts (`totals`, `byAgent`, `byPeriod`), plus subscription ledger (`fromSubscriptions`) and claimable balances (`fromTrading.claimableUsd`, `totalClaimableUsd`). Requires developer registration.



## OpenAPI

````yaml https://mcp.echozero.app/api/docs-json get /api/v1/developers/earnings
openapi: 3.0.0
info:
  title: EchoZero MCP API
  description: >-
    EchoZero MCP Server - Developer API for agent management, trading,
    marketplace, and AI chat.


    **Rate Limiting:** All endpoints enforce per-API-key rate limits. Tiers:
    free (60 req/min), standard (300 req/min), premium (1000 req/min). Every
    response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`,
    `X-RateLimit-Reset` headers. Exceeding the limit returns `429 Too Many
    Requests` with a `Retry-After` header.
  version: '1.0'
  contact: {}
servers:
  - url: https://mcp.echozero.app
    description: Production
security: []
tags:
  - name: MCP Protocol
    description: >-
      Model Context Protocol (Streamable HTTP): `/mcp`, `/mcp/sse` — not under
      `/api`; same API key as REST
  - name: Health
    description: Server health check
  - name: API Keys
    description: API key generation, listing, and revocation
  - name: User
    description: >-
      User profile, sessions, social, onboarding, internal agent subscriptions,
      and bot activations (v1: /v1/users/me)
  - name: Token
    description: Token data and trending
  - name: Trade
    description: Trade execution and history
  - name: Strategy
    description: Strategy (trading bot) configuration and control
  - name: Agent
    description: Agent registration and management
  - name: AI
    description: AI chat, intent, and insights
  - name: Wallet
    description: Wallet operations, deposits, and withdrawals
  - name: Notification
    description: Notification management and settings
  - name: Auth
    description: >-
      Public authentication: signup / login lookup, code verification, Google
      OAuth, refresh, and sign-out. Returns `accessToken` / `refreshToken` in
      the JSON body.
  - name: OAuth
    description: >-
      OAuth 2.1 authorization-code + PKCE for AI assistant clients:
      `/oauth/authorize`, `/oauth/token`, `/oauth/introspect`, `/status`.
  - name: Activity
    description: User trade activity list and search
  - name: Feed
    description: Social activity feed timeline
  - name: Earn
    description: Leaderboard, rewards, and referrals
  - name: Statics
    description: Countries, languages, and static data
  - name: Misc
    description: File uploads and utility endpoints
  - name: Developer
    description: Developer registration and profile
  - name: Developer dashboard
    description: >-
      Per-agent dashboard: subscribers (anonymized), performance detail, signal
      history (v1)
  - name: Developer Agent
    description: Developer agent listings and management
  - name: Developer Agents (Marketplace)
    description: Public browse, search, and subscribe to external developer-listed agents
  - name: Admin
    description: Admin-only endpoints for review, approval, and platform management
  - name: Webhooks
    description: >-
      Inbound provider webhooks (no API key). Telegram signal-bot uses
      `X-Telegram-Bot-Api-Secret-Token` when configured.
paths:
  /api/v1/developers/earnings:
    get:
      tags:
        - Developer
      summary: Developer earnings summary
      description: >-
        Success-fee totals from recorded weekly payouts (`totals`, `byAgent`,
        `byPeriod`), plus subscription ledger (`fromSubscriptions`) and
        claimable balances (`fromTrading.claimableUsd`, `totalClaimableUsd`).
        Requires developer registration.
      operationId: DeveloperRevenueController_earnings
      parameters:
        - name: x-signature
          in: header
          required: false
          description: >-
            HMAC-SHA256 signature: HMAC-SHA256(secretKey, timestamp + METHOD +
            path + body). Optional -- when omitted, HMAC verification is
            skipped.
          schema:
            type: string
        - name: x-timestamp
          in: header
          required: false
          description: >-
            Request timestamp in epoch milliseconds. Required when x-signature
            is provided. Rejected if drift exceeds 5 minutes.
          schema:
            type: string
      responses:
        '200':
          description: Earnings summary.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/McpSuccessResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/DeveloperEarningsResponseDto'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpErrorResponseDto'
        '404':
          description: Not registered as a developer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpErrorResponseDto'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpErrorResponseDto'
      security:
        - bearer-jwt: []
        - api-key: []
components:
  schemas:
    McpSuccessResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          description: Endpoint-specific payload
          additionalProperties: true
      required:
        - success
        - data
    DeveloperEarningsResponseDto:
      type: object
      properties:
        developerId:
          type: string
        totals:
          $ref: '#/components/schemas/DeveloperEarningsTotalsDto'
        byAgent:
          type: array
          items:
            $ref: '#/components/schemas/DeveloperEarningsByAgentDto'
        byPeriod:
          type: array
          items:
            $ref: '#/components/schemas/DeveloperEarningsByPeriodDto'
        fromTrading:
          description: Success-fee marketplace revenue from recorded weekly payouts.
          allOf:
            - $ref: '#/components/schemas/DeveloperEarningsTotalsDto'
        fromSubscriptions:
          description: >-
            Stripe subscription ledger: earned totals (CLAIMED + CLAIMABLE +
            PENDING_CONVERSION) and CLAIMABLE creator pool.
          allOf:
            - $ref: '#/components/schemas/DeveloperEarningsSubscriptionSliceDto'
        totalClaimableUsd:
          type: number
          description: >-
            Trading success-fee claimable plus subscription CLAIMABLE creator
            balance.
        lifetimeClaimedUsd:
          type: number
          description: >-
            Lifetime instant-claim payouts (success fees via SOL + subscription
            ledger marked CLAIMED).
        fromInstantClaims:
          type: object
          description: Breakdown of instant claims already withdrawn.
        totalClaimable:
          type: number
          description: >-
            Deprecated alias of `totalClaimableUsd` (trading + subscription
            claimable).
          deprecated: true
      required:
        - developerId
        - totals
        - byAgent
        - byPeriod
        - fromTrading
        - fromSubscriptions
        - totalClaimableUsd
        - lifetimeClaimedUsd
        - fromInstantClaims
        - totalClaimable
    McpErrorResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/McpErrorBodyDto'
      required:
        - success
        - error
    DeveloperEarningsTotalsDto:
      type: object
      properties:
        grossUsd:
          type: number
        netUsd:
          type: number
        platformFeeUsd:
          type: number
        claimableUsd:
          type: number
          description: >-
            Outstanding success-fee balance not yet paid out (trading /
            marketplace fees).
      required:
        - grossUsd
        - netUsd
        - platformFeeUsd
    DeveloperEarningsByAgentDto:
      type: object
      properties:
        developerAgentId:
          type: string
        agentName:
          type: string
          description: Agent display name (includes soft-deleted agents).
        agentStatus:
          type: string
          enum:
            - DRAFT
            - ACTIVE
            - PAUSED
            - DELETED
          description: Agent lifecycle status at read time.
        grossUsd:
          type: number
        netUsd:
          type: number
        platformFeeUsd:
          type: number
      required:
        - developerAgentId
        - grossUsd
        - netUsd
        - platformFeeUsd
    DeveloperEarningsByPeriodDto:
      type: object
      properties:
        periodLabel:
          type: string
        periodIsoYear:
          type: number
        periodIsoWeek:
          type: number
        grossUsd:
          type: number
        netUsd:
          type: number
        platformFeeUsd:
          type: number
      required:
        - periodLabel
        - periodIsoYear
        - periodIsoWeek
        - grossUsd
        - netUsd
        - platformFeeUsd
    DeveloperEarningsSubscriptionSliceDto:
      type: object
      properties:
        grossUsd:
          type: number
          description: >-
            Subscription invoice gross (USD) from ledger CREATOR rows in
            CLAIMED, CLAIMABLE, or PENDING_CONVERSION.
        netUsd:
          type: number
          description: Creator share (USD/USDC) from those subscription CREATOR rows.
        platformFeeUsd:
          type: number
          description: Platform share from matching PLATFORM rows in the same statuses.
        claimableUsd:
          type: number
          description: >-
            Outstanding creator subscription balance in CLAIMABLE state (USDC
            when converted, else USD line).
      required:
        - grossUsd
        - netUsd
        - platformFeeUsd
        - claimableUsd
    McpErrorBodyDto:
      type: object
      properties:
        code:
          type: string
          example: NOT_FOUND
        message:
          type: string
          example: Resource not found
      required:
        - code
        - message
  securitySchemes:
    bearer-jwt:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        User JWT access token issued by `POST /api/auth/verify` or `POST
        /api/auth/social/verify`. Routes that accept both auth modes declare
        `api-key` *and* `bearer-jwt` security schemes.
    api-key:
      type: apiKey
      in: header
      name: x-api-key

````