polkadot chain is covered. The Polkadot integration aligns with the general Unified API process but with network-specific parameters.
Get an authentication token to start using the Unified API.
Request examples are provided using cURL.
To check the integration guides for other chains, refer to the Networks Supported section.
Key Polkadot-specific details
chain— always set topolkadotfor Polkadot-related requests.network— environment in which the transaction is processed:kusama,westendormainnet.stakerAddress— account address initiating staking, unstaking or withdrawal transactions.amount— amount of tokens for bond operations. DOT is used for the main network, KSM for Kusama, and WND for Westend.
Staking flow
1. Create bonding request
Send a POST request to /api/v1/unified/staking/stake. Example request (forwestend network):
chain— blockchain network, always set topolkadotfor Polkadot-related requests.network— environment in which the transaction is processed:kusama,westendormainnet.stakerAddress— account address initiating the bonding transaction.amount— amount of tokens to bond. DOT is used for the main network, KSM for Kusama, and WND for Westend.extraData— additional parameters:stashAccountAddress— not needed for this step. required only for step (2) nomination request.
-
amount— amount of tokens to bond. DOT is used for the main network, KSM for Kusama, and WND for Westend. -
createdAt— timestamp of the transaction in the ISO 8601 format. -
extraData— additional transaction details:-
unsignedTransactionData— unsigned transaction in Base64 encrypted format. Sign the transaction and submit it to the blockchain to perform the called action. -
stashAccountAddress— main address which keeps tokens for bonding. -
rewardDestinationType— type of receiving the rewards:staked— rewards will be sent to the and added to the current bond (compounding rewards).stash— rewards will be sent to the as a transferrable balance (not compounding rewards).controller— rewards will be sent to the controller account.account— default; rewards will be sent to any account specified as a transferrable balance.
-
rewardDestination— rewards destination account address.
-
2. Sign and send transaction
UseunsignedTransactionData to sign the transaction using the Polkadot-specific signing logic.
To broadcast the signed transaction to the Polkadot network, send a POST request to /api/v1/unified/transaction/broadcast.
Example request:
chain— blockchain network.network— environment in which the transaction is processed.stakerAddress— account address initiating the bonding transaction.signedTransaction— signed transaction in Base64 encrypted format, which contains all transaction details (e.g., accounts, instructions, and signatures) required to broadcast the transaction to the network.
-
status— transaction status:pending,successorfailed. -
extraData— additional transaction details:-
network— environment in which the transaction is processed. -
signedTransaction— signed transaction in Base64 encrypted format, which contains all transaction details (e.g., accounts, instructions, and signatures) required to broadcast the transaction to the network. -
blockHash— block hash in which the transaction has been included. -
blockId— unique block identifier. -
extrinsicId— unique identifier. -
transactionHash— signed transaction in the hexadecimal format. -
signerAccount— account that signed the transaction. -
datais the list of data fields to be used to construct the bonding transaction.-
args.value— amount of tokens to bond. -
args.payee— type of receiving the rewards:staked— rewards will be sent to the stash account and added to the current bond (compounding rewards).stash— rewards will be sent to the stash account as a transferable balance (not compounding rewards).controller— rewards will be sent to the controller account.account— default; rewards will be sent to any account specified as a transferrable balance.args.payee.Account— account address initiated the bonding transaction.
-
method— operation type. -
section— endpoint section type.createdAt— timestamp of the transaction in the ISO 8601 format.
-
-
3. Create nomination request
Send a POST request to /api/v1/unified/staking/stake. Example request (forwestend network):
chain— blockchain network.network— environment in which the transaction is processed.stakerAddress— account address initiated the bonding transaction.amount— amount of tokens to bond. DOT is used for the main network, KSM for Kusama, and WND for Westend.extraData— additional parameters:stashAccountAddress— main stash account address which keeps tokens for bonding.
-
createdAt— timestamp of the transaction in the ISO 8601 format. -
extraData— additional transaction details:unsignedTransactionData— unsigned transaction in Base64 encrypted format. Sign the transaction and submit it to the blockchain to perform the called action.stashAccountAddress— main stash account address which keeps tokens for bonding.targets— validators selected in the targets.
4. Sign and send transaction
UseunsignedTransactionData to sign and send the transaction following the Polkadot-specific signing logic.
Unstaking flow
1. Create unbonding request
Send a POST request to /api/v1/unified/staking/unstake. Example request (forwestend network):
chain— blockchain network.network— environment in which the transaction is processed.stakerAddress— account address initiated the bonding transaction.extra— additional parameters:amount— amount of tokens to unbond. DOT for mainnet, KSM for Kusama and WND for Westend.
-
createdAt— timestamp of the transaction in the ISO 8601 format. -
extraData— additional transaction details:unsignedTransactionData— unsigned transaction in Base64 encrypted format. Sign the transaction and submit it to the blockchain to perform the called action.stashAccountAddress— main stash account address which keeps tokens for bonding.amount— amount of tokens to unbond. DOT is used for the main network, KSM for Kusama, and WND for Westend.
2. Sign and send transaction
UseunsignedTransactionData to sign and send the transaction following the Polkadot-specific signing logic.
3. Create withdrawal request
Note that the withdrawal is available only after the unbonding period. It takes 7 days (28 eras) to unbond on Kusama, 28 days (28 eras) on Polkadot, and 12 hours (2 eras) on Westend.
westend network):
chain— blockchain network.network— environment in which the transaction is processed.stakerAddress— account address initiated the unbonding transaction.
stakerAddress— account address initiating the withdrawal transaction.unsignedTransactionData— unsigned transaction in Base64 encrypted format. Sign the transaction and submit it to the blockchain to perform the called action.createdAt— timestamp of the transaction in the ISO 8601 format.extraData— additional transaction details.
4. Sign and send transaction
UseunsignedTransactionData to sign and send the transaction following the Polkadot-specific signing logic.