The following endpoint
https://api.elrond.com/accounts/{address}/stake
E.g.:
https://api.elrond.com/accounts/erd1hw78kxyj353x52hmmq6dzxgexynwt4m29q2uvpq6xdm90z3halvsl7cn6g/stake
returns
{"totalStaked":"0"}
but the staked total is different than 0 for the given address.
Is there any API endpoint that returns the real staked value?
From delegation-api.elrond.com
, try:
https://delegation-api.elrond.com/accounts/{address}/delegations
E.g.:
which returns
[
{
"address":"erd1hw78kxyj353x52hmmq6dzxgexynwt4m29q2uvpq6xdm90z3halvsl7cn6g",
"contract":"erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqq8hlllls7a6h85",
"userUnBondable":"0",
"userActiveStake":"1114814108508273514",
"claimableRewards":"3162326474680405",
"userUndelegatedList":[
]
}
]
The field "userActiveStake":"1114814108508273514"
shows the stake value (1.1148 EGLD
).