跳到正文

database_api.list_witness_votes ​

Purpose ​

返回见证人(witness)投票列表。参数:start:array、limit:int、order:string

  • start 取决于 order(见下文)
  • limit 最大 1000。
  • order 可取以下值:
    • by_account_witness - 按账户与见证人排序
      • start 为两个值组成的数组:account、witness
    • by_witness_account - 按见证人与账户排序
      • start 为两个值组成的数组:witness、account

| start (array) | limit (int) | order (string) | | |----------------------------|---------------|-| | ["", ""] | 10 | "by_withdraw_route" | 查询前 10 条投票,按账户与见证人排序 | | ["", ""] | 10 | "by_destination" | 查询前 10 条投票,按见证人与账户排序 |

另见:Paginated API Methods

Parameters ​

PARAMETERS
json
{
  "start": null,
  "limit": 0,
  "order": "by_name"
}

Example ​

Example 1 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "database_api.list_witness_votes",
    "params": {
      "start": [
        "",
        ""
      ],
      "limit": 10,
      "order": "by_account_witness"
    },
    "id": 1
  }'

Example 2 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "database_api.list_witness_votes",
    "params": {
      "start": [
        "",
        ""
      ],
      "limit": 10,
      "order": "by_witness_account"
    },
    "id": 1
  }'

Response ​

RESPONSE
json
{
  "votes": [
    {
      "id": 428961,
      "witness": "aggroed",
      "account": "a-0magic"
    }
  ]
}