Skip to main content

Staking API - Polkadot


API AuthenticationClick to view API Authentication details
API calls require authentication with API key via Authorization request header or URL property. Calls are made to one of the Polkadot Staking API endpoints found in your app's dashboard.

For example: https://polkadot-slate.datahub.figment.io

Here's some boilerplate to get you started.
fetch("https://polkadot-slate.datahub.figment.io/api/v1/flows", {
method: 'POST', // can also be 'GET', 'PUT' or any appropriate method
headers: {
"Authorization" : "<api_key>",
"Content-Type": "application/json" // if method is 'POST'
},
body: JSON.stringify({
// JSON Payload
})
})

Available Methods

Create New Delegation Flow

To initiate the staking process, create a new flow with a POST request to /api/v1/flows.

Request Body
Example Response
{
"id": "705bd51b-f9a7-4dbf-aa78-2523e32bd24a",
"operation": "staking",
"state": "initialized",
"actions": [
{
"name": "assign_stash_and_controller_account",
"inputs": [
{
"name": "controller_account_address",
"display": "Controller Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "controller_proxy_account_address",
"display": "Controller Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
},
{
"name": "stash_account_address",
"display": "Stash Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "stash_proxy_account_address",
"display": "Stash Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
}
]
},
{
"name": "create_bonding_tx",
"inputs": [
{
"name": "controller_account_address",
"display": "Controller Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "controller_proxy_account_address",
"display": "Controller Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
},
{
"name": "stash_account_address",
"display": "Stash Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "stash_proxy_account_address",
"display": "Stash Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
},
{
"name": "reward_destination",
"display": "Reward Destination",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "amount",
"display": "Amount",
"description": "in DOT",
"type": "decimal",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
],
"data": {
"controller_account_address": null,
"controller_proxy_account_address": null,
"stash_account_address": null,
"stash_proxy_account_address": null,
"validator_addresses": null,
"reward_destination": null,
"amount": null,
"bonding_transaction": null,
"nomination_transaction": null,
"bond_more_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T17:13:26.096Z",
"updated_at": "2023-02-28T17:13:26.096Z"
}
SpecificationView Specification

Parameters

  • flowobject
    • network_codestring Network this flow operates on (ex. polkadot) (required).
    • chain_codestring Chain this flow operates on (ex. westend) (required).
    • operation string The operation to perform (ex. staking) (required).
    • versionstring API version to use (ex. v1) (optional).

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • assign_stash_and_controller_account — Use this action if you already have a controller account set up and wish to add bond to it.
      • create_bonding_tx — Use this action if you do not have a controller account set up and would like to create a controller and bond tokens.
      • controller_account_address — The wallet to which the DOT will be bonded.
      • controller_proxy_account_address — A proxy account that will sign on behalf of the controller account.
      • stash_account_address — Primary wallet from which DOT will be bonded.
      • stash_proxy_account_address — A proxy account that will sign on behalf of the stash account.
      • reward_destination — Indicates whether rewards are to be:
        • Added to the staked balance: Staked.
        • Sent to the controller account, liquid: Controller.
        • Sent to the stash account, liquid: Stash.
      • amount — The amount of DOT to be bonded to the controller. This field should be in full DOT, not in Planck (ie. if you want to stake 5 DOT, return "amount": 5.0). The Staking API will translate the amount to Plancks so you do not have to worry about the conversion factor.
  • dataobject Delegation flow & transaction data.

Submit Bonding Transaction Data

After creating a new staking flow, submit the staking account data. Collect the required inputs. Send a PUT request to /api/v1/flows/[:flow_id]/next to proceed to the next step.

Request Body
Example Response
{
"id": "90a28f6e-09b4-4fe1-aeb4-c8e3720933ab",
"operation": "staking",
"state": "bonding_tx_signature",
"actions": [
{
"name": "refresh_bonding_tx",
"inputs": [
{
"name": "controller_account_address",
"display": "Controller Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
},
{
"name": "controller_proxy_account_address",
"display": "Controller Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
},
{
"name": "stash_account_address",
"display": "Stash Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t"
},
{
"name": "stash_proxy_account_address",
"display": "Stash Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
},
{
"name": "reward_destination",
"display": "Reward Destination",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t"
},
{
"name": "amount",
"display": "Amount",
"description": "in DOT",
"type": "decimal",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "1.0"
}
]
},
{
"name": "sign_bonding_tx",
"inputs": [
{
"name": "transaction_payload",
"display": "Transaction Payload",
"description": "",
"type": "signed_transaction",
"validations": [
{
"type": "sign_payload",
"options": {}
}
],
"array": false,
"default_value": null,
"signers": [
"5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t"
],
"transaction_payload": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00000000000000000000000000000000000000000000000000000000000000000000000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec7451c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004"
},
{
"name": "signatures",
"display": "Signatures",
"description": "",
"type": "array_of_signatures",
"validations": [],
"array": true,
"default_value": null,
"element_type": "signature_data",
"signers": [
"5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t"
],
"transaction_payload": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00000000000000000000000000000000000000000000000000000000000000000000000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec7451c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"inputs": [
{
"name": "account_address",
"display": "Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "signature",
"display": "Signature",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
]
},
{
"name": "confirm_bonding_tx_by_hash",
"inputs": [
{
"name": "hash",
"display": "Hash",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "block_number",
"display": "Block Number",
"description": "",
"type": "integer",
"validations": [],
"array": false,
"default_value": null
}
]
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"stash_proxy_account_address": null,
"validator_addresses": null,
"reward_destination": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"bonding_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00000000000000000000000000000000000000000000000000000000000000000000000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec7451c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": null,
"hash": null,
"status": null,
"error": null,
"signatures": null,
"block_time": null,
"block_number": null,
"proxy": false
},
"nomination_transaction": null,
"bond_more_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T17:28:38.940Z",
"updated_at": "2023-02-28T18:05:30.096Z"
}
SpecificationView Specification

Parameters

  • namestring Name of the action to execute (required).
  • inputsobject
    • controller_account_addressstring Address of the wallet to which the DOT will be bonded (required).
    • controller_proxy_account_addressstring A proxy account that will sign on behalf of the controller account (optional).
    • stash_account_addressstring Primary wallet from which DOT will be bonded. Cannot have a zero balance (required).
    • stash_proxy_account_addressstring A proxy account that will sign on behalf of the controller account (optional).
    • reward_destinationstring Reward destination (required). Indicates whether rewards are to be:
      • Staked Added to the staked balance.
      • Controller Sent to the controller account, liquid.
      • Stash Sent to the stash account, liquid. Providing the stash_account_address is equivalent to using Stash.
    • amountnumber — The amount of DOT to be bonded to the controller. Minimum of 1.0. This field should be in full DOT, not in Planck (ie. if you want to stake 5 DOT, return "amount": 5.0). Staking API will translate the amount to Plancks so you do not have to worry about the conversion factor (required).

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • refresh_bonding_tx — If you need to get a fresh version of the transaction payload (i.e., the nonce has increased).
    • sign_bonding_tx — Submit a signed transaction payload ready to be broadcast to the network.
  • dataobject Delegation flow & transaction data.

Submit Bond More Transaction Data

Bond more tokens between an existing Stash and Controller account. The required input is the amount. Send a PUT request to /api/v1/flows/[:flow_id]/next to proceed to the next step.

Request Body
Example Response
{
"id": "2dd1fb5e-d089-4aca-81e9-fb52f2e245d1",
"state": "bond_more_tx_signature",
"actions": [
{
"name": "refresh_bond_more_tx",
"inputs": [
{
"name": "amount",
"display": "Amount",
"description": "in DOT",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
},
{
"type": "numericality",
"options": {
"greater_than": 0
}
}
],
"array": false,
"default_value": "1.0"
}
]
},
{
"name": "sign_bond_more_tx",
"inputs": [
{
"name": "transaction_payload",
"display": "Transaction Payload",
"description": "",
"type": "signed_transaction",
"validations": [
{
"type": "sign_payload",
"options": {}
}
],
"array": false,
"default_value": null,
"signers": [
"5FNVfA6qhVJBKrG4KCo6CLzvcXVRRdiGpsYHbkzujMUG6JJG"
],
"transaction_payload": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000601070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004"
},
{
"name": "signatures",
"display": "Signatures",
"description": "",
"type": "array_of_signatures",
"validations": [],
"array": true,
"default_value": null,
"element_type": "signature_data",
"signers": [
"5FNVfA6qhVJBKrG4KCo6CLzvcXVRRdiGpsYHbkzujMUG6JJG"
],
"transaction_payload": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000601070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0601070010a5d4e8000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"inputs": {
"input_klass": "Workflows::Signature",
"input_instance": {
"account_address": null,
"signature": null
},
"flow": {
"workflow_state": "bond_more_tx_signature",
"id": 3770,
"customer_id": 40,
"chain_id": 8,
"data": {
"controller_account_address": "5EsUYYB1wj2MYkQF1Wrr4gQo8L2v5aRZWjZunxRjFXdUm81k",
"controller_proxy_account_address": null,
"stash_account_address": "5FNVfA6qhVJBKrG4KCo6CLzvcXVRRdiGpsYHbkzujMUG6JJG",
"stash_proxy_account_address": null,
"validator_addresses": null,
"reward_destination": "5FNVfA6qhVJBKrG4KCo6CLzvcXVRRdiGpsYHbkzujMUG6JJG",
"amount": "1.0",
"bonding_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000600007c242fcd1bb54e2a6af7791e7f2392ffe9e8069498c0fe841bcd87889c59121d070010a5d4e80392460dcf0b9ae6cabf654c1b33f02f52934d1ae262f8db733b470b631c5871651c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0600007c242fcd1bb54e2a6af7791e7f2392ffe9e8069498c0fe841bcd87889c59121d070010a5d4e80392460dcf0b9ae6cabf654c1b33f02f52934d1ae262f8db733b470b631c587165000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xc102840092460dcf0b9ae6cabf654c1b33f02f52934d1ae262f8db733b470b631c58716501f0890cf1144825f8e40321cf344105c6af1a17e62e2c73c5e9681037dce1c250843ace78df337737c23935fcdf9da1a67c911fb90fbe9541241b63e01edf9e840000000600007c242fcd1bb54e2a6af7791e7f2392ffe9e8069498c0fe841bcd87889c59121d070010a5d4e80392460dcf0b9ae6cabf654c1b33f02f52934d1ae262f8db733b470b631c587165",
"hash": "0x6a967111a86491612dae27bdc6dcbfcd01884c994737e54f0941afffe36f6649",
"status": "confirmed",
"error": null,
"signatures": [],
"block_number": 14742751,
"proxy": false
},
"nomination_transaction": null,
"bond_more_transaction": {
"raw": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000601070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0601070010a5d4e8000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": null,
"hash": null,
"status": null,
"error": null,
"signatures": null,
"block_number": null,
"proxy": false
}
},
"created_at": "2023-02-21T19:48:20.974Z",
"updated_at": "2023-02-21T20:00:54.058Z",
"id_public": "2dd1fb5e-d089-4aca-81e9-fb52f2e245d1",
"supported_operation_id": 22
},
"flow_attributes": {},
"empty_input": {
"account_address": null,
"signature": null
}
}
}
]
},
{
"name": "confirm_bond_more_tx_by_hash",
"inputs": [
{
"name": "hash",
"display": "Hash",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "block_number",
"display": "Block Number",
"description": "",
"type": "integer",
"validations": [],
"array": false,
"default_value": null
}
]
}
],
"data": {
"controller_account_address": "5EsUYYB1wj2MYkQF1Wrr4gQo8L2v5aRZWjZunxRjFXdUm81k",
"controller_proxy_account_address": null,
"stash_account_address": "5FNVfA6qhVJBKrG4KCo6CLzvcXVRRdiGpsYHbkzujMUG6JJG",
"stash_proxy_account_address": null,
"validator_addresses": null,
"reward_destination": "5FNVfA6qhVJBKrG4KCo6CLzvcXVRRdiGpsYHbkzujMUG6JJG",
"amount": "1.0",
"bonding_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000600007c242fcd1bb54e2a6af7791e7f2392ffe9e8069498c0fe841bcd87889c59121d070010a5d4e80392460dcf0b9ae6cabf654c1b33f02f52934d1ae262f8db733b470b631c5871651c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0600007c242fcd1bb54e2a6af7791e7f2392ffe9e8069498c0fe841bcd87889c59121d070010a5d4e80392460dcf0b9ae6cabf654c1b33f02f52934d1ae262f8db733b470b631c587165000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xc102840092460dcf0b9ae6cabf654c1b33f02f52934d1ae262f8db733b470b631c58716501f0890cf1144825f8e40321cf344105c6af1a17e62e2c73c5e9681037dce1c250843ace78df337737c23935fcdf9da1a67c911fb90fbe9541241b63e01edf9e840000000600007c242fcd1bb54e2a6af7791e7f2392ffe9e8069498c0fe841bcd87889c59121d070010a5d4e80392460dcf0b9ae6cabf654c1b33f02f52934d1ae262f8db733b470b631c587165",
"hash": "0x6a967111a86491612dae27bdc6dcbfcd01884c994737e54f0941afffe36f6649",
"status": "confirmed",
"error": null,
"signatures": [],
"block_number": 14742751,
"proxy": false
},
"nomination_transaction": null,
"bond_more_transaction": {
"raw": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000601070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0601070010a5d4e8000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": null,
"hash": null,
"status": null,
"error": null,
"signatures": null,
"block_number": null,
"proxy": false
}
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-21T19:48:20.974Z",
"updated_at": "2023-02-21T20:00:54.058Z"
}
SpecificationView Specification

Parameters

  • namestring Name of the action to execute, i.e. create_bond_more_tx (required).
  • inputsobject
    • amountnumber — The amount of DOT to be bonded to the controller. Minimum of 1.0. This field should be in full DOT, not in Planck (ie. if you want to stake 5 DOT, return "amount": 5.0). The Staking API will translate the amount to Plancks so you do not have to worry about the conversion factor (required).

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • refresh_bond_more_tx — If you need to get a fresh version of the transaction payload (i.e., the nonce has increased).
    • sign_bond_more_tx — Submit a signed transaction payload ready to be broadcast to the network.
    • confirm_bond_more_tx_by_hash — Submit a valid extrinsic hash and block number to confirm the transaction on-chain.
  • dataobject Delegation flow & transaction data.

Submit Signed Bonding Transaction for Broadcast

Before broadcasting the transaction, you must sign the transaction_payload you received in the previous step. After signing the transaction, send a PUT request to /api/v1/flows/[:flow_id]/next with the signed payload. The Staking API will broadcast the transaction to the Polkadot network.

Request Body
Example Response
{
"id": "90a28f6e-09b4-4fe1-aeb4-c8e3720933ab",
"operation": "staking",
"state": "bonding_tx_broadcasting",
"actions": [
{
"name": "wait",
"estimated_state_change_at": "2023-02-28T18:42:20.260Z",
"inputs": []
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"stash_proxy_account_address": null,
"validator_addresses": null,
"reward_destination": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"bonding_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00000000000000000000000000000000000000000000000000000000000000000000000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec7451c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xc1028400ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745017e6fb8557959f7c8806aee19a18b54f42336f0f7c814514f66d8fa788b32902722ea6dc1bfe66cf6e402b8f139137900e63e20e72951b780abd3a6d80e640f8b000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745",
"hash": "0xed90569932c9897bd0defbf763d8e9ab24fd849f9c627a5a50d6d622b3f37449",
"status": null,
"error": null,
"signatures": [],
"block_time": null,
"block_number": 14838031,
"proxy": false
},
"nomination_transaction": null,
"bond_more_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T17:41:14.880Z",
"updated_at": "2023-02-28T18:41:20.228Z"
}
SpecificationView Specification

Parameters

  • namestring Name of the action to execute (required).
  • inputsobject
    • transaction_payload — Signed transaction payload from the previous step's response.

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
    • bonding_tx_broadcasting — Broadcasting transaction
    • bonding_complete — Transaction broadcasted & confirmed
  • actionsarray It includes the name & inputs of all next possible actions.
  • dataobject Delegation flow & transaction data.

Get Flow Status

To get the current state of the existing flow, send a GET request to /api/v1/flows/[:flow_id] using the flow ID from the previous step.

Request Query
Example Response
{
"id": "90a28f6e-09b4-4fe1-aeb4-c8e3720933ab",
"operation": "staking",
"state": "bonding_complete",
"actions": [
{
"name": "create_nomination_tx",
"inputs": [
{
"name": "validator_addresses",
"display": "Validator Addresses",
"description": "",
"type": "array_of_strings",
"validations": [
{
"type": "array",
"options": {
"allow_empty": false,
"allow_duplicates": false
}
},
{
"type": "length",
"options": {
"maximum": 16,
"message": "Cannot have more than 16 validators"
}
}
],
"array": false,
"default_value": null
}
]
},
{
"name": "create_bond_more_tx",
"inputs": [
{
"name": "amount",
"display": "Amount",
"description": "in DOT",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
},
{
"type": "numericality",
"options": {
"greater_than": 0
}
}
],
"array": false,
"default_value": "1.0"
}
]
},
{
"name": "complete",
"inputs": []
},
{
"name": "assign_stash_and_controller_account",
"inputs": [
{
"name": "controller_account_address",
"display": "Controller Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
},
{
"name": "controller_proxy_account_address",
"display": "Controller Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
},
{
"name": "stash_account_address",
"display": "Stash Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t"
},
{
"name": "stash_proxy_account_address",
"display": "Stash Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
}
]
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"stash_proxy_account_address": null,
"validator_addresses": null,
"reward_destination": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"bonding_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00000000000000000000000000000000000000000000000000000000000000000000000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec7451c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xc1028400ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745017e6fb8557959f7c8806aee19a18b54f42336f0f7c814514f66d8fa788b32902722ea6dc1bfe66cf6e402b8f139137900e63e20e72951b780abd3a6d80e640f8b000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745",
"hash": "0xed90569932c9897bd0defbf763d8e9ab24fd849f9c627a5a50d6d622b3f37449",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T18:42:42.254Z",
"block_number": 14838035,
"proxy": false
},
"nomination_transaction": null,
"bond_more_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T17:41:14.880Z",
"updated_at": "2023-02-28T18:42:42.261Z"
}
SpecificationView Specification

Parameters

  • None

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
    • bonding_tx_broadcasting — Broadcasting transaction
    • bonding_complete — Transaction broadcasted & confirmed
  • actionsarray It includes the name & inputs of all next possible actions.
  • dataobject Delegation flow & transaction data.

Submit Nomination Addresses

Now that the bond is created, submit a nomination transaction to activate the stake. The previous response indicates one required input: validator_addresses.

Request Body
Example Response
{
"id": "90a28f6e-09b4-4fe1-aeb4-c8e3720933ab",
"operation": "staking",
"state": "nomination_tx_signature",
"actions": [
{
"name": "refresh_nomination_tx",
"inputs": [
{
"name": "validator_addresses",
"display": "Validator Addresses",
"description": "",
"type": "array_of_strings",
"validations": [
{
"type": "array",
"options": {
"allow_empty": false,
"allow_duplicates": false
}
},
{
"type": "length",
"options": {
"maximum": 16,
"message": "Cannot have more than 16 validators"
}
}
],
"array": false,
"default_value": [
"5HYYWyhyUQ7Ae11f8fCid58bhJ7ikLHM9bU8A6Ynwoc3dStR"
]
}
]
},
{
"name": "sign_nomination_tx",
"inputs": [
{
"name": "transaction_payload",
"display": "Transaction Payload",
"description": "",
"type": "signed_transaction",
"validations": [
{
"type": "sign_payload",
"options": {}
}
],
"array": false,
"default_value": null,
"signers": [
"5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
],
"transaction_payload": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f58361c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004"
},
{
"name": "signatures",
"display": "Signatures",
"description": "",
"type": "array_of_signatures",
"validations": [],
"array": true,
"default_value": null,
"element_type": "signature_data",
"signers": [
"5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
],
"transaction_payload": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f58361c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x06050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f5836000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"inputs": [
{
"name": "account_address",
"display": "Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "signature",
"display": "Signature",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
]
},
{
"name": "confirm_nomination_tx_by_hash",
"inputs": [
{
"name": "hash",
"display": "Hash",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "block_number",
"display": "Block Number",
"description": "",
"type": "integer",
"validations": [],
"array": false,
"default_value": null
}
]
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"stash_proxy_account_address": null,
"validator_addresses": [
"5HYYWyhyUQ7Ae11f8fCid58bhJ7ikLHM9bU8A6Ynwoc3dStR"
],
"reward_destination": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"bonding_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00000000000000000000000000000000000000000000000000000000000000000000000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec7451c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xc1028400ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745017e6fb8557959f7c8806aee19a18b54f42336f0f7c814514f66d8fa788b32902722ea6dc1bfe66cf6e402b8f139137900e63e20e72951b780abd3a6d80e640f8b000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745",
"hash": "0xed90569932c9897bd0defbf763d8e9ab24fd849f9c627a5a50d6d622b3f37449",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T18:42:42.254Z",
"block_number": 14838035,
"proxy": false
},
"nomination_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f58361c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x06050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f5836000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": null,
"hash": null,
"status": null,
"error": null,
"signatures": null,
"block_time": null,
"block_number": null,
"proxy": false
},
"bond_more_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T17:41:14.880Z",
"updated_at": "2023-02-28T18:48:11.951Z"
}
SpecificationView Specification

After collecting the required inputs, send a PUT request to /api/v1/flows/[:flow_id]/next to proceed to the next step.

Parameters

  • namestring Name of the action to execute (required).
  • inputsobject
    • validator_addressesarray An array containing the addresses of the validators to which the DOT will be delegated (required).

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • refresh_nomination_tx — If you need to get a fresh version of the transaction payload.
    • sign_nomination_tx — Submit a signed transaction payload ready to be broadcast to the network.
  • dataobject delegation flow & transaction data.

Submit Signed Nomination Transaction for Broadcast

Before broadcasting the transaction, you must sign the transaction_payload you received in the previous step. After signing the transaction, you will PUT /api/v1/flows/[:flow_id]/next and the Staking API will broadcast the transaction to the Polkadot network.

Request Body
Example Response
{
"id": "90a28f6e-09b4-4fe1-aeb4-c8e3720933ab",
"state": "nomination_tx_broadcasting",
"actions": [
{
"name": "wait",
"estimated_state_change_at": "2022-10-06T18:37:59.295Z",
"inputs": []
}
],
"data": {
"controller_account_address": "5FWX3P9gwg4FKAyDHp1UYJp4ZZYPPoQZHfWRcN74HwBgXifh",
"controller_proxy_account_address": null,
"stash_account_address": "5FH4Ek1u9d4V5R1REoary3MDSApLL6vkEEcW2M7fZR9bnUuz",
"stash_proxy_account_address": null,
"validator_addresses": [
"5HYYWyhyUQ7Ae11f8fCid58bhJ7ikLHM9bU8A6Ynwoc3dStR"
],
"reward_destination": "5FH4Ek1u9d4V5R1REoary3MDSApLL6vkEEcW2M7fZR9bnUuz",
"amount": "1.0",
"bonding_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000600009864ac6455584af3c38540ec03927eca126342d266d3c9b62e44b41844a31666070010a5d4e8038e20409ae393dc420d8c9efbc03028dc58718e74bf3c3fec437fc089ae80fc4c1c77657374656e64387061726974792d77657374656e64020000004a2400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a801000000f3ff14d5ab5270590100000017a6bc0d0062aeb3010000000c0000000004",
"signing_payload": "0x0600009864ac6455584af3c38540ec03927eca126342d266d3c9b62e44b41844a31666070010a5d4e8038e20409ae393dc420d8c9efbc03028dc58718e74bf3c3fec437fc089ae80fc4c0000004a2400000c000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xc10284008e20409ae393dc420d8c9efbc03028dc58718e74bf3c3fec437fc089ae80fc4c01feec62b92266c99ce19a4421290b1bfbb56751a783b64ce3d701a5c8ec3e971929000e1849eb07ec7016cc7ff81b67f8a8ae6858b19de6eb313a6871624fbe8d0000000600009864ac6455584af3c38540ec03927eca126342d266d3c9b62e44b41844a31666070010a5d4e8038e20409ae393dc420d8c9efbc03028dc58718e74bf3c3fec437fc089ae80fc4c",
"hash": "0x0c0a1e5b08e91eaeb628437d850c147496901b252903bff2d6e40dcb9e1bfe3e",
"status": "confirmed",
"error": null,
"signatures": [],
"block_number": 12775946,
"proxy": false
},
"nomination_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f58361c77657374656e64387061726974792d77657374656e64020000004a2400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a801000000f3ff14d5ab5270590100000017a6bc0d0062aeb3010000000c0000000004",
"signing_payload": "0x06050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f58360000004a2400000c000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0x290284009864ac6455584af3c38540ec03927eca126342d266d3c9b62e44b41844a3166601ee8b719a3b17e67a5918ccd7552ec57bfa9f2b1e94ef04121434f1fc10fb413df73dd29b931bb91612e87f6c9c3abaa2bfbb2d6e1a987c08e55d1dcf4edfd78500000006050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f5836",
"hash": "0xa11b85fead33991c4bcae2ac9b4ddf8a7b9aee7ebb46907955745d5e6deb38a7",
"status": null,
"error": null,
"signatures": [],
"block_number": 12775987,
"proxy": false
}
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2022-10-06T18:26:22.984Z",
"updated_at": "2022-10-06T18:36:59.284Z"
}
SpecificationView Specification

Parameters

  • namestring Name of the action to execute (required).
  • inputsobject
    • transaction_payload — Signed transaction payload from the previous step's response.

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
    • nomination_tx_broadcasting — The transaction has been broadcasted and is waiting for confirmation.
    • delegated — The transaction is complete and the nomination is active.
  • actionsarray It includes the name & inputs of all next possible actions.
  • dataobject Delegation flow & transaction data.

Get Flow Status

To get the current state of the existing flow, send a GET request to /api/v1/flows/[:flow_id] using the flow ID from the previous step.

Request Query
Example Response
{
"id": "90a28f6e-09b4-4fe1-aeb4-c8e3720933ab",
"operation": "staking",
"state": "delegated",
"actions": [],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"stash_proxy_account_address": null,
"validator_addresses": [
"5HYYWyhyUQ7Ae11f8fCid58bhJ7ikLHM9bU8A6Ynwoc3dStR"
],
"reward_destination": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"bonding_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00000000000000000000000000000000000000000000000000000000000000000000000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec7451c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xc1028400ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745017e6fb8557959f7c8806aee19a18b54f42336f0f7c814514f66d8fa788b32902722ea6dc1bfe66cf6e402b8f139137900e63e20e72951b780abd3a6d80e640f8b000000060000246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679070010a5d4e803ece3c0004ffa0c55acd1bb2ec951f24d6b898fbafee6520dab3022fe12bec745",
"hash": "0xed90569932c9897bd0defbf763d8e9ab24fd849f9c627a5a50d6d622b3f37449",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T18:42:42.254Z",
"block_number": 14838035,
"proxy": false
},
"nomination_transaction": {
"raw": "0x0000000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f58361c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x06050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f5836000000a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0x29028400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e6790138963959f624d1e45e3916920ba27b5907b6f153b5355d08f47b911ab9788e59db6eb9294e01cb3cc748df9dca66cfb32e5aaafed6d5fa1bf7ad14ae47c9788700000006050400f268995cc38974ce0686df1364875f26f2c32b246ddc18835512c3f9969f5836",
"hash": "0x83993811f17c4db71c72ca8f4b5e2fdd291a2531b248499c90254838b92f7e85",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T19:02:57.801Z",
"block_number": 14838234,
"proxy": false
},
"bond_more_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T17:41:14.880Z",
"updated_at": "2023-02-28T19:02:57.808Z"
}
SpecificationView Specification

Parameters

  • None

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
    • nomination_tx_broadcasting — The transaction has been broadcasted and is waiting for confirmation.
    • delegated — The transaction is complete and the nomination is active.
  • actionsarray It includes the name & inputs of all next possible actions.
  • dataobject Delegation flow & transaction data.

Create New Undelegation Flow

To initiate the undelegation process, create a new flow with a POST request to /api/v1/flows.

Request Body
Example Response
{
"id": "86d4a5d4-1c75-4c6a-926d-ab930e57f504",
"state": "initialized",
"actions": [
{
"name": "assign_unstaking_data",
"inputs": [
{
"name": "stash_account_address",
"display": "Stash Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
]
},
{
"name": "controller_account_address",
"display": "Controller Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
]
},
{
"name": "controller_proxy_account_address",
"display": "Controller Proxy Account Address",
"description": "",
"type": "string",
"validations": []
},
{
"name": "amount",
"display": "Amount",
"description": "",
"type": "decimal",
"validations": [
{
"type": "presence",
"options": {
"unless": "maximum"
}
},
{
"type": "precision",
"options": {
"unless": "maximum",
"max": 12
}
}
]
},
{
"name": "maximum",
"display": "Maximum",
"description": "",
"type": "boolean",
"validations": []
}
]
},
{
"name": "create_withdraw_tx",
"inputs": [
{
"name": "stash_account_address",
"display": "Stash Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
]
},
{
"name": "controller_account_address",
"display": "Controller Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
]
},
{
"name": "controller_proxy_account_address",
"display": "Controller Proxy Account Address",
"description": "",
"type": "string",
"validations": []
}
]
}
],
"data": {
"controller_account_address": null,
"controller_proxy_account_address": null,
"stash_account_address": null,
"amount": null,
"maximum": null,
"chill_transaction": null,
"estimated_chilled_at": null,
"unbond_transaction": null,
"unbonding_era": null,
"estimated_unbonded_at": null,
"withdraw_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2022-10-06T16:15:36.383Z",
"updated_at": "2022-10-06T16:15:36.383Z"
}
SpecificationView Specification

From a newly initialized flow you can either jump right to create_withdraw_tx or perform assign_unstaking_data. If you assign the unstaking data, you may need to create, sign, and broadcast a chill transaction, followed by an unbonding transaction. After unbonding, you can either be done with the flow, or if there is a balance to withdraw, you can create, sign, and broadcast the withdraw transaction.

Parameters

  • flowobject
    • network_codestring Network this flow operates on (ex. polkadot) (required).
    • chain_codestring Chain this flow operates on (ex. westend) (required).
    • operation string The operation to perform (ex. unstaking) (required).
    • versionstring API version to use (ex. v1) (optional).

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • assign_unstaking_data — Use this action if you want to unbond. Chill first if needed. Optionally used to withdraw.
      • stash_account_address — The wallet DOT is bonded to.
      • controller_account_address — The account that controls the staking/unstaking actions. This is the account that will sign transactions.
      • controller_proxy_account_address (optional) — A proxy account that can sign on behalf of the controller account.
      • amount — The amount of DOT to be unbonded from the controller. This field should be in full DOT, not in Planck (i.e., if you want to stake 5 DOT, return "amount": 5.0). The Staking API will translate the amount to Plancks so you do not have to worry about the conversion factor.
      • maximum — This boolean indicates if all bonded funds should be unbonded.
    • create_withdraw_tx — Use this action if you want to withdraw without unbonding.
  • dataobject Undelegation flow & transaction data.

Assign Unstaking Data

After collecting the required Inputs, we PUT /api/v1/flows/[:flow_id]/next to move on to the next step.

Request Body
Example Response
{
"id": "6c37da8a-4b69-44db-b0df-6fb9af75f24b",
"operation": "unstaking",
"state": "ready_to_unbond",
"actions": [
{
"name": "create_unbond_tx",
"inputs": []
},
{
"name": "complete",
"inputs": []
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"maximum": true,
"chill_transaction": null,
"estimated_chilled_at": null,
"unbond_transaction": null,
"unbonding_era": null,
"estimated_unbonded_at": null,
"withdraw_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T21:04:29.799Z",
"updated_at": "2023-02-28T21:09:19.882Z"
}
SpecificationView Specification

Parameters

  • namestring Name of the action to execute (required).
  • inputsobject
    • controller_account_addressstring Address of the wallet DOT will be bonded to (required).
    • controller_proxy_account_addressstring A proxy account that will sign on behalf of the controller account (optional).
    • stash_account_addressstring Primary wallet from which DOT will be bonded (required).
    • amountnumber — The amount of DOT to be bonded to the controller. This field should be in full DOT, not in Planck (ie. if you want to stake 5 DOT, return "amount": 5.0). Staking API will translate the amount to Plancks so you do not have to worry about the conversion factor (required).
    • maximumbooleantrue if you want to unbond the maximum number of tokens, else false.

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
  • dataobject Undelegation flow & transaction data.

Create Chill Transaction

After collecting the required inputs, send a PUT request to /api/v1/flows/[:flow_id]/next to proceed to the next step.

Request Body
Example Response
{
"id": "6c37da8a-4b69-44db-b0df-6fb9af75f24b",
"operation": "unstaking",
"state": "chill_tx_signature",
"actions": [
{
"name": "refresh_chill_tx",
"inputs": []
},
{
"name": "sign_chill_tx",
"inputs": [
{
"name": "transaction_payload",
"display": "Transaction Payload",
"description": "",
"type": "signed_transaction",
"validations": [
{
"type": "sign_payload",
"options": {}
}
],
"array": false,
"default_value": null,
"signers": [
"5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
],
"transaction_payload": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006061c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004"
},
{
"name": "signatures",
"display": "Signatures",
"description": "",
"type": "array_of_signatures",
"validations": [],
"array": true,
"default_value": null,
"element_type": "signature_data",
"signers": [
"5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
],
"transaction_payload": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006061c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0606000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"inputs": [
{
"name": "account_address",
"display": "Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "signature",
"display": "Signature",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
]
},
{
"name": "confirm_chill_tx_by_hash",
"inputs": [
{
"name": "hash",
"display": "Hash",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "block_number",
"display": "Block Number",
"description": "",
"type": "integer",
"validations": [],
"array": false,
"default_value": null
}
]
},
{
"name": "assign_unstaking_data",
"inputs": [
{
"name": "stash_account_address",
"display": "Stash Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t"
},
{
"name": "controller_account_address",
"display": "Controller Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
},
{
"name": "controller_proxy_account_address",
"display": "Controller Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
},
{
"name": "amount",
"display": "Amount",
"description": "in DOT",
"type": "decimal",
"validations": [
{
"type": "presence",
"options": {
"unless": "maximum"
}
},
{
"type": "numericality",
"options": {
"unless": "maximum",
"greater_than": 0
}
}
],
"array": false,
"default_value": "1.0"
},
{
"name": "maximum",
"display": "Maximum",
"description": "",
"type": "boolean",
"validations": [],
"array": false,
"default_value": true
}
]
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"maximum": true,
"chill_transaction": {
"raw": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006061c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0606000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": null,
"hash": null,
"status": null,
"error": null,
"signatures": null,
"block_time": null,
"block_number": null,
"proxy": false
},
"estimated_chilled_at": null,
"unbond_transaction": null,
"unbonding_era": null,
"estimated_unbonded_at": null,
"withdraw_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T21:04:29.799Z",
"updated_at": "2023-02-28T21:09:20.687Z"
}
SpecificationView Specification

Parameters

All data is already input so the inputs object is empty: {}

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • refresh_chill_tx — If you need to get a fresh version of the transaction payload (i.e., the nonce needs to be updated).
    • sign_chill_tx — Submit a signed transaction payload ready to be broadcast to the network.
  • dataobject delegation flow & transaction data.

Submit a Signed Chill Transaction for Broadcast

Before broadcasting the transaction, you must sign the transaction_payload you received in the previous step. After signing the transaction, send a PUT request to /api/v1/flows/[:flow_id]/next and the Staking API will broadcast the transaction to the Polkadot network.

Request Body
Example Response
{
"id": "6c37da8a-4b69-44db-b0df-6fb9af75f24b",
"operation": "unstaking",
"state": "chill_tx_broadcasting",
"actions": [
{
"name": "wait",
"estimated_state_change_at": "2023-02-28T21:21:04.250Z",
"inputs": []
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"maximum": true,
"chill_transaction": {
"raw": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006061c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0606000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xa1018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e67901a80802082aebf10f18f617120553d717c9173f5c453ad4b3d84575f466ce6863f4e09541db117fd8b78cd057433ca5dd64cbe80b845525cbf8d138dd3200508d0004000606",
"hash": "0x677b522703e763ca44273e69b4633bc38b03ad51dd55fdd169d5986190a8ca44",
"status": null,
"error": null,
"signatures": [],
"block_time": null,
"block_number": 14839537,
"proxy": false
},
"estimated_chilled_at": null,
"unbond_transaction": null,
"unbonding_era": null,
"estimated_unbonded_at": null,
"withdraw_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T21:04:29.799Z",
"updated_at": "2023-02-28T21:20:04.230Z"
}
SpecificationView Specification

Parameters

  • namestring Name of the action to execute (required).
  • inputsobject
    • validator_addressesarray An array containing the address(es) of the validator(s) to which the DOT will be delegated (required).

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
    • chill_tx_broadcasting - The chill transaction has been broadcast and is awaiting confirmation.
  • actionsarray It includes the name & inputs of all next possible actions.
  • dataobject Undelegation flow & transaction data.

Create Unbond Transaction

Now that the account is chilled, submit an unbond transaction to unbond from the stake.

Request Body
Example Response
{
"id": "6c37da8a-4b69-44db-b0df-6fb9af75f24b",
"operation": "unstaking",
"state": "unbond_tx_signature",
"actions": [
{
"name": "refresh_unbond_tx",
"inputs": []
},
{
"name": "sign_unbond_tx",
"inputs": [
{
"name": "transaction_payload",
"display": "Transaction Payload",
"description": "",
"type": "signed_transaction",
"validations": [
{
"type": "sign_payload",
"options": {}
}
],
"array": false,
"default_value": null,
"signers": [
"5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
],
"transaction_payload": "0x0008000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000602070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004"
},
{
"name": "signatures",
"display": "Signatures",
"description": "",
"type": "array_of_signatures",
"validations": [],
"array": true,
"default_value": null,
"element_type": "signature_data",
"signers": [
"5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
],
"transaction_payload": "0x0008000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000602070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0602070010a5d4e8000800a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"inputs": [
{
"name": "account_address",
"display": "Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "signature",
"display": "Signature",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
]
},
{
"name": "confirm_unbond_tx_by_hash",
"inputs": [
{
"name": "hash",
"display": "Hash",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "block_number",
"display": "Block Number",
"description": "",
"type": "integer",
"validations": [],
"array": false,
"default_value": null
}
]
},
{
"name": "assign_unstaking_data",
"inputs": [
{
"name": "stash_account_address",
"display": "Stash Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t"
},
{
"name": "controller_account_address",
"display": "Controller Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
},
{
"name": "controller_proxy_account_address",
"display": "Controller Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
},
{
"name": "amount",
"display": "Amount",
"description": "in DOT",
"type": "decimal",
"validations": [
{
"type": "presence",
"options": {
"unless": "maximum"
}
},
{
"type": "numericality",
"options": {
"unless": "maximum",
"greater_than": 0
}
}
],
"array": false,
"default_value": "1.0"
},
{
"name": "maximum",
"display": "Maximum",
"description": "",
"type": "boolean",
"validations": [],
"array": false,
"default_value": true
}
]
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"maximum": true,
"chill_transaction": {
"raw": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006061c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0606000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xa1018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e67901a80802082aebf10f18f617120553d717c9173f5c453ad4b3d84575f466ce6863f4e09541db117fd8b78cd057433ca5dd64cbe80b845525cbf8d138dd3200508d0004000606",
"hash": "0x677b522703e763ca44273e69b4633bc38b03ad51dd55fdd169d5986190a8ca44",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T21:20:53.081Z",
"block_number": 14839540,
"proxy": false
},
"estimated_chilled_at": "2023-02-28T21:25:53.081Z",
"unbond_transaction": {
"raw": "0x0008000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000602070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0602070010a5d4e8000800a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": null,
"hash": null,
"status": null,
"error": null,
"signatures": null,
"block_time": null,
"block_number": null,
"proxy": false
},
"unbonding_era": null,
"estimated_unbonded_at": null,
"withdraw_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T21:04:29.799Z",
"updated_at": "2023-02-28T21:24:44.832Z"
}
SpecificationView Specification

Once again, there are no required inputs for this action.

Parameters

  • namestring Name of the action to execute (required).

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • refresh_unbond_tx — If you need to get a fresh version of the transaction payload (ie. the nonce needs to be updated)
    • sign_unbond_tx — Submit a signed transaction payload ready to be broadcast to the network
  • dataobject Undelegation flow & transaction data.

Submit Signed Unbond Transaction for Broadcast

Before broadcasting the transaction, you must sign the transaction_payload you received in the previous step. After signing the transaction, you will PUT /api/v1/flows/[:flow_id]/next and the Staking API will broadcast the transaction to the Polkadot network.

Request Body
Example Response
{
"id": "6c37da8a-4b69-44db-b0df-6fb9af75f24b",
"operation": "unstaking",
"state": "unbond_tx_broadcasting",
"actions": [
{
"name": "wait",
"estimated_state_change_at": "2023-02-28T21:29:16.900Z",
"inputs": []
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"maximum": true,
"chill_transaction": {
"raw": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006061c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0606000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xa1018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e67901a80802082aebf10f18f617120553d717c9173f5c453ad4b3d84575f466ce6863f4e09541db117fd8b78cd057433ca5dd64cbe80b845525cbf8d138dd3200508d0004000606",
"hash": "0x677b522703e763ca44273e69b4633bc38b03ad51dd55fdd169d5986190a8ca44",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T21:20:53.081Z",
"block_number": 14839540,
"proxy": false
},
"estimated_chilled_at": "2023-02-28T21:25:53.081Z",
"unbond_transaction": {
"raw": "0x0008000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000602070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0602070010a5d4e8000800a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xb9018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e6790168ec300920dcc4fc99e920ddffffbee1b07e47d43c28219de8b58222f8e2953e9dda8850f371afefdaf5e32db748136da1d70dec871fdf3baf173cad7537cd800008000602070010a5d4e8",
"hash": "0x10ed254dfe97bf01b5ca0961cd503f867b5df5b8016a8fee4d090640ccbb6c37",
"status": null,
"error": null,
"signatures": [],
"block_time": null,
"block_number": 14839609,
"proxy": false
},
"unbonding_era": null,
"estimated_unbonded_at": null,
"withdraw_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T21:04:29.799Z",
"updated_at": "2023-02-28T21:28:16.877Z"
}
SpecificationView Specification

Parameters

  • namestring Name of the action to execute (required).
  • inputsobject
    • transaction_payload — Signed transaction payload from the previous step's response.

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • create_withdraw_tx — This proceeds with withdrawing from the account.
    • complete — This will end the flow if we do not want to withdraw funds.
  • dataobject Undelegation flow & transaction data.

Create Withdrawal Transaction

This transaction be created directly from initializing or after the unbonding flow.

Request Body
Example Response
{
"id": "6c37da8a-4b69-44db-b0df-6fb9af75f24b",
"operation": "unstaking",
"state": "withdraw_tx_signature",
"actions": [
{
"name": "refresh_withdraw_tx",
"inputs": [
{
"name": "stash_account_address",
"display": "Stash Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t"
},
{
"name": "controller_account_address",
"display": "Controller Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
},
{
"name": "controller_proxy_account_address",
"display": "Controller Proxy Account Address",
"description": "",
"type": "string",
"validations": [],
"array": false,
"default_value": null
}
]
},
{
"name": "sign_withdraw_tx",
"inputs": [
{
"name": "transaction_payload",
"display": "Transaction Payload",
"description": "",
"type": "signed_transaction",
"validations": [
{
"type": "sign_payload",
"options": {}
}
],
"array": false,
"default_value": null,
"signers": [
"5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
],
"transaction_payload": "0x000c000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000603000000001c77657374656e64387061726974792d77657374656e6402000000ae2400000000000044df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0400000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000018ef58a3b67ba7700100000013000000010004"
},
{
"name": "signatures",
"display": "Signatures",
"description": "",
"type": "array_of_signatures",
"validations": [],
"array": true,
"default_value": null,
"element_type": "signature_data",
"signers": [
"5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg"
],
"transaction_payload": "0x000c000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000603000000001c77657374656e64387061726974792d77657374656e6402000000ae2400000000000044df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0400000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000018ef58a3b67ba7700100000013000000010004",
"signing_payload": "0x060300000000000c00ae24000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"inputs": [
{
"name": "account_address",
"display": "Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "signature",
"display": "Signature",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
]
},
{
"name": "confirm_withdraw_tx_by_hash",
"inputs": [
{
"name": "hash",
"display": "Hash",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "block_number",
"display": "Block Number",
"description": "",
"type": "integer",
"validations": [],
"array": false,
"default_value": null
}
]
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"maximum": true,
"chill_transaction": {
"raw": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006061c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0606000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xa1018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e67901a80802082aebf10f18f617120553d717c9173f5c453ad4b3d84575f466ce6863f4e09541db117fd8b78cd057433ca5dd64cbe80b845525cbf8d138dd3200508d0004000606",
"hash": "0x677b522703e763ca44273e69b4633bc38b03ad51dd55fdd169d5986190a8ca44",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T21:20:53.081Z",
"block_number": 14839540,
"proxy": false
},
"estimated_chilled_at": "2023-02-28T21:25:53.081Z",
"unbond_transaction": {
"raw": "0x0008000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000602070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0602070010a5d4e8000800a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xb9018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e6790168ec300920dcc4fc99e920ddffffbee1b07e47d43c28219de8b58222f8e2953e9dda8850f371afefdaf5e32db748136da1d70dec871fdf3baf173cad7537cd800008000602070010a5d4e8",
"hash": "0x10ed254dfe97bf01b5ca0961cd503f867b5df5b8016a8fee4d090640ccbb6c37",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T21:29:26.517Z",
"block_number": 14839612,
"proxy": false
},
"unbonding_era": 6238,
"estimated_unbonded_at": "2023-03-01T03:56:45.062Z",
"withdraw_transaction": {
"raw": "0x000c000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000603000000001c77657374656e64387061726974792d77657374656e6402000000ae2400000000000044df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0400000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000018ef58a3b67ba7700100000013000000010004",
"signing_payload": "0x060300000000000c00ae24000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": null,
"hash": null,
"status": null,
"error": null,
"signatures": null,
"block_time": null,
"block_number": null,
"proxy": false
}
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T21:04:29.799Z",
"updated_at": "2023-03-01T18:34:30.864Z"
}
SpecificationView Specification

When creating this transaction directly after initializing, the inputs will be required for the stash account address, controller account address, and an optional controller proxy account address.
Otherwise, inputs will not be required. If the information has not been collected: After collecting the required inputs, send a PUT request to /api/v1/flows/[:flow_id]/next to proceed to the next step.

Parameters

  • namestring Name of the action to execute (required).
  • inputsobject
  • controller_account_addressstring Address of the wallet DOT will be bonded to (required).
  • controller_proxy_account_addressstring A proxy account that will sign on behalf of the controller account (optional).
  • stash_account_addressstring Primary wallet from which DOT will be bonded (required).
  • amountnumber The amount of DOT to be bonded to the controller. This field should be in full DOT, not in Planck (i.e., if you want to stake 5 DOT, return "amount": 5.0). Staking API will translate the amount to Plancks so you do not have to worry about the conversion factor (required).
  • maximumboolean Set this to true if you want to unbond the maximum amount of tokens (optional).

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • refresh_withdraw_tx — If you need to get a fresh version of the transaction payload (i.e., the nonce needs to be updated).
    • sign_withdraw_tx — Submit a signed transaction payload ready to be broadcast to the network.
  • dataobject Undelegation flow & transaction data.

Submit Signed Withdrawal Transaction for Broadcast

Before broadcasting the transaction, you must sign the transaction_payload you received in the previous step. AAfter signing the transaction, send a PUT request to /api/v1/flows/[:flow_id]/next and the Staking API will broadcast the transaction to the Polkadot network.

Request Body
Example Response
{
"id": "6c37da8a-4b69-44db-b0df-6fb9af75f24b",
"operation": "unstaking",
"state": "withdraw_tx_broadcasting",
"actions": [
{
"name": "wait",
"estimated_state_change_at": "2023-03-01T18:42:02.544Z",
"inputs": []
}
],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"maximum": true,
"chill_transaction": {
"raw": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006061c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0606000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xa1018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e67901a80802082aebf10f18f617120553d717c9173f5c453ad4b3d84575f466ce6863f4e09541db117fd8b78cd057433ca5dd64cbe80b845525cbf8d138dd3200508d0004000606",
"hash": "0x677b522703e763ca44273e69b4633bc38b03ad51dd55fdd169d5986190a8ca44",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T21:20:53.081Z",
"block_number": 14839540,
"proxy": false
},
"estimated_chilled_at": "2023-02-28T21:25:53.081Z",
"unbond_transaction": {
"raw": "0x0008000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000602070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0602070010a5d4e8000800a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xb9018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e6790168ec300920dcc4fc99e920ddffffbee1b07e47d43c28219de8b58222f8e2953e9dda8850f371afefdaf5e32db748136da1d70dec871fdf3baf173cad7537cd800008000602070010a5d4e8",
"hash": "0x10ed254dfe97bf01b5ca0961cd503f867b5df5b8016a8fee4d090640ccbb6c37",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T21:29:26.517Z",
"block_number": 14839612,
"proxy": false
},
"unbonding_era": 6238,
"estimated_unbonded_at": "2023-03-01T03:56:45.062Z",
"withdraw_transaction": {
"raw": "0x000c000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000603000000001c77657374656e64387061726974792d77657374656e6402000000ae2400000000000044df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0400000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000018ef58a3b67ba7700100000013000000010004",
"signing_payload": "0x060300000000000c00ae24000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xb1018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679016681c585ae6b459faf8f71cd09e767b5830ff6b35a786f9feb6850cbe71a5d4665fb18ee507e7d6db45fceae016206406e8f210290e23c195cd98e936d5ec28b000c00060300000000",
"hash": "0x0006ca8c2d684d19db3d275fb5fbd243cffff69f52a9036125f4d521f08bc9e4",
"status": null,
"error": null,
"signatures": [],
"block_time": null,
"block_number": 14851755,
"proxy": false
}
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T21:04:29.799Z",
"updated_at": "2023-03-01T18:41:02.512Z"
}
SpecificationView Specification

Parameters

  • namestring Name of the action to execute (required).
  • inputsobject
    • transaction_payload — Signed transaction payload from the previous step's response.

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
    • withdraw_tx_broadcasting — The transaction has been broadcast and is waiting for confirmation.
    • done — The transaction is complete and the stake has been withdrawn to the specified location.
  • actionsarray It includes the name & inputs of all next possible actions.
  • dataobject Undelegation flow & transaction data.

Get Flow Status

To get the current state of the existing flow, send a GET request to /api/v1/flows/[:flow_id] using the flow ID from the previous step.

Request Query
Example Response
{
"id": "6c37da8a-4b69-44db-b0df-6fb9af75f24b",
"operation": "unstaking",
"state": "done",
"actions": [],
"data": {
"controller_account_address": "5CtTpJSdf13cbBZU4RX7EHkEaJ53pVaAF5XJosmusXJ5gdDg",
"controller_proxy_account_address": null,
"stash_account_address": "5HRJp9zQzMTjyv7skG3gnWwopPgFfc5FNwyNtEsmLHLyRK8t",
"amount": "1.0",
"maximum": true,
"chill_transaction": {
"raw": "0x0004000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e0000000000000000000000000000000000000000000000000000000000000000000000000006061c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0606000400a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xa1018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e67901a80802082aebf10f18f617120553d717c9173f5c453ad4b3d84575f466ce6863f4e09541db117fd8b78cd057433ca5dd64cbe80b845525cbf8d138dd3200508d0004000606",
"hash": "0x677b522703e763ca44273e69b4633bc38b03ad51dd55fdd169d5986190a8ca44",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T21:20:53.081Z",
"block_number": 14839540,
"proxy": false
},
"estimated_chilled_at": "2023-02-28T21:25:53.081Z",
"unbond_transaction": {
"raw": "0x0008000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000602070010a5d4e81c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x0602070010a5d4e8000800a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xb9018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e6790168ec300920dcc4fc99e920ddffffbee1b07e47d43c28219de8b58222f8e2953e9dda8850f371afefdaf5e32db748136da1d70dec871fdf3baf173cad7537cd800008000602070010a5d4e8",
"hash": "0x10ed254dfe97bf01b5ca0961cd503f867b5df5b8016a8fee4d090640ccbb6c37",
"status": "confirmed",
"error": null,
"signatures": [],
"block_time": "2023-02-28T21:29:26.517Z",
"block_number": 14839612,
"proxy": false
},
"unbonding_era": 6238,
"estimated_unbonded_at": "2023-03-01T03:56:45.062Z",
"withdraw_transaction": {
"raw": "0x000c000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e000000000000000000000000000000000000000000000000000000000000000000000000000603000000001c77657374656e64387061726974792d77657374656e6402000000ae2400000000000044df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0400000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000018ef58a3b67ba7700100000013000000010004",
"signing_payload": "0x060300000000000c00ae24000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": "0xb1018400246c8389743df168ed8f55e531a31e55d5d3ac774d8f7efe626d46c2c433e679016681c585ae6b459faf8f71cd09e767b5830ff6b35a786f9feb6850cbe71a5d4665fb18ee507e7d6db45fceae016206406e8f210290e23c195cd98e936d5ec28b000c00060300000000",
"hash": "0x0006ca8c2d684d19db3d275fb5fbd243cffff69f52a9036125f4d521f08bc9e4",
"status": null,
"error": null,
"signatures": [],
"block_time": null,
"block_number": 14851759,
"proxy": false
}
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T21:04:29.799Z",
"updated_at": "2023-03-01T18:42:02.045Z"
}
SpecificationView Specification

Parameters

  • None

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
    • withdraw_tx_broadcasting — The transaction has been broadcast and is waiting for confirmation.
    • done — The transaction is complete and the stake has been withdrawn to the specified location.
  • actionsarray It includes the name & inputs of all next possible actions.
  • dataobject Undelegation flow & transaction data.

Create New Add Staking Proxy Flow

To add a staking proxy, create a new flow with a POST request to /api/v1/flows.

Request Body
Example Response
{
"id": "5d2a7dc6-0f7c-41a5-bbb6-fb27b2e16a9b",
"operation": "add_proxy",
"state": "initialized",
"actions": [
{
"name": "create_add_proxy_tx",
"inputs": [
{
"name": "proxy_account_address",
"display": "Proxy Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "proxied_account_address",
"display": "Proxied Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
],
"data": {
"proxy_account_address": null,
"proxied_account_address": null,
"add_proxy_transaction": null
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T19:11:38.281Z",
"updated_at": "2023-02-28T19:11:38.281Z"
}
SpecificationView Specification

Parameters

  • flowobject
    • network_codestring Network this flow operates on (ex. polkadot) (required).
    • chain_codestring Chain this flow operates on (ex. westend) (required).
    • operation string The operation to perform (ex. add_proxy) (required).
    • versionstring API version to use (ex. v1) (optional).

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • create_add_proxy_tx — Use this action to generate an add proxy transaction.
      • proxy_account_address — The address to which you want to grant proxy rights.
      • proxied_account_address — The account whose rights will be proxied.
  • dataobject Staking proxy flow & transaction data.

Submit Add Proxy Data

After collecting the required inputs, send a PUT request to /api/v1/flows/[:flow_id]/next to proceed to the next step.

Request Body
Example Response
{
"id": "5d2a7dc6-0f7c-41a5-bbb6-fb27b2e16a9b",
"operation": "add_proxy",
"state": "add_proxy_tx_signature",
"actions": [
{
"name": "refresh_add_proxy_tx",
"inputs": [
{
"name": "proxy_account_address",
"display": "Proxy Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5HDojdfR1Vm9dnDYEB4JQyxgcgH3aHHeWgE9jqarBkChULRJ"
},
{
"name": "proxied_account_address",
"display": "Proxied Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "5FNVfA6qhVJBKrG4KCo6CLzvcXVRRdiGpsYHbkzujMUG6JJG"
}
]
},
{
"name": "sign_add_proxy_tx",
"inputs": [
{
"name": "transaction_payload",
"display": "Transaction Payload",
"description": "",
"type": "signed_transaction",
"validations": [
{
"type": "sign_payload",
"options": {}
}
],
"array": false,
"default_value": null,
"signers": [
"5FNVfA6qhVJBKrG4KCo6CLzvcXVRRdiGpsYHbkzujMUG6JJG"
],
"transaction_payload": "0x0008000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00000000000000000000000000000000000000000000000000000000000000000000000000160100e41e2a54397e0657cb58d978d0f2a9201a84b3d953a83780df5795a1006ecf7d02000000001c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004"
},
{
"name": "signatures",
"display": "Signatures",
"description": "",
"type": "array_of_signatures",
"validations": [],
"array": true,
"default_value": null,
"element_type": "signature_data",
"signers": [
"5FNVfA6qhVJBKrG4KCo6CLzvcXVRRdiGpsYHbkzujMUG6JJG"
],
"transaction_payload": "0x0008000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00000000000000000000000000000000000000000000000000000000000000000000000000160100e41e2a54397e0657cb58d978d0f2a9201a84b3d953a83780df5795a1006ecf7d02000000001c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x160100e41e2a54397e0657cb58d978d0f2a9201a84b3d953a83780df5795a1006ecf7d0200000000000800a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"inputs": [
{
"name": "account_address",
"display": "Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "signature",
"display": "Signature",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
]
},
{
"name": "confirm_add_proxy_tx_by_hash",
"inputs": [
{
"name": "hash",
"display": "Hash",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "block_number",
"display": "Block Number",
"description": "",
"type": "integer",
"validations": [],
"array": false,
"default_value": null
}
]
}
],
"data": {
"proxy_account_address": "5HDojdfR1Vm9dnDYEB4JQyxgcgH3aHHeWgE9jqarBkChULRJ",
"proxied_account_address": "5FNVfA6qhVJBKrG4KCo6CLzvcXVRRdiGpsYHbkzujMUG6JJG",
"add_proxy_transaction": {
"raw": "0x0008000000000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e00000000000000000000000000000000000000000000000000000000000000000000000000160100e41e2a54397e0657cb58d978d0f2a9201a84b3d953a83780df5795a1006ecf7d02000000001c77657374656e64387061726974792d77657374656e6402000000a42400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0300000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a803000000f3ff14d5ab5270590300000017a6bc0d0062aeb30100000013000000010004",
"signing_payload": "0x160100e41e2a54397e0657cb58d978d0f2a9201a84b3d953a83780df5795a1006ecf7d0200000000000800a424000013000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423ee143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
"signed": null,
"hash": null,
"status": null,
"error": null,
"signatures": null,
"block_time": null,
"block_number": null,
"proxy": null
}
},
"network_code": "polkadot",
"chain_code": "westend",
"created_at": "2023-02-28T19:11:38.281Z",
"updated_at": "2023-02-28T19:14:40.992Z"
}
SpecificationView Specification

Parameters

  • namestring Name of the action to execute (required).
  • inputsobject
    • proxy_account_addressstring The address to which you want to add proxy rights (required).
    • proxied_account_addressstring The account whose rights will be proxied (required).

Response

  • idstring ID of the flow.
  • operationstring The Staking API operation being performed by this flow.
  • statestring The current state of the flow.
  • actionsarray It includes the name & inputs of all next possible actions.
    • refresh_add_proxy_tx — If you need to get a fresh version of the transaction payload (i.e., the nonce has increased).
    • sign_add_proxy_tx — Submit a signed transaction payload ready to be broadcast to the network.
  • dataobject Staking proxy flow & transaction data.

Submit Signed Add Proxy Transaction for Broadcast

Before broadcasting the transaction, you must sign the transaction_payload you received in the previous step. After signing the transaction, you will PUT /api/v1/flows/[:flow_id]/next (as always!) and the Staking API will broadcast the transaction to the Polkadot network.

Request Body
Example Response
{
"id": "5d2a7dc6-0f7c-41a5-bbb6-fb27b2e16a9b",
"operation": </