Skip to main content
POST
/
api
/
agent
/
stake
Prepare a stake transaction
curl --request POST \
  --url https://staking.x402layer.cc/api/agent/stake \
  --header 'Content-Type: application/json' \
  --data '
{
  "wallet": "<string>",
  "amount": 50000
}
'
{
  "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

Staker wallet (base58).

role
enum<string>
required

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

Available options:
compute,
validator,
yield
amount
number
required

Amount of $SGL to stake (min 50000).

Example:

50000

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 }."