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

AVAX Liquid Staking API

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

Stake AVAX and claim ankrAVAX​

stakeAndClaimCerts()​

Stakes the msg.value of AVAX and claims ankrAVAX for it.

Smart contract​
Example​

Testnet live transaction example

Unstake ankrAVAX and claim AVAX​

claimCerts(amount)​

Lets AvalanchePool exchange ankrAVAX for AVAX.

Parameters​

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

Smart contract​
Example​

Testnet live transaction example

Get staking metrics​

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