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

# platform.getStake

> Returns the amount of nAVAX that the specified addresses have cumulatively staked on the Primary Network. This method assumes that each stake output has only one owner. This method assumes only AVAX can be staked. This method only concerns itself with the Primary Network, not Subnets.



## OpenAPI

````yaml post /P#platform.getStake
openapi: 3.0.0
info:
  title: Avalanche Platform Chain API
  description: >-
    JSON-RPC 2.0 API for interacting with Avalanche's Platform Chain (P-Chain).
    All methods use POST to the same endpoint with the method specified in the
    request body.
  version: 1.0.0
servers:
  - url: https://api.avax.network/ext/bc
    description: Mainnet
  - url: https://api-test.avax.network/ext/bc
    description: Testnet
  - url: http://127.0.0.1:9650/ext/bc
    description: Testnet
security: []
paths:
  /P#platform.getStake:
    post:
      tags:
        - platform
      summary: platform.getStake
      description: >-
        Returns the amount of nAVAX that the specified addresses have
        cumulatively staked on the Primary Network. This method assumes that
        each stake output has only one owner. This method assumes only AVAX can
        be staked. This method only concerns itself with the Primary Network,
        not Subnets.
      operationId: platform_getStake
      requestBody:
        required: true
        description: JSON-RPC request
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  example: '2.0'
                  default: '2.0'
                method:
                  type: string
                  example: platform.getStake
                  default: platform.getStake
                params:
                  $ref: '#/components/schemas/GetStakeArgs'
                  description: Method parameters
                id:
                  type: integer
                  example: 1
                  default: 1
              required:
                - jsonrpc
                - method
                - params
                - id
            examples:
              default:
                summary: Example request
                value:
                  jsonrpc: '2.0'
                  method: platform.getStake
                  params: {}
                  id: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    example: '2.0'
                  result:
                    $ref: '#/components/schemas/GetStakeReply'
                    description: Method result
                  id:
                    type: integer
                    example: 1
                required:
                  - jsonrpc
                  - result
                  - id
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JSONRPCError'
components:
  schemas:
    GetStakeArgs:
      type: object
      properties:
        validatorsOnly:
          type: boolean
        encoding:
          type: string
          enum:
            - hex
            - json
          description: Encoding format
          example: hex
      required:
        - validatorsOnly
        - encoding
    GetStakeReply:
      type: object
      properties:
        staked:
          type: string
          description: Unsigned 64-bit integer as string
          example: '1000000000'
        stakeds:
          type: object
          additionalProperties: true
          description: Map of ids.ID to avajson.Uint64
        stakedOutputs:
          type: array
          items:
            type: string
        encoding:
          type: string
          enum:
            - hex
            - json
          description: Encoding format
          example: hex
      required:
        - staked
        - stakeds
        - stakedOutputs
        - encoding
    JSONRPCError:
      type: object
      description: JSON-RPC 2.0 Error Response
      properties:
        jsonrpc:
          type: string
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: Error code
            message:
              type: string
              description: Error message
            data:
              type: object
              description: Additional error data
          required:
            - code
            - message
        id:
          type: integer
          example: 1
      required:
        - jsonrpc
        - error
        - id

````