Skip to main content
Staking on the Polygon network using the Staking API consists of the following steps:
  1. Approve token management with the Polygon smart contract.
  2. Create a staking request.
After each operation, sign and send the transaction to the Polygon network. Get an authentication token to start using Staking API. Request examples are provided using cURL.
1

Approve token management

Allow the Polygon smart contract to manage tokens by obtaining approval. Any amount can be approved, but preferably specify the exact amount ready to stake.Send a POST request to /api/v1/polygon/staking/approve. Use https://api.p2p.org for production.Example request:
  • amount — amount of tokens in Wei (1 POL = 10¹⁸ Wei) to approve for staking.
  • stakerAddress — staker account address.
Example response:
  • serializeTx — serialized unsigned transaction.
  • to — recipient address for this transaction.
  • gasLimit — maximum limit for this block.
  • data — transaction data.
  • value — amount this transaction is sending in Wei.
  • chainId — chain ID this transaction is authorized on, as specified by EIP-155.
  • typeEIP-2718 type of this transaction envelope.
  • maxFeePerGas — maximum price per unit of gas this transaction will pay for the combined EIP-1559 block’s base fee and this transaction’s priority fee in Wei.
  • maxPriorityFeePerGas — price per unit of gas in Wei, which is added to the EIP-1559 block’s base fee. This added fee is used to incentivize miners to prioritize this transaction.
2

Create staking request

To create a stake transaction, delegate tokens to P2P validator by sending a POST request to /api/v1/polygon/staking/delegate.Example request:
  • amount — amount of tokens in Wei (1 MATIC = 10¹⁸ Wei) to delegate.
  • stakerAddress — staker account address.
Example response is the same as in the approve token management step.To complete staking, sign and send the transaction to the Polygon network.