cardano-community / koios-artifacts

Artifacts for https://koios.rest and https://api.koios.rest websites
Creative Commons Attribution 4.0 International
20 stars 25 forks source link

asset_policy_info + asset_address_list #90

Closed CreatureGeorge closed 1 year ago

CreatureGeorge commented 2 years ago

Is your feature request related to a problem? Please describe. I would like to limit the amount of requests needed to grab address information for all policy tokens. Right now you can grab all tokens to a policy but in order to see who owns them you have to query one by one. Describe the solution you'd like One request that would query a policy [asset_policy_info] and include [asset_address_list] for each token. Describe alternatives you've considered Hosting my own cardano-dbsync (again, its annoying though) or cardano-graphql to do own queries... Additional context Working on a d3js visualization for a few key areas of cardano ecosystem and for this specific feature, it would be for a policy(ies) overview. This shows all related accounts to specific policy(ies) to see the distribution of tokens visually.

rdlrt commented 2 years ago

Unfortunately, it's not something doable for a free/public instance as it's an easy way to DDoS an instance provider. IMO - it's a requirement that conflicts with the design of how ledger was created (within public API realm)

Do acknowledge that it might definitely handicap your requirement, but given that policy to asset map as well as asset to tx (which cotains address) is infinite, it's not a sustainable endpoint to workaround against.

Instead this would likely be better served via Koios Lite (part of catalyst proposal 9) which could have much smaller subset of queries to host and return within public instance realm. In the meanwhile, one can run Koios instance locally and create a custom cache table OR create filtered asset dumps that they're interested in.

CreatureGeorge commented 2 years ago

Makes sense.

Dbsync can be annoying (it is annoying) and the Koios Lite would be ideal to circumvent that requirement.

rdlrt commented 2 years ago

Will just keep this open so it's not lost from radar (as it's increasingly common requirement in DeFi world)

rdlrt commented 1 year ago

Instead of increasing amount of data being queried/returned on infinite map, a better outcome might be reducing info on asset_policy_info by splitting it into asset_policy_list and allowing bulk queries to asset endpoints