Voting

Get voting epochs

Returns a list of voting epochs.

get/v1/voting/epochs

Query parameters

eqstring nullable

Equal filter mode (optional, i.e. param.eq=123 is the same as param=123).
Specify an epoch status to get items where the specified field is equal to the specified value.

Example: ?status=completed.

nestring nullable

Not equal filter mode.
Specify an epoch status to get items where the specified field is not equal to the specified value.

Example: ?status.ne=no_proposals.

instring[] nullable

In list (any of) filter mode.
Specify a comma-separated list of epoch statuses to get items where the specified field is equal to one of the specified values.

Example: ?status.in=completed,failed.

nistring[] nullable

Not in list (none of) filter mode.
Specify a comma-separated list of epoch statuses to get items where the specified field is not equal to all the specified values.

Example: ?status.ni=completed,failed.

Filter by voting epoch status (no_proposals, voting, completed, failed).

ascstring nullable

Ascending sort mode (optional, i.e. sort.asc=id is the same as sort=id).
Specify a field name to sort by.

Example: ?sort=balance.

descstring nullable

Descending sort mode.
Specify a field name to sort by descending.

Example: ?sort.desc=id.

Sorts voting epochs by specified field. Supported fields: index (default).

elinteger nullable

Elements offset mode (optional, i.e. offset.el=123 is the same as offset=123).
Skips specified number of elements.

Example: ?offset=100.

pginteger nullable

Page offset mode.
Skips page * limit elements. This is a classic pagination.

Example: ?offset.pg=1.

crinteger nullable

Cursor offset mode.
Skips all elements with the cursor before (including) the specified value. Cursor is a field used for sorting, e.g. id. Avoid using this offset mode with non-unique or non-sequential cursors such as amount, balance, etc.

Example: ?offset.cr=45837.

Specifies which or how many items should be skipped

limitinteger

Maximum number of items to return

Response

indexinteger

Index of the voting epoch, starting from zero

firstLevelinteger

The height of the block in which the epoch starts

startTimestring date-time

The timestamp of the block in which the epoch starts

lastLevelinteger

The height of the block in which the epoch ends

endTimestring date-time

The timestamp of the block in which the epoch ends

statusstring required

Status of the voting epoch: no_proposals - there were no proposals proposed voting - there was at least one proposal and the voting is in progress completed - voting successfully completed and the proposal was accepted failed - voting was not completed due to either quorum or supermajority was not reached

Changes

No recorded changes to this endpoint across all 1 revision of this API.