POST
https://api.cryptohopper.com/v1/tournaments/{tournament_id}/join
Joins a published tournament with one of your hoppers, or creates a new hopper for it. A new hopper gets the tournament's exchange, quote currency and paper trading setting.
OAuth scope:
manage About scopes
Send no body to create a new hopper. To join with an existing hopper, send hopper_id as a form field (application/x-www-form-urlencoded); a hopper_id in a JSON body is not accepted and returns 400 Cannot join tournament: no hopper selected. An existing hopper must match the tournament's paper trading setting, exchange and quote currency.
Example request
curl -X POST "https://api.cryptohopper.com/v1/tournaments/TOURNAMENT_ID/join" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/tournaments/TOURNAMENT_ID/join', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/tournaments/TOURNAMENT_ID/join",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/tournaments/TOURNAMENT_ID/join');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
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": "Tournament joined and new hopper created. You can now edit your hopper and prepare for the tournament. Good luck!"
}