AMM Action History
GET
/api/v1/gateway/user/history/ammUserAction请求参数
The unique identifier of the AMM pool to query.
The type of action to filter history (e.g., "ADD_LIQUIDITY", "REMOVE_LIQUIDITY", "COLLECT_FEE").
The start time of the time range for filtering history (Unix timestamp in milliseconds).
The end time of the time range for filtering history (Unix timestamp in milliseconds).
The lower bound of the price range for filtering history.
The upper bound of the price range for filtering history.
The maximum number of history records to retrive (Default is 500. Maximum is 1000).
The ID from which to start fetching records. In this API, since the order is descending (backwards), if fromId is set to 100, the system will return records starting from the ID just before 100 and continue moving backwards. The retrieval will proceed until the limit is reached.
示例代码
Responses
Indicates whether there was an error processing the request.
An error message, if applicable.
Contains the history of user actions within the specified AMM pool, filtered based on the provided query parameters.
The unique identifier for the action.
The unique identifier of the AMM pool associated with the action.
The type of action (e.g., "ADD_LIQUIDITY", "REMOVE_LIQUIDITY", "COLLECT_FEE").
The lower bound of the price range of the position.
The upper bound of the price range of the position.
The timestamp of when the action occurred (Unix timestamp in milliseconds).
The amount of the base asset involved in the action. Positive values indicate adding liquidity or collecting fee, while negative values indicate removing liquidity.
The amount of the quote asset involved in the action. Positive values indicate adding liquidity or collecting fee, while negative values indicate removing liquidity.
The name of the base asset.
The name of the quote asset
{
"error": false,
"msg": "success",
"history": [
{
"id": 1724917216225016,
"poolId": 3,
"type": "COLLECT_FEE",
"tickL": 2303.6,
"tickR": 2815.6,
"timestamp": 1724998524970,
"baseAssetAmount": 0.00014961,
"quoteAssetAmount": 0.446652,
"baseAssetName": "WETH",
"quoteAssetName": "USDT"
},
{
"id": 1724917216225015,
"poolId": 3,
"type": "REMOVE_LIQUIDITY",
"tickL": 2303.6,
"tickR": 2815.6,
"timestamp": 1724998524970,
"baseAssetAmount": -0.3002,
"quoteAssetAmount": -510.32151,
"baseAssetName": "WETH",
"quoteAssetName": "USDT"
},
{
"id": 1724917216225012,
"poolId": 1,
"type": "COLLECT_FEE",
"tickL": 56960,
"tickR": 62960,
"timestamp": 1724996388586,
"baseAssetAmount": 0.00016813,
"quoteAssetAmount": 14.983697,
"baseAssetName": "WBTC",
"quoteAssetName": "USDT"
},
{
"id": 1724917216225009,
"poolId": 3,
"type": "ADD_LIQUIDITY",
"tickL": 2303.6,
"tickR": 2815.6,
"timestamp": 1724930666755,
"baseAssetAmount": 0.256,
"quoteAssetAmount": 622.4768,
"baseAssetName": "WETH",
"quoteAssetName": "USDT"
}
]
}