Filoos - Unified Python SDK.
A unified, type-safe Python SDK for programmatic trading on Indian stock exchanges. It abstracts broker-specific APIs behind a clean, domain-driven interface.
Launch Specifications
Product Overview
Filoos is a standalone, PyPI-installable Python package that provides a single interface to trade across multiple Indian stockbrokers. It eliminates cryptic symbol strings and broker-specific idiosyncrasies by introducing strict Domain Objects and Type-Safe Enums.
- Broker-agnostic interface across Zerodha and Angel One.
- Type-safe Python Enums for transaction and order types.
- Auto-provisioned SQLite master contract database for O(1) resolution.
- Memory-efficient domain objects using dataclasses with slots.
What Filoos - Unified Python SDK Can Generate
Python enums prevent cryptic string errors.
Switch brokers by changing a single line of code.
SQLite database for O(1) contract resolution.
Safely ports upstream code without dependencies.
The Problem
Programmatic trading in India requires wrestling with poorly documented, inconsistent APIs across different brokers. Developers waste time writing boilerplate authentication, tracking cryptic contract tokens, and managing broker-specific JSON responses.
Our Solution
A unified, type-safe interface that wraps broker APIs. Users trade using intuitive Domain Objects (Equity, Future, Option) while the library handles token resolution, request formatting, and canonical responses.
Technical Architecture
The SDK uses a 'Shim' pattern to port battle-tested execution logic from OpenAlgo, decoupling it from Flask dependencies. A local SQLite database acts as a master contract resolver, mapping domain objects to broker-specific tokens instantly.
Shim & Execution Architecture
Tech Stack
Dashboard View Simulation
[INFO] SQLite Resolver: Loaded 112,450 instruments
[INFO] Resolving token for Equity(symbol='RELIANCE') -> 738561
Order placed: 24012500194833
Key Engineering Challenges
- •Porting complex broker execution logic without bringing over heavy web framework dependencies.
- •Resolving ambiguous options contracts safely across millions of available strikes.
- •Keeping broker logic automatically synced with upstream open-source releases.
Key Lessons Learned
- ✓Using the __init_subclass__ pattern allows zero-boilerplate registration for new broker adapters.
- ✓Setting frozen=True and slots=True on Dataclasses reduces RAM consumption by ~40% for 100K+ instruments.
- ✓A flat SQLite table structure provides the absolute fastest O(1) token resolution for algorithmic latency.
Development Roadmap
Core SDK & Zerodha
Domain objects and type-safe enums.
Angel One Integration
Extending adapter interface to new brokers.
WebSocket Streaming
Real-time tick data via callbacks.
Related Products
Every product is built with a focus on solving real problems.
Interested in engineering collaboration, specialized quantitative models, or custom educational AI solutions? Let's connect.
