Querying metrics used for staking reward calculations

How can one query metrics used for staking reward calculations? (such as total participating stake?) .
I was pointed to source code of https://github.com/orbs-network/orbs-ethereum-contracts/tree/master/voting/client-web, but I need more concrete ways to query this information. Much appreciated. Thanks.

the election contract is defined in https://github.com/orbs-network/orbs-network-go/tree/master/services/processor/native/repository/_Elections
this shows you the whole election process.

In the export.go file (https://github.com/orbs-network/orbs-network-go/blob/master/services/processor/native/repository/_Elections/exports.go) we define all the public available functions that can be queried (using gamma-cli for example)

getTotalStake is the function to call to get the total number of participation votes in the last election (in election on 7th November its 516,062,037)
you can use functions starting with “get” to query all kinds of data that we expose on the election.
please note some of them do require input (usually address of a participant/guardian/validator)

please let us know if this helps,