Investors, warrants & staking
Create Staking Configuration
Creates a new versioned staking configuration for the org and marks all previous versions not current.
POSThttps://api.toku.com/tga/create-staking-configuration
Not available to API keys yet. It will need grants:write.
curl --request POST \
--url 'https://api.toku.com/tga/create-staking-configuration' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"maxStakePercentage": "string",
"bufferPeriod": 0,
"cooldownPeriod": 0,
"stakingTypesEnabled": [
"string"
]
}'200 response
{
"stakingConfigurationID": "string",
"orgID": "string",
"maxStakePercentage": "string",
"bufferPeriod": 0,
"cooldownPeriod": 0,
"versionNumber": 0,
"createdAt": "string",
"updatedAt": "string",
"isCurrent": true,
"stakingTypesEnabled": [
"UNVESTED_LOCKED_TOKENS"
]
}Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.
Body
application/json
maxStakePercentagestringrequiredNOTE(ck): a .transform() rule is not mirrored here; TGA still enforces it
Allowed: matches ^\d+(?:\.\d+)?$
bufferPeriodintegerrequiredAllowed: at least 0
cooldownPeriodintegerrequiredAllowed: at least 0
stakingTypesEnabledstring[]requiredAllowed: at most 50 items
Response
200Successful response
stakingConfigurationIDstringrequiredorgIDstringrequiredmaxStakePercentagestringrequiredAllowed: matches ^-?\d+(?:\.\d+)?(?:e[+-]?\d+)?$
bufferPeriodintegerrequiredcooldownPeriodintegerrequiredversionNumberintegerrequiredcreatedAtstringrequiredupdatedAtstringrequiredisCurrentbooleanrequiredstakingTypesEnabledstring[]required400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits