Closed giuliop closed 2 years ago
of course I can interact with the pool and check the application id on a block explorer but I guess there should be an easier way :)
It would be nice to be able to get pool(s) just by supplying 2 asset IDs.
Hello @giuliop and @LogioTek: apologies for the late response. All HumbleSwap data is on the blockchain, so there are no [in-house] RESTful APIs for listing data at the moment.
The Humble SDK gives you tools to build a find-pool-by-token-ids mechanism: the catch (re: what @LogioTek suggests) is that you have to build it yourself.
I just gave a lengthy explanation here that [peripherally] shows how you can subscribe to a stream of pools. When you first connect to it, the subscribeToPoolStream
function will fetch as many pools as it "hears" exist. Even after it stops emitting data, it will continue to listen and send new stuff as long as you don't terminate it. You can route this data into a cache, local db, or state manager of choice.
You should ideally do this soon after initializing the SDK, so that the data can be stored and used in other operations. But (unlike initHumbleSDK
) you can call subscribeToPoolStream
at any time.
Let me know if this helps!
I suppose the website should show it in the Pools section but I can't find it