Metadata-Version: 2.4
Name: finda
Version: 2.0.0
Summary: Pro-Grade async financial data engine with Parquet caching and multi-provider support
Home-page: https://github.com/kshlgrg/finda
Author: Kushal Garg
Author-email: your.email@example.com
License: MIT
Project-URL: Homepage, https://github.com/kshlgrg/finda
Project-URL: Repository, https://github.com/kshlgrg/finda
Keywords: finance,trading,data-pipeline,async,forex,crypto,stocks,OHLCV,tick-data
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Framework :: FastAPI
Classifier: Framework :: AsyncIO
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: pandas>=1.5.0
Requires-Dist: numpy>=1.21.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pyarrow>=10.0.0
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.20.0
Requires-Dist: ccxt>=4.0.0
Requires-Dist: dukascopy-python>=0.1.0
Requires-Dist: httpx>=0.24.0
Provides-Extra: alpaca
Requires-Dist: alpaca-py>=0.10.0; extra == "alpaca"
Provides-Extra: all
Requires-Dist: alpaca-py>=0.10.0; extra == "all"
Requires-Dist: aiohttp>=3.8.0; extra == "all"
Dynamic: author-email
Dynamic: home-page
Dynamic: requires-python

# Finda Pro-Grade Data Engine v2.0

**Institutional-grade async financial data pipeline** with Parquet caching, multi-provider fallback, and WebSocket streaming.

## Features

- ⚡ **Async Architecture** - Non-blocking I/O with `asyncio` and `ccxt.async_support`
- 💾 **Parquet Caching** - High-performance local cache with smart data merging
- 🔄 **Smart Fallback** - Auto-switch providers on failure with health tracking
- 📊 **Pydantic Models** - Type-safe Candle, Tick, and MarketMetadata schemas
- 🔌 **WebSocket Streaming** - Real-time tick and candle subscriptions
- 🌍 **Multi-Provider** - Dukascopy (Forex), Binance (Crypto), Alpaca (Stocks)

## Installation

```bash
pip install finda
```

With Alpaca support:
```bash
pip install finda[alpaca]
```

## Quick Start

### Async (Recommended)
```python
import asyncio
from finda import Finda

async def main():
    f = Finda()
    df = await f.get_candles("EUR/USD", "1m", "2024-01-01", "2024-01-02")
    print(df)

asyncio.run(main())
```

### FastAPI Server
```bash
uvicorn main:app --reload
```

Endpoints:
- `GET /ohlcv` - OHLCV candles with caching
- `GET /tick` - Tick-level Bid/Ask data
- `GET /markets` - Provider health & available symbols
- `GET /cache/stats` - Cache hit/miss statistics

### Legacy Sync
```python
from finda import fetch_unified_ohclv
o, h, l, c, v, t = fetch_unified_ohclv("EUR/USD", "1m", "2024-01-01", "2024-01-02")
```

## Configuration

Create `.env` file:
```env
ALPACA_API_KEY=your_key
ALPACA_SECRET_KEY=your_secret
CACHE_DIR=.finda_cache
LOG_LEVEL=INFO
```

## Data Sources

| Provider | Asset Class | Data Types |
|----------|-------------|------------|
| Dukascopy | Forex | OHLCV, Bid/Ask Ticks |
| Binance | Crypto | OHLCV, Trades |
| Alpaca | Stocks | OHLCV, Trades |

## License

MIT
