拉取数字资产历史登记记录
更新时间:2022-07-14
拉取数字资产历史登记记录
接口描述
- 本接口用于拉取资产登记历史记录。包括资产创造、碎片授予、碎片转移的全部操作纪录,按时间倒序排序
- shard_id是可选参数,用户查询指定藏品、指定碎片的历史记录。
请求结构
JSON
1POST /xasset/horae/v1/history HTTP/1.1
2Host: xuper.baidu.com
3Authorization: Authorization string
4Content-Type: application/x-www-form-urlencoded;charset=utf-8
5
6asset_id={asset_id}
7&page={page}
8&limit={limit}
9&shard_id={shard_id}
请求头域
- 除公共头域外,无其它特殊头域。
请求参数
参数名 | 参数类型 | 是否可选 | 参数说明 |
---|---|---|---|
asset_id | int64 | 可选 | 要查询的资产id |
page | int | 必选 | 要拉取页数,第一页为1 |
limit | int | 可选 | 默认20,最大50 |
shard_id | int64 | 可选 | 指定的话查询指定藏品、指定碎片的历史记录 |
响应头域
- 除公共头域外,无其它特殊头域。
响应参数
参数名 | 参数类型 | 参数说明 |
---|---|---|
list | array | 资产登记历史记录 |
total_cnt | int | 总条目数 |
请求示例
JSON
1Post xasset/horae/v1/history
2Host: xuper.baidu.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2022-04-18T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4
5asset_id=123123123
6&page=1
7&limit=20
响应示例
JSON
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3Date: Wed, 18 Apr 2022 03:28:11 GMT
4X-Trace-Id: "1182282645"
5{
6 "errmsg": "succ",
7 "errno": 0,
8 "request_id": "916556533358021977",
9 "total_cnt": 10,
10 "list": [
11 {
12 "asset_id": 123,
13 "type": 1, // 1:资产创造 2:碎片授予 3:碎片转移
14 "shard_id": 123, // type=1时shard_id为0
15 "price": 1000, // 当时价格
16 "tx_id": "abcd1cadfa",
17 "from": "TeyyPLpp9L7QAcxHangtcHTusHUZ6iydN", // type=1时from为""
18 "to": "Tadfasdfp9L7QAcxHangtcHTusHUZ6iydN",
19 "ctime": 12312312
20 }
21 ]
22}