The user can add liquidity on various liquidity pools on different dexes and earn pool fees. A pool is a pair of two tokens.
To initiate a swap, first determine if the DEX has the necessary allowance to access the tokens. This can be done using the following API endpoint:
API URL:
https://api.expand.network/fungibletoken/getuserallowance
Sample Request:
Sample Response:
This can be done using the following API endpoint:
API URL:
https://api.expand.network/fungibletoken/approve
Sample Request:
Sample Response:
This can be done using the following API endpoint:
API URL:
https://api.expand.network/dex/addliquidity
Sample Request:
Sample Response:
The user will receive the LP tokens after adding liquidity to the pool.
This section explains the integration and usage of dex protocols for managing liquidity in a pool.
To remove the liquidity from a pool, the user needs to provide LP tokens.
To initiate a swap, first determine if the DEX has the necessary allowance to access the tokens. This can be done using the following API endpoint:
API URL:
https://api.expand.network/fungibletoken/getuserallowance
Sample Request:
Sample Response:
This can be done using the following API endpoint:
API URL:
https://api.expand.network/fungibletoken/approve
Sample Request:
Sample Response:
This can be done using the following API endpoint:
API URL:
https://api.expand.network/dex/removeliquidity
Sample Request:
Sample Response: