Protokol
  • Introduction To Digital Assets
  • Tutorials
    • How To Create Digital Assets
    • How To Trade Digital Assets
  • ARK CORE MODULES
    • NFT
      • Development
      • Complementary Examples
        • Base
        • Exchange
      • API Endpoints
        • Assets
        • Burns
        • Collections
        • Transfers
        • Base Configurations
        • Auctions
        • Bids
        • Trades
        • Exchange Configurations
    • Guardian
      • Development
      • Complementary Examples
      • API Endpoints
        • Configurations
        • Groups
        • Users
    • Nameservice
      • Development
      • Complementary Examples
      • API Endpoints
        • Configurations
        • Nameservice
    • Voting
      • Development
      • Complementary Examples
      • API Endpoints
        • Configurations
        • Create Proposal
        • Cast Vote
        • Statistics
  • Protokol Templates
    • Core Starter Kit
    • Solidity Typescript Hardhat
    • Nestjs
Powered by GitBook
On this page

Was this helpful?

  1. ARK CORE MODULES
  2. Voting
  3. API Endpoints

Statistics

Voting Statistics API Endpoints.

/statistics/:id

GET http://localhost:4003/api/statistics/:id

Returns statistical information of selected proposal.

Path Parameters

Name
Type
Description

id

string

Create Proposal Id

{
  "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 Example

curl http://localhost:4003/api/statistics/fe8419bda6525ef0074e733dbd3e8b671267c6c8d51b025fd7ae0812947cec30
PreviousCast VoteNextCore Starter Kit

Last updated 3 years ago

Was this helpful?