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

# Get actions

> List recent actions or fetch one action by ID.

Use `actionId` to fetch one action. Omit it to list recent actions.

Use `limit` only when you are listing recent actions.


## OpenAPI

````yaml GET /v1/actions
openapi: 3.1.0
info:
  title: Docent API
  description: >-
    REST API for programmatic trading on Hyperliquid and Polymarket via Docent.
    Create API agents, fund a dedicated wallet, place trades, check balances,
    and move funds between venues with API keys.
  version: 1.0.0
  contact:
    email: support@trydocent.com
servers:
  - url: https://api.trydocent.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Registration, key management, and auth status
  - name: Balances
    description: Unified balance across all trading venues
  - name: Positions
    description: Open positions on Hyperliquid and Polymarket
  - name: Markets
    description: Market metadata and search
  - name: Orders
    description: Place orders on Hyperliquid perpetuals, spot, and Polymarket
  - name: Transfers
    description: Move funds between trading venues
  - name: Actions
    description: Poll workflow execution status
  - name: Strategies
    description: Coming soon. Reserved for future strategy endpoints.
paths:
  /v1/actions:
    get:
      tags:
        - Actions
      summary: Get actions
      description: >-
        Returns recent workflow actions for the authenticated API agent. Pass
        `actionId` to fetch one action by ID. Omit `actionId` to list recent
        actions.
      parameters:
        - name: actionId
          in: query
          required: false
          description: Fetch a single action by ID
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Maximum results when listing recent actions (1-100, default 20)
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
      responses:
        '200':
          description: A single action or a list of actions
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Action'
                  - type: array
                    items:
                      $ref: '#/components/schemas/Action'
        '400':
          description: Invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Action not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Action:
      type: object
      required:
        - id
        - workflowId
        - venue
        - status
        - summary
        - createdAt
        - startedAt
        - completedAt
        - error
      properties:
        id:
          type: string
        workflowId:
          type: string
          nullable: true
        venue:
          type: string
          enum:
            - hyperliquid_perp
            - hyperliquid_spot
            - polymarket
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
        summary:
          type: string
          example: 'API: long 0.01 BTC market'
        createdAt:
          type: number
        startedAt:
          type: number
          nullable: true
        completedAt:
          type: number
          nullable: true
        error:
          type: string
          nullable: true
    Error:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Machine-readable error code
          enum:
            - UNAUTHORIZED
            - FORBIDDEN
            - RATE_LIMITED
            - BAD_REQUEST
            - VALIDATION_ERROR
            - NOT_FOUND
            - ORDER_REJECTED
            - ORDER_FAILED
            - TRANSFER_FAILED
            - REGISTRATION_FAILED
            - ROTATION_FAILED
            - NOT_IMPLEMENTED
        retryAfter:
          type: number
          description: Milliseconds until rate limit resets (only on 429)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key in the format `dk_live_...`. Pass as `Authorization: Bearer
        dk_live_...`

````