Skip to main content

Getting started with staking API

To get started, ensure you have the correct API permission group, API key, and a sufficiently funded wallet. End-to-end staking via API is available for ETH and SOL only. Stake other assets in the iOS app or web dashboard.
  1. Create the API permission group - including the following permissions:
    1. Read vaults.
    2. Initiate staking and unstaking,
  2. Quorum approval
    1. Admins must confirm operation via quorum on iOS device.
  3. Create an API key with staking permission group
    1. Once you’ve created your permission group, create an API key tied to this permission group to use for staking operations.
    2. See API permission groups and API keys

When the staking position ID becomes available

The transaction hash and the staking position ID for a stake request become available at different times. Once a stake request clears quorum approval and Anchorage Digital risk review, we sign and broadcast the deposit. At that point List transactions returns the transaction’s blockchainTxId, before the deposit is included in a block. The stakingPositionId is assigned later. Anchorage Digital waits for the deposit to be mined, confirmed, and detected by our blockchain indexer, then creates the staking position from the confirmed on-chain state. This typically takes a few minutes. We assign the position ID only once the position exists on-chain, so the ID never needs to be reconciled against later on-chain changes. Until the position is created, Get staking positions returns an empty data array for that transaction.

Poll for the position by transaction ID

Each staking position carries the transactionId of the stake request that created it, and the endpoint accepts the same value as a filter.
  1. Store the transaction ID returned by POST /v2/transactions/stake.
  2. Poll GET /v2/wallets/{walletId}/staking/positions?transactionId={transactionId} on an interval until data is non-empty.
  3. Read stakingPositionId and status from the returned position.
A position can appear with status set to PENDING before it’s ACTIVE. PENDING means the deposit is confirmed and the position exists but isn’t yet active on-chain, for example while an ETH validator waits in the activation queue. Rewards begin accruing once the position is ACTIVE.
If your monitoring expects stakingPositionId and blockchainTxId to arrive together, it will see an empty positions response for a few minutes after every stake request. Treat the position ID as available only when the positions endpoint returns it.