Get the logged-in user’s lifetime WHUF earned and burned
using System.Net.Http.Headers;var clientHandler = new HttpClientHandler{ UseCookies = false,};var client = new HttpClient(clientHandler);var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.ethos.network/api/v2/wallets/lifetime-totals"), Headers = { { "cookie", "ethos-access-token=<ethos-access-token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.ethos.network/api/v2/wallets/lifetime-totals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "ethos-access-token=<ethos-access-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.ethos.network/api/v2/wallets/lifetime-totals") .get() .addHeader("cookie", "ethos-access-token=<ethos-access-token>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.ethos.network/api/v2/wallets/lifetime-totals', headers: {cookie: 'ethos-access-token=<ethos-access-token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.ethos.network/api/v2/wallets/lifetime-totals';const options = { method: 'GET', headers: {cookie: 'ethos-access-token=<ethos-access-token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.ethos.network/api/v2/wallets/lifetime-totals";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("cookie", "ethos-access-token=<ethos-access-token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url https://api.ethos.network/api/v2/wallets/lifetime-totals \ --cookie ethos-access-token=<ethos-access-token>wget --quiet \ --method GET \ --header 'cookie: ethos-access-token=<ethos-access-token>' \ --output-document \ - https://api.ethos.network/api/v2/wallets/lifetime-totalsReturns lifetime WHUF totals in wei across every address of the logged-in user’s profile and their embedded wallet. Earned is WHUF from reward payouts, claimed or still claimable; Burned is WHUF destroyed in vouch, review and market fees. Slashes are not counted. > ⚠️ Warning: This is a beta endpoint. It is not guaranteed to be stable and may change or break without notice.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Successful response
object
Example generated
{ "burnedWei": "example", "earnedWei": "example"}Authorization not provided
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": []}Insufficient access
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "FORBIDDEN", "message": "Insufficient access", "issues": []}Internal server error
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": []}