Vessel Finance API
  1. AMM
Vessel Finance API
  • Introduction
  • General Info
  • HMAC Signature Guide
  • Poseidon Signature Guide
  • Internal Transfer Signature Guide
  • Error Code
  • Vessel REST API
    • Public
      • Market Data
        • 24hr Ticker Statistics
        • Kline / Candlestick Data
        • Order Book
        • Recent Trades List
        • Average Price
        • AMM Pool Last 24h Data
      • Exchange Data
        • Ticker Info
        • Asset Info
        • Trade Fee
        • AMM Pool Info
    • User
      • Asset
        • User Asset
        • Withdraw
        • Withdraw History
        • Deposit History
        • Claim History
        • Internal Transfer (Send)
        • Internal Transfer History
      • Order
        • Place Order
        • Cancel Order
        • Open Orders
        • Completed Orders
        • All Orders
        • Query Order
        • Modify Order
      • AMM
        • Add Liquidity
          POST
        • Remove Liquidity
          POST
        • Collect Fee
          POST
        • AMM Position
          GET
        • AMM Action History
          GET
      • Account
        • User Profile
        • User Trade List
  • Vessel WebSocket
    • Market
      • Order Book
      • K Line
      • Recent Trades
      • 24hr Ticker Statistics
      • Ticker Setting Upade
    • User
      • Authorize
      • Balance
      • Account
  1. AMM

AMM Action History

Testnet Env
https://testnet.trade.vessel.finance
Testnet Env
https://testnet.trade.vessel.finance
GET
/api/v1/gateway/user/history/ammUserAction
Last modified:2024-10-15 06:23:56

Request

Query Params
poolId
string 
optional
The unique identifier of the AMM pool to query.
type
string 
optional
The type of action to filter history (e.g., "ADD_LIQUIDITY", "REMOVE_LIQUIDITY", "COLLECT_FEE").
startTime
string 
optional
The start time of the time range for filtering history (Unix timestamp in milliseconds).
endTime
string 
optional
The end time of the time range for filtering history (Unix timestamp in milliseconds).
tickL
string 
optional
The lower bound of the price range for filtering history.
tickR
string 
optional
The upper bound of the price range for filtering history.
limit
string 
optional
The maximum number of history records to retrive (Default is 500. Maximum is 1000).
fromId
string 
optional
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.
Header Params
VESSEL-API-KEY
string 
required
Default:
{{API_KEY}}
VESSEL-PASSPHRASE
string 
required
Default:
{{API_PASSPHRASE}}
VESSEL-SIGNATURE
string 
required
Use signRequest script to generate
VESSEL-TIMESTAMP
string 
required
Use signRequest script to set

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://testnet.trade.vessel.finance/api/v1/gateway/user/history/ammUserAction?poolId&type&startTime&endTime&tickL&tickR&limit&fromId' \
--header 'VESSEL-API-KEY;' \
--header 'VESSEL-PASSPHRASE;' \
--header 'VESSEL-SIGNATURE;' \
--header 'VESSEL-TIMESTAMP;'

Responses

🟢200OK
application/json
Body
history
array [object {10}] 
required
Contains the history of user actions within the specified AMM pool, filtered based on the provided query parameters.
id
string 
required
Unique identifier for the action.
poolId
string 
required
Unique identifier of the AMM pool associated with the action.
type
string 
required
Type of action (e.g., "ADD_LIQUIDITY", "REMOVE_LIQUIDITY", "COLLECT_FEE").
tickL
string 
required
Lower bound of the price range of the position.
tickR
string 
required
Upper bound of the price range of the position.
timestamp
string 
required
Timestamp of when the action occurred (Unix timestamp in milliseconds).
baseAssetAmount
string 
required
Amount of the base asset involved in the action. Positive values indicate adding liquidity or collecting fee, while negative values indicate removing liquidity.
quoteAssetAmount
string 
required
Amount of the quote asset involved in the action. Positive values indicate adding liquidity or collecting fee, while negative values indicate removing liquidity.
baseAssetName
string 
required
Name of the base asset.
quoteAssetName
string 
required
Name of the quote asset
Example
{
  "history": [
    {
      "id": "1728711700276087",
      "poolId": "1",
      "type": "ADD_LIQUIDITY",
      "tickL": "47500",
      "tickR": "52500",
      "timestamp": "1728723291359",
      "baseAssetAmount": "0.025",
      "quoteAssetAmount": "1218.625",
      "baseAssetName": "WBTC",
      "quoteAssetName": "USDC"
    }
  ]
}
Previous
AMM Position
Next
User Profile
Built with