curl --request POST \
--url https://api.dfns.io/staking/stakes/{stakeId}/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-DFNS-USERACTION: <api-key>' \
--data '
{
"protocol": "Iota",
"kind": "Withdraw",
"amount": "<string>",
"externalId": "<string>"
}
'{
"id": "stk-0pmu3-tog2k-fdtn0teii2i4r13f",
"walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
"status": "Active",
"requester": {
"userId": "us-6b58p-r53sr-rlrd3l5cj3uc4ome",
"tokenId": "to-202a0-cdo33-o65mbt6q758lvvnt"
},
"requestBody": {
"protocol": "Babylon",
"walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
"provider": "Figment",
"amount": "<string>",
"duration": 123,
"externalId": "<string>"
},
"dateCreated": "2023-04-14T20:41:28.715Z",
"protocol": "Babylon",
"data": {
"finalityProviders": [
"<string>"
],
"covenantPubkeys": [
"<string>"
],
"magicBytes": "<string>",
"covenantThreshold": 123,
"minUnbondingTime": 123,
"lockHeight": 123
},
"actions": [
{
"id": "stka-567ui-9g9b7-ftgvpstk8qfa71b4",
"stakeId": "stk-0pmu3-tog2k-fdtn0teii2i4r13f",
"status": "PendingPolicyApproval",
"kind": "Stake",
"requester": {
"userId": "us-6b58p-r53sr-rlrd3l5cj3uc4ome",
"tokenId": "to-202a0-cdo33-o65mbt6q758lvvnt"
},
"requestBody": {
"protocol": "Babylon",
"walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
"provider": "Figment",
"amount": "<string>",
"duration": 123,
"externalId": "<string>"
},
"dateCreated": "2023-04-14T20:41:28.715Z",
"transactionId": "tx-583hu-sp2p7-slvb9nqpa3hd8bus",
"signatureId": "sig-4sfvl-f4iha-umighfi3hk4t54dr",
"transactionHash": "<string>",
"failureReason": "<string>"
}
],
"provider": "Figment"
}Create a new action for an existing stake.
curl --request POST \
--url https://api.dfns.io/staking/stakes/{stakeId}/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-DFNS-USERACTION: <api-key>' \
--data '
{
"protocol": "Iota",
"kind": "Withdraw",
"amount": "<string>",
"externalId": "<string>"
}
'{
"id": "stk-0pmu3-tog2k-fdtn0teii2i4r13f",
"walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
"status": "Active",
"requester": {
"userId": "us-6b58p-r53sr-rlrd3l5cj3uc4ome",
"tokenId": "to-202a0-cdo33-o65mbt6q758lvvnt"
},
"requestBody": {
"protocol": "Babylon",
"walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
"provider": "Figment",
"amount": "<string>",
"duration": 123,
"externalId": "<string>"
},
"dateCreated": "2023-04-14T20:41:28.715Z",
"protocol": "Babylon",
"data": {
"finalityProviders": [
"<string>"
],
"covenantPubkeys": [
"<string>"
],
"magicBytes": "<string>",
"covenantThreshold": 123,
"minUnbondingTime": 123,
"lockHeight": 123
},
"actions": [
{
"id": "stka-567ui-9g9b7-ftgvpstk8qfa71b4",
"stakeId": "stk-0pmu3-tog2k-fdtn0teii2i4r13f",
"status": "PendingPolicyApproval",
"kind": "Stake",
"requester": {
"userId": "us-6b58p-r53sr-rlrd3l5cj3uc4ome",
"tokenId": "to-202a0-cdo33-o65mbt6q758lvvnt"
},
"requestBody": {
"protocol": "Babylon",
"walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
"provider": "Figment",
"amount": "<string>",
"duration": 123,
"externalId": "<string>"
},
"dateCreated": "2023-04-14T20:41:28.715Z",
"transactionId": "tx-583hu-sp2p7-slvb9nqpa3hd8bus",
"signatureId": "sig-4sfvl-f4iha-umighfi3hk4t54dr",
"transactionHash": "<string>",
"failureReason": "<string>"
}
],
"provider": "Figment"
}Documentation Index
Fetch the complete documentation index at: https://docs.dfns.co/llms.txt
Use this file to discover all available pages before exploring further.
CustomerEmployee)EndUser)Stakes:Update: Always required.Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows
User Action Signature: Used to sign the change-inducing API requests. More details how to generate the token: User Action Signing flows
1 - 64^stk-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$Success
1 - 64^stk-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$"stk-0pmu3-tog2k-fdtn0teii2i4r13f"
Wallet id.
1 - 64^wa-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$"wa-5pfuu-9euek-h0odgb6snva8ph3k"
Status of the stake position.
| Status | Definition |
|---|---|
Staking | The stake is being created and funds are being delegated to the validator. |
Active | The stake is active and earning rewards. |
Unbonding | The stake is in the process of being unbonded (cooldown period). |
Unbond | The stake has been unbonded and is ready for withdrawal. |
Withdrawing | The staked funds are in the process of being withdrawn. |
Withdrawn | The staked funds have been fully withdrawn. |
Failed | The staking operation failed. |
Active, Failed, Staking, Unbonding, Unbond, Withdrawing, Withdrawn The user who initiated the request.
Show child attributes
Show child attributes
Babylon Show child attributes
Show child attributes
The staking infrastructure provider used to manage the stake.
Figment Was this page helpful?