# thesnoweagle/cryptopilot architecture

> Architecture diagram of the GitHub repository thesnoweagle/cryptopilot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thesnoweagle/cryptopilot
- Repository: https://github.com/thesnoweagle/cryptopilot

## Overview

This is a small Python tool for analyzing Bitcoin candles and producing technical-analysis signals. Its main workflow fetches closed Binance candles, calculates trend, Fibonacci levels, and RSI, then displays the analysis; a separate entry point turns that analysis into buy, sell, or wait signals. Historical candle retrieval is also implemented, though no caller is shown. The map reflects the sampled source; it does not assume additional integrations or orchestration.

Main entry points: [`analyse.py`](https://github.com/thesnoweagle/cryptopilot/blob/main/analyse.py) (Technical analysis), [`data.py`](https://github.com/thesnoweagle/cryptopilot/blob/main/data.py) (Candle retrieval), [`signaux.py`](https://github.com/thesnoweagle/cryptopilot/blob/main/signaux.py) (Signal generation), [`config.py`](https://github.com/thesnoweagle/cryptopilot/blob/main/config.py) (Analysis settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_market_data["Market data"]
  node_candles["Candle retrieval<br/>[data.py]"]
end

subgraph group_analysis["Analysis"]
  node_config["Analysis settings<br/>[config.py]"]
  node_analyzer["Technical analysis<br/>[analyse.py]"]
end

subgraph group_signals["Signals and output"]
  node_report["Console report<br/>[analyse.py]"]
  node_signal["Signal generation<br/>[signaux.py]"]
end

node_user(("Script user"))
node_binance{{"Binance API"}}

node_user -->|"runs analysis"| node_analyzer
node_user -->|"requests signals"| node_signal
node_analyzer -->|"fetches candles"| node_candles
node_candles -->|"requests klines"| node_binance
node_candles -->|"reads settings"| node_config
node_analyzer -->|"reads thresholds"| node_config
node_analyzer -->|"prints results"| node_report
node_signal -->|"calls analysis"| node_analyzer
node_signal -->|"reads thresholds"| node_config

click node_config "https://github.com/thesnoweagle/cryptopilot/blob/main/config.py"
click node_candles "https://github.com/thesnoweagle/cryptopilot/blob/main/data.py"
click node_analyzer "https://github.com/thesnoweagle/cryptopilot/blob/main/analyse.py"
click node_report "https://github.com/thesnoweagle/cryptopilot/blob/main/analyse.py"
click node_signal "https://github.com/thesnoweagle/cryptopilot/blob/main/signaux.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_candles,node_user toneBlue
class node_config,node_analyzer toneAmber
class node_report,node_signal,node_binance toneMint
```

## Components

### Market data

- [Candle retrieval](https://github.com/thesnoweagle/cryptopilot/blob/main/data.py): `data.py`

### Analysis

- [Analysis settings](https://github.com/thesnoweagle/cryptopilot/blob/main/config.py): `config.py`
- [Technical analysis](https://github.com/thesnoweagle/cryptopilot/blob/main/analyse.py): `analyse.py`

### Signals and output

- [Console report](https://github.com/thesnoweagle/cryptopilot/blob/main/analyse.py): `analyse.py`
- [Signal generation](https://github.com/thesnoweagle/cryptopilot/blob/main/signaux.py): `signaux.py`

### Other components

- **Script user**
- **Binance API**

## Connections

- Script user → Technical analysis: runs analysis (evidence: `analyse.py`)
- Script user → Signal generation: requests signals (evidence: `signaux.py`)
- Technical analysis → Candle retrieval: fetches candles (evidence: `analyse.py`)
- Candle retrieval → Binance API: requests klines (evidence: `data.py`)
- Candle retrieval → Analysis settings: reads settings (evidence: `data.py`)
- Technical analysis → Analysis settings: reads thresholds (evidence: `analyse.py`)
- Technical analysis → Console report: prints results (evidence: `analyse.py`)
- Signal generation → Technical analysis: calls analysis (evidence: `signaux.py`)
- Signal generation → Analysis settings: reads thresholds (evidence: `signaux.py`)
