Users
Overview
Section titled “Overview”The Users API returns statistics about a user in the Ethos network, including reviews, slashes and vouches.
Endpoints
Section titled “Endpoints”Get User Statistics
Section titled “Get User Statistics”GET /api/v1/users/:userkey/statsDescription: Retrieves comprehensive statistics about a user, including review and vouch information.
Authentication Required: No
Parameters
Section titled “Parameters”Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
userkey |
string | Yes | The userkey for the user. Can be in the format of “profileId:123”, “address:0x1234…”, or “service:x.com:username:username” |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
startDate |
string | No | Filter statistics to data after this date (ISO format) |
endDate |
string | No | Filter statistics to data before this date (ISO format) |
Responses
Section titled “Responses”Success Response
Code: 200 OK
{ "ok": true, "data": { "profileId": 123, "market": null, "reviews": { "received": 10, "positiveReviewPercentage": 90, "positiveReviewCount": 9, "negativeReviewCount": 1, "neutralReviewCount": 0 }, "slashes": { "count": 0, "openSlash": null }, "vouchTotals": [ { "token": { "id": "eth", "address": null, "decimals": 18 }, "count": { "given": 2, "received": 3 }, "balance": { "given": "2000000000000000000n", "received": "5000000000000000000n" } } ], "influenceFactor": 12, "influenceFactorPercentile": 40 }}| Property | Type | Description |
|---|---|---|
ok |
boolean | Success status |
data |
object | User statistics data |
data.profileId |
number | null | Ethos profile ID, or null when the userkey has no profile |
data.market |
object | null | The user’s reputation market, or null when there is none |
data.reviews |
object | Review statistics |
data.reviews.received |
number | Total number of reviews received |
data.reviews.positiveReviewPercentage |
number | Percentage of positive reviews (excluding neutral reviews) |
data.reviews.positiveReviewCount |
number | Number of positive reviews |
data.reviews.negativeReviewCount |
number | Number of negative reviews |
data.reviews.neutralReviewCount |
number | Number of neutral reviews |
data.slashes |
object | Slash statistics |
data.slashes.count |
number | Number of slashes against the user |
data.slashes.openSlash |
object | null | The slash currently open against the user, or null |
data.vouchTotals |
array | Lifetime vouch totals, one entry per token. Empty when a date filter is set |
data.vouchTotals[].token |
object | The vouch token: id (eth or whuf), contract address (null for ETH), decimals |
data.vouchTotals[].count.given |
number | Number of vouches the user has given in this token |
data.vouchTotals[].count.received |
number | Number of vouches the user has received in this token |
data.vouchTotals[].balance.given |
string | Amount the user has vouched, in the token’s smallest unit, as digits followed by n |
data.vouchTotals[].balance.received |
string | Amount vouched for the user, in the same format |
data.influenceFactor |
number | null | The user’s influence factor |
data.influenceFactorPercentile |
number | null | Percentile of the influence factor compared to all users (0-100) |
Example
Section titled “Example”Request
http GET https://api.ethos.network/api/v1/users/profileId:123/statsRequest with Date Filters
http GET https://api.ethos.network/api/v1/users/profileId:123/stats \ startDate=2023-01-01 \ endDate=2023-12-31- If a user has multiple userkeys (e.g., multiple addresses or social accounts), the statistics are aggregated across all of them.
- For reviews, the positive review percentage excludes neutral reviews from the calculation.
vouchTotalscovers the user’s whole history. A request withstartDateorendDatereturns it empty.