获取psbt方式兑换待签名psbt
开发中POST
/brc20swap/get_swap_psbt请求参数
Body 参数application/json
send_coin_type
string
发送的币种
send_tick
string
发送的tick
send_amount
string
发送的数量
receive_coin_type
string
接收的币种
receive_tick
string
接收的tick
receive_amount
string
接收的数量
address
string
地址
slipper
string
必需
fee_rate
integer
必需
ins
array[string]
铭文id
用brc20兑换的时候才需要输入
user_public_key
string
必需
tx_size
integer
必需
从get_swap_psbt_txsize接口获得
checksum
integer
必需
从get_swap_psbt_txsize接口获得
vins
array[string]
必需
从get_swap_psbt_txsize接口获得
usr_cnt
integer
必需
从get_swap_psbt_txsize接口获得
chl
string
必需
method
string
必需
非跨池swap,跨池pools_swap, 只需传pools_swap即可
示例
{
"send_coin_type": "string",
"send_tick": "string",
"send_amount": "string",
"receive_coin_type": "string",
"receive_tick": "string",
"receive_amount": "string",
"address": "string",
"slipper": "string",
"fee_rate": 0,
"ins": [
"string"
],
"user_public_key": "string",
"tx_size": 0,
"checksum": 0,
"vins": [
"string"
],
"usr_cnt": 0,
"chl": "string",
"method": "string"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
msg
string
必需
data
object
必需
order_id
string
psbt tx大小
psbt
string
必需
check_sign_only
boolean
必需
示例
{
"code": 0,
"msg": "string",
"data": {
"order_id": "string",
"psbt": "string",
"check_sign_only": true
}
}
最后修改时间: 1 个月前