Ethos Developers - API Docs
  • API Documentation
    • Introduction
    • API v2
      • Activity
      • Categories
      • Chains
      • Contributions
      • Nfts
      • Projects
      • Project Votes
      • Score
      • System
      • Users
      • Xp
    • API v1 (deprecated)
      • Activities
      • Addresses
      • Attestations
      • Categories
      • Contracts
      • Contributions
      • Curated Lists
      • ENS
      • Events
      • Exchange Rates
      • Fees
      • Invitations
      • Markets
      • Notifications
      • Profiles
      • Replies
      • Reviews
      • Scores
      • Search
      • Signatures
      • Slashes
      • Twitter
      • Users
      • Vouches
      • XP
  • Whitepaper
    • Whitepaper
Powered by GitBook
On this page
  1. API Documentation
  2. API v2

Project Votes

PreviousProjectsNextScore

Get the current user's vote balance, optionally for a specific project

get
Authorizations
Query parameters
projectIdintegerOptional
Responses
200
Successful response
application/json
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
404
Not found
application/json
500
Internal server error
application/json
get
GET /api/v2/projects/votes/balance HTTP/1.1
Host: api.ethos.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "balance": {
    "bullishVotesRemaining": 1,
    "bearishVotesRemaining": 1,
    "bullishVotesSpent": 1,
    "bearishVotesSpent": 1,
    "allocationResetDate": "text"
  },
  "projectHistory": {
    "bullishVotesSpent": 1,
    "bearishVotesSpent": 1
  }
}

Reallocate votes for all users (Admin only)

post
Authorizations
Responses
200
Successful response
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
POST /api/v2/projects/votes/reallocate HTTP/1.1
Host: api.ethos.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "allocationsCreated": 1,
  "totalVotesAllocated": 1,
  "message": "text"
}

Get bulk user project vote totals

get
Query parameters
projectIdintegerRequired
profileIdsinteger[] · min: 1 · max: 100Required
Responses
200
Successful response
application/json
400
Invalid input data
application/json
404
Not found
application/json
500
Internal server error
application/json
get
GET /api/v2/projects/votes/bulk-totals HTTP/1.1
Host: api.ethos.network
Accept: */*
{
  "ANY_ADDITIONAL_PROPERTY": {
    "totalBullishVotes": 1,
    "totalBearishVotes": 1
  }
}
  • GETGet votes for a specific project
  • POSTCast a vote for a project
  • GETGet the current user's vote balance, optionally for a specific project
  • POSTReallocate votes for all users (Admin only)
  • GETGet bulk user project vote totals

Get votes for a specific project

get
Path parameters
projectIdintegerRequired
Responses
200
Successful response
application/json
400
Invalid input data
application/json
404
Not found
application/json
500
Internal server error
application/json
get
GET /api/v2/projects/{projectId}/votes HTTP/1.1
Host: api.ethos.network
Accept: */*
{
  "bullish": {
    "topVoters": [
      {
        "id": 1,
        "profileId": 1,
        "displayName": "text",
        "username": "text",
        "avatarUrl": "https://example.com",
        "description": "text",
        "score": 1,
        "status": "ACTIVE",
        "userkeys": [
          "text"
        ],
        "xpTotal": 1,
        "xpStreakDays": 1,
        "stats": {
          "review": {
            "received": {
              "negative": 1,
              "neutral": 1,
              "positive": 1
            }
          },
          "vouch": {
            "given": {
              "amountWeiTotal": 1,
              "count": 1
            },
            "received": {
              "amountWeiTotal": 1,
              "count": 1
            }
          }
        }
      }
    ],
    "total": 1,
    "uniqueVoters": 1
  },
  "bearish": {
    "topVoters": [
      {
        "id": 1,
        "profileId": 1,
        "displayName": "text",
        "username": "text",
        "avatarUrl": "https://example.com",
        "description": "text",
        "score": 1,
        "status": "ACTIVE",
        "userkeys": [
          "text"
        ],
        "xpTotal": 1,
        "xpStreakDays": 1,
        "stats": {
          "review": {
            "received": {
              "negative": 1,
              "neutral": 1,
              "positive": 1
            }
          },
          "vouch": {
            "given": {
              "amountWeiTotal": 1,
              "count": 1
            },
            "received": {
              "amountWeiTotal": 1,
              "count": 1
            }
          }
        }
      }
    ],
    "total": 1,
    "uniqueVoters": 1
  }
}

Cast a vote for a project

post
Authorizations
Path parameters
projectIdintegerRequired
Body
voteTypestring · enumRequiredPossible values:
amountintegerRequired
Responses
200
Successful response
application/json
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
POST /api/v2/projects/{projectId}/votes HTTP/1.1
Host: api.ethos.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "voteType": "BULLISH",
  "amount": 1
}
{
  "success": true,
  "message": "text",
  "newBalance": {
    "bullishVotesRemaining": 1,
    "bearishVotesRemaining": 1,
    "bullishVotesSpent": 1,
    "bearishVotesSpent": 1,
    "allocationResetDate": "text"
  }
}