Collect Fees

Build PSBT

Endpoint: /api/transactions Method: POST

Request Body

{
  "type": "collect-fee",
  "params": {
    "userAddress": "string",
    "token0Id": "string",
    "token1Id": "string",
    "amount0": "string",
    "amount1": "string",
    "liquidityValue": "string",
    "nftId": "string"
  }
}

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": "collect-fee",
  "params": {
    "userAddress": "string",
    "signedBase64Tx": "string"
  }
}

Response

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

Last updated