minswap / sdk

Query Minswap data and build transactions
MIT License
51 stars 20 forks source link

Finding a specific pool requires massive amount of requests to Blockfrost #18

Closed denishacquin closed 1 year ago

denishacquin commented 1 year ago

Using the for loop in the example provided, it seems we need about 30 requests to find the min/ada pool for instance. It seems this would very quickly use all the request quota of the blockfrost account.

Is there any way to optimize this?

Thanks!

longngn commented 1 year ago

Using the for loop in the example provided, it seems we need about 30 requests to find the min/ada pool for instance. It seems this would very quickly use all the request quota of the blockfrost account.

Is there any way to optimize this?

Thanks!

Once you have acquired the pool ID you can find it in 1 request You can also store the map of pool ID in your own database for quick lookup