Skip to main content
POST
/
api
/
agent
/
unstake
Prepare an unstake transaction (begin cooldown)
curl --request POST \
  --url https://staking.x402layer.cc/api/agent/unstake \
  --header 'Content-Type: application/json' \
  --data '
{
  "wallet": "<string>"
}
'
{
  "action": "stake",
  "note": "<string>",
  "transactions": [
    {
      "description": "Stake 50000 $SGL as compute",
      "transaction": "<string>",
      "blockhash": "<string>",
      "lastValidBlockHeight": 123
    }
  ],
  "next": "Sign each transaction with your wallet keypair, then POST /api/agent/submit { transaction }."
}

Body

application/json
wallet
string
required
role
enum<string>
required

Stake type. compute = compute node operator, validator = marketplace validator, yield = yield enjoyer.

Available options:
compute,
validator,
yield

Response

Unsigned transaction(s) to sign and submit.

action
string
Example:

"stake"

note
string
transactions
object[]
next
string
Example:

"Sign each transaction with your wallet keypair, then POST /api/agent/submit { transaction }."