Withdraw Rewards

Withdraw ADA Rewards :

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

JSON

{
  "protocol": "cardano",
  "network": "preprod",
  "operation": "withdraw_rewards"
}

Response

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