PATCH
https://api.cryptohopper.com/v1/hopper/{id}/reserved/{reserved_id}/movetopositions
Moves one reserved position back to the hopper's open positions. A reserved position in the hopper's quote currency is removed instead.
An ID that is not found is skipped without an error. If the hopper is not found or has no config, the call returns data "No config found for hopper." instead of an error. Not available for exchange arbitrage, market maker, copy and grid bots.
Example request
curl -X PATCH "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/reserved/RESERVED_ID/movetopositions" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/reserved/RESERVED_ID/movetopositions', {
method: 'PATCH',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.patch(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/reserved/RESERVED_ID/movetopositions",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/reserved/RESERVED_ID/movetopositions');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
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. |
reserved_id |
string | Required | Reserved position ID. |
Response
{
"data": "Funds moved to open positions."
}