# joshyattridge/smart-money-concepts architecture

> Architecture diagram of the GitHub repository joshyattridge/smart-money-concepts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/joshyattridge/smart-money-concepts
- Repository: https://github.com/joshyattridge/smart-money-concepts

## Overview

Smart Money Concepts is a Python library that calculates ICT-style market indicators from OHLC(V) DataFrames. Users import the `smc` API and call indicators to receive annotated results; the README documents passing swing-high/low results into structure, order-block, liquidity, and retracement calculations. Indicator implementations and input validation are in `smartmoneyconcepts/smc.py`; unsampled internal details are not inferred.

Main entry points: [`smartmoneyconcepts/smc.py`](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py) (SMC interface), [`smartmoneyconcepts/__init__.py`](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/__init__.py) (Package export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Library API"]
  node_export["Package export<br/>[__init__.py]"]
  node_api_smc["SMC interface<br/>[smc.py]"]
  node_validation["Input validation<br/>[smc.py]"]
end

subgraph group_market["Market Structure"]
  node_fvg["Fair value gaps<br/>[smc.py]"]
  node_swings["Swing highs/lows<br/>[smc.py]"]
  node_bos["BOS / CHoCH<br/>[smc.py]"]
  node_order_blocks["Order blocks<br/>[smc.py]"]
  node_liquidity["Liquidity levels<br/>[smc.py]"]
  node_retracements["Retracements<br/>[smc.py]"]
end

subgraph group_context["Market Context"]
  node_previous_levels["Previous highs/lows<br/>[smc.py]"]
  node_sessions["Trading sessions<br/>[smc.py]"]
end

node_trader(("Data analyst"))

node_trader -->|"imports"| node_export
node_export -->|"exports"| node_api_smc
node_trader -->|"calls with OHLC&#40;V&#41;"| node_api_smc
node_api_smc -->|"validates inputs"| node_validation
node_api_smc -->|"calls"| node_fvg
node_api_smc -->|"calls"| node_swings
node_api_smc -->|"calls"| node_bos
node_api_smc -->|"calls"| node_order_blocks
node_api_smc -->|"calls"| node_liquidity
node_api_smc -->|"calls"| node_retracements
node_api_smc -->|"calls"| node_previous_levels
node_api_smc -->|"calls"| node_sessions
node_swings -->|"supplies swing data"| node_bos
node_swings -->|"supplies swing data"| node_order_blocks
node_swings -->|"supplies swing data"| node_liquidity
node_swings -->|"supplies swing data"| node_retracements

click node_export "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/__init__.py"
click node_api_smc "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py"
click node_validation "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py"
click node_fvg "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py"
click node_swings "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py"
click node_bos "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py"
click node_order_blocks "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py"
click node_liquidity "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py"
click node_retracements "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py"
click node_previous_levels "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py"
click node_sessions "https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.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_export,node_api_smc,node_validation toneBlue
class node_fvg,node_swings,node_bos,node_order_blocks,node_liquidity,node_retracements toneAmber
class node_previous_levels,node_sessions toneMint
class node_trader toneIndigo
```

## Components

### Library API

- [Package export](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/__init__.py): `smartmoneyconcepts/__init__.py`
- [SMC interface](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py): `smartmoneyconcepts/smc.py`
- [Input validation](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py): `smartmoneyconcepts/smc.py`

### Market Structure

- [Fair value gaps](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py): `smartmoneyconcepts/smc.py`
- [Swing highs/lows](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py): `smartmoneyconcepts/smc.py`
- [BOS / CHoCH](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py): `smartmoneyconcepts/smc.py`
- [Order blocks](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py): `smartmoneyconcepts/smc.py`
- [Liquidity levels](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py): `smartmoneyconcepts/smc.py`
- [Retracements](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py): `smartmoneyconcepts/smc.py`

### Market Context

- [Previous highs/lows](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py): `smartmoneyconcepts/smc.py`
- [Trading sessions](https://github.com/joshyattridge/smart-money-concepts/blob/master/smartmoneyconcepts/smc.py): `smartmoneyconcepts/smc.py`

### Other components

- **Data analyst**

## Connections

- Data analyst → Package export: imports
- Package export → SMC interface: exports
- Data analyst → SMC interface: calls with OHLC(V)
- SMC interface → Input validation: validates inputs
- SMC interface → Fair value gaps: calls
- SMC interface → Swing highs/lows: calls
- SMC interface → BOS / CHoCH: calls
- SMC interface → Order blocks: calls
- SMC interface → Liquidity levels: calls
- SMC interface → Retracements: calls
- SMC interface → Previous highs/lows: calls
- SMC interface → Trading sessions: calls
- Swing highs/lows → BOS / CHoCH: supplies swing data
- Swing highs/lows → Order blocks: supplies swing data
- Swing highs/lows → Liquidity levels: supplies swing data
- Swing highs/lows → Retracements: supplies swing data
