Basic Description

This endpoint is used to create an Unstaking Request in Taurus-PROTECT in the Fantom Network.
To understand what Staking is, please refer to the following page in the Taurus User Guides.

This endpoint would accept a POST Request with a JSON payload containing the Unstaking Request details.

The amount , fromAddressId , and toValidatorAddressIdare the three required parameters that must be included within the JSON payload.

🚧

Staking Amount for FTM

It is important to note that in the Fantom Network, you are allowed to select the amount you want to stake.

Prerequisites

Required Roles

Certain API endpoints require that the user has a specific role in order to access them. Roles are used to restrict access to certain functionality within the system and ensure that only authorized users are able to perform specific actions.

Here is the list of required Roles for this particular endpoint:

  • RequestCreator
  • TPUser

To find out more about roles, please refer to the following page in the Taurus User Guides.

Required Input Parameters

Certain API endpoints require specific input parameters. Here is the list of Required Input Parameters for this particular endpoint:

  • fromAddressId : the originating Address
  • amount : the amount you would like to unstake
  • toValidatorAddressId : the destination Validator Address used for Staking

📘

Preconditions

It is important to note that the selected Addresses needs to pre-exist and be active in the system. In addition, the originating Address should have already been used for Staking, otherwise the Unstaking Request will fail.

Call Example

You can find a basic example in cURL below.
Please note that you will need to update the BASEURL and the APITOKEN for the command to function.
In this example, Taurus-PROTECT has created a new Unstaking Request from Address 271633 to Validator Address 1466 with 1 FTM as the specified amount to unstake and has assigned it a unique ID of 4268654.

export BASEURL=https://taurus-protect-instance.com
export APIToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZXh0ZXJuYWxVc2VySUQiOiJ0ZWFtMUV4dGVybmFsVXNlcklEIiwidGVuYW50SUQiOjEsImNhcGl0YWxUZW5hbnRJRCI6MSwiZmlyc3RuYW1lIjoiSm9obiIsImxhc3RuYW1lIjoiRG9lIiwicm9sZXMiOlsidHB1c2VyIl0sImVtYWlsIjoidGVhbTFAYmFuay5jb20iLCJ1c2VybmFtZSI6InRlYW0xIiwiand0X3JlbmV3YWJsZV9hbW91bnQiOjAsImlzX3RvdHBfZW5hYmxlZCI6ZmFsc2UsImF1dGhfc3RhdHVzIjoiU1VDQ0VTUyIsImxhc3RfbG9naW4iOiIyMDIzLTAxLTAxVDAwOjAwOjAwLjE0OTc0NDIzMloiLCJsb2dnZWRfaW5fd2l0aF9zc28iOmZhbHNlLCJrZXkiOiIiLCJleHAiOjE2ODEyMTkyNzYsImlhdCI6MTY4MTIxNzQ3Nn0.K_85arIrigpkN1yHttCydpeT6oVg2c6PyQnuji907Og
curl --location "$BASEURL/api/rest/v1/requests/outgoing/ftm/undelegate" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $APIToken" \
--data '{
    "amount": "1000000000000000000",
    "fromAddressId": "271633",
    "toValidatorAddressId": "1466"
}'

This piece of code sends a POST request to https://your-protect-instance.example.com/api/rest/v1/requests/outgoing/ftm/undelegate with the JSON string in the request body.

👍

Call Result

A successful response for the POST call to create an Unstaking Request for FTM might look like this:

{
    "result": {
        "approvers": {
            "parallel": [
                {
                    "sequential": [
                        {
                            "externalGroupID": "team1",
                            "minimumSignatures": 1
                        },
                        {
                            "externalGroupID": "team2",
                            "minimumSignatures": 1
                        }
                    ]
                }
            ]
        },
        "currency": "FTM",
        "currencyInfo": {
            "blockchain": "FTM",
            "coinTypeIndex": "1007",
            "decimals": "18",
            "displayName": "Fantom - FTM",
            "enabled": true,
            "hasStaking": true,
            "id": "3f50870eb1981f3093f05cc30e6d89cb31e39a5d422643c018cf4df0c41456b9",
            "isAccountBased": true,
            "name": "Fantom",
            "network": "mainnet",
            "symbol": "FTM",
            "type": "native"
        },
        "envelope": "Cgc0MjY4NjU0EIe6/NSTqMyuFxgPKtQHCCgSkQEKdgoUbS80NCcvMTAwNycvNCcvMCcvMCcYoMIeKioweGZjMDBmYWNlMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAyAQBCKzI3MTYzMzphMWQ4NDIwYS1lN2NmLTQzYjItYmI1Mi1kNjU1NDkyMThjNzQQHBgBIMidwp/1p5zrxQEqCAFjRXhdigAAIhcKCnJlcXVlc3RfaWQQARoHNDI2ODY1NCI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c3QQARoFZmFsc2U6B21haW5uZXQ=",
        "id": "4268654",
        "rule": "rule = [source: any, amount: any], approvals = ['team1': 1 sig, 'team2': 1 sig]",
        "status": "CREATED",
        "tenantId": "1",
        "trails": [
            {
                "action": "created",
                "externalUserId": "[email protected]",
                "requestStatus": "CREATED",
                "userId": "11"
            },
            {
                "action": "approvers_assigned",
                "comment": "rule = [source: any, amount: any], approvals = ['team1': 1 sig, 'team2': 1 sig]",
                "externalUserId": "[email protected]",
                "requestStatus": "CREATED",
                "userId": "1"
            }
        ],
        "type": "ftm_undelegate"
    }
}

Taurus-PROTECT responds with a JSON object containing the Unstaking Request details, including the Request status and the newly assigned Requestid.

Requirements for Future Use

For this particular endpoint, we need to store the Requestid as it will be required in the next step where we will sign the Unstaking Request.

You can find the Swagger-generated page for this endpoint in the following link.




  © 2025 Taurus SA. All rights reserved.