GET
https://api.cryptohopper.com/v1/hopper/{id}/position/hold
Returns the open positions of the hopper, in the same format as Get positions. The hold filter is not applied, so positions that are not on hold are included as well: filter on hold = "1" yourself.
OAuth scope:
read About scopes
Not available for exchange arbitrage, market maker and grid bots.
Example request
curl "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/hold" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/hold', {
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/position/hold",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/hold');
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 |
|---|---|---|---|
id |
string | Required | Hopper ID. |
Response
{
"data": [
{
"id": "123456",
"pair": "BTCUSDT",
"currency": "BTC",
"amount": "0.0015000000000000",
"rate": "64250.1200000000000000",
"buy_id": "987654321",
"order_id": null,
"sell_id": null,
"buy_trigger": "strategy",
"sell_trigger": null,
"config": null,
"percentage_profit": "3",
"stop_loss": "0",
"sell_rate": null,
"trailing_percentage": "0.0000000000000000",
"buy_time": "1758790000",
"sell_time": null,
"auto_close_time": "0",
"hold": "1",
"sold": "0",
"take_profit_levels": null,
"take_profit_levels_done": [],
"tsl_enabled": "0",
"dca_enabled": "0",
"dca_latest_average": "0",
"dca_count": "0",
"auto_dca_time": "-1 hours",
"auto_dca_max": "3",
"auto_dca_percentage": "5",
"dca_order_type": "limit",
"auto_dca_strategy": "0",
"cost": "96.37518",
"trailing_stop_loss_enabled": "0",
"trailing_stop_loss_only": "0",
"stop_loss_enabled": "0",
"auto_close_enabled": "0"
}
]
}