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

# Agent-scoped signal-trades for the dev-portal Trades tab

> Paginated list of signal-trades (the canonical "trade-the-agent-called") for this developer agent. Theoretical P&L is computed against the parsed entry / SL / TP and the live price feed; rows are independent of subscriber on-chain executions, so an agent with zero subscribers still builds a track record.



## OpenAPI

````yaml https://mcp.echozero.app/api/docs-json get /api/v1/developers/agents/{id}/trades
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/agents/{id}/trades:
    get:
      tags:
        - Developer dashboard
      summary: Agent-scoped signal-trades for the dev-portal Trades tab
      description: >-
        Paginated list of signal-trades (the canonical "trade-the-agent-called")
        for this developer agent. Theoretical P&L is computed against the parsed
        entry / SL / TP and the live price feed; rows are independent of
        subscriber on-chain executions, so an agent with zero subscribers still
        builds a track record.
      operationId: DeveloperDashboardController_agentTrades
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - 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: Signal-trade rows for the Trades tab.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/McpSuccessResponseDto'
                  - properties:
                      data:
                        type: object
                        properties:
                          items:
                            type: array
                            items:
                              $ref: '#/components/schemas/AgentSignalTradeRowDto'
                          pagination:
                            $ref: '#/components/schemas/PaginationMetaDto'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpErrorResponseDto'
        '403':
          description: Not a registered developer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpErrorResponseDto'
        '404':
          description: Agent not found or not owned.
          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
    AgentSignalTradeRowDto:
      type: object
      properties:
        id:
          type: string
          description: TradeSignal Mongo id (stable for table keys).
        signalId:
          type: string
          description: Public signalId (sig_…); stable across replays / dedupe.
        action:
          type: string
          description: BUY / SELL action the agent called.
        tokenAddress:
          type: string
          description: Token mint address from the parsed signal.
        tokenName:
          type: string
          description: >-
            Resolved token name from Echo Zero metadata (or parser ticker when
            no DB row).
        tokenSymbol:
          type: string
          description: >-
            Display symbol — from metadata or parser (e.g. Telegram
            `context.parserToken`).
        amount:
          type: number
          description: >-
            USD notional carried on the signal record (parsing / bridge / demo).
            Actual swap size is chosen by each subscriber in the Echo Zero app
            from their own settings — not set here for subscribers.
        status:
          type: string
          description: >-
            Lifecycle status. `recorded` = signal-trade saved with no fan-out
            (Mike's no-subscribers case), `executed` = at least one subscriber
            executed, `failed` = fan-out attempted but every subscriber errored.
        venue:
          type: string
          enum:
            - JUPITER
            - JUPITER_PERPS
            - DRIFT
            - HYPERLIQUID
          description: >-
            Resolved trading venue for this signal-trade (e.g. JUPITER or
            HYPERLIQUID).
        leverage:
          type: number
          description: >-
            Resolved leverage from the signal execution plan, when the agent
            uses leverage.
        failureReason:
          type: string
          description: >-
            Human-readable diagnostic shown when the signal-trade failed or was
            rejected.
        failureReasons:
          description: >-
            Structured, user-facing failure reasons shown for failed/rejected
            rows.
          type: array
          items:
            $ref: '#/components/schemas/TradeReasonDto'
        diagnosticReasons:
          description: Structured non-failure diagnostics shown for recorded/executed rows.
          type: array
          items:
            $ref: '#/components/schemas/TradeReasonDto'
        subscriberCount:
          type: number
          description: >-
            How many subscribers the bridge tried fan-out against (0 = no
            on-chain trades — agent is bootstrapping).
        livePriceSeeded:
          type: boolean
          description: >-
            True when a positive live USD price snapshot was available at signal
            creation.
        entryPriceUsd:
          type: number
          description: Snapshot live USD price at signal creation.
        stopLossPriceUsd:
          type: number
          description: Parsed stop-loss USD price.
        takeProfitPriceUsd:
          type: number
          description: Parsed take-profit USD price.
        currentPriceUsd:
          type: number
          description: Latest USD price observed by the price-feed worker.
        unrealizedPnlPercent:
          type: number
          description: >-
            Unrealized P&L percent (current price vs entry) while the trade is
            open.
        realizedPnlPercent:
          type: number
          description: Realized P&L percent set when SL / TP / manual close fires.
        closeReason:
          type: string
          description: >-
            Why the signal-trade closed (take_profit / stop_loss / manual /
            expired).
        closedAt:
          type: string
          format: date-time
        firstTxHash:
          type: string
          description: >-
            Simulated or on-chain tx hash from the first successful subscriber
            execution (when present).
        createdAt:
          format: date-time
          type: string
          description: When the signal-trade was recorded.
        performanceOpen:
          type: boolean
          description: True while the price-feed worker is still tracking this row.
      required:
        - id
        - signalId
        - action
        - tokenAddress
        - amount
        - subscriberCount
        - livePriceSeeded
        - createdAt
        - performanceOpen
    PaginationMetaDto:
      type: object
      properties:
        total:
          type: number
        limit:
          type: number
        page:
          type: number
        totalPages:
          type: number
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
      required:
        - total
        - limit
        - page
        - totalPages
        - hasNextPage
        - hasPreviousPage
    McpErrorResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/McpErrorBodyDto'
      required:
        - success
        - error
    TradeReasonDto:
      type: object
      properties:
        code:
          type: string
        raw:
          type: string
        category:
          type: string
        severity:
          type: string
          enum:
            - failure
            - warning
            - info
        title:
          type: string
        message:
          type: string
        remediation:
          type: string
      required:
        - code
        - raw
        - category
        - severity
        - title
        - message
    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

````