DELETE
https://api.cryptohopper.com/v1/hopper/{id}/short/remove
Removes the given short positions from the hopper without closing them. No order is placed at the exchange.
OAuth scope:
read manage About scopes
position_ids are short position IDs. With one ID, data is "The selected short position has been removed.". Not available for exchange arbitrage, market maker, copy, grid and AI bots.
Example request
curl -X DELETE "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/short/remove" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"position_ids":[223344,223345]}'
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/short/remove', {
method: 'DELETE',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"position_ids": [
223344,
223345
]
})
});
const data = await response.json();
import requests
response = requests.delete(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/short/remove",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"position_ids": [
223344,
223345
]
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/short/remove');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'position_ids' => [
223344,
223345,
],
]),
]);
$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. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
position_ids | array of integer | Required |
Response
{
"data": "The selected short positions have been removed."
}