# Create a config pool

`POST https://api.cryptohopper.com/v1/hopper/{id}/config/pool`

Part of [Bot config](https://www.cryptohopper.com/api-documentation/api-reference/bot-config.md) in the Cryptohopper API reference.

Creates a config pool for the hopper: a set of coins with its own config settings.

OAuth scope: `read`, `manage`

selected_coins must be an array; any other value creates the pool without coins. Not available for AI Bots.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Hopper ID. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `pool_name` | string | yes |  |
| `enabled` | integer | no |  |
| `exchange` | string | no | One of: poloniex, kraken, bittrex, gdax, binance, cryptopia, bitfinex, kucoin, cexio, hitbtc. |
| `base_currency` | string | no |  |
| `selected_coins` | array of string | no |  |
| `config` | object | no |  |
| &nbsp;&nbsp;`strategy` | string | no | One of: none, multiple_ta, bbands_easy, bbands_advanced, rsi, fixed_rates. |
| &nbsp;&nbsp;`advanced_settings` | object | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`candle_size` | string | no | One of: 5_min, 15_min, 30_min, 1_hour, 2_hours, 4_hours, 1_day. |
| &nbsp;&nbsp;&nbsp;&nbsp;`stochastic` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stochastic_RSI` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`RSI` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`MACD` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`EMA` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`KAMA` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`SMA` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`bollinger_bands` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_fast_K period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_slow_K_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_slow_KMA_type` | string | no | One of: sma, ema, wma, dema, tema, trima, kama, mama, t3. |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_slow_D_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_slow_DMA_type` | string | no | One of: sma, ema, wma, dema, tema, trima, kama, mama, t3. |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_oversold_threshold` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_overbought_threshold` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_req_for_buy_signal` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_RSI_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_RSI_fast_K_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_RSI_fast_D_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_RSI_fast_DMA_type` | string | no | One of: sma, ema, wma, dema, tema, trima, kama, mama, t3. |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_RSI_oversold_threshold` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_RSI_overbought_threshold` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`stoch_RSI_req_for_buy_signal` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`RSI_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`RSI_oversold_threshold` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`RSI_overbought_threshold` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`RSI_needed_for_buy_signal` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`MACD_fast_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`MACD_slow_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`MACD_signal_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`MACD_req_for_buy_signal` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`EMA_short_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`EMA_long_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`EMA_req_for_buy_signal` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`SMA_short_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`SMA_long_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`SMA_req_for_buy_signal` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`KAMA_short_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`KAMA_long_period` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`KAMA_req_for_buy_signal` | integer | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`bollinger_bands_period` | number | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`bollinger_bands_deviation_upper_band` | number | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`bollinger_bands_deviation_lower_band` | number | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`bollinger_bands_MA_type` | string | no | One of: sma, ema, wma, dema, tema, trima, kama, mama, t3. |
| &nbsp;&nbsp;&nbsp;&nbsp;`bollinger_bands_req_for_buy_signal` | integer | no |  |
| &nbsp;&nbsp;`targets_to_buy` | integer | no |  |
| &nbsp;&nbsp;`sell_with_strategy` | integer | no |  |
| &nbsp;&nbsp;`pct_profit` | integer | no |  |
| &nbsp;&nbsp;`ticker_rate` | string | no | One of: highest_bid_lowest_ask, last_tick_if_higher_lower, always_last_tick. |
| &nbsp;&nbsp;`cool_down` | integer | no |  |
| &nbsp;&nbsp;`one_open_order_coin` | integer | no |  |
| &nbsp;&nbsp;`pct_lower_bid` | number | no |  |
| &nbsp;&nbsp;`pct_higher_ask` | number | no |  |
| &nbsp;&nbsp;`stop_loss_pct` | number | no |  |
| &nbsp;&nbsp;`trailing_stop_loss` | integer | no |  |
| &nbsp;&nbsp;`trailing_stop_loss_pct` | number | no |  |
| &nbsp;&nbsp;`trailing_stop_arm_pct` | number | no |  |
| &nbsp;&nbsp;`trailing_stop_buy_pct` | number | no |  |
| &nbsp;&nbsp;`hold_target_is_same` | integer | no |  |
| &nbsp;&nbsp;`only_buy_positive_pairs` | integer | no |  |
| &nbsp;&nbsp;`autoclose_position` | integer | no |  |
| &nbsp;&nbsp;`DCA` | integer | no |  |
| &nbsp;&nbsp;`DCA_after_time` | integer | no |  |
| &nbsp;&nbsp;`DCA_max_retries` | integer | no |  |
| &nbsp;&nbsp;`DCA_pct_trigger` | integer | no |  |
| &nbsp;&nbsp;`DCA_buy_immediately` | integer | no |  |
| &nbsp;&nbsp;`DCA_order_size` | string | no | One of: double_down, triple_down. |
| &nbsp;&nbsp;`sell_order_max_open_time` | integer | no |  |
| &nbsp;&nbsp;`buy_order_max_open_time` | integer | no |  |
| &nbsp;&nbsp;`max_open_positions` | integer | no |  |
| &nbsp;&nbsp;`coin_max_open_pos` | integer | no |  |
| &nbsp;&nbsp;`coin_max_open_pos_pct` | number | no |  |
| &nbsp;&nbsp;`buy_order_amount_pct` | number | no |  |
| &nbsp;&nbsp;`buy_order_min_amount` | number | no |  |
| &nbsp;&nbsp;`max_amount_allocated` | number | no |  |

## Example request

```bash
curl -X POST "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/config/pool" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"pool_name":"Altcoins","selected_coins":["ETH","SOL"],"config":{"max_open_positions":5,"stop_loss":1,"stop_loss_percentage":4},"enabled":1}'
```

## Response

Example response (illustrative values):

```json
{
    "data": {
        "id": 2346
    }
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
