I have installed the node on the server
Now I need to get the transactions related to adding liquidity.
We can use the following address to get all the transactions of a block
v2/blocks/block-id
But how do you know if a transaction is about adding liquidity?
If you mean “adding liquidity” in a DeFi app such as TinyMan or AlgoFi, each DeFi app has a different way of doing it. You need to design an ad-hoc test for each of those.
For example AlgoScout
I want to get it when liquidity is added to an asset in tinyman
So I have to check all the transactions that are recorded in the network
Now how to understand a liquidity transaction. Is there a special filter for separating transactions?
The best way is to look at the transactions that get sent in the add liquidity grouped transaction.
For example, by looking at an add liquidity transaction group on algoexplorer (for tinyman) - AlgoExplorer Yldy add liquidity example, you can see there is an app call, the ALGO being added, the ASA (YLDY in this case) being added, the pool tokens being transferred from the pool account to the user and lastly the fee.
What’s also quite helpful is in the App Call TXN of the add liquidity transaction group, there is an BASE64 app arg (bWludA==). This decodes to “mint”.
These are quite easy ways to tell if it’s an add liquidity transaction on tinyman. You can programmatically check these using the indexer in python etc.