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

# My Stakes List

> Returns a list of user stakes for a given wallet and staking pool id



## OpenAPI

````yaml /apis/portal/openapi.json get /api/{portalId}/my-stakes
openapi: 3.0.2
info:
  title: Magna Portal API
  version: 1.0.0
servers: []
security: []
tags:
  - name: Auth
    description: Authentication related endpoints
  - name: Token
    description: Token claiming
  - name: Config
    description: Portal configuration
  - name: Misc
    description: Miscellaneous operational endpoints
  - name: Staking
    description: Staking pool operations
  - name: Compliance
    description: Wallet compliance operations
paths:
  /api/{portalId}/my-stakes:
    get:
      tags:
        - Token
      summary: My Stakes List
      description: Returns a list of user stakes for a given wallet and staking pool id
      parameters:
        - name: portalId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: unique portal id (provided by Magna)
        - name: cursor
          in: header
          schema:
            type: number
            nullable: true
            description: >-
              cursor for pagination; not required for the first page; for
              subsequent pages, use the cursor from the previous response
              (x-cursor response header)
        - name: wallet
          in: query
          description: wallet address to get allocations for
          required: true
          schema:
            type: string
        - name: stakingPoolId
          in: query
          description: staking pool id
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      description: unique stake id
                    amount:
                      type: string
                      description: number of tokens staked
                    claimable:
                      type: string
                      description: number of claimable token rewards
                    withdrawable:
                      type: string
                      description: number of withdrawable tokens
                    status:
                      type: string
                      enum:
                        - PENDING
                        - UNSTAKED
                        - ACTIVE
                        - FAILED
                      description: stake status
                    poolId:
                      type: string
                      format: uuid
                      description: staking pool id
                    createdAt:
                      type: string
                      description: staking date
                    pendingWithdraws:
                      type: array
                      items:
                        type: object
                        properties:
                          amount:
                            type: string
                            description: number of tokens
                          unlockAt:
                            type: string
                            description: staking date
                          type:
                            type: string
                            enum:
                              - CLAIM_REWARDS
                              - UNSTAKE
                        required:
                          - amount
                          - unlockAt
                          - type
                  required:
                    - id
                    - amount
                    - claimable
                    - withdrawable
                    - status
                    - poolId
                    - createdAt
                    - pendingWithdraws
                description: Ok
                example:
                  stakes:
                    - id: 123e4567-e89b-12d3-a456-426614174000
                      poolId: 123e4567-e89b-12d3-a456-426614174001
                      status: ACTIVE
                      amount: '100'
                      claimable: '100'
                      withdrawable: '0'
                      createdAt: '2024-01-01T00:00:00Z'
                      pendingWithdraws:
                        - amount: '100'
                          unlockAt: '2024-01-01T00:00:00Z'
                          type: CLAIM_REWARDS
        '400':
          description: Client Error
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                          required:
                            - path
                            - message
                    required:
                      - errors
                  - type: object
                    properties:
                      error:
                        oneOf:
                          - type: string
                            enum:
                              - DISTRIBUTION_NOT_FOUND
                              - HUMANITY_CHECK_INCOMPLETE
                              - DISTRIBUTION_NOT_STARTED
                              - STAKING_POOL_NOT_FOUND
                              - STAKE_NOT_FOUND
                          - type: string
                    required:
                      - error
                description: Client Error
                example:
                  errors:
                    - path: query.wallet
                      message: Required
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: error message
                required:
                  - error
                description: Server Error
                example:
                  error: internal server error

````