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

# Wallet Statistics

> Return aggregated information about a wallet



## OpenAPI

````yaml /apis/portal/openapi.json get /api/{portalId}/wallet-stats
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}/wallet-stats:
    get:
      tags:
        - Token
      summary: Wallet Statistics
      description: Return aggregated information about a wallet
      parameters:
        - name: portalId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: unique portal id (provided by Magna)
        - name: wallet
          in: query
          description: wallet address to get statistics for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  distributionCount:
                    type: number
                    description: total count of distributions available for this wallet
                  totalAllocated:
                    type: string
                    description: >-
                      total number of tokens allocated across all allocations
                      for the wallet
                  totalVested:
                    type: string
                    description: >-
                      total number of tokens vested across all allocations for
                      the wallet
                required:
                  - distributionCount
                  - totalAllocated
                  - totalVested
        '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

````