要使用此功能,您必须拥有 API 密钥。请阅读这里以了解如何获取我们的 API 密钥。
通过 API 密钥获取历史
GET
https://api.tronsave.io/v0/orders
获取许多订单按创建时间排序。默认:返回10个最新订单
Query Parameters
{
data:{
id: string, // 订单的 ID
requester: string, // 代表订单所有者的地址
target: string, // 收到资源的地址
resource_amount: number, // 资源的数量
resource_type: string, // 资源类型为 "ENERGY"
remain_amount: number, // 系统可以匹配的剩余数量
price: number, // 价格单位等于 sun
duration: number, // 租赁期限,以秒为单位
allow_partial_fill: boolean, // 允许订单部分成交或不允许
payout_amount: number, // 此订单的总支付金额
fulfilled_percent: number, // 显示填充进度的百分比,范围从0到100
} [],
total:number
}
例子 (Example)
{
"data": [
{
"id": "651d0e5d8248d002ea08a231",
"requester": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
"target": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
"resource_amount": 100000,
"resource_type": "ENERGY",
"remain_amount": 100000,
"price": 45,
"duration": 259200,
"allow_partial_fill": false,
"payout_amount": 4500000,
"fulfilled_percent": 0
},
{
"id": "651d2306e55c073f6ca0992e",
"requester": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
"target": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
"resource_amount": 100000,
"resource_type": "ENERGY",
"remain_amount": 0,
"price": 67.5,
"duration": 3600,
"allow_partial_fill": true,
"payout_amount": 6750000,
"fulfilled_percent": 100
}
],
"total": 2
}
通过 API 密钥获取一个订单的详细信息
GET
https://api.tronsave.io/v0/orders/:id
例子 (Example)
{
"id": "651d2306e55c073f6ca0992e",
"requester": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
"target": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
"resource_amount": 100000,
"resource_type": "ENERGY",
"remain_amount": 0,
"price": 67.5,
"duration": 3600,
"allow_partial_fill": true,
"payout_amount": 6750000,
"fulfilled_percent": 100
}
Last updated