Collect Fee
POST
/api/v1/amm/collectFeeCollect Fee allows users to collect fees from their positions within an Automated Market Maker (AMM) pool. Users must provide the pool ID, price tick range, and nonce for authentication. Upon successful execution, the API returns the amounts of base and quote assets collected as fees from the position.
请求参数
The unique identifier of the AMM pool.
The minimum price tick index
The maximum price tick index.
A unique identifier for the request, typically a Unix timestamp indicating the time at which the request was made. It helps prevent replay attacks by ensuring that each request is unique.
The cryptographic signature generated using the Poseidon algorithm. Refer to the Poseidon Signature Guide for details on generating the signature.
{
"poolId": 0,
"tickIndexL": 0,
"tickIndexR": 0,
"baseAmount": 0,
"quoteAmount": 0,
"nonce": "string",
"signature": "string"
}
示例代码
Responses
Indicates whether the operation was successful (true if there was an error, false otherwise).
The fee collected from the position in terms of base asset.
The fee collected from the position in terms of quote asset.
{
"error": false,
"baseAssetAmount": 0.1,
"quoteAssetAmount": 100.23
}