subscan-explorer / subscan-issue-tracker

The issue tracker for Subscan.io.
3 stars 5 forks source link

Calculate APR for a given address #46

Open Aytorex opened 1 year ago

Aytorex commented 1 year ago

Network(s)

Polkadot, Kusama, Moonbeam

Description

I would like to calculate (or get) APR for a given address using your API.

To do this, I need at least :

I can't find the endpoints to use this method, could you help me?

There is another way to do this : Calculate the yield between two dates, but the concern is that if a few tokens has been added or removed from the validator, I need to be able to know when and how many.

Is it possible to implement one or the other way to calculate it ? Or is there another way ?

Thanks !

Use cases

Ideally, sending a get request to the api which give me the APR for this address.

Second way, having one or more requests to get :

And the last option is a way to get the reward between two dates, and the total added / removed from this address.

Additional factoids or references

No response