Skip to content

database_api.list_witness_votes ​

Purpose ​

Returns a list of witness votes. Parameters: start:array; limit:int; order:string

  • start depends on order (see below)
  • limit is up to 1000.
  • order can be one of:
    • by_account_witness - order by account witness
      • start is an array of two values: account, witness
    • by_witness_account - order by witness account
      • start is an array of two values: witness, account

| start (array) | limit (int) | order (string) | | |----------------------------|---------------|-| | ["", ""] | 10 | "by_withdraw_route" | Queries first 10 votes, sort by account witness | | ["", ""] | 10 | "by_destination" | Queries first 10 votes, sort by witness account |

Also see: 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"
    }
  ]
}