GET
https://api.cryptohopper.com/v1/subscription/{subscription_id}/hopper
Returns the ID of the bot a subscription is assigned to. A subscription without a bot returns 404.
OAuth scope:
read About scopes
Example request
curl "https://api.cryptohopper.com/v1/subscription/SUBSCRIPTION_ID/hopper" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/subscription/SUBSCRIPTION_ID/hopper', {
method: 'GET',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api.cryptohopper.com/v1/subscription/SUBSCRIPTION_ID/hopper",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/subscription/SUBSCRIPTION_ID/hopper');
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 |
|---|---|---|---|
subscription_id |
string | Required | ID of the subscription. |
Response
{
"data": {
"subscription_id": "466000",
"hopper_id": "987654"
}
}