> For the complete documentation index, see [llms.txt](https://docs.vibetrading.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vibetrading.dev/library/configuration.md).

# Configuration

## LLM API Keys

Strategy generation and backtest analysis require an LLM. Set at least **one** of the following:

| Variable            | Provider              |
| ------------------- | --------------------- |
| OPENAI\_API\_KEY    | OpenAI (GPT-4o, etc.) |
| ANTHROPIC\_API\_KEY | Anthropic (Claude)    |
| GEMINI\_API\_KEY    | Google (Gemini)       |
| DEEPSEEK\_API\_KEY  | DeepSeek              |
| XAI\_API\_KEY       | xAI (Grok)            |

Any OpenAI-compatible endpoint is supported via [litellm](https://github.com/BerriAI/litellm).

## Network Proxy

If your network requires a proxy to reach LLM APIs:

| Variable     | Description     | Example                 |
| ------------ | --------------- | ----------------------- |
| HTTPS\_PROXY | HTTPS proxy URL | `http://127.0.0.1:7890` |

## Data & Exchange

| Variable                       | Description                         | Default   |
| ------------------------------ | ----------------------------------- | --------- |
| VIBETRADING\_DEFAULT\_EXCHANGE | Default exchange for data downloads | `binance` |

## Using a `.env` File

Create a `.env` file in your project root. The package loads it automatically at import time:

```bash
# .env
OPENAI_API_KEY=sk-...
HTTPS_PROXY=http://127.0.0.1:7890
```

See [`.env.dev_example`](https://github.com/VibeTradingLabs/vibetrading/blob/main/.env.dev_example) for a full template.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vibetrading.dev/library/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
