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

Authorizationstringheaderrequired

Bearer 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

maxStakePercentagestringrequired

NOTE(ck): a .transform() rule is not mirrored here; TGA still enforces it

Allowed: matches ^\d+(?:\.\d+)?$

bufferPeriodintegerrequired

Allowed: at least 0

cooldownPeriodintegerrequired

Allowed: at least 0

stakingTypesEnabledstring[]required

Allowed: at most 50 items

Response

200Successful response
stakingConfigurationIDstringrequired
orgIDstringrequired
maxStakePercentagestringrequired

Allowed: matches ^-?\d+(?:\.\d+)?(?:e[+-]?\d+)?$

bufferPeriodintegerrequired
cooldownPeriodintegerrequired
versionNumberintegerrequired
createdAtstringrequired
updatedAtstringrequired
isCurrentbooleanrequired
stakingTypesEnabledstring[]required
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits