astar-apps icon indicating copy to clipboard operation
astar-apps copied to clipboard

Provide total tokens staked through Token API

Open bobo-k2 opened this issue 2 years ago • 3 comments

Motivation It would be very useful to have historical information about staked amounts on the portal dashboard page. This is the second ticket in series of tickets related to adding total staked ASTR/SDN on the dashboard page. Depends on #753

Suggested Solution Create a new endpoint /api/v1/:network/dapps-staking/staked/:period on [Token API service](https://github.com/AstarNetwork/astar-token-api). The endpoint should fetch tokens staked data from deployed indexer (see #753) GraphQL endpoint and provide results in form:

[timestamp, staked_value][]

Alternatives Not at the moment. Any ideas are welcome.

Additional Information Please comment if the ticket is not clear enough.

bobo-k2 avatar Apr 24 '23 19:04 bobo-k2

Hi , I have a question regarding the UI DAO Ambassador Task. I worked on task 754, where I cloned the repository and added a new endpoint to the URL (see screeenshot). However, I realized that the necessary data cannot be retrieved without an indexer, which means that task 753 needs to be completed first.

grafik

I am not familiar with working on an indexer, so I am unsure if I am capable of handling it. Should I complete task 753 before moving on to 754? Or is it possible to work on the 754 task, even if the API has not the necessary indexer in place?

MarcoB95-lab avatar Apr 28 '23 18:04 MarcoB95-lab

Another suggestion. Why leave a input field for a string for a api query which only has 2 possible parameters? Would it not be better do it as a dropdown? Like that?

grafik

MarcoB95-lab avatar Apr 28 '23 18:04 MarcoB95-lab

@MarcoB95-lab Please leave your PR here or in the relevant ticket so we can continue the logs

Kahonnohak avatar May 01 '23 06:05 Kahonnohak