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. 流动池管理
  2. BRC20

预注入/创建流动池

Previous获取代币兑换率Next获取注入/创建待签名 PSBT

Last updated 3 months ago

创建/注入 pool

选择完币对,点击注入时,如果是 BRC20,需要先请求预注入/创建接口

1、这个接口返回的结果,原值传到 create_add_liquid_psbt 接口 2、因为要根据比例注入,由于 brc20 需要先铭刻,所以不支持创建 brc20-brc20 币对池3、关于 tick_1_inscription_ids 和tick_2_inscription_ids 两个参数的说明。其传值和 coin_type 对应。

  • 如果 coin_type_1 是 brc20,则 brc20 inscription_id 放在 tick_1_inscription_ids数组,tick_2_inscription_ids 传空

  • 如果 coin_type_2 是 brc20,brc20 inscription_id 放在 tick_2_inscription_ids数组,tick_1_inscription_ids 传空

如果是同一种币对,brc20-btc 和 btc-brc20 创建或注入的是同一个池子(如:ordi-btc,btc-ordi),只是传参使用的字段不同

  • 创建/注入 pool
  • POST预注入流动性

预注入流动性

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
tick1stringRequired
tick2stringRequired
amount_1stringRequired
amount_2stringRequired
tick_1_inscription_idsstring[]Required

brc20充值时使用

tick_2_inscription_idsstring[]Required
payer_ord_addrstringRequired
payer_btc_addrstringRequired
payer_pub_keystringRequired
fee_ratestringRequired
slipperstringRequired
Responses
200
成功
application/json
x-200:成功
成功
application/json
post
POST /brc20swap/v2/pre_add_liquid HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 364

{
  "tick1": "sint amet aliquip reprehenderit",
  "tick2": "sint et",
  "coin_type_1": "nostrud",
  "coin_type_2": "nisi",
  "amount_1": "86",
  "amount_2": "44",
  "tick_1_inscription_ids": [
    "32",
    "44",
    "21",
    "11",
    "55"
  ],
  "tick_2_inscription_ids": [
    "17",
    "55",
    "23",
    "74",
    "41"
  ],
  "payer_ord_addr": "dolor in id",
  "fee_rate": "cillum aute",
  "payer_btc_addr": "irure sit culpa ea sed",
  "payer_pub_key": "minim"
}
{
  "code": 1,
  "msg": "text",
  "data": {
    "tx_size": 1,
    "ins_contain_sats": 1,
    "vins": [
      "text"
    ],
    "usr_cnt": 1,
    "net_fee": 1,
    "check_sum": "text"
  },
  "req_id": "text"
}