Remove Liq

Estimate the number of ticks you can get by typing LP.

get
/v1/brc20-swap/quote_remove_liq
Authorizations
Query parameters
addressstringRequired
tick0stringRequired
tick1stringRequired
lpstringRequired
Responses
200

Default Response

application/json
get
/v1/brc20-swap/quote_remove_liq
GET /v1/brc20-swap/quote_remove_liq?address=text&tick0=text&tick1=text&lp=text HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "tick0": "text",
    "tick1": 1,
    "amount0": "text",
    "amount1": "text",
    "amount0USD": "text",
    "amount1USD": "text"
  }
}

/remove_liq interface pre-load, get the signature content, gas and byte information.

get
/v1/brc20-swap/pre_remove_liq
Authorizations
Query parameters
addressstringRequired
tick0stringRequired
tick1stringRequired
amount0stringRequired

Input amount of tick0

amount1stringRequired

Input amount of tick1

lpstringRequired
slippagestringRequired
tsnumberRequired
Responses
200

Default Response

application/json
get
/v1/brc20-swap/pre_remove_liq
GET /v1/brc20-swap/pre_remove_liq?address=text&tick0=text&tick1=text&amount0=text&amount1=text&lp=text&slippage=text&ts=1 HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "signMsg": "text",
    "bytesL1": 1,
    "bytesL2": 1,
    "feeRate": "text",
    "gasPrice": "text",
    "serviceFeeL1": "text",
    "serviceFeeL2": "text",
    "unitUsdPriceL1": "text",
    "unitUsdPriceL2": "text",
    "serviceTickBalance": "text"
  }
}

Remove the liquidity operation

post
/v1/brc20-swap/remove_liq
Authorizations
Body
addressstringRequired
tick0stringRequired
tick1stringRequired
lpstringRequired
amount0stringRequired

Input amount of tick0

amount1stringRequired

Input amount of tick1

slippagestringRequired
tsnumberRequired

Timestamp (seconds)

sigstringRequired

User signature

Responses
200

Default Response

application/json
post
/v1/brc20-swap/remove_liq
POST /v1/brc20-swap/remove_liq HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 132

{
  "address": "text",
  "tick0": "text",
  "tick1": "text",
  "lp": "text",
  "amount0": "text",
  "amount1": "text",
  "slippage": "text",
  "ts": 1,
  "sig": "text"
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "id": "text",
    "rollupInscriptionId": "text",
    "address": "text",
    "type": "text",
    "tick0": "text",
    "tick1": "text",
    "amount0": "text",
    "amount1": "text",
    "lp": "text",
    "ts": 1
  }
}

Last updated