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

# Change per-trade allocation percentage



## OpenAPI

````yaml https://mcp.echozero.app/api/docs-json post /api/v1/users/me/subscriptions/{agentId}/allocation/percent
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
paths:
  /api/v1/users/me/subscriptions/{agentId}/allocation/percent:
    post:
      tags:
        - User
      summary: Change per-trade allocation percentage
      operationId: McpUserController_changeAllocationPercent
      parameters:
        - name: agentId
          required: true
          in: path
          schema:
            type: string
        - name: x-signature
          in: header
          required: true
          description: >-
            Required for API-key authenticated requests. HMAC-SHA256(secretKey,
            timestamp + METHOD + path + body) as lowercase hex. Omit only for
            JWT/OAuth session tokens or public routes.
          schema:
            type: string
        - name: x-timestamp
          in: header
          required: true
          description: >-
            Required with x-signature. Epoch milliseconds; rejected if drift
            exceeds 5 minutes. Omit only for JWT/OAuth session tokens or public
            routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/McpChangeAgentAllocationPercentBodyDto'
      responses:
        '200':
          description: Percent update result.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/McpSuccessResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/McpSubscribeToAgentResponseDto'
      security:
        - bearer-jwt: []
        - api-key: []
components:
  schemas:
    McpChangeAgentAllocationPercentBodyDto:
      type: object
      properties:
        allocationPercentageMax:
          type: number
          minimum: 0.01
          maximum: 100
        allocationPercentageMin:
          type: number
          minimum: 0
          maximum: 100
      required:
        - allocationPercentageMax
    McpSuccessResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          description: Endpoint-specific payload
          additionalProperties: true
      required:
        - success
        - data
    McpSubscribeToAgentResponseDto:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        subscription:
          $ref: '#/components/schemas/McpAgentSubscriptionDto'
        agentName:
          type: string
        agentImageUrl:
          type: string
        strategyCount:
          type: number
      required:
        - success
        - message
    McpAgentSubscriptionDto:
      type: object
      properties:
        agent:
          type: string
          description: Agent id
        subscriptionType:
          type: string
          enum:
            - AUTO_TRADING
            - ALERTS_ONLY
            - TEST_TRADING
            - FULL_TRADING
          description: Deprecated; prefer bot activations
        subscribedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        tradeMode:
          type: string
          enum:
            - AUTO_TRADING
            - ALERTS_ONLY
            - TEST_TRADING
            - FULL_TRADING
        walletContext:
          type: string
          enum:
            - virtual
            - real
          description: Canonical wallet context for this mode-specific subscription row.
        walletMode:
          type: string
          enum:
            - VIRTUAL
            - REAL
          deprecated: true
          description: >-
            Deprecated. Prefer walletContext. Kept for backward-compatible
            clients.
        allocationMode:
          type: string
          enum:
            - PERCENTAGE_RANGE
            - USD_AMOUNT
            - SOL_AMOUNT
        allocationPercentageMin:
          type: number
        allocationPercentageMax:
          type: number
        allocationAmountUsd:
          type: number
        allocationAmountSol:
          type: number
        allocatedUsd:
          type: number
          description: >-
            Ledger capital assigned to this agent in USD (confirmed).
            Unconfirmed add/withdraw sits in pendingDeltaUsd.
        inUseUsd:
          type: number
          description: Open-trade margin locked in this agent pool
        withdrawableUsd:
          type: number
          description: >-
            Ledger withdrawable USD after the venue fee buffer (not Hyperliquid
            on-chain free margin)
        currentBalanceUsd:
          type: number
          description: Agent pool equity headline
        availableUsd:
          type: number
          description: Free capital deployable (current − locked).
        inTradesUsd:
          type: number
          description: Capital in open trades (HL margin, not notional)
        feeBufferUsd:
          type: number
          description: >-
            Venue fee/gas buffer inside the pool. Hyperliquid: max($0, 0.05% ×
            maxLeverage × allocation). Jupiter: $0.
        lockedInPositionsUsd:
          type: number
          description: Open-trade margin (alias of inUseUsd / inTradesUsd)
        venue:
          type: string
          enum:
            - JUPITER
            - HYPERLIQUID
            - ONEINCH
            - ALL_PLATFORMS
          description: Allocation venue (JUPITER or HYPERLIQUID)
        hyperliquidTotalEquityUsd:
          type: number
          description: >-
            Live Hyperliquid accountValue (shared EVM account, not per-agent).
            Null for Jupiter.
        hyperliquidFreeMarginUsd:
          type: number
          description: >-
            Live Hyperliquid withdrawable (on-chain free margin). Distinct from
            ledger withdrawableUsd. Null for Jupiter.
        bridgeStatus:
          type: string
          enum:
            - PENDING_BRIDGE
            - BRIDGING
            - CONFIRMED
            - FAILED
            - RECLAIM_DEFERRED
          description: Solana↔Hyperliquid bridge lifecycle. Null for Jupiter / virtual.
        bridgeTransactionId:
          type: string
          description: bridge-transactions id for the in-flight or last HL bridge
        pendingDeltaUsd:
          type: number
          description: >-
            Unconfirmed add (+) or withdraw (−) USD applied to allocatedUsd only
            after confirmation
        minAllocationUsd:
          type: number
        minPerTradePercent:
          type: number
        recommendedPerTradePercent:
          type: number
        maxConcurrentPositions:
          type: number
        maxEntriesPerTrade:
          type: number
        allocationBalanceAudit:
          $ref: '#/components/schemas/McpAllocationBalanceAuditDto'
        goLiveUponConfirmation:
          type: boolean
        isPaused:
          type: boolean
      required:
        - agent
        - subscribedAt
    McpAllocationBalanceAuditDto:
      type: object
      properties:
        depositedUsd:
          type: number
        realizedPnlUsd:
          type: number
        unrealizedPnlUsd:
          type: number
        lockedMarginUsd:
          type: number
        feeBufferUsd:
          type: number
        ledgerAvailableUsd:
          type: number
          description: >-
            Ledger available after the fee buffer. Not Hyperliquid on-chain free
            margin.
        dustUsd:
          type: number
        venueEquityUsd:
          type: number
        venueFreeMarginUsd:
          type: number
        venueGapUsd:
          type: number
        pendingDeltaUsd:
          type: number
        bridgeStatus:
          type: string
          enum:
            - PENDING_BRIDGE
            - BRIDGING
            - CONFIRMED
            - FAILED
            - RECLAIM_DEFERRED
        reconciliationStatus:
          type: string
          enum:
            - IN_SYNC
            - GAP
            - UNKNOWN
        netRealizedProfitUsd:
          type: number
          description: >-
            max(0, realized PnL). Success fees apply only to this amount, never
            to deposited principal.
        pendingPlatformFeeUsd:
          type: number
        pendingCreatorFeeUsd:
          type: number
        estimatedSuccessFeeUsd:
          type: number
          description: Success fee due if this allocation fully exited now (0 on a loss).
        estimatedPlatformFeeUsd:
          type: number
        estimatedCreatorFeeUsd:
          type: number
        netUserPayoutUsd:
          type: number
          description: >-
            currentBalance + unrealized − estimated success fee (you would
            keep).
      required:
        - depositedUsd
        - realizedPnlUsd
        - unrealizedPnlUsd
        - lockedMarginUsd
        - feeBufferUsd
        - ledgerAvailableUsd
        - dustUsd
        - pendingDeltaUsd
        - reconciliationStatus
        - netRealizedProfitUsd
        - pendingPlatformFeeUsd
        - pendingCreatorFeeUsd
        - estimatedSuccessFeeUsd
        - estimatedPlatformFeeUsd
        - estimatedCreatorFeeUsd
        - netUserPayoutUsd
  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

````