Skip to main content
POST
/
set-staking-rate
Set Staking Rate
curl --request POST \
  --url https://tokens.shakesco.com/set-staking-rate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "base_duration": "<string>",
  "base_reward_percent": 123
}
'
{ "tx_hash": "0xabc..." }

Documentation Index

Fetch the complete documentation index at: https://docs.shakesco.com/llms.txt

Use this file to discover all available pages before exploring further.

For the complete documentation index, see llms.txt. Sets the base reward rate for your token. Every customer stake is calculated proportionally from this base: a customer locking for half the base duration earns half the base reward, locking for double earns double, and so on. You only need to call this once unless you want to change the rate. Stakes created before a rate change keep their original reward percent.
This must be set before customers can create stakes. /create-stake returns 400 Invalid parameters until you do.

Request Body

base_duration
string
required
Base lock period in seconds (e.g. "31536000" = 1 year)
base_reward_percent
number
required
Reward earned over the base period, in percent. 20 = 20%. Decimals allowed (12.5).

Response

tx_hash
string
Reference identifier for the rate change
await fetch("https://tokens.shakesco.com/set-staking-rate", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ base_duration: "31536000", base_reward_percent: 20 }),
});
{ "tx_hash": "0xabc..." }