Votes

A vote is a specific type of transaction (type 3). A wallet votes on a different wallet, which has registered itself as eligible to become a Validator. Wallets may vote for themselves.

Users are often confused by the voting mechanism and the fee associated with a vote. A Validator does not receive ARK from their voters, nor is the number of blocks they produce proportional to their voting weight.

Properties

  • Name
    amount
    Type
    string
    Description

    The amount involved in the vote transaction, which is always "0" for votes.

  • Name
    asset
    Type
    object
    Description

    Contains the votes and unvotes arrays, indicating which validator(s) the vote was cast for or removed from.

  • Name
    blockId
    Type
    string
    Description

    The identifier of the block that includes this vote transaction.

  • Name
    confirmations
    Type
    integer
    Description

    The number of confirmations this vote transaction has received.

  • Name
    fee
    Type
    string
    Description

    The fee associated with the vote transaction.

  • Name
    id
    Type
    string
    Description

    The unique identifier of the vote transaction.

  • Name
    nonce
    Type
    string
    Description

    The nonce of the wallet that created this vote transaction.

  • Name
    recipient
    Type
    string or null
    Description

    The recipient of the transaction, typically null for vote transactions.

  • Name
    senderPublicKey
    Type
    string
    Description

    The public key of the wallet that created this vote transaction.

  • Name
    signature
    Type
    string
    Description

    The cryptographic signature that authenticates the vote transaction.

  • Name
    signatures
    Type
    array or null
    Description

    An array of additional cryptographic signatures for multi-signature accounts.

  • Name
    timestamp
    Type
    integer
    Description

    The timestamp of when the vote transaction was created.

  • Name
    type
    Type
    integer
    Description

    The type of transaction, which is "3" for votes.

  • Name
    typeGroup
    Type
    integer
    Description

    The group of transaction types, which is "1" for core transactions like votes.

  • Name
    vendorField
    Type
    string or null
    Description

    An optional field to include additional data with the transaction, typically null for votes.

  • Name
    version
    Type
    integer
    Description

    The version of the transaction schema.


GET/votes

List All Votes

This endpoint returns all voting transactions. This is equivalent to transactions/search with the body parameter type: 3.

Request

GET
/votes
curl https://testnet.mainsailhq.com/api/votes

Response

{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 53,
    "first": "/votes?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "last": "/votes?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "next": null,
    "pageCount": 1,
    "previous": null,
    "self": "/votes?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "totalCount": 60
  },
  "data": [
    {
      "amount": "0",
      "asset": {
        "votes": [
          "03a8fce7db7ab62be3024d5cd9e8ca6c7b6768933c3b815fcc8d06e106b795262e"
        ],
        "unvotes": []
      },
      "blockId": "a95e5eab395803cccfb13459d15d79225ee9c5b4c6b257d0e0dacab7864b5c8b",
      "confirmations": 85671,
      "fee": "0",
      "id": "8fe7c4ac9530c7b8d061ca1824517f1a081b2d40a29c1b947af94f6ca70c98fc",
      "nonce": "3",
      "recipient": null,
      "senderPublicKey": "03a8fce7db7ab62be3024d5cd9e8ca6c7b6768933c3b815fcc8d06e106b795262e",
      "signature": "19c8f4db6291859ed4ce11ad66ef84752d36039f71cd87c6beefe6ef2aecd8338c425b270c32ac550a263993ddb9d16804d49d3c197f194c983c04777fb2a113",
      "signatures": null,
      "timestamp": 1724753709339,
      "type": 3,
      "typeGroup": 1,
      "vendorField": null,
      "version": 1
    }
  ]
}

GET/votes/{id}

Retrieve a Vote

This endpoint retrieves a specific vote transaction using its transaction ID. The asset field contains the votes object. The first character of each item in the array indicates if it was a vote (+) or an unvote (-), followed by the public key of the Validator.

Request

GET
/votes/{id}
curl https://testnet.mainsailhq.com/api/votes/4e30369a979967ee3835860b80194b2acab4c9a16696c35ed5c7e779ed93fbaa

Response

{
  "data": {
    "amount": "0",
    "asset": {
      "votes": [
        "03b423fef8eb3859cd4122c2a9d184c29568685f01e11601fcf8b59ba06e81f4a0"
      ],
      "unvotes": []
    },
    "blockId": "a95e5eab395803cccfb13459d15d79225ee9c5b4c6b257d0e0dacab7864b5c8b",
    "confirmations": 85676,
    "fee": "0",
    "id": "4e30369a979967ee3835860b80194b2acab4c9a16696c35ed5c7e779ed93fbaa",
    "nonce": "3",
    "recipient": null,
    "senderPublicKey": "03b423fef8eb3859cd4122c2a9d184c29568685f01e11601fcf8b59ba06e81f4a0",
    "signature": "360115dfccefb67c2b5198eb170d397ddec550c9bd0a22ad4ca2ae98ddd1ab4c79781182b132783b955416918deae1cf9be256e6a35baf1fbcbf744f19f52b1a",
    "signatures": null,
    "timestamp": 1724753709339,
    "type": 3,
    "typeGroup": 1,
    "vendorField": null,
    "version": 1
  }
}