PATCH https://api.cryptohopper.com/v1/hopper/{id}/trigger/{trigger_id}

Updates a trigger of the hopper. All trigger fields are overwritten, so send the complete trigger, as for Create a trigger.

The handler checks no OAuth scope: any valid access token can call it. Not available for AI bots.

Example request

curl -X PATCH "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/trigger/TRIGGER_ID" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Stop buying above 72k","exchange":"binance","market":"BTCUSDT","candle_size":1800,"indicators":["price"],"indicator_configs":{"price":{"trig_when":">","trig_when_value":72000}},"actions":["setbuyingstatus"],"action_configs":{"setbuyingstatus":{"config":0}},"status":1,"cooldown_count":1,"cooldown_val":"hours"}'

Parameters

Headers

NameTypeRequiredDescription
access-token string Required The OAuth access token of the user.

Path parameters

NameTypeRequiredDescription
trigger_id string Required Trigger ID.
id string Required Hopper ID.

Request body

JSON, model TriggerPATCH

FieldTypeRequiredDescription
trigger_idintegerRequired
namestringOptional
enabledintegerOptional
exchangeintegerOptional
trading_pairarray of integerOptional
candle_sizeintegerOptional
indicatorsarray of objectOptional
typestringOptional
itemsintegerOptional
actionsarray of objectOptional
typestringOptional
itemsintegerOptional
cooldown_untilintegerOptional
cooldown_time_unitintegerOptional

Response

Example response (illustrative values)

{
    "data": {
        "trigger_id": 12845001,
        "status": 1,
        "triggers_left": 4,
        "triggers_total": 1,
        "message": "Trigger saved."
    }
}

Status codes: 200. Errors return JSON with status, error and message. See How the API works for response codes and rate limits.