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.