For Developers
Smart Contract API
Avalanche Liquid Staking API

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 (opens in a new tab)

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 (opens in a new tab)

Get staking metrics

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