Voting Statistics API Endpoints.
Last updated 3 years ago
GET http://localhost:4003/api/statistics/:id
GET
http://localhost:4003/api/statistics/:id
Returns statistical information of selected proposal.
{ "data": { "address": "ANBkoGqWeTSiaEVgVzSKZd3jS7UWzv9PSo", "publicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37", "status": "VOTING_IN_PROGRESS", "allVoters": "734909200000000", "agreed": { "amount": "489861200000000", "percentage": 66.656 }, "disagreed": { "amount": "245048000000000", "percentage": 33.343999999999994 } } }
{ "statusCode": 404, "error": "Not Found", "message": "Voting Proposal not found!" }
{ "statusCode": 422, "error": "Unprocessable Entity", "message": "\"id\" length must be 64 characters long" }
curl http://localhost:4003/api/statistics/fe8419bda6525ef0074e733dbd3e8b671267c6c8d51b025fd7ae0812947cec30
id
string
Create Proposal Id