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

# List strategy runs for an agent

> Returns recent strategy runner executions for a managed agent. Caller must be the on-chain owner (Privy wallet).



## OpenAPI

````yaml https://api-421614.alphagrid.capital/docs/swagger.json get /agents/{agentId}/strategy-runs
openapi: 3.1.0
info:
  title: AlphaGrid API
  version: 0.1.0
  description: >-
    AlphaGrid HTTP API. MCP tools mirror these operations at POST /mcp
    (Streamable HTTP). For LLM URL fetchers, use GET /vaults or GET
    /vaults?format=md — see /llms.txt.
servers:
  - url: https://api-421614.alphagrid.capital/
    description: Current deployment
security: []
tags:
  - name: System
    description: Health, discovery, and operational endpoints
  - name: Vaults
    description: Thematic ERC-4626 vault catalog
  - name: Agents
    description: Agent registration via x402 and AgentRegistry
  - name: Trading
    description: Trade intents, positions, and on-chain risk state reads
paths:
  /agents/{agentId}/strategy-runs:
    get:
      tags:
        - Strategy
      summary: List strategy runs for an agent
      description: >-
        Returns recent strategy runner executions for a managed agent. Caller
        must be the on-chain owner (Privy wallet).
      parameters:
        - schema:
            type: string
            pattern: ^[1-9]\d*$
            example: '1'
          required: true
          name: agentId
          in: path
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          required: false
          name: limit
          in: query
        - schema:
            type: string
            example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
          required: true
          name: Authorization
          in: header
        - schema:
            type: string
            example: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...
            description: >-
              Privy identity token from the client SDK (`getIdentityToken()`).
              Required to resolve the linked Ethereum wallet address.
          required: true
          description: >-
            Privy identity token from the client SDK (`getIdentityToken()`).
            Required to resolve the linked Ethereum wallet address.
          name: privy-id-token
          in: header
      responses:
        '200':
          description: Strategy run history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListStrategyRunsResponse'
        '401':
          description: Missing or invalid Privy session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StrategyRunError'
        '403':
          description: Caller is not the on-chain agent owner
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StrategyRunError'
        '404':
          description: Managed agent profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StrategyRunError'
      security:
        - bearerAuth: []
components:
  schemas:
    ListStrategyRunsResponse:
      type: object
      properties:
        agentId:
          type: string
          pattern: ^[1-9]\d*$
        runs:
          type: array
          items:
            $ref: '#/components/schemas/StrategyRunItem'
      required:
        - agentId
        - runs
    StrategyRunError:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    StrategyRunItem:
      type: object
      properties:
        runId:
          type: string
        status:
          type: string
          enum:
            - running
            - completed
            - failed
        startedAt:
          type: string
        completedAt:
          type:
            - string
            - 'null'
        summary:
          type:
            - string
            - 'null'
        actions:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - open
                  symbol:
                    type: string
                    minLength: 1
                  usdcAmount:
                    type: string
                    pattern: ^\d+(\.\d+)?$
                  minTokenOut:
                    type: string
                    pattern: ^\d+$
                  maxSlippageBps:
                    type: integer
                    minimum: 0
                    maximum: 10000
                  exits:
                    type: array
                    items:
                      type: object
                      properties:
                        triggerType:
                          type: string
                          enum:
                            - StopLoss
                            - TakeProfit
                        triggerBps:
                          type: integer
                        exitBps:
                          type: integer
                          minimum: 1
                          maximum: 10000
                      required:
                        - triggerType
                        - triggerBps
                        - exitBps
                      additionalProperties: false
                    minItems: 1
                    maxItems: 5
                required:
                  - type
                  - symbol
                  - usdcAmount
                additionalProperties: false
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - close
                  positionId:
                    type: string
                    pattern: ^\d+$
                  exitBps:
                    type: integer
                    minimum: 1
                    maximum: 10000
                required:
                  - type
                  - positionId
                additionalProperties: false
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - add
                  positionId:
                    type: string
                    pattern: ^\d+$
                  usdcAmount:
                    type: string
                    pattern: ^\d+(\.\d+)?$
                  minTokenOut:
                    type: string
                    pattern: ^\d+$
                  maxSlippageBps:
                    type: integer
                    minimum: 0
                    maximum: 10000
                required:
                  - type
                  - positionId
                  - usdcAmount
                additionalProperties: false
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - reduce
                  positionId:
                    type: string
                    pattern: ^\d+$
                  exitBps:
                    type: integer
                    minimum: 1
                    maximum: 10000
                required:
                  - type
                  - positionId
                  - exitBps
                additionalProperties: false
        execution:
          type: array
          items:
            $ref: '#/components/schemas/ExecutionActionResult'
        error:
          type:
            - string
            - 'null'
      required:
        - runId
        - status
        - startedAt
        - completedAt
        - summary
        - actions
        - execution
        - error
    ExecutionActionResult:
      type: object
      properties:
        action:
          oneOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - open
                symbol:
                  type: string
                  minLength: 1
                usdcAmount:
                  type: string
                  pattern: ^\d+(\.\d+)?$
                minTokenOut:
                  type: string
                  pattern: ^\d+$
                maxSlippageBps:
                  type: integer
                  minimum: 0
                  maximum: 10000
                exits:
                  type: array
                  items:
                    type: object
                    properties:
                      triggerType:
                        type: string
                        enum:
                          - StopLoss
                          - TakeProfit
                      triggerBps:
                        type: integer
                      exitBps:
                        type: integer
                        minimum: 1
                        maximum: 10000
                    required:
                      - triggerType
                      - triggerBps
                      - exitBps
                    additionalProperties: false
                  minItems: 1
                  maxItems: 5
              required:
                - type
                - symbol
                - usdcAmount
              additionalProperties: false
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - close
                positionId:
                  type: string
                  pattern: ^\d+$
                exitBps:
                  type: integer
                  minimum: 1
                  maximum: 10000
              required:
                - type
                - positionId
              additionalProperties: false
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - add
                positionId:
                  type: string
                  pattern: ^\d+$
                usdcAmount:
                  type: string
                  pattern: ^\d+(\.\d+)?$
                minTokenOut:
                  type: string
                  pattern: ^\d+$
                maxSlippageBps:
                  type: integer
                  minimum: 0
                  maximum: 10000
              required:
                - type
                - positionId
                - usdcAmount
              additionalProperties: false
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - reduce
                positionId:
                  type: string
                  pattern: ^\d+$
                exitBps:
                  type: integer
                  minimum: 1
                  maximum: 10000
              required:
                - type
                - positionId
                - exitBps
              additionalProperties: false
        status:
          type: string
          enum:
            - ok
            - failed
        txHash:
          type: string
        positionId:
          type: string
        error:
          type: string
      required:
        - action
        - status

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.