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

Add Liquidity

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

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/add' \
--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

Examples
{
    "baseAssetAmount": "0.6808",
    "quoteAssetAmount": "89747.84"
}
Modified at 2024-10-15 06:23:56
Previous
Modify Order
Next
Remove Liquidity
Built with