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

# Fetch historical staking balances

> Fetch historical staking balances for given address. This API is available for mainnet only.



## OpenAPI

````yaml GET /v1/networks/{network_id}/addresses/{address_id}/stake/balances
openapi: 3.0.3
info:
  title: Coinbase Developer Platform API
  license:
    name: MIT License
    url: https://opensource.org/license/mit
  version: 0.0.1-alpha
servers:
  - url: https://api.cdp.coinbase.com/platform
security:
  - bearerAuth: []
tags:
  - name: Addresses
    description: Addresses belong to a wallet and are scoped to a network.
  - name: Assets
    description: Assets are the digital assets that can be held in a wallet.
  - name: Networks
    description: Blockchain networks that are supported by the platform.
  - name: Staking
    description: Staking operations and rewards for addresses on supported networks.
paths:
  /v1/networks/{network_id}/addresses/{address_id}/stake/balances:
    get:
      tags:
        - Staking
      summary: Fetch historical staking balances
      description: >-
        Fetch historical staking balances for given address. This API is
        available for mainnet only.
      operationId: fetchHistoricalStakingBalances
      parameters:
        - description: >-
            A limit on the number of objects to be returned. Limit can range
            between 1 and 100, and the default is 50.
          in: query
          name: limit
          required: false
          schema:
            type: integer
          example: 10
          style: form
        - description: >-
            A cursor for pagination across multiple pages of results. Don't
            include this parameter on the first call. Use the next_page value
            returned in a previous response to request subsequent results.
          in: query
          name: page
          required: false
          schema:
            maxLength: 5000
            type: string
          style: form
        - description: The ID of the blockchain network.
          in: path
          name: network_id
          required: true
          schema:
            maxLength: 5000
            type: string
          example: ethereum-mainnet
        - description: >-
            The symbol of the asset for which the historical staking balances
            are being fetched.
          in: query
          name: asset_id
          required: true
          schema:
            maxLength: 5000
            type: string
          example: ETH
          style: form
        - description: >-
            The onchain address for which the historical staking balances are
            being fetched.
          in: path
          name: address_id
          required: true
          schema:
            maxLength: 5000
            type: string
          example: '0xfc807D1bE4997e5C7B33E4d8D57e60c5b0f02B1a'
        - description: The start time of this historical staking balance period.
          in: query
          name: start_time
          required: true
          schema:
            type: string
            format: date-time
          example: '2024-07-21T00:00:00Z'
          style: form
        - description: The end time of this historical staking balance period.
          in: query
          name: end_time
          required: true
          schema:
            type: string
            format: date-time
          example: '2024-07-21T00:00:00Z'
          style: form
      responses:
        '200':
          description: The list of historical staking balances.
          content:
            application/json:
              schema:
                description: ''
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/StakingBalance'
                    type: array
                  has_more:
                    description: >-
                      True if this list has another page of items after this one
                      that can be fetched.
                    type: boolean
                  next_page:
                    description: The page token to be used to fetch the next page.
                    type: string
                required:
                  - data
                  - has_more
                  - next_page
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error response
components:
  schemas:
    StakingBalance:
      description: The staking balances for an address.
      type: object
      properties:
        address:
          type: string
          example: >-
            0x80000001677f23a227dfed6f61b132d114be83b8ad0aa5f3c5d1d77e6ee0bf5f73b0af750cc34e8f2dae73c21dc36f4a
          description: >-
            The onchain address for which the staking balances are being
            fetched.
        date:
          type: string
          format: date
          example: '2024-07-21'
          description: The date of the staking balance in format 'YYYY-MM-DD' in UTC.
        bonded_stake:
          $ref: '#/components/schemas/Balance'
          description: The bonded balance amount.
        unbonded_balance:
          $ref: '#/components/schemas/Balance'
          description: The unbonded balance amount.
        participant_type:
          type: string
          example: validator
          description: The type of staking participation.
      required:
        - address
        - date
        - bonded_stake
        - unbonded_balance
        - participant_type
      xml:
        name: staking_balance
    Error:
      description: An error response from the Coinbase Developer Platform API
      properties:
        code:
          description: >-
            A short string representing the reported error. Can be use to handle
            errors programmatically.
          maxLength: 5000
          type: string
        message:
          description: A human-readable message providing more details about the error.
          maxLength: 5000
          type: string
        correlation_id:
          description: >-
            A unique identifier for the request that generated the error. This
            can be used to help debug issues with the API.
          type: string
      required:
        - code
        - message
      type: object
      xml:
        name: error
    Balance:
      description: The balance of an asset onchain
      type: object
      properties:
        amount:
          type: string
          example: '12345678'
          description: The amount in the atomic units of the asset
        asset:
          $ref: '#/components/schemas/Asset'
      required:
        - amount
        - asset
      xml:
        name: balance
    Asset:
      description: >-
        An asset onchain scoped to a particular network, e.g. ETH on
        base-sepolia, or the USDC ERC20 Token on ethereum-mainnet.
      type: object
      properties:
        network_id:
          type: string
          example: base-sepolia
          description: The ID of the blockchain network.
        asset_id:
          type: string
          example: USDC
          description: The ID for the asset on the network
        decimals:
          type: integer
          example: 18
          description: >-
            The number of decimals the asset supports. This is used to convert
            from atomic units to base units.
        contract_address:
          type: string
          description: >-
            The optional contract address for the asset. This will be specified
            for smart contract-based assets, for example ERC20s.
          example: '0x036CbD53842c5426634e7929541eC2318f3dCF7e'
      required:
        - network_id
        - asset_id
      xml:
        name: asset
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Enter your JSON Web Token (JWT) here. Refer to the [Generate
        JWT](/api-reference/authentication#2-generate-jwt-server-only) section
        of our Authentication docs for information on how to generate your
        Bearer Token.

````