How to get staking info by core api?

image

is there any way to get staking info, find any tx flow of staking

3 Likes

It’s no longer possible in the core, but you can retrieve validator stakes from the Gateway using the validator/stakes end point, or for an individual staker using the account/stakes end point:

Gateway API Specs

4 Likes

I want to calculate the APY, use this formula

APY = 100* ((ValueNow - ValueOld)/ValueOld * 365.25 * 24 * 3600) / (TimestampNow - TimestampOld)

but there may be some questions, if I unStaking or staked some XRD, the APY will not correct when I change the staked amount some time, is there any way to ensure the APY accurate

2 Likes