Getting Started
Staking with Story Protocol via the Staking API consists of several main steps:
- Create a stake transaction.
- Sign and send the transaction to the network.
Get an authentication token to start using Staking API.
A request example is provided using cURL.
1. Create Stake Transaction
Send a POST request to /api/v1/story/[network]/staking/stake.
Example request (for aeneid
network):
curl --request POST \
--url https://api-test.p2p.org/api/v1/story/aeneid/staking/stake \
--header 'accept: application/json' \
--header 'authorization: Bearer <token>' \
--header 'content-type: application/json' \
--data '{
"amount": 1024,
"delegatorAddress": "0x3202B5B0602274197CcB22B8c02CEC9539990c7c",
"stakingPeriod": 0,
"tokenType": "UNLOCKED",
"gas": {
"maxFeePerGas": 100,
"maxPriorityFeePerGas": 1,
"gasLimit": 21000
}
}'
amount
— amount of tokens to stake (in native token units, not wei).delegatorAddress
— address initiating the stake operation.stakingPeriod
— Staking duration: 0 = FLEXIBLE, 1 = SHORT, 2 = MEDIUM, 3 = LONG.tokenType
— Type of token being staked: LOCKED or UNLOCKED.gas
— optional gas settings: maxFeePerGas, maxPriorityFeePerGas, gasLimit.
Example response:
{
"result": {
"unsignedTransaction": "0xf86e808504a817c80082520894c32e3d7c7e6e53d16b9a48d0ae76c70e6adf09f080801ba0f31401df9e6f6d861fdf09d1e69b5f51855f4f63b0179033a6c3871c05ec93da03e0f7d7eab4a3179b29b416d6c75dbe53de763153b7ed9e2c49883c8fca1ef29c",
"createdAt": "2025-07-22T12:34:56.789Z"
}
}
unsignedTransaction
— unsigned transaction in RLP or raw hex format. Sign this to proceed.createdAt
— timestamp of the transaction in the ISO 8601 format.
The unsigned transaction must be signed and submitted within a limited time window (e.g., 1 minute).
2. Sign and Send Transaction
Use unsignedTransaction
to sign and send the signed transaction to the Story Protocol network.
What's Next?
- Sign and Send Transaction.
- Withdrawal.
- Staking API reference.
Updated about 22 hours ago