Elections
GET /explorer/election/{head,hash,number}
On-chain elections can be queried by proposal hash or sequence number. An election contains a complete set of data on a past or the currently ongoing (head) on-chain voting process, including up to four voting periods. Voting periods may be empty when no proposal has been published. Only the last voting period of the last election can be in state open. Ballots represent the individual ballot operations sent by bakers during votes or the up-votes to a proposal during the first voting period.
- Schema
- Period
- Proposal
- Sample
- Example
| Field | Description | 
|---|---|
| election_idint64 | Sequence number of the election. | 
| num_periodsint64 | Number of voting periods activated during this election (min 1, max 4) | 
| num_proposalsint64 | Total number of submitted proposals. | 
| start_timeint64 | Time of the first block in the election. | 
| end_timeint64 | Time of the last block in the election (when open this is an approximation of the latest possible end assuming all voting periods are used and all remaining blocks are produced at priority zero). | 
| start_heightint64 | First block of the election period. | 
| end_heightbool | Last block of the election (when open this is an approximation of the full duration assuming all voting periods are used). | 
| is_emptybool | Flag indicating the election has not seen and proposal being submitted. | 
| is_openbool | Flag indicating the election is ongoing. | 
| is_failedbool | Flag indicating the election has failed to select or activate a new protocol. | 
| no_quorumbool | Flag indicating the election has failed because no quorum could be reached. | 
| no_majoritybool | Flag indicating the election has failed because no majority could be reached. | 
| no_proposalbool | Flag indicating the election has failed because no proposal has been submitted. | 
| voting_periodenum | Period kind proposal,exploration,cooldown,promotion,adoption. | 
| proposalobject | Vote object for the proposal period 1 (see below). | 
| explorationobject | Vote object for the exploration period 2 (see below). | 
| cooldownobject | Vote object for the cooldown period 3 (see below). | 
| promotionobject | Vote object for the promotion vote period 4 (see below). | 
| adoptionobject | Vote object for the adoption vote period 5 (see below). | 
Voting Schema​
| Field | Description | 
|---|---|
| voting_periodint64 | Protocol-level voting period counter. | 
| voting_period_kindenum | Period kind proposal,exploration,cooldown,promotion,adoption. | 
| period_start_timedatetime | Time of the first block in the voting period. | 
| period_end_timedatetime | Time of the last block in the voting period (when open this is an approximation of the latest possible end assuming all remaining blocks are produced at priority zero). | 
| period_start_blockint64 | First block of the voting period. | 
| period_end_blockint64 | Last block of the voting period. | 
| eligible_stakemoney | |
| eligible_votersint64 | Number of eligible voters (delegates) snapshot at start of the voting period. | 
| quorum_pctfloat | Required quorum in percent. | 
| quorum_stakemoney | Required stake to reach quorum. | 
| turnout_stakemoney | Actual voting stake. | 
| turnout_votersint64 | Actual voters who voted. | 
| turnout_pctfloat | Actual participation in percent. | 
| turnout_emafloat | Moving average for Babylon v005 quorum algorithm. | 
| yay_stakemoney | Amount of Yay stake. | 
| yay_votersint64 | Number of Yay voters. | 
| nay_stakemoney | Amount of Nay stake. | 
| nay_votersint64 | Number of Nay voters. | 
| pass_stakemoney | Amount of Pass stake. | 
| pass_votersint64 | Number of Pass voters. | 
| is_openbool | Flag indicating the voting period is currently open. | 
| is_failedbool | Flag indicating the voting period has failed to select or activate a new protocol. | 
| is_drawbool | Flag indication the reason for failure was a draw between two proposals in the proposal period. | 
| no_proposalbool | Flag indication the reason for failure was no submitted proposal in the proposal period. | 
| no_quorumbool | Flag indication the reason for failure was participation below the required quorum. | 
| no_majoritybool | Flag indication the reason for failure was acceptance below the required supermajority. | 
| proposalsarray | List of submitted proposals (in proposal period) or the selected proposal. | 
Proposal Schema​
| Field | Description | 
|---|---|
| hashhash | Protocol hash. | 
| sourcehash | Sender account. | 
| block_hashhash | Proposal operation block hash. | 
| op_hashhash | Proposal operation hash. | 
| heightint64 | Proposal operation submission height. | 
| timedatetime | Proposal operation submission time. | 
| stakemoney | Amount of stake voting for this proposal. | 
| votersint64 | Count of voters voting for this proposal during the proposal period. | 
{
    "election_id": 39,
    "start_height": 2285569,
    "start_time": "2022-04-16T09:50:14Z",
    "end_height": 2490368,
    "end_time": "2022-06-28T14:48:14Z",
    "voting_period": "adoption",
    "is_empty": false,
    "is_failed": false,
    "is_open": true,
    "max_periods": 5,
    "no_majority": false,
    "no_proposal": false,
    "no_quorum": false,
    "num_periods": 5,
    "num_proposals": 4,
    "proposal": {
        "eligible_stake": 685418342.568226,
        "eligible_voters": 385,
        "is_draw": false,
        "is_failed": false,
        "is_open": false,
        "nay_stake": 0,
        "nay_voters": 0,
        "no_majority": false,
        "no_proposal": false,
        "no_quorum": false,
        "pass_stake": 0,
        "pass_voters": 0,
        "period_end_block": 2326528,
        "period_end_time": "2022-05-01T02:05:29Z",
        "period_start_block": 2285569,
        "period_start_time": "2022-04-16T09:50:14Z",
        "proposals": [
            {
                "block_hash": "BLrcxiWFjAWf3E1KyPAQyPGfRSqTVSofZ1936ERT3nWxJC9j9dH",
                "hash": "PtJakartaiDz69SfDDLXJSiuZqTSeSKRDbKVZC8MNzJnvRjvnGw",
                "height": 2286604,
                "op_hash": "ooNVwjdBEuFEcCr6Qjvj4ZmsaboAqxQxEc1JYvsXPQy63of9Z2z",
                "source": "tz1S5WxdZR5f9NzsPXhr7L9L1vrEb5spZFur",
                "stake": 0,
                "time": "2022-04-16T18:46:59Z",
                "voters": 47
            },
            {
                "block_hash": "BLXGQGX1suCSsSF7Kx8ch2idKGSyJ5vJztA214TmgrMJ97VMiGN",
                "hash": "PtJakart2xVj7pYXJBXrqHgd82rdkLey5ZeeGwDgPp9rhQUbSqY",
                "height": 2313783,
                "op_hash": "ongHcJPpjJmnReoNwxQQqiuZKr9ZxvSGFRfq1ZiJcvWYAN6bp3F",
                "source": "tz1S5WxdZR5f9NzsPXhr7L9L1vrEb5spZFur",
                "stake": 0,
                "time": "2022-04-26T12:34:44Z",
                "voters": 85
            },
            {
                "block_hash": "BKrxpNphA3mJRBJtwc41SBVR29rHd1j8KsorzEbygcRi89QkyLR",
                "hash": "PtSEBSEBSEBSEBSEBSEBSEBSEBSEBSEBSEBSEBSEBSEBS5VTrmo",
                "height": 2323914,
                "op_hash": "oojxUhKQrEp3kHqpjt3J2MSyvLu7KGieU1xQgangsPZfWNyMfSj",
                "source": "tz1R664EP6wjcM1RSUVJ7nrJisTpBW9QyJzP",
                "stake": 0,
                "time": "2022-04-30T03:53:29Z",
                "voters": 1
            },
            {
                "block_hash": "BKrxpNphA3mJRBJtwc41SBVR29rHd1j8KsorzEbygcRi89QkyLR",
                "hash": "PtGXSEBUHXFARMxDEXxNFTxRPCxSEBxSEBxSEBxSEBxSE3GRJJC",
                "height": 2323914,
                "op_hash": "oojxUhKQrEp3kHqpjt3J2MSyvLu7KGieU1xQgangsPZfWNyMfSj",
                "source": "tz1R664EP6wjcM1RSUVJ7nrJisTpBW9QyJzP",
                "stake": 0,
                "time": "2022-04-30T03:53:29Z",
                "voters": 1
            }
        ],
        "quorum_pct": 500,
        "quorum_stake": 34270917.128411,
        "turnout_ema": 0,
        "turnout_pct": 2668,
        "turnout_stake": 182912224.998332,
        "turnout_voters": 96,
        "voting_period": 70,
        "voting_period_kind": "proposal",
        "yay_stake": 0,
        "yay_voters": 0
    },
    "exploration": {
        "eligible_stake": 687620221.226926,
        "eligible_voters": 380,
        "is_draw": false,
        "is_failed": false,
        "is_open": false,
        "nay_stake": 0,
        "nay_voters": 0,
        "no_majority": false,
        "no_proposal": false,
        "no_quorum": false,
        "pass_stake": 165617666.478757,
        "pass_voters": 20,
        "period_end_block": 2367488,
        "period_end_time": "2022-05-15T16:51:14Z",
        "period_start_block": 2326529,
        "period_start_time": "2022-05-01T02:05:59Z",
        "proposals": [
            {
                "block_hash": "BLXGQGX1suCSsSF7Kx8ch2idKGSyJ5vJztA214TmgrMJ97VMiGN",
                "hash": "PtJakart2xVj7pYXJBXrqHgd82rdkLey5ZeeGwDgPp9rhQUbSqY",
                "height": 2313783,
                "op_hash": "ongHcJPpjJmnReoNwxQQqiuZKr9ZxvSGFRfq1ZiJcvWYAN6bp3F",
                "source": "tz1S5WxdZR5f9NzsPXhr7L9L1vrEb5spZFur",
                "stake": 0,
                "time": "2022-04-26T12:34:44Z",
                "voters": 0
            }
        ],
        "quorum_pct": 5224,
        "quorum_stake": 359212803.568946,
        "turnout_ema": 6448,
        "turnout_pct": 5854,
        "turnout_stake": 402585743.698669,
        "turnout_voters": 141,
        "voting_period": 71,
        "voting_period_kind": "exploration",
        "yay_stake": 236968077.219912,
        "yay_voters": 121
    },
    "cooldown": {
        "eligible_stake": 679602809.899885,
        "eligible_voters": 383,
        "is_draw": false,
        "is_failed": false,
        "is_open": false,
        "nay_stake": 0,
        "nay_voters": 0,
        "no_majority": false,
        "no_proposal": false,
        "no_quorum": false,
        "pass_stake": 0,
        "pass_voters": 0,
        "period_end_block": 2408448,
        "period_end_time": "2022-05-30T04:12:14Z",
        "period_start_block": 2367489,
        "period_start_time": "2022-05-15T16:51:44Z",
        "proposals": [
            {
                "block_hash": "BLXGQGX1suCSsSF7Kx8ch2idKGSyJ5vJztA214TmgrMJ97VMiGN",
                "hash": "PtJakart2xVj7pYXJBXrqHgd82rdkLey5ZeeGwDgPp9rhQUbSqY",
                "height": 2313783,
                "op_hash": "ongHcJPpjJmnReoNwxQQqiuZKr9ZxvSGFRfq1ZiJcvWYAN6bp3F",
                "source": "tz1S5WxdZR5f9NzsPXhr7L9L1vrEb5spZFur",
                "stake": 0,
                "time": "2022-04-26T12:34:44Z",
                "voters": 0
            }
        ],
        "quorum_pct": 0,
        "quorum_stake": 0,
        "turnout_ema": 0,
        "turnout_pct": 0,
        "turnout_stake": 0,
        "turnout_voters": 0,
        "voting_period": 72,
        "voting_period_kind": "cooldown",
        "yay_stake": 0,
        "yay_voters": 0
    },
    "promotion": {
        "eligible_stake": 690148163.099879,
        "eligible_voters": 386,
        "is_draw": false,
        "is_failed": false,
        "is_open": false,
        "nay_stake": 0,
        "nay_voters": 0,
        "no_majority": false,
        "no_proposal": false,
        "no_quorum": false,
        "pass_stake": 212384627.309411,
        "pass_voters": 20,
        "period_end_block": 2449408,
        "period_end_time": "2022-06-14T04:26:29Z",
        "period_start_block": 2408449,
        "period_start_time": "2022-05-30T04:13:14Z",
        "proposals": [
            {
                "block_hash": "BLXGQGX1suCSsSF7Kx8ch2idKGSyJ5vJztA214TmgrMJ97VMiGN",
                "hash": "PtJakart2xVj7pYXJBXrqHgd82rdkLey5ZeeGwDgPp9rhQUbSqY",
                "height": 2313783,
                "op_hash": "ongHcJPpjJmnReoNwxQQqiuZKr9ZxvSGFRfq1ZiJcvWYAN6bp3F",
                "source": "tz1S5WxdZR5f9NzsPXhr7L9L1vrEb5spZFur",
                "stake": 0,
                "time": "2022-04-26T12:34:44Z",
                "voters": 0
            }
        ],
        "quorum_pct": 5164,
        "quorum_stake": 356392511.424777,
        "turnout_ema": 6329,
        "turnout_pct": 6251,
        "turnout_stake": 431431747.515176,
        "turnout_voters": 134,
        "voting_period": 73,
        "voting_period_kind": "promotion",
        "yay_stake": 219047120.205765,
        "yay_voters": 114
    },
    "adoption": {
        "eligible_stake": 693473356.445228,
        "eligible_voters": 387,
        "is_draw": false,
        "is_failed": false,
        "is_open": true,
        "nay_stake": 0,
        "nay_voters": 0,
        "no_majority": false,
        "no_proposal": false,
        "no_quorum": false,
        "pass_stake": 0,
        "pass_voters": 0,
        "period_end_block": 2490368,
        "period_end_time": "2022-06-28T14:47:44Z",
        "period_start_block": 2449409,
        "period_start_time": "2022-06-14T04:26:59Z",
        "proposals": [
            {
                "block_hash": "BLXGQGX1suCSsSF7Kx8ch2idKGSyJ5vJztA214TmgrMJ97VMiGN",
                "hash": "PtJakart2xVj7pYXJBXrqHgd82rdkLey5ZeeGwDgPp9rhQUbSqY",
                "height": 2313783,
                "op_hash": "ongHcJPpjJmnReoNwxQQqiuZKr9ZxvSGFRfq1ZiJcvWYAN6bp3F",
                "source": "tz1S5WxdZR5f9NzsPXhr7L9L1vrEb5spZFur",
                "stake": 0,
                "time": "2022-04-26T12:34:44Z",
                "voters": 0
            }
        ],
        "quorum_pct": 0,
        "quorum_stake": 0,
        "turnout_ema": 0,
        "turnout_pct": 0,
        "turnout_stake": 0,
        "turnout_voters": 0,
        "voting_period": 74,
        "voting_period_kind": "adoption",
        "yay_stake": 0,
        "yay_voters": 0
    }
}
curl https://api.tzpro.io/explorer/election/head
List Voters​
GET /explorer/election/{hash,number,head}/{stage}/voters
Lists all eligible voters for the current voting period where stage is the sequence number of the voting period [1..4]. The voter list supports pagination with limit, offset and cursor. To change the order of returned calls use the optional order (asc|desc) parameter.
Voter Schema​
| Field | Description | 
|---|---|
| row_idint64 | Internal account id for use with cursor. | 
| addresshash | Voter address. | 
| stakemoney | Staking balance the voter had at the beginning of this voting period. | 
| has_votedbool | Flag indicating if the account has already voted. | 
| ballotenum | Ballot cast by the voter, either yay,nayorpass. | 
| proposalsarray | List of proposals (as hashes) the voter voted for. | 
List Ballots​
GET /explorer/election/{hash,number,head}/{stage}/ballots
Lists all ballots cast during the current voting period where stage is the sequence number of the voting period [1..4]. The voter list supports pagination with limit, offset and cursor. To change the order of returned calls use the optional order (asc|desc) parameter.
Ballot Schema​
| Field | Description | 
|---|---|
| row_idint64 | Internal account id for use with cursor. | 
| senderhash | Voter address. | 
| heightint64 | Operation submission height. | 
| timedatetime | Operation submission time. | 
| election_idint64 | Sequence number of the election. | 
| voting_periodint64 | Protocol-level voting period counter. | 
| voting_period_kindenum | Period kind proposal,exploration,cooldown,promotion,adoption. | 
| proposalhash | Hash of the proposal the voter voted for. If the vote happened during the proposal period and the voter used to vote for multiple proposals either in a single proposalsoperation or with multipleproposalsoperations, multiple ballots exist. | 
| ophash | Operation hash. | 
| ballotenum | Ballot cast by the voter, either yay,nayorpass. During proposal period the ballot is alwaysyayto describe the only choice. | 
| stakemoney | Amount of stake the voter had during this voting period. |