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

> Get delegation history for a Cardano stake account including stake pool changes and active epochs.

# Stake account delegation history



## OpenAPI

````yaml cardano/blockchain-indexer-api/openapi.json get /accounts/{stake_addr}/delegations
openapi: 3.0.3
info:
  title: Cardano - Blockchain Indexer API
  description: Core indexer endpoints dedicated to Cardano.
  contact:
    name: Maestro Blockchain Inc.
    url: https://gomaestro.org/
    email: info@gomaestro.org
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.txt
  version: v1.8.0
servers:
  - url: https://mainnet.gomaestro-api.org/v1
    description: Cardano Mainnet
  - url: https://preprod.gomaestro-api.org/v1
    description: Cardano Preprod
  - url: https://preview.gomaestro-api.org/v1
    description: Cardano Preview
security:
  - api-key: []
tags:
  - name: Maestro
paths:
  /accounts/{stake_addr}/delegations:
    get:
      tags:
        - Accounts
      summary: Stake account delegation history
      description: Returns list of delegation actions relating to a stake account
      operationId: account_delegations
      parameters:
        - name: stake_addr
          in: path
          description: Bech32 encoded stake/reward address ('stake1...')
          required: true
          schema:
            type: string
        - name: count
          in: query
          description: The max number of results per page
          required: false
          schema:
            allOf:
              - type: integer
                default: 100
                minimum: 0
            nullable: true
        - name: order
          in: query
          description: The order in which the results are sorted (by epoch number)
          required: false
          schema:
            allOf:
              - type: string
                default: asc
                enum:
                  - asc
                  - desc
            nullable: true
        - name: cursor
          in: query
          description: >-
            Pagination cursor string, use the cursor included in a page of
            results to fetch the next page
          required: false
          schema:
            type: string
            nullable: true
      responses:
        '200':
          description: Stake account delegations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAccountDelegation'
              example:
                data:
                  - active_epoch_no: 397
                    pool_id: pool1jst7rrhucnp93hepezv5yqy6fx982xs2v0udwfc5ea6my3kfak7
                    slot: 85518752
                  - active_epoch_no: 462
                    pool_id: pool1ywpt43nttzjd7883wafg255mh0hmjypwe65ercw6p2sxg5lt7ez
                    slot: 113498793
                last_updated:
                  timestamp: '2024-01-12 14:06:24'
                  block_hash: >-
                    8295c809a899e67bbf6a1a90408eb5b9f5b563e64931e1db2fa51ac057a9716f
                  block_slot: 113502093
                next_cursor: null
        '400':
          description: Malformed query parameters
        '500':
          description: Internal server error
components:
  schemas:
    PaginatedAccountDelegation:
      type: object
      description: >-
        A paginated response. Pass in the `next_cursor` in a subsequent request
        as the `cursor` query parameter to fetch the next page of results.
      required:
        - data
        - last_updated
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccountDelegation'
          description: Endpoint response data
        last_updated:
          $ref: '#/components/schemas/LastUpdated'
        next_cursor:
          type: string
          description: Pagination cursor
          nullable: true
    AccountDelegation:
      type: object
      description: Stake account related update
      required:
        - active_epoch_no
        - pool_id
        - slot
      properties:
        active_epoch_no:
          type: integer
          format: int64
          description: Epoch number in which the delegation becomes active
        pool_id:
          type: string
          description: Bech32 encoded pool ID the account is delegating to
        slot:
          type: integer
          format: int64
          description: Absolute slot of the block which contained the transaction
    LastUpdated:
      type: object
      description: >-
        Details of the most recent block processed by the indexer (aka chain
        tip); that is, the data returned is correct as of this block in time.
      required:
        - timestamp
        - block_hash
        - block_slot
      properties:
        block_hash:
          type: string
          description: >-
            Hex-encoded hash of the most recently processed block (aka chain
            tip)
        block_slot:
          type: integer
          format: int64
          description: Absolute slot of the most recently processed block (aka chain tip)
          minimum: 0
        timestamp:
          type: string
          description: UTC timestamp of when the most recently processed block was minted
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: api-key
      description: Project API Key

````