DotSwap Nexus Integration
中文简体
中文简体
  • 介绍
  • 快速上手
  • 基本信息
    • 访问限制
  • 全局
    • 代币兑换率查询
    • 代币列表查询
    • 数据查询
  • 兑换
    • RUNES
      • 获取可兑换代币列表
      • 获取代币兑换率
      • 获取兑换待签名 PSBT
      • 发送兑换已签名 PSBT
    • BRC20
      • 获取可兑换代币列表
      • 获取代币兑换率
      • 预兑换请求
      • 获取兑换待签名 PSBT
      • 发送兑换已签名 PSBT
    • ARC20
      • 获取可兑换代币列表
      • 获取代币兑换率
      • 获取兑换待签名 PSBT
      • 发送兑换已签名 PSBT
  • 流动池管理
    • RUNES
      • 获取可注入代币列表
      • 获取代币兑换率
      • 获取注入/创建待签名 PSBT
      • 发送注入/创建已签名 PSBT
    • BRC20
      • 获取可注入代币列表
      • 获取代币兑换率
      • 预注入/创建流动池
      • 获取注入/创建待签名 PSBT
      • 发送注入/创建已签名 PSBT
    • ARC20
      • 获取可注入代币列表
      • 获取代币兑换率
      • 获取注入/创建待签名 PSBT
      • 发送注入/创建已签名 PSBT
  • 移除流动池
    • 移除流动池
  • cat20
    • split
Powered by GitBook
On this page
  1. 移除流动池

移除流动池

Previous发送注入/创建已签名 PSBTNextsplit

Last updated 3 months ago

本指南中,我们将通过 DotSwap 提供的一个示例来展示如何进行移除流动池,这个过程包括:

  • 移除流动池

    • 预移除请求

    • 获取移除待签名 PSBT

    • 发送移除已签名 PSBT

  • 获取移除预估数量

RUNES/BRC20/ARC20 移除接口相同,根据coin_type_*区分。

示例

{
    "tick1": "BTC",
    "tick2": "RUNEONERUNEONE",
    "coin_type_1": "btc",
    "coin_type_2": "runes",
    "payer_ord_addr": "tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e",
    "payer_btc_addr": "tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e",
    "percent": "15",
    "slipper": "12",
    "fee_rate": "57",
    "payer_pub_key": "02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81:02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81"
}
curl 'https://test-api-proxy.ddpurse.com/brc20swap/v2/pre_remove_liquid' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://localhost:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://localhost:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"tick1":"BTC","tick2":"RUNEONERUNEONE","coin_type_1":"btc","coin_type_2":"runes","payer_ord_addr":"tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e","payer_btc_addr":"tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e","percent":"15","slipper":"12","fee_rate":"57","payer_pub_key":"02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81:02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81"}'
curl 'https://test-api-proxy.ddpurse.com/brc20swap/v2/pre_remove_liquid' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://192.168.10.66:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://192.168.10.66:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"percent":"10","tick1":"BTC","tick2":"bqbq","coin_type_1":"btc","coin_type_2":"brc20","payer_ord_addr":"tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e","payer_btc_addr":"tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e","payer_pub_key":"02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81:02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81","slipper":"12","fee_rate":"11"}' \
  --compressed
curl 'https://test-api-proxy.ddpurse.com/brc20swap/v2/pre_remove_liquid' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://localhost:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://localhost:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"tick1":"BTC","tick2":"3dbb","coin_type_1":"btc","coin_type_2":"arc20","payer_ord_addr":"tb1qlphav0389832xt8deme0hx2unvw3cjt7fsfuyx","payer_btc_addr":"tb1qlphav0389832xt8deme0hx2unvw3cjt7fsfuyx","percent":"30","slipper":"12","fee_rate":"3","payer_pub_key":"036d9bb5a5cbf1cfb46c6ec79832a53b4f8717751485abb141ba6d595393200ace:036d9bb5a5cbf1cfb46c6ec79832a53b4f8717751485abb141ba6d595393200ace"}'

