For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

ETH Liquid Staking API

To integrate with ETH Liquid Staking, use the smart contract functions and examples below.

Stake ETH and claim ankrETH

stakeAndClaimAethC()

Stakes the msg.value of ETH and claims ankrETH for it.

Smart contract
Example

Unstake ETH and get ETH

unstakeAETH()

Unstakes ankrETH and gets the corresponding amount of ETH.

Parameters

shares (uint256, required) — amount of ankrETH to be unstaked.

Smart contract
Example

Get staking metrics

To integrate Ankr Staking metrics into your dashboards or use metrics like APY in your products, read Liquid Staking Metrics.