Skip to main content
Version: 2.0

Get Era Election Status

Returns the status of the era election. While an election is open, all staking activities are suspended.

await API.query.getEraElectionStatus()

You can get the AVN_GATEWAY_URL here.

const AVN_API = require("avn-api");
const AVN_GATEWAY_URL = "<node_url>";
const options = {
suri: "<account_suri>",
const API = new AVN_API(AVN_GATEWAY_URL, options);

async function main() {
await API.init();

let result = await API.query.getEraElectionStatus();

(async () => {
await main();