Skip to content

Get Poll Votes

Get all votes on a poll in reverse chronological order.

Request:

  • requestType is getPollVotes
  • poll is the poll ID
  • includeWeights is true to calculate and return the weight assigned to each vote (optional)
  • firstIndex is a zero-based index to the first vote to retrieve (optional)
  • lastIndex is a zero-based index to the last vote to retrieve (optional)
  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • votes (A) is an array of vote objects (refer to Get Poll Vote for details)
  • lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
  • requestProcessingTime (N) is the API request processing time (in millisec)

Note: Votes are deleted from the database 1441 blocks after the poll is finished. Only aggregate results are kept (refer to Get Poll Result ).