How to get Total Value Locked and Apy from the Smart Contract via API?

Hi, we are trying to build a website for that we need to connect our smart contract data( such as total supply,token price, etc…) into the website.
Most Importantly, we wanted to know what is the best way to get Total Value Locked and Apy from the Smart Contract via API.
And we deployed our contracts on Binance smart chain(BSC).
How to create API to call these contract functions? and we want to know how other cryptocurrency websites (bdollar, venus, ditto, etc…)are creating API for those functions.

1 Like

Hi @Prabhakaran,

I would suggest looking contacting those projects or seeing if their code is open source to see how they do this.

1 Like

Hi mate.

Sorry if I get this wrong but is your question related to the Bincance Chain right?
Otherwise, we can get that information using web3 libs.

For the binance chain have a look at this

I hope it helps.
Cheers.

2 Likes

Thanks, @Chxpz.I will check it out.

1 Like