Supply Liquidity

Build PSBT

Endpoint: /api/transactions Method: POST

Request Body

{
  "type": "provide-liquidity",
  "params": {
    "userAddress": "string",
    "token0Id": "string",
    "token1Id": "string",
    "amount0": "string",
    "amount1": "string",
    "upperTick": "string",
    "lowerTick": "string",
    "feeRate": "number"
  }
}

Response

{
  "code": 1,
  "message": "common.success",
  "data": {
    "base64Psbt": "string",
    "fee": {
      "feeRate": "number",
      "totalFee": "number"
    }
  }
}

Sign and Broadcast Transaction

Endpoint: /api/transactions/sign Method: POST

Request Body

{
  "type": "provide-liquidity",
  "params": {
    "userAddress": "string",
    "signedBase64Tx": "string"
  }
}

Response

{
  "code": 1,
  "message": "common.success",
  "data": {
    "txId": "string"
  }
}

Last updated