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

Merges the config keys you send into the hopper config, validates the result and saves it. Returns the full saved config.

OAuth scope: read manage About scopes

Keys you sent that are unknown or fail validation are dropped and listed in ignored_settings; the field is left out when nothing was dropped. For trading bots the number of allowed_coins is limited by the subscription (15, 50 or 75). Set config.load_api_from to the ID of another of your hoppers on the same exchange to copy its API keys. Not available for AI Bots.

Example request

curl -X PATCH "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/config" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"config":{"allowed_coins":["BTC","ETH","SOL"],"max_open_positions":10,"stop_loss":1,"stop_loss_percentage":5}}'

Parameters

Headers

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

Path parameters

NameTypeRequiredDescription
id string Required Hopper ID.

Request body

JSON, model HopperConfigPATCH

FieldTypeRequiredDescription
configobjectOptional
exchangestringOptional
base_currencystringOptional
allowed_coinsarray of stringOptional
strategystringOptional
num_targets_per_buystringOptional
advanced_settingsobjectOptional
candle_sizestringOptionalOne of: 5_min, 15_min, 30_min, 1_hour, 2_hours, 4_hours, 1_day.
stochasticintegerOptional
stochastic_RSIintegerOptional
RSIintegerOptional
MACDintegerOptional
EMAintegerOptional
KAMAintegerOptional
SMAintegerOptional
bollinger_bandsintegerOptional
stoch_fast_K periodintegerOptional
stoch_slow_K_periodintegerOptional
stoch_slow_KMA_typestringOptionalOne of: sma, ema, wma, dema, tema, trima, kama, mama, t3.
stoch_slow_D_periodintegerOptional
stoch_slow_DMA_typestringOptionalOne of: sma, ema, wma, dema, tema, trima, kama, mama, t3.
stoch_oversold_thresholdintegerOptional
stoch_overbought_thresholdintegerOptional
stoch_req_for_buy_signalintegerOptional
stoch_RSI_periodintegerOptional
stoch_RSI_fast_K_periodintegerOptional
stoch_RSI_fast_D_periodintegerOptional
stoch_RSI_fast_DMA_typestringOptionalOne of: sma, ema, wma, dema, tema, trima, kama, mama, t3.
stoch_RSI_oversold_thresholdintegerOptional
stoch_RSI_overbought_thresholdintegerOptional
stoch_RSI_req_for_buy_signalintegerOptional
RSI_periodintegerOptional
RSI_oversold_thresholdintegerOptional
RSI_overbought_thresholdintegerOptional
RSI_needed_for_buy_signalintegerOptional
MACD_fast_periodintegerOptional
MACD_slow_periodintegerOptional
MACD_signal_periodintegerOptional
MACD_req_for_buy_signalintegerOptional
EMA_short_periodintegerOptional
EMA_long_periodintegerOptional
EMA_req_for_buy_signalintegerOptional
SMA_short_periodintegerOptional
SMA_long_periodintegerOptional
SMA_req_for_buy_signalintegerOptional
KAMA_short_periodintegerOptional
KAMA_long_periodintegerOptional
KAMA_req_for_buy_signalintegerOptional
bollinger_bands_periodnumberOptional
bollinger_bands_deviation_upper_bandnumberOptional
bollinger_bands_deviation_lower_bandnumberOptional
bollinger_bands_MA_typestringOptionalOne of: sma, ema, wma, dema, tema, trima, kama, mama, t3.
bollinger_bands_req_for_buy_signalintegerOptional
targets_to_buyintegerOptional
sell_with_strategyintegerOptional
pct_profitintegerOptional
ticker_ratestringOptionalOne of: highest_bid_lowest_ask, last_tick_if_higher_lower, always_last_tick.
cool_downintegerOptional
one_open_order_coinintegerOptional
pct_lower_bidnumberOptional
pct_higher_asknumberOptional
stop_loss_pctnumberOptional
trailing_stop_lossintegerOptional
trailing_stop_loss_pctnumberOptional
trailing_stop_arm_pctnumberOptional
trailing_stop_buy_pctnumberOptional
hold_target_is_sameintegerOptional
only_buy_positive_pairsintegerOptional
autoclose_positionintegerOptional
DCAintegerOptional
DCA_after_timeintegerOptional
DCA_max_retriesintegerOptional
DCA_pct_triggerintegerOptional
DCA_buy_immediatelyintegerOptional
DCA_order_sizestringOptionalOne of: double_down, triple_down.
sell_order_max_open_timeintegerOptional
buy_order_max_open_timeintegerOptional
max_open_positionsintegerOptional
coin_max_open_posintegerOptional
coin_max_open_pos_pctnumberOptional
buy_order_amount_pctnumberOptional
buy_order_min_amountnumberOptional
max_amount_allocatedstringOptional
min_buy_amountstringOptional
perc_buy_amountstringOptional
min_buy_amount_forcestringOptional
min_buy_scorestringOptional
min_sell_scorestringOptional
sell_score_correctedstringOptional
buy_score_correctedstringOptional

Response

Example response (illustrative values)

{
    "data": {
        "config": {
            "name": "My BTC bot",
            "exchange": "binance",
            "collect_currency": "usdt",
            "api_key": "***",
            "api_secret": "***",
            "allowed_coins": [
                "BTC",
                "ETH",
                "SOL"
            ],
            "max_open_positions": "10",
            "stop_loss": "1",
            "stop_loss_percentage": "5"
        },
        "message": "Config saved.",
        "ignored_settings": [
            "unknown_setting"
        ]
    }
}

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