POST
https://api.cryptohopper.com/v1/hopper
Creates a new hopper with the given name, config and API keys, optionally from a template. When enabled is 1 the new hopper starts right away.
OAuth scope:
manage About scopes
bot_type accepts 0 (trading bot), 1 (exchange arbitrage), 2 (market maker), 4 (signal bot, only when enabled for the account), 6 (portfolio bot) and 8 (grid bot, test accounts only); 11 (AI Bot) is refused and any other value creates a trading bot. template_id is a template ID, optionally prefixed with user_, market_ or basic_. Set config.load_api_from to the ID of another of your hoppers on the same exchange to copy its API keys. api_config must be a JSON object.
Example request
curl -X POST "https://api.cryptohopper.com/v1/hopper" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"My BTC bot","enabled":0,"bot_type":0,"template_id":"market_12345","config":{"exchange":"binance","base_currency":"usdt","paper_trading":0},"api_config":{"api_key":"your-exchange-api-key","api_secret":"your-exchange-api-secret"}}'
const response = await fetch('https://api.cryptohopper.com/v1/hopper', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "My BTC bot",
"enabled": 0,
"bot_type": 0,
"template_id": "market_12345",
"config": {
"exchange": "binance",
"base_currency": "usdt",
"paper_trading": 0
},
"api_config": {
"api_key": "your-exchange-api-key",
"api_secret": "your-exchange-api-secret"
}
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/hopper",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"name": "My BTC bot",
"enabled": 0,
"bot_type": 0,
"template_id": "market_12345",
"config": {
"exchange": "binance",
"base_currency": "usdt",
"paper_trading": 0
},
"api_config": {
"api_key": "your-exchange-api-key",
"api_secret": "your-exchange-api-secret"
}
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper');
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([
'name' => 'My BTC bot',
'enabled' => 0,
'bot_type' => 0,
'template_id' => 'market_12345',
'config' => [
'exchange' => 'binance',
'base_currency' => 'usdt',
'paper_trading' => 0,
],
'api_config' => [
'api_key' => 'your-exchange-api-key',
'api_secret' => 'your-exchange-api-secret',
],
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | |
enabled | integer | Optional | |
api_config | object | Optional | |
api_key | string | Optional | |
api_secret | string | Optional | |
api_passphrase | string | Optional | |
extra_api_key | string | Optional | |
extra_api_secret | string | Optional | |
kraken_extra_key | string | Optional | |
kraken_private_extra_key | string | Optional | |
gdax_api_passphrase | string | Optional | |
gdax_post_only | string | Optional | |
template_id | string | Optional | |
config | object | Optional | |
exchange | string | Optional | |
base_currency | string | Optional | |
selected_coins | array of string | Optional | |
strategy | string | Optional | One of: none, multiple_ta, bbands_easy, bbands_advanced, rsi, fixed_rates. |
advanced_settings | object | Optional | |
candle_size | string | Optional | One of: 5_min, 15_min, 30_min, 1_hour, 2_hours, 4_hours, 1_day. |
stochastic | integer | Optional | |
stochastic_RSI | integer | Optional | |
RSI | integer | Optional | |
MACD | integer | Optional | |
EMA | integer | Optional | |
KAMA | integer | Optional | |
SMA | integer | Optional | |
bollinger_bands | integer | Optional | |
stoch_fast_K period | integer | Optional | |
stoch_slow_K_period | integer | Optional | |
stoch_slow_KMA_type | string | Optional | One of: sma, ema, wma, dema, tema, trima, kama, mama, t3. |
stoch_slow_D_period | integer | Optional | |
stoch_slow_DMA_type | string | Optional | One of: sma, ema, wma, dema, tema, trima, kama, mama, t3. |
stoch_oversold_threshold | integer | Optional | |
stoch_overbought_threshold | integer | Optional | |
stoch_req_for_buy_signal | integer | Optional | |
stoch_RSI_period | integer | Optional | |
stoch_RSI_fast_K_period | integer | Optional | |
stoch_RSI_fast_D_period | integer | Optional | |
stoch_RSI_fast_DMA_type | string | Optional | One of: sma, ema, wma, dema, tema, trima, kama, mama, t3. |
stoch_RSI_oversold_threshold | integer | Optional | |
stoch_RSI_overbought_threshold | integer | Optional | |
stoch_RSI_req_for_buy_signal | integer | Optional | |
RSI_period | integer | Optional | |
RSI_oversold_threshold | integer | Optional | |
RSI_overbought_threshold | integer | Optional | |
RSI_needed_for_buy_signal | integer | Optional | |
MACD_fast_period | integer | Optional | |
MACD_slow_period | integer | Optional | |
MACD_signal_period | integer | Optional | |
MACD_req_for_buy_signal | integer | Optional | |
EMA_short_period | integer | Optional | |
EMA_long_period | integer | Optional | |
EMA_req_for_buy_signal | integer | Optional | |
SMA_short_period | integer | Optional | |
SMA_long_period | integer | Optional | |
SMA_req_for_buy_signal | integer | Optional | |
KAMA_short_period | integer | Optional | |
KAMA_long_period | integer | Optional | |
KAMA_req_for_buy_signal | integer | Optional | |
bollinger_bands_period | number | Optional | |
bollinger_bands_deviation_upper_band | number | Optional | |
bollinger_bands_deviation_lower_band | number | Optional | |
bollinger_bands_MA_type | string | Optional | One of: sma, ema, wma, dema, tema, trima, kama, mama, t3. |
bollinger_bands_req_for_buy_signal | integer | Optional | |
targets_to_buy | integer | Optional | |
sell_with_strategy | integer | Optional | |
pct_profit | integer | Optional | |
ticker_rate | string | Optional | One of: highest_bid_lowest_ask, last_tick_if_higher_lower, always_last_tick. |
cool_down | integer | Optional | |
one_open_order_coin | integer | Optional | |
pct_lower_bid | number | Optional | |
pct_higher_ask | number | Optional | |
stop_loss_pct | number | Optional | |
trailing_stop_loss | integer | Optional | |
trailing_stop_loss_pct | number | Optional | |
trailing_stop_arm_pct | number | Optional | |
trailing_stop_buy_pct | number | Optional | |
hold_target_is_same | integer | Optional | |
only_buy_positive_pairs | integer | Optional | |
autoclose_position | integer | Optional | |
DCA | integer | Optional | |
DCA_after_time | integer | Optional | |
DCA_max_retries | integer | Optional | |
DCA_pct_trigger | integer | Optional | |
DCA_buy_immediately | integer | Optional | |
DCA_order_size | string | Optional | One of: double_down, triple_down. |
sell_order_max_open_time | integer | Optional | |
buy_order_max_open_time | integer | Optional | |
max_open_positions | integer | Optional | |
coin_max_open_pos | integer | Optional | |
coin_max_open_pos_pct | number | Optional | |
buy_order_amount_pct | number | Optional | |
buy_order_min_amount | number | Optional | |
max_amount_allocated | number | Optional |
Response
{
"data": {
"id": 123457
}
}