Staking enables clients to earn rewards by participating in blockchain consensus. With Prime’s Staking APIs, clients can stake supported assets directly from eligible wallets and initiate unstaking when desired. While many assets are available for staking through the Prime UI, the Stake and Unstake APIs currently support Ethereum (ETH) only, with additional assets to be supported over time. Reward accrual, stake and unstake activity, and associated balance states can all be monitored through existing API endpoints for all stakable assets on Prime.

Staking a Wallet

To stake from a Vault wallet, use Create Stake. Instead of requiring a public address, this endpoint operates using Wallet IDs. For a refresher on Vault wallets and Wallet IDs, refer to the Wallets page.

Once the request is successfully submitted, the response will include an activity_id. As with other sensitive operations in Prime, this request must be approved in the Prime UI or Mobile App before it is processed. Once approved, the ETH selected for staking will begin the bonding process.

Coinbase Prime supports both partial staking and multiple concurrent staking operations from the same wallet. In practice, this means you can stake a specific amount (e.g. 64 ETH) without needing to stake the entire wallet balance, and you can initiate multiple stakes without waiting for earlier ones to complete.

To learn about how to track balance subtypes that are specific to staking, e.g. bonded_amount, bondable_amount, and pending_rewards_amount, please visit the Balances page.


stakingService := staking.NewStakingService(client)  
  
request := &staking.CreateStakeRequest{  
    PortfolioId:   "PORTFOLIO_ID_HERE",  
    WalletId:      "WALLET_ID_HERE",  
    IdempotencyKey: uuid.New().String(),  
    Inputs:         &staking.CreateStakeInputs{  
        Amount: '32'  
    }  
}  
  
response, err := stakingService.CreateStake(context.Background(), request)  

For more information, please visit the Prime Go SDK.

Unstaking a wallet

The process for unstaking is nearly identical to staking. As with staking, partial unstaking is supported. For example, if a wallet has 320 ETH staked, an unstake request can be submitted for just 96 ETH.

Unstaking is not immediate. After initiating the request and approving it in the Prime UI, ETH enters the Ethereum exit queue and becomes withdrawable only once the network finalizes the exit.


stakingService := staking.NewStakingService(client)  
  
request := &staking.CreateUnstakeRequest{  
    PortfolioId:   "PORTFOLIO_ID_HERE",  
    WalletId:      "WALLET_ID_HERE",  
    IdempotencyKey: uuid.New().String(),  
    Inputs:         &staking.CreateUnstakeInputs{  
        Amount: '1'  
    }  
}  
response, err := stakingService.CreateUnstake(context.Background(), request)  

For more information, please visit the Prime Go SDK.

Tracking staking events and rewards

Staking-related transaction events can be tracked using either the List Portfolio Transactions or List Wallet Transactions endpoints. Both endpoints return identical response structures; the wallet-level endpoint simply scopes the results to a single wallet.

You can use these APIs to monitor staking lifecycle events (e.g., initiation, bonding, exit) and to track reward distribution over time. Below is an example of querying for staking rewards at the portfolio level.

TransactionsService transactionsService = PrimeServiceFactory.createTransactionsService(client);  
  
ListPortfolioTransactionsRequest request = new ListPortfolioTransactionsRequest.Builder()  
.portfolioId("PORTFOLIO_ID_HERE")  
.types("REWARD")  
.build();  
  
ListPortfolioTransactionsResponse response = transactionsService.listPortfolioTransactions(request);  

To learn more about this SDK, please visit the Prime Java SDK.

Staking events may also be tracked using Prime activities. For more information, visit the Activities page.