Skip to content

database_api.list_votes ​

Purpose ​

Returns all votes, starting with the specified voter and/or author and permlink. Parameters: start:array; limit:int; order:string

  • start depends on order (see below)
    • voter is optional
    • author and permlink are optional, but if one is blank, they must both be blank
  • limit is up to 1000.
  • order can be one of:
    • by_comment_voter - order by comment voter
      • start is an array of three optional values: author, permlink, voter
    • by_voter_comment - order by voter comment
      • start is an array of three optional values: voter, author, permlink

| start (array) | limit (int) | order (string) | | |----------------------------|---------------|-| | ["", "", ""] | 10 | "by_comment_voter" | Queries first 10 votes, sort by comment voter | | ["", "", ""] | 10 | "by_voter_comment" | Queries first 10 votes, sort by voter comment | | ["xeroc", "vanteem-config", ""] | 10 | "by_comment_voter" | Queries next 10 votes starting on the post @xeroc/vanteem-config, sort by comment voter | | ["alice", "xeroc", "vanteem-config"] | 10 | "by_voter_comment" | Queries next 10 votes starting at alice on the post @xeroc/vanteem-config, sort by voter comment |

Also see: Paginated API Methods

Parameters ​

PARAMETERS
json
{
  "start": [
    "",
    "",
    ""
  ],
  "limit": 10,
  "order": "by_comment_voter"
}

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_votes",
    "params": {
      "start": [
        "",
        "",
        ""
      ],
      "limit": 10,
      "order": "by_comment_voter"
    },
    "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_votes",
    "params": {
      "start": [
        "",
        "",
        ""
      ],
      "limit": 10,
      "order": "by_voter_comment"
    },
    "id": 1
  }'

Example 3 ​

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

Example 4 ​

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

Response ​

RESPONSE
json
{
  "votes": [
    {
      "id": 9,
      "voter": "dantheman",
      "author": "steemit",
      "permlink": "firstpost",
      "weight": "32866333630",
      "rshares": 375241,
      "vote_percent": 100,
      "last_update": "2016-04-07T19:15:36",
      "num_changes": -1
    }
  ]
}