Basic Description

This endpoint is used to create a Staking Request in Taurus-PROTECT in the Polkadot 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 Staking Request details.

The amount and fromAddressId are the only required parameters that must be included within the JSON payload.

🚧

Staking Amount for DOT

It is important to note that in the Polkadot 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 use 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 cannot have a zero balance for the Staking Request to succeed.

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 Staking Request from Address 485964 with 1 DOT as the specified amount and has assigned it a unique ID of 4235015.

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

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

👍

Call Result

A successful response for the POST call to create a Staking Request for DOT might look like this:

{
    "result": {
        "approvers": {
            "parallel": [
                {
                    "sequential": [
                        {
                            "externalGroupID": "team1",
                            "minimumSignatures": 1
                        }
                    ]
                }
            ]
        },
        "currency": "DOT",
        "currencyInfo": {
            "blockchain": "DOT",
            "coinTypeIndex": "354",
            "decimals": "10",
            "displayName": "Polkadot - DOT",
            "enabled": true,
            "hasStaking": true,
            "id": "cadc2268107de6d9749ca1d1a2f8df20f7cea5263a5cf3fb852395be08947a13",
            "isAccountBased": true,
            "name": "Polkadot",
            "network": "mainnet",
            "symbol": "DOT",
            "type": "native"
        },
        "envelope": "Cgc0MjM1MDE1EP7F6b7s3cOtFxgOKpsGCCASVAoFAlQL5AAaSworNDg1OTY0OjlmOTk5YjdmLTNkNDEtNDg4MC1iNDE2LWI0ZTQ0ZGE5MWQwNhITbS80NCcvMzU0Jy8zJy8wJy8yJzIBAGIECVLymCIXCgpyZXF1ZXN0X2lkEAEaBzQyMzUwMTUiFwoJcnVsZXNfa2V5EAEaCERPVF9Cb25kIhEKCGN1cnJlbmN5EAEaA0RPVCIhCg1jdXJyZW5jeV9uYW1lEAEaDlBvbGthZG90IC0gRE9UIlEKC2N1cnJlbmN5X2lkEAEaQGNhZGMyMjY4MTA3ZGU2ZDk3NDljYTFkMWEyZjhkZjIwZjdjZWE1MjYzYTVjZjNmYjg1MjM5NWJlMDg5NDdhMTMiFAoHbmV0d29yaxABGgdtYWlubmV0InoKBnNvdXJjZRAEGmYIARJiCMzUHRIwMTJRM3NidkpLMWJ2OFIxbUEybVNROFIyWjZIVGhOZzVZdFg2VWlDcHU2VTZZb0tmGhVOb3N0cm8gbWFpbiBhZGRyZXNzIDEiE20vNDQnLzM1NCcvMycvMCcvMiciBnNvdXJjZSKmAQoGYW1vdW50EAoakQEKBQJUC+QAEgY1LjE3MDQaETUuMTcwNDk2OTk5OTk5OTk5IAoqA0RPVDIDQ0hGOmEKHXZhbGlkYXRvci1jb3JlQHRhdXJ1c2dyb3VwLmNoEkCUK9LN6ANhqH03ivxx5rhGcoICKllPEUCgNn46HNluxCHJRaIhEhFLhVbNVCVqxBgcobwwN8Ch6sWtUrjVSAiYIgZhbW91bnQiEQoGc3Rha2VkEAEaBWZhbHNlIh0KEXRvdGFsX2ZpYXRfYW1vdW50EAEaBjUuMTcwNCIWCgpmZWVfbGltaXRzEAMaBgoECVLymCIfChF2YWxpZF91bnRpbF9ibG9jaxACGggAAAAAAOoHNiJCCg90cmFuc2FjdGlvbl9pZHMQBhotCis0ODU5NjQ6OWY5OTliN2YtM2Q0MS00ODgwLWI0MTYtYjRlNDRkYTkxZDA2IhwKEWlzX2NhbmNlbF9yZXF1ZXN0EAEaBWZhbHNlOgdtYWlubmV0",
        "id": "4235015",
        "rule": "rule = [source: any, amount: any], approvals = ['team1': 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]",
                "externalUserId": "[email protected]",
                "requestStatus": "CREATED",
                "userId": "1"
            }
        ],
        "type": "dot_bond"
    }
}

Taurus-PROTECT responds with a JSON object containing the Staking 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 Staking Request.

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




  © 2025 Taurus SA. All rights reserved.