Skip to Content
API超级代表获取提案列表

获取提案列表

1. 概述与典型用途

返回链上治理提案列表,包括提案 ID、参数修改内容、状态、过期时间、审批与反对的超级代表列表等详细信息。

  • 典型用途:治理提案列表展示、提案投票状态追踪、链参数变更历史查询。
  • 何时不要用:查询链参数当前值用「获取链参数列表」。
  • limit 范围为 [20, 200],超出范围返回错误。

2. 接口与鉴权

GET /api/proposal

Base URL 与鉴权见 公共网络与鉴权说明

3. 请求

参数类型必填默认说明
startinteger0起始编号
limitinteger20每页条目数,范围 [20, 200]
addressstring显示该地址是否为发起人或参与者
idinteger提案 ID
statestring按提案状态过滤:PENDINGAPPROVEDDISAPPROVEDCANCELED

4. 响应

顶层

字段类型是否必返说明
totalinteger必返提案总数
dataarray必返提案记录数组,见下

data[] 元素

字段类型是否必返说明单位/精度
proposalIdinteger必返提案 ID
proposalHashstring必返提案哈希
proposerobject必返发起人信息,见下
paramtersarray必返参数修改列表(含 key + value)(paramters 为 API 真实字段名,缺一个 a,非文档错)
statestring必返提案状态:PENDING/APPROVED/DISAPPROVED/CANCELED
expirationTimeinteger必返过期时间毫秒 ms
createTimeinteger必返创建时间毫秒 ms
totalVotesinteger必返总票数
validVotesinteger必返有效票数
approveSelfboolean必返传入 address 时为该地址是否已审批,不传时为 false
createSelfboolean必返传入 address 时为该地址是否为发起人,不传时为 false
approvalsarray必返审批的超级代表列表,见下
vetoarray必返反对的超级代表列表
typeApprovalsobject必返按类型分组的审批列表(sr/partner/candidate),各数组元素结构同 proposer

proposer 对象 / approvals[] 元素 / veto[] 元素 / typeApprovals.sr[] 元素(结构相同)

字段类型是否必返说明单位/精度
addressstring必返超级代表地址
namestring必返名称
urlstring必返官网 URL
producerboolean必返是否为活跃出块节点
votesinteger必返当前投票数
votesPercentagenumber必返投票占比百分比 %
producedTotalinteger必返累计出块数
missedTotalinteger必返累计漏块数
producedTrxinteger必返累计产生的 TRX 奖励sun
producePercentagenumber必返出块效率百分比 %
latestBlockNumberinteger必返最近出块高度
latestSlotNumberinteger必返最新时隙号

5. 错误

HTTP 状态码见 公共错误说明。本接口要点:

  • limit 范围限制limit 不在 [20, 200] 范围内时返回错误消息。
  • 空结果 ≠ 错误:无匹配提案时返回 200 + data: [],属于正常响应。
最后更新于: