Skip to content
On this page

DAO ​


This function is used to get stakeholders data.

It can be used for showing a list of desired number of stakeholders, where the information about total number of votes a stakeholder raised, how much stakeholder’s vote can weigh, address and number of proposals he voted for ordered by the vote weight.

Request parameters ​

Required body parameters:

NameExample valueComment
limit50Maximum number of stakeholders to be retrieved
offset0Offset
orderingvoteweightascendingValue based on which the retrieved stakeholders data will be ordered (voteweightascending, voteweightdescending…)based on which the retrieved stakeholders data will be ordered (voteweightascending, voteweightdescending…)

Response fields explanation ​

NameExample valueComment
stakeholders-List of stakeholders data determined by the limit body parameter
proposalVotesCount1Amount of proposals stakeholder raised a vote
userAddress0:0c3fbf8b400ce637a49e09e7ae2fc5e92920680b1d10f4cd6956c7aebde93903Address of the stakeholder
voteWeight0Amount per vote
votes0Total amount of votes raised
totalCount208Total number of stakeholders

Example ​

java
app.post('/dao/search/stakeholders', (req, res) => {
    axios({
        method: 'post',
        url: `${apiUrl}/dao/search/stakeholders`,
        data: {
            limit: req.body.limit,
            offset: req.body.offset,
            ordering: req.body.ordering
        }
      })
    .then(function (response) {
        res.send(response.data)
    })
    .catch(function(error){
        console.error(error)
        res.send('Error')
    })
})

This function is used to get stakeholder data.

It can be used to show one’s stakeholder data based on his account address. Information that can be displayed is the amount of votes certain stakeholder raised, his vote weight, address and total number of proposal votes.

Request parameters ​

Required parameters:

NameExample ValueComment
userAddress0:66003d2db4bc1566c3d7d3c118004b1e1d54f1f62c30c6b173845db3aa459f07Address of particular account

Response fields explanation ​

NameExample valueComment
proposalVotesCount1Amount of proposals stakeholder raised a vote
userAddress0:66003d2db4bc1566c3d7d3c118004b1e1d54f1f62c30c6b173845db3aa459f07Address of the user
voteWeight3.400Amount representing the vote weight (per vote)
votes100002.580351726000Total amount of votes raised

Example ​

java
app.get('/dao/user/:user_address', (req, res) => {
    axios({
        method: 'get',
        url: `${apiUrl}/dao/user/${req.params.user_address}`
      })
    .then(function (response) {
        res.send(response.data)
    })
    .catch(function(error){
        console.error(error)
        res.send('Error')
    })
})