• Staking
  • For Integrators
  • 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 aAVAXb

stakeAndClaimBonds()

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

Smart contract
Example

Testnet live transaction example

Stake AVAX and claim aAVAXc

stakeAndClaimCerts()

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

Smart contract
Example

Testnet live transaction example

Unstake aAVAXb and claim AVAX

claimBonds(amount)

Lets AvalanchePool exchange aAVAXb for AVAX.

Parameters

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

Smart contract
Example

Testnet live transaction example

Unstake aAVAXc and claim AVAX

claimCerts(amount)

Lets AvalanchePool exchange aAVAXc for AVAX.

Parameters

amount (uint256, required) — amount of aAVAXc 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.