Get all Pools by Owner
Getting all pools created by one particular wallet on Tensor
Pool details for a wallet can be fetched by applying a where filter on the owner field in Tensor's Pool Account.
Account Joins can be seen in action here! We fetch pool data joined with the associated margin account.
Natively in RPC calls, if a wallet owns 100 pools you would need to fetch margin accounts for each one separately to get the balance. But here we are joining the pool data with the associated margin account, so you get everything in a single call.
You can directly copy paste this code on replit and see it in action.
Last updated