Skip to main content

Remove Liquidity

Generates a transaction to remove liquidity from a pool.

Request URL

https://api.euclidprotocol.com/api/v1/execute/liquidity/remove

Curl

curl -X 'POST' \
'https://api.euclidprotocol.com/api/v1/execute/liquidity/remove' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"cross_chain_addresses": [],
"lp_allocation": "1000000000",
"pair": {
"token_1": "usdc",
"token_2": "usdt"
},
"sender": {
"address": "wasm14hcxlnwlqtq75ttaxf674vk6mafspg8xv03ktg",
"chain_uid": "osmosis"
},
"timeout": null,
"vlp_address": "wasm1zh2dlnjmr839t2dkgqclfq5893edt3agswa0kmhdznwrz4xjmyhs8walp0"
}'

Parameters

FieldTypeDescription
cross_chain_addressesVec<CrossChainUserWithLimit>A set of addresses to specify where the asset_out should be released. The first element specified in the vector has highest priority and so on.
lp_allocationStringThe amount of liquidity pool allocation to be removed.
pairPairWithDenomThe token pair to request creating a new pool for.
senderCrossChainUserThe address performing the swap request.
timeoutOption<u64>Optional duration in seconds after which the message will be timed out. Can be set to a minimum of 30 seconds and a maximum of 240 seconds. Defaults to 60 seconds if not specified.
vlp_addressStringThe address of the VLP contract that the pool is on.

Example Response

{
"sender": {
"chain_uid": "osmosis",
"address": "wasm14hcxlnwlqtq75ttaxf674vk6mafspg8xv03ktg"
},
"contract": "wasm1zh2dlnjmr839t2dkgqclfq5893edt3agswa0kmhdznwrz4xjmyhs8walp0",
"chain_id": "localpoolb-2",
"rpc_url": "http://rpc.url",
"rest_url": "http://rest.url",
"msgs": [
{
"contractAddress": "wasm1zh2dlnjmr839t2dkgqclfq5893edt3agswa0kmhdznwrz4xjmyhs8walp0",
"msg": {
{
"remove_liquidity":{
"cross_chain_addresses":[],
"lp_allocation":"1000000000",
"pair":{
"token_1":"usdc",
"token_2":"usdt"
},
"timeout":null}}
},
"funds": []
}
]
}