Skip to main content
POST
/
create-stake
Create Stake
curl --request POST \
  --url https://tokens.shakesco.com/create-stake \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_ref": "<string>",
  "amount": 123,
  "lock_duration": "<string>"
}
'
{ "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. Locks tokens from the customer’s available balance into a new stake position. Rewards accrue proportionally to the lock duration (see /set-staking-rate). Each customer can have at most 50 active stakes; use /prune-inactive-stakes to clear unlocked ones.
Treat this as a transaction. If you don’t get a response, fetch /stake-count before retrying.

Request Body

customer_ref
string
required
Your unique identifier for this customer
amount
number
required
Number of tokens to lock. Decimals allowed.
lock_duration
string
required
Lock period in seconds (e.g. "2592000" = 30 days)

Response

tx_hash
string
Reference identifier for the stake
await fetch("https://tokens.shakesco.com/create-stake", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    customer_ref: "customer-123",
    amount: 100,
    lock_duration: "2592000",
  }),
});
{ "tx_hash": "0xabc..." }