1、返回结果原值传给 create_remove_liquid_psbt (下一个接口)

示例

{
    "expect_amount1": "1500",
    "expect_amount2": "75",
    "expect_transfer_fee": 20121,
    "check_sum": "D6CCF094281BC79DD4AF6E7A7FBF1CDA",
    "tx_size": 353,
    "usr_cnt": 1,
    "vins": [
        "6cf1c2614a4eaaadf68769909b04687a2ddc4d6082fe4a78654dfad08a9a9323:6"
    ],
    "tick1": "BTC",
    "tick2": "RUNEONERUNEONE",
    "coin_type_1": "btc",
    "coin_type_2": "runes",
    "payer_ord_addr": "tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e",
    "payer_btc_addr": "tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e",
    "percent": "15",
    "slipper": "12",
    "fee_rate": "57",
    "payer_pub_key": "02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81:02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81"
}
curl 'https://test-api-proxy.ddpurse.com/brc20swap/v2/create_remove_liquid_psbt' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://localhost:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://localhost:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"expect_amount1":"1500","expect_amount2":"75","expect_transfer_fee":20121,"check_sum":"D6CCF094281BC79DD4AF6E7A7FBF1CDA","tx_size":353,"usr_cnt":1,"vins":["6cf1c2614a4eaaadf68769909b04687a2ddc4d6082fe4a78654dfad08a9a9323:6"],"tick1":"BTC","tick2":"RUNEONERUNEONE","coin_type_1":"btc","coin_type_2":"runes","payer_ord_addr":"tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e","payer_btc_addr":"tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e","percent":"15","slipper":"12","fee_rate":"57","payer_pub_key":"02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81:02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81"}'
curl 'https://test-api-proxy.ddpurse.com/brc20swap/v2/create_remove_liquid_psbt' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://192.168.10.66:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://192.168.10.66:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"expect_amount1":"5075.803216837728754467","expect_amount2":"282.002432596010007297781694096138448","expect_transfer_fee":15798,"check_sum":"8DEFAA3590E994E291F02030EE7BBBE1","usr_cnt":1,"vins":["5fbfbe6ed863c228b8dc77ed2ec55a8b09fcbb8a2767874c12f61c9ce1dbc263:2"],"tx_size":642,"percent":"10","slipper":"12","tick1":"BTC","tick2":"bqbq","coin_type_1":"btc","coin_type_2":"brc20","payer_ord_addr":"tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e","payer_btc_addr":"tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e","payer_pub_key":"02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81:02d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81","fee_rate":"11"}' \
  --compressed
curl 'https://test-api-proxy.ddpurse.com/brc20swap/v2/create_remove_liquid_psbt' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://localhost:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://localhost:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"expect_amount1":"120383.33777471435486031353079418688523444","expect_amount2":"637.35028437485150273725464254913146868","expect_transfer_fee":1911,"check_sum":"35B665B6AA891953152CC576C5FE125F","tx_size":637,"usr_cnt":1,"vins":["9ad1f5f681637d6d11443b941cfa2f5e0ba4dad2405b88ee8254a34f763969e7:1"],"tick1":"BTC","tick2":"3dbb","coin_type_1":"btc","coin_type_2":"arc20","payer_ord_addr":"tb1qlphav0389832xt8deme0hx2unvw3cjt7fsfuyx","payer_btc_addr":"tb1qlphav0389832xt8deme0hx2unvw3cjt7fsfuyx","percent":"30","slipper":"12","fee_rate":"3","payer_pub_key":"036d9bb5a5cbf1cfb46c6ec79832a53b4f8717751485abb141ba6d595393200ace:036d9bb5a5cbf1cfb46c6ec79832a53b4f8717751485abb141ba6d595393200ace"}'

示例

