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

# Request to stake or delegate a wallet

> Creates an execution request to stake or delegate funds to a validator



## OpenAPI

````yaml POST /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/initiate
openapi: 3.0.1
info:
  title: REST API
  description: >-
    The Coinbase Prime REST API provides programmatic access to trading,
    custody, staking, market data, and account management functionality.
  version: '0.1'
servers:
  - url: https://api.prime.coinbase.com/
security: []
tags:
  - name: PrimeRESTAPI
paths:
  /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/initiate:
    post:
      tags:
        - Staking
      summary: Request to stake or delegate a wallet
      description: Creates an execution request to stake or delegate funds to a validator
      operationId: PrimeRESTAPI_StakingInitiate
      parameters:
        - name: portfolio_id
          in: path
          description: The portfolio ID
          required: true
          schema:
            type: string
        - name: wallet_id
          in: path
          description: The wallet ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              required:
                - idempotency_key
              type: object
              properties:
                idempotency_key:
                  type: string
                  description: >-
                    The client generated idempotency key for requested
                    execution. Subsequent requests using the same key will fail
                inputs:
                  $ref: >-
                    #/components/schemas/coinbase.public_rest_api.WalletStakeInputs
                metadata:
                  $ref: >-
                    #/components/schemas/coinbase.public_rest_api.WalletStakingMetadata
              description: >-
                StakingInitiateRequest represents a request to initiate a
                staking operation.
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_rest_api.StakingInitiateResponse
components:
  schemas:
    coinbase.public_rest_api.WalletStakeInputs:
      type: object
      properties:
        amount:
          type: string
          description: >-
            Optional amount to stake (ETH only). If omitted, the wallet will
            stake the maximum amount available
        validator_address:
          type: string
          description: >-
            Optional validator address, defaults to Coinbase validator. For SOL,
            must be the vote account address. Ignored for ETH.
      description: >-
        WalletStakeInputs contains the custom inputs for staking operations on a
        wallet.

        Requirements and supported fields vary by asset type.
    coinbase.public_rest_api.WalletStakingMetadata:
      type: object
      properties:
        external_id:
          type: string
          description: >-
            An optional custom identifier (up to 255 bytes) to attach to the
            transaction. This is not a searchable transaction field. Retries
            with the same idempotency_key must use the same external_id; a
            differing value on retry will be silently ignored.
      description: >-
        WalletStakingMetadata contains optional metadata for wallet staking
        requests.

        external_id tags the discrete TWS transaction stake/unstake create;
        automatic reward crediting (e.g. SOL inflation) does not produce one.

        StakingClaimRewardsRequest intentionally omits this field; add metadata
        to claim rewards only if a supported network's claim flow creates a
        discrete TWS transaction clients need to tag.
    coinbase.public_rest_api.StakingInitiateResponse:
      required:
        - activity_id
        - transaction_id
        - wallet_id
      type: object
      properties:
        wallet_id:
          type: string
          description: The wallet ID
        transaction_id:
          type: string
          description: >-
            ID of the newly created transaction, can be used to fetch details of
            the current state of execution
        activity_id:
          type: string
          description: The ID for the activity generated for this request
      description: >-
        StakingInitiateResponse contains the response data from initiating a
        staking operation.

````