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

Remove Liquidity

Testnet Env
https://testnet.trade.vessel.finance
Testnet Env
https://testnet.trade.vessel.finance
POST
/api/v1/amm/remove
Last modified:2024-10-15 06:23:56
Remove Liquidity allows users to remove liquidity from an Automated Market Maker (AMM) pool. Users must provide the pool ID, price tick range, base and quote asset amounts to remove, a nonce, and a signature for authentication. Upon successful execution, the API returns the amounts of base and quote assets removed from the pool, as well as any fee amounts incurred.

Request

Header Params

Body Params application/json

Example
{
    "poolId": 2,
    "tickIndexL": 222,
    "tickIndexR": 350,
    "baseAmount": 1,
    "quoteAmount": 100000,
    "nonce": "1715321003889",
    "signature": "0xa742f3a4296aa5d8221451793f2c2d835f0aa484b37c021fa7953a6aa78c053f67972dc251ce763b0c4b8a7b843d5d4f28c6b5d6dff674a44a0850966e598123"
}

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 POST 'https://testnet.trade.vessel.finance/api/v1/amm/remove' \
--header 'VESSEL-TIMESTAMP;' \
--header 'VESSEL-TIMESTAMP;' \
--header 'VESSEL-API-KEY;' \
--header 'VESSEL-PASSPHRASE;' \
--header 'VESSEL-SIGNATURE;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "poolId": 2,
    "tickIndexL": 222,
    "tickIndexR": 350,
    "baseAmount": 1,
    "quoteAmount": 100000,
    "nonce": "1715321003889",
    "signature": "0xa742f3a4296aa5d8221451793f2c2d835f0aa484b37c021fa7953a6aa78c053f67972dc251ce763b0c4b8a7b843d5d4f28c6b5d6dff674a44a0850966e598123"
}'

Responses

🟢200OK
application/json
Body

Example
{
    "baseAssetAmount": "-0.6808",
    "quoteAssetAmount": "-89747.84",
    "baseAssetFeeAmount": "0",
    "quoteAssetFeeAmount": "0"
}
Modified at 2024-10-15 06:23:56
Previous
Add Liquidity
Next
Collect Fee
Built with