Lux Docs
Staking

Staking API

P-Chain staking API endpoints for validators and delegators

All staking operations go through the P-Chain API at /ext/bc/P.

Add Validator

{
  "jsonrpc": "2.0",
  "method": "platform.addValidator",
  "params": {
    "nodeID": "NodeID-...",
    "startTime": 1700000000,
    "endTime": 1731536000,
    "stakeAmount": 2000000000000,
    "rewardAddress": "P-lux1...",
    "delegationFeeRate": 200000
  },
  "id": 1
}
FieldTypeDescription
nodeIDstringNode identifier from info.getNodeID
startTimeuint64Unix timestamp for staking start
endTimeuint64Unix timestamp for staking end
stakeAmountuint64Stake in nLUX (1 LUX = 1e9 nLUX)
rewardAddressstringP-Chain address for reward payout
delegationFeeRateuint32Fee in millionths (200000 = 2%)

Add Delegator

{
  "jsonrpc": "2.0",
  "method": "platform.addDelegator",
  "params": {
    "nodeID": "NodeID-...",
    "startTime": 1700000000,
    "endTime": 1731536000,
    "stakeAmount": 25000000000,
    "rewardAddress": "P-lux1..."
  },
  "id": 1
}

Query Validators

{
  "jsonrpc": "2.0",
  "method": "platform.getCurrentValidators",
  "params": {"subnetID": "11111111111111111111111111111111LpoYY"},
  "id": 1
}

Returns an array of active validators with nodeID, stakeAmount, startTime, endTime, uptime, delegationFee, and delegators.

Query Pending Validators

{
  "jsonrpc": "2.0",
  "method": "platform.getPendingValidators",
  "params": {"subnetID": "11111111111111111111111111111111LpoYY"},
  "id": 1
}

Query Staking Status

{
  "jsonrpc": "2.0",
  "method": "platform.getMinStake",
  "params": {},
  "id": 1
}

Returns minValidatorStake and minDelegatorStake in nLUX.

API Endpoint

NetworkURL
Mainnethttps://api.lux.network/mainnet/ext/bc/P
Testnethttps://api.lux.network/testnet/ext/bc/P

On this page