Create Stake Action

POST /staking/stakes/:stakeId/actions

Creates a new stake action.

Required Permissions

Name
Conditions

Stakes:Update

Always Required

Path Parameters

Name
Conditions

stakeId*

Id of the stake to update

Body

Babylon

Property
Required/Optional
Description
Type

protocol *

Required

Staking Protocol: Babylon

String

kind *

Required

The action to perform: Either Unbond or Withdraw

String

Example

{
  "protocol": "Babylon",
  "kind": "Withdraw",
}

Ethereum

Property
Required/Optional
Description
Type

protocol *

Required

Staking Protocol: Ethereum

String

kind *

Required

The action to perform: Only Withdraw available

String

Example

{
  "protocol": "Ethereum",
  "kind": "Withdraw",
}

Iota

Property
Required/Optional
Description
Type

protocol *

Required

Staking Protocol: "Iota"

String

kind *

Required

The action to perform: Either Withdraw or Deposit

String

amount

Required for Withdraw / Deposit

Amount to withdraw or add to the stake.

String

lockedIotas

Required for Deposit (Timelocked Stake only)

Locked Iotas to add to the stake.

String[]

Example

{
  "protocol": "Iota",
  "kind": "Deposit",
  "amount": "1000000000"
  "lockedIotas": ["xxxxxx"] // Required when depositing new timelocked stakes
}

Response

Response example

{
  "stake": {
    "id": "stk-5q230-nl4b0-xxxxxxxxxxxxxxxx",
    "provider": "Figment",
    "providerStakeId": "1dd3b430-729e-4935-8da1-bc7af56a4e7a",
    "walletId": "wa-fd328-9v5a8-xxxxxxxxxxxxxxxx",
    "protocol": "Babylon",
    "status": "Active",
    "requester": {
      "userId": "us-3htce-s75t3-xxxxxxxxxxxxxxxx",
      "tokenId": "to-72305-jh38s-xxxxxxxxxxxxxxxx",
    },
    "requestBody": {
      "kind": "Native",
      "amount": "50000",
      "walletId": "wa-fd328-9v5a8-xxxxxxxxxxxxxxxx",
      "provider": "Figment",
      "protocol": "Babylon",
      "duration": 150
    },
    "dateCreated": "2024-11-27T19:05:33.551Z"
},
  "stakeAction": {
    "id": "stka-5q230-nl4b0-xxxxxxxxxxxxxxxx",
    "stakeId": "stk-5q230-nl4b0-xxxxxxxxxxxxxxxx",
    "transactionId": "1dd3b430-729e-4935-8da1-bc7af56a4e7a",
    "kind": "Withdraw",
    "protocol": "Babylon",
    "requester": {
      "userId": "us-3htce-s75t3-xxxxxxxxxxxxxxxx",
      "tokenId": "to-72305-jh38s-xxxxxxxxxxxxxxxx",
    },
    "requestBody": {
      "kind": "Withdraw",
      "protocol": "Babylon",
    },
    "dateCreated": "2024-11-27T19:05:33.551Z"
  },
}

Last updated