Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Function to NODE API #792

Open
pir8radio opened this issue Jan 31, 2024 · 5 comments
Open

Add Function to NODE API #792

pir8radio opened this issue Jan 31, 2024 · 5 comments

Comments

@pir8radio
Copy link

https://us-east.signum.network/api?requestType=getState

Can you add "numberOfHolders" that returns how many accounts hold the native coin, AKA how many accounts are >0

Thanks!

@ohager
Copy link
Member

ohager commented Feb 18, 2024

image

The getState function does not scale and takes a lot of time to respond or even causes timeouts. Adding "numberOfHolders" is not a problem, but I fear that the entire endpoint needs to be reviewed regarding performance. In the worst case I'm going so far to split the call in multiples or make it selective:

requestType=getCount&subject=accounts
requestType=getCount&subject=transactions
requestType=getCount&subject=holders&token=0
requestType=getCount&subject=aliases

etc.

@ohager
Copy link
Member

ohager commented Apr 17, 2024

@pir8radio https://europe.signum.network/api-doc/index.html#get-/api-requestType-getAsset

Should do the trick

Sorry, for late response....but I'm reviewing the issues atm as I'm working on some improvements of the node

@pir8radio
Copy link
Author

Awesome! Will this also work for the native coin? Aka signa?

@ohager
Copy link
Member

ohager commented Apr 17, 2024

oh, my fault... not for native coin.... But actually, should be easy to add it

@ohager
Copy link
Member

ohager commented May 5, 2024

will be added after the performance update (3.8.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants