custodyAccount

托管账户post请求(聪相关)

1.账户的验证

本小节API使用需提前获取账户认证,认证方法请查看以下page:

Authentification-appchevron-right

APP端需要获取token作为账户标识。并在后面每一个请求头中放入token

请求头:

APP端:
key:Authorization  value: Bearer token

2.申请一张发票

POST:/custodyAccount/invoice/apply

该接口是为用户申请一张指定数额发票。 需要注意的是,只有用户调用过一次申请发票的接口后,服务器端才会激活该用户的托管账户功能。在此之前,调用托管账户相关的其他功能调用可能会失败。这个问题会在上线托管资产时优化。

请求体:

{
    "amount": 500,
    "memo" : "it's a test invoice"
}
amount:数量
memo:发票中的附言

响应:

3.查询当前账户的所有发票

POST:/custodyAccount/invoice/queryinvoice

请求体:

响应体:

4.查询余额

弃用,使用coustodyAccount第8条

POST:/custodyAccount/invoice/querybalance

请求体:

响应体:

5.支付发票

POST:/custodyAccount/invoice/pay

请求体:

响应体:

6.查询托管账户的交易记录

POST:/custodyAccount/invoice/querypayment

请求体:

响应体:

更新:8/5新增fee字段

7.解码发票

POST:/custodyAccount/invoice/decodeinvoice

请求体:

响应体:

8.查询余额

POST:/custodyAccount/balance

请求体:

响应体:

9.查询所有btc及资产余额列表

Post:/custodyAccount/getAssetBalanceList

请求体:

响应体:

Last updated