{
    "psbt": "70736274ff01007d020000000123939a8ad0fa4d65784afe82604ddc2d7a68049b906987f6adaa4e4a61c2f16c0600000000ffffffff02994e00000000000022512054f638dfba2ea8d607a59ec681a1ec479f741b0f505a116fe20172fde877eede52ca040000000000160014464ef3759fcfb1eb3d76f3319ef58ec20301c658000000000001011ffc3a050000000000160014464ef3759fcfb1eb3d76f3319ef58ec20301c65801086b0247304402200b398be45be70f30793de6e31aa9a9007a954f391f82e12b7a72c663af5d94570220230c28c921ca20e94669fab5abb7baf9cc908d121d2a5ffb96643e02c2d529bd012102d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81000000",
    "order_id": "liquid_972788279311073280",
    "checksum": "CAA324EB56C64FA1A6646C9AED0E2BAF",
    "to_sign_inputs": null
}
curl 'https://test-api-proxy.ddpurse.com/brc20swap/v2/remove_liquid_by_psbt' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://localhost:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://localhost:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"psbt":"70736274ff01007d020000000123939a8ad0fa4d65784afe82604ddc2d7a68049b906987f6adaa4e4a61c2f16c0600000000ffffffff02994e00000000000022512054f638dfba2ea8d607a59ec681a1ec479f741b0f505a116fe20172fde877eede52ca040000000000160014464ef3759fcfb1eb3d76f3319ef58ec20301c658000000000001011ffc3a050000000000160014464ef3759fcfb1eb3d76f3319ef58ec20301c65801086b0247304402200b398be45be70f30793de6e31aa9a9007a954f391f82e12b7a72c663af5d94570220230c28c921ca20e94669fab5abb7baf9cc908d121d2a5ffb96643e02c2d529bd012102d3ac7452920b1cc4653516dd4f4381a2df0a8c0aac6e3446e633a73ea63eee81000000","order_id":"liquid_972788279311073280","checksum":"CAA324EB56C64FA1A6646C9AED0E2BAF","to_sign_inputs":null}'

示例

{
    "address": "tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e",
    "lp_precent": 35,
    "from_tick": "BTC",
    "to_tick": "RUNEONERUNEONE",
    "from_coin_type": "btc",
    "to_coin_type": "runes"
}
curl 'https://test-api-proxy.ddpurse.com/brc20swap/get_liquid_info' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://localhost:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://localhost:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"address":"tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e","lp_precent":35,"from_tick":"BTC","to_tick":"RUNEONERUNEONE","from_coin_type":"btc","to_coin_type":"runes"}'

手续费说明

用户实际获得的数量,需要扣掉多签托管机构的服务费,该服务费费率使用后端返回的字段mutisign_fee_proportion(目前是 0.3%,未来如果托管机构变动,我们将会跟着调整)

手续费计算

  • btc-brc20\runes 移除手续费 = btc 聪数*0.3%

  • btc-arc20 移除手续费 = btc 聪数*0.3%+arc20 聪数*0.3%

  • brc20-brc20 移除手续费 = 免费

用户实际获得数量计算示例

if (from_coin_type === "btc") {
  finally_from_amount = from_amount * (1 - mutisign_fee_proportion);
  if (to_coin_type === "arc20") {
    finally_from_amount =
      finally_from_amount - to_amount * mutisign_fee_proportion;
  }
  finally_to_amount = to_amount;
}
if (to_coin_type === "btc") {
  finally_from_amount = from_amount;
  finally_to_amount = to_amount * (1 - mutisign_fee_proportion);
  if (to_coin_type === "arc20") {
    finally_to_amount =
      finally_to_amount - from_amount * mutisign_fee_proportion;
  }
}

1、预估数量会根据总流动池的数量实时变化,所以前端可进行轮询请求,以获得最新数量

  • POST预移除流动性
  • 示例
  • POST构建移除流动性psbt
  • 示例
  • POST移除流动性
  • 示例
  • POST根据移除比例获取流动性信息
  • 示例
  • 手续费说明

预移除流动性

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
tick1stringRequired
tick2stringRequired
coin_type_1stringRequired
coin_type_2stringRequired
percentstringRequired
payer_btc_addrstringRequired
payer_ord_addrstringRequired
payer_pub_keystringRequired
slipperstringRequired
fee_ratestringRequired
Responses
200
成功
application/json
x-200:成功
成功
application/json
post
POST /brc20swap/v2/pre_remove_liquid HTTP/1.1
Host: test-api-proxy.ddpurse.com
Content-Type: application/json
Accept: */*
Content-Length: 196

{
  "tick1": "text",
  "tick2": "text",
  "coin_type_1": "text",
  "coin_type_2": "text",
  "percent": "text",
  "payer_btc_addr": "text",
  "payer_ord_addr": "text",
  "payer_pub_key": "text",
  "slipper": "text",
  "fee_rate": "text"
}
{
  "code": 1,
  "msg": "text",
  "data": {
    "expect_amount1": "text",
    "expect_amount2": "text",
    "expect_transfer_fee": 1,
    "check_sum": "text",
    "tx_size": 1,
    "usr_cnt": 1,
    "vins": [
      "text"
    ]
  },
  "req_id": "text"
}

构建移除流动性psbt

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
tick1stringRequired
tick2stringRequired
coin_type_1stringRequired
coin_type_2stringRequired
percentstringRequired
payer_btc_addrstringRequired
payer_ord_addrstringRequired
payer_pub_keystringRequired
slipperstringRequired
fee_ratestringRequired
expect_amount1stringRequired
expect_amount2stringRequired
expect_transfer_feeintegerRequired
check_sumstringRequired
tx_sizeintegerRequired
usr_cntintegerRequired
vinsstring[]Required
Responses
200
成功
application/json
x-200:成功
成功
application/json
post
POST /brc20swap/v2/create_remove_liquid_psbt HTTP/1.1
Host: test-api-proxy.ddpurse.com
Content-Type: application/json
Accept: */*
Content-Length: 327

{
  "tick1": "text",
  "tick2": "text",
  "coin_type_1": "text",
  "coin_type_2": "text",
  "percent": "text",
  "payer_btc_addr": "text",
  "payer_ord_addr": "text",
  "payer_pub_key": "text",
  "slipper": "text",
  "fee_rate": "text",
  "expect_amount1": "text",
  "expect_amount2": "text",
  "expect_transfer_fee": 1,
  "check_sum": "text",
  "tx_size": 1,
  "usr_cnt": 1,
  "vins": [
    "text"
  ]
}
{
  "code": 1,
  "msg": "text",
  "data": {
    "order_id": "text",
    "psbt": "text",
    "checksum": "text"
  },
  "req_id": "text"
}

移除流动性

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
order_idstringRequired
psbtstringRequired
checksumstringRequired
Responses
200
成功
application/json
x-200:成功
成功
application/json
post
POST /brc20swap/v2/remove_liquid_by_psbt HTTP/1.1
Host: test-api-proxy.ddpurse.com
Content-Type: application/json
Accept: */*
Content-Length: 96

{
  "order_id": "text",
  "psbt": "text",
  "checksum": "text",
  "to_sign_inputs": [
    {
      "index": 1,
      "type": "text"
    }
  ]
}
{
  "code": 1,
  "msg": "text",
  "data": null,
  "req_id": "text"
}

根据移除比例获取流动性信息

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
addressstringRequired
lp_precentintegerRequired

小数 百分比 整数

from_tickstringRequired

当前都是btc

to_tickstringRequired
from_coin_typestringRequired
to_coin_typestringRequired
Responses
200
成功
application/json
x-200:成功
成功
application/json
post
POST /brc20swap/get_liquid_info HTTP/1.1
Host: test-api-proxy.ddpurse.com
Content-Type: application/json
Accept: */*
Content-Length: 115

{
  "address": "text",
  "lp_precent": 1,
  "from_tick": "text",
  "to_tick": "text",
  "from_coin_type": "text",
  "to_coin_type": "text"
}
{
  "code": 1,
  "msg": "text",
  "data": {
    "from_amount": "text",
    "to_amount": "text",
    "mutisign_fee_proportion": "text"
  }
}