POST
https://api.cryptohopper.com/v1/hopper/{id}/marketmaker/trend
Sets a manual market trend on a market maker bot for a limited time. When the trend changes and the bot is configured to cancel orders on a trend change, its open market maker orders are cancelled accordingly.
OAuth scope:
read manage About scopes
trend is uptrend, downtrend or neutral. time_val is seconds, minutes or hours; time_count is capped at 999 (99 for hours) and at least 30 for seconds. Without time_count and time_val the trend is set for 15 minutes.
Example request
curl -X POST "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/marketmaker/trend" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"trend":"uptrend","time_count":30,"time_val":"minutes"}'
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/marketmaker/trend', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"trend": "uptrend",
"time_count": 30,
"time_val": "minutes"
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/marketmaker/trend",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"trend": "uptrend",
"time_count": 30,
"time_val": "minutes"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/marketmaker/trend');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'trend' => 'uptrend',
'time_count' => 30,
'time_val' => 'minutes',
]),
]);
$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 of a market maker bot. |
Response
{
"data": "Manual trend: uptrend has been set for the next 30 minutes."
}