# ibahng/finflux architecture

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

- Interactive diagram: https://gitdiagram.com/ibahng/finflux
- Repository: https://github.com/ibahng/finflux

## Overview

FinFlux is a Python API wrapper for financial and market data. A caller configures credentials, then uses the exported equity, bond, indicator, or top-market classes to request data; these modules fetch and format results from external providers. The sampled code shows provider calls and shared configuration, but not every method or provider integration. The archive modules are present in the tree and named in the source index, but are excluded from the packaged distribution. Their relationships are therefore shown only where excerpts support them.

Main entry points: [`finflux/base_var.py`](https://github.com/ibahng/finflux/blob/main/finflux/base_var.py) (API Configuration), [`finflux/__init__.py`](https://github.com/ibahng/finflux/blob/main/finflux/__init__.py) (Package Exports), [`finflux/equity.py`](https://github.com/ibahng/finflux/blob/main/finflux/equity.py) (Equity Data), [`finflux/bond.py`](https://github.com/ibahng/finflux/blob/main/finflux/bond.py) (Bond Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public API"]
  node_exports["Package Exports<br/>[__init__.py]"]
  node_config["API Configuration<br/>[base_var.py]"]
end

subgraph group_market["Market Data"]
  node_equity["Equity Data<br/>[equity.py]"]
  node_bond["Bond Data<br/>[bond.py]"]
  node_top["Market Leaders<br/>[top.py]"]
end

subgraph group_economic["Economic Data"]
  node_indicators["Economic Indicators<br/>[indicator.py]"]
end

subgraph group_archive["Archive Modules"]
  node_arch_bond["Archived Bond Data<br/>[bond_1.py]"]
  node_arch_crypto["Archived Crypto Data<br/>[crypto.py]"]
  node_arch_forex["Archived Forex Data<br/>[forex.py]"]
  node_arch_fund["Archived Fund Data<br/>[fund.py]"]
  node_arch_econ["Archived Economic Data<br/>[econ_indic.py]"]
end

node_caller(("Python Caller"))
node_yahoo["Yahoo Finance"]
node_twelve["Twelve Data"]
node_sec["SEC"]
node_investing["Investing.com"]
node_fred["Federal Reserve FRED"]
node_bea["BEA"]
node_bls["BLS"]

node_caller -->|"imports API"| node_exports
node_caller -->|"sets credentials"| node_config
node_exports -->|"exports"| node_equity
node_exports -->|"exports"| node_bond
node_exports -->|"exports"| node_top
node_exports -->|"exports"| node_indicators
node_equity -->|"reads settings"| node_config
node_bond -->|"reads settings"| node_config
node_top -->|"reads settings"| node_config
node_indicators -->|"reads settings"| node_config
node_equity -->|"fetches data"| node_yahoo
node_equity -->|"fetches data"| node_twelve
node_equity -->|"fetches filings data"| node_sec
node_bond -->|"fetches bond data"| node_investing
node_bond -->|"fetches yields"| node_fred
node_bond -->|"downloads yields"| node_yahoo
node_top -->|"fetches quotes"| node_yahoo
node_indicators -->|"requests series"| node_bls
node_indicators -->|"requests series"| node_bea
node_indicators -->|"requests observations"| node_fred
node_arch_bond -->|"reads settings"| node_config
node_arch_bond -->|"fetches yields"| node_fred
node_arch_bond -->|"downloads yields"| node_yahoo
node_arch_crypto -->|"reads settings"| node_config
node_arch_crypto -->|"fetches prices"| node_twelve
node_arch_crypto -->|"fetches history"| node_yahoo
node_arch_forex -->|"reads settings"| node_config
node_arch_forex -->|"fetches quotes"| node_twelve
node_arch_forex -->|"fetches history"| node_yahoo
node_arch_fund -->|"reads settings"| node_config
node_arch_fund -->|"fetches identifiers"| node_sec
node_arch_fund -->|"fetches fund data"| node_yahoo

click node_exports "https://github.com/ibahng/finflux/blob/main/finflux/__init__.py"
click node_config "https://github.com/ibahng/finflux/blob/main/finflux/base_var.py"
click node_equity "https://github.com/ibahng/finflux/blob/main/finflux/equity.py"
click node_bond "https://github.com/ibahng/finflux/blob/main/finflux/bond.py"
click node_top "https://github.com/ibahng/finflux/blob/main/finflux/top.py"
click node_indicators "https://github.com/ibahng/finflux/blob/main/finflux/indicator.py"
click node_arch_bond "https://github.com/ibahng/finflux/blob/main/finflux_archive/bond_1.py"
click node_arch_crypto "https://github.com/ibahng/finflux/blob/main/finflux_archive/crypto.py"
click node_arch_forex "https://github.com/ibahng/finflux/blob/main/finflux_archive/forex.py"
click node_arch_fund "https://github.com/ibahng/finflux/blob/main/finflux_archive/fund.py"
click node_arch_econ "https://github.com/ibahng/finflux/blob/main/finflux_archive/econ_indic.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_exports,node_config toneBlue
class node_equity,node_bond,node_top toneAmber
class node_indicators toneMint
class node_arch_bond,node_arch_crypto,node_arch_forex,node_arch_fund,node_arch_econ toneRose
class node_caller,node_yahoo,node_twelve,node_sec,node_investing,node_fred,node_bea,node_bls toneIndigo
```

## Components

### Public API

- [Package Exports](https://github.com/ibahng/finflux/blob/main/finflux/__init__.py): `finflux/__init__.py`
- [API Configuration](https://github.com/ibahng/finflux/blob/main/finflux/base_var.py): `finflux/base_var.py`

### Market Data

- [Equity Data](https://github.com/ibahng/finflux/blob/main/finflux/equity.py): `finflux/equity.py`
- [Bond Data](https://github.com/ibahng/finflux/blob/main/finflux/bond.py): `finflux/bond.py`
- [Market Leaders](https://github.com/ibahng/finflux/blob/main/finflux/top.py): `finflux/top.py`

### Economic Data

- [Economic Indicators](https://github.com/ibahng/finflux/blob/main/finflux/indicator.py): `finflux/indicator.py`

### Archive Modules

- [Archived Bond Data](https://github.com/ibahng/finflux/blob/main/finflux_archive/bond_1.py): `finflux_archive/bond_1.py`
- [Archived Crypto Data](https://github.com/ibahng/finflux/blob/main/finflux_archive/crypto.py): `finflux_archive/crypto.py`
- [Archived Forex Data](https://github.com/ibahng/finflux/blob/main/finflux_archive/forex.py): `finflux_archive/forex.py`
- [Archived Fund Data](https://github.com/ibahng/finflux/blob/main/finflux_archive/fund.py): `finflux_archive/fund.py`
- [Archived Economic Data](https://github.com/ibahng/finflux/blob/main/finflux_archive/econ_indic.py): `finflux_archive/econ_indic.py`

### Other components

- **Python Caller**
- **Yahoo Finance**
- **Twelve Data**
- **SEC**
- **Investing.com**
- **Federal Reserve FRED**
- **BEA**
- **BLS**

## Connections

- Python Caller → Package Exports: imports API (evidence: `finflux/__init__.py`)
- Python Caller → API Configuration: sets credentials (evidence: `finflux/base_var.py`)
- Package Exports → Equity Data: exports (evidence: `finflux/__init__.py`)
- Package Exports → Bond Data: exports (evidence: `finflux/__init__.py`)
- Package Exports → Market Leaders: exports (evidence: `finflux/__init__.py`)
- Package Exports → Economic Indicators: exports (evidence: `finflux/__init__.py`)
- Equity Data → API Configuration: reads settings (evidence: `finflux/equity.py`)
- Bond Data → API Configuration: reads settings (evidence: `finflux/bond.py`)
- Market Leaders → API Configuration: reads settings (evidence: `finflux/top.py`)
- Economic Indicators → API Configuration: reads settings (evidence: `finflux/indicator.py`)
- Equity Data → Yahoo Finance: fetches data (evidence: `finflux/equity.py`)
- Equity Data → Twelve Data: fetches data (evidence: `finflux/equity.py`)
- Equity Data → SEC: fetches filings data (evidence: `finflux/equity.py`)
- Bond Data → Investing.com: fetches bond data (evidence: `finflux/bond.py`)
- Bond Data → Federal Reserve FRED: fetches yields (evidence: `finflux/bond.py`)
- Bond Data → Yahoo Finance: downloads yields (evidence: `finflux/bond.py`)
- Market Leaders → Yahoo Finance: fetches quotes (evidence: `finflux/top.py`)
- Economic Indicators → BLS: requests series (evidence: `finflux/indicator.py`)
- Economic Indicators → BEA: requests series (evidence: `finflux/indicator.py`)
- Economic Indicators → Federal Reserve FRED: requests observations (evidence: `finflux/indicator.py`)
- Archived Bond Data → API Configuration: reads settings (evidence: `finflux_archive/bond_1.py`)
- Archived Bond Data → Federal Reserve FRED: fetches yields (evidence: `finflux_archive/bond_1.py`)
- Archived Bond Data → Yahoo Finance: downloads yields (evidence: `finflux_archive/bond_1.py`)
- Archived Crypto Data → API Configuration: reads settings (evidence: `finflux_archive/crypto.py`)
- Archived Crypto Data → Twelve Data: fetches prices (evidence: `finflux_archive/crypto.py`)
- Archived Crypto Data → Yahoo Finance: fetches history (evidence: `finflux_archive/crypto.py`)
- Archived Forex Data → API Configuration: reads settings (evidence: `finflux_archive/forex.py`)
- Archived Forex Data → Twelve Data: fetches quotes (evidence: `finflux_archive/forex.py`)
- Archived Forex Data → Yahoo Finance: fetches history (evidence: `finflux_archive/forex.py`)
- Archived Fund Data → API Configuration: reads settings (evidence: `finflux_archive/fund.py`)
- Archived Fund Data → SEC: fetches identifiers (evidence: `finflux_archive/fund.py`)
- Archived Fund Data → Yahoo Finance: fetches fund data (evidence: `finflux_archive/fund.py`)
