GET
https://api.cryptohopper.com/v1/hopper/{id}/short/{short_id}
Returns one open short position with its effective take profit, stop-loss, trailing stop-loss, auto close and auto remove settings.
OAuth scope:
read About scopes
Scalar values are returned as strings. config is the short's own settings as an object, or null; ta_values holds the strategy indicator values of the sell, or null. stop_loss_percentage is left out when stop-loss is off, and trailing_arm_percentage when trailing stop-loss is off. Not available for exchange arbitrage, market maker, copy, grid and AI bots.
Example request
curl "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/short/SHORT_ID" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/short/SHORT_ID', {
method: 'GET',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/short/SHORT_ID",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/short/SHORT_ID');
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 |
|---|---|---|---|
short_id |
string | Required | Short position ID. |
id |
string | Required | Hopper ID. |
Response
{
"data": {
"id": "223344",
"user_id": "100200",
"deleted": "0",
"pair": "ETHUSDT",
"ta_values": null,
"rate": "3120.45",
"config": null,
"sell_time": "1758790000",
"start_profit": "0",
"start_rate": "3080",
"sell_id": "987654322",
"sell_trigger": "My App",
"currency": "ETH",
"order_id": null,
"hold": "0",
"percentage_profit": "2",
"trailing_percentage": "0",
"stop_loss": "0",
"auto_close_time": "0",
"auto_remove_time": "0",
"amount": "0.25",
"btc": "0",
"val": "780.1125",
"cost": "780.1125",
"trailing_stop_loss_enabled": "0",
"trailing_stop_loss_only": "0",
"stop_loss_enabled": "0",
"auto_close_enabled": "0",
"auto_remove_enabled": "0"
}
}