Withdraw Rewards
Withdraw ADA Rewards :
- Delegator Address: The address to which ADA will be transferred from the Reward Account.
- Please note the Withdraw Rewards Flow will withdraw the whole amount. Partial withdrawals are not supported.
In the following guide we will illustrate how to withdraw ADA rewards accrued in a Reward Account.
Create New Withdraw Rewards Flow
To initiate the Withdraw Rewards process, create a new flow with a POST request to /flows.
URL
POST https://api.figment.io/flows
Request
protocol* :stringProtocol this flow operates on (ex.cardano).network* :stringNetwork this flow operates on (ex.preprod).operation* :stringThe operation to perform (ex.withdraw_rewards).
JSON
{
"protocol": "cardano",
"network": "preprod",
"operation": "withdraw_rewards"
}
Response
id:stringID of the flow.operation:stringThe Staking API operation being performed by this flow.state:stringThe current state of the flow.actions:arrayIt includes thename&inputsof all next possible actions.create_withdraw_tx: Use this action to withdraw ADA rewards.delegator_address: The delegator address to which ADA will be transferred from the Reward Account.
data:objectFlow & transaction data.
JSON
{
"id": "b31a3ccb-24c2-40d6-a89f-bf565b9f918e",
"operation": "withdraw_rewards",
"state": "initialized",
"actions": [
{
"name": "create_withdraw_tx",
"inputs": [
{
"name": "delegator_address",
"display": "Delegator Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
],
"data": {
"delegator_address": null,
"withdraw_transaction": null
},
"protocol": "cardano",
"network": "preprod",
"created_at": "2023-09-27T20:03:57.329Z",
"updated_at": "2023-09-27T20:03:57.329Z"
}
Submit Withdraw Rewards Transaction Data
After collecting the required inputs, send a PUT request to /flows/[:flow_id]/next to proceed to the next step.
URL
PUT https://api.figment.io/flows/[:flow_id]/next
Request
name* :create_withdraw_txinputs* :object- `delegator_address\