> For the complete documentation index, see [llms.txt](https://docs.tokenbot.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tokenbot.com/home/api-docs/rest-api/strategies.md).

# Strategies

Manage trading strategies.

## Endpoints

| Method | Path                         | Description              |
| ------ | ---------------------------- | ------------------------ |
| GET    | `/v1/strategies`             | List strategies          |
| GET    | `/v1/strategies/:id`         | Get strategy             |
| POST   | `/v1/strategies`             | Create strategy          |
| PATCH  | `/v1/strategies/:id`         | Update strategy          |
| DELETE | `/v1/strategies/:id`         | Delete strategy          |
| POST   | `/v1/strategies/:id/copiers` | Link copiers to strategy |

***

### List Strategies

```
GET /v1/strategies
```

```bash
curl https://api.tokenbot.com/v1/strategies \
  -H "X-API-Key: tb_live_your_key"
```

***

### Get Strategy

```
GET /v1/strategies/:id
```

```bash
curl https://api.tokenbot.com/v1/strategies/str_abc123 \
  -H "X-API-Key: tb_live_your_key"
```

***

### Create Strategy

```
POST /v1/strategies
```

**Request Body:**

```json
{
  "exchange_account_id": "exc_abc123",
  "name": "BTC Momentum",
  "description": "Momentum-based BTC/USDT strategy",
  "is_public": false,
  "risk_level": 3,
  "max_drawdown": 10.0,
  "max_allocation": 50.0,
  "trading_pairs": ["BTC/USDT"]
}
```

```bash
curl -X POST https://api.tokenbot.com/v1/strategies \
  -H "X-API-Key: tb_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"exchange_account_id":"exc_abc123","name":"BTC Momentum","risk_level":3}'
```

***

### Update Strategy

```
PATCH /v1/strategies/:id
```

```bash
curl -X PATCH https://api.tokenbot.com/v1/strategies/str_abc123 \
  -H "X-API-Key: tb_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name":"Updated Name","risk_level":2}'
```

***

### Delete Strategy

```
DELETE /v1/strategies/:id
```

```bash
curl -X DELETE https://api.tokenbot.com/v1/strategies/str_abc123 \
  -H "X-API-Key: tb_live_your_key"
```

***

### Link Copiers to Strategy

```
POST /v1/strategies/:id/copiers
```

**Request Body:**

```json
{
  "copier_ids": ["cop_abc123", "cop_def456"]
}
```

```bash
curl -X POST https://api.tokenbot.com/v1/strategies/str_abc123/copiers \
  -H "X-API-Key: tb_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"copier_ids":["cop_abc123"]}'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tokenbot.com/home/api-docs/rest-api/strategies.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
