GET
https://api.cryptohopper.com/v1/tournaments/{tournament_id}/stats
Returns statistics of a published tournament: traded volume per quote currency, trade totals and the players with the most, first, last and most profitable trade. Each statistic has a readable label.
OAuth scope:
read About scopes
Statistics are cached for about a minute. The player statistics are only present when the tournament has trades.
Example request
curl "https://api.cryptohopper.com/v1/tournaments/TOURNAMENT_ID/stats" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/tournaments/TOURNAMENT_ID/stats', {
method: 'GET',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api.cryptohopper.com/v1/tournaments/TOURNAMENT_ID/stats",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/tournaments/TOURNAMENT_ID/stats');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
],
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
tournament_id |
string | Required | Numeric ID of the tournament. |
Response
{
"data": {
"labels": {
"total_trades": "Total trades in tournament",
"total_sells": "Total sells in tournament",
"total_buys": "Total buys in tournament",
"player_most_trades": "Player with most trades",
"player_first_trade": "Player with the first trade",
"player_last_trade": "Player with the last trade",
"player_highest_trade": "Player with most profitable trade",
"total_USDT": "Total volume in USDT"
},
"stats": {
"total_USDT": "1,254,310.55 USDT",
"total_trades": 1840,
"total_sells": 902,
"total_buys": 938,
"player_most_trades": {
"user_id": "123456",
"stat": "212 trades",
"player_name": "Trader Jane",
"player_logo": "https://cdn.example.com/images/social/uploads/avatar_4567.jpg",
"player_id": "4567"
},
"player_first_trade": {
"user_id": "234567",
"player_name": "Hodl Henk",
"player_logo": "https://cdn.example.com/images/social/uploads/avatar_4567.jpg",
"player_id": "5678"
},
"player_last_trade": {
"user_id": "123456",
"player_name": "Trader Jane",
"player_logo": "https://cdn.example.com/images/social/uploads/avatar_4567.jpg",
"player_id": "4567"
}
}
}
}