Get started¶
This tab takes you from an empty machine to a Python session that looks up a share, reads its prices and rehearses an order. It is written for someone who wants to use the library, and it assumes no knowledge of how the library is built inside.
The library does not talk to brokers itself. Every price and every order goes through the Unified Broker Interface (UBI), the sibling project that runs on the same machine and speaks to ten Indian brokers. So getting started means two things: installing this library, and having a UBI it can reach.
What you need before you start¶
The table below lists what the machine needs, and why each piece is there.
| You need | Why |
|---|---|
| Python 3.14 | pyproject.toml requires it, and the project's .venv is built with it |
| The TA-Lib C library | The TA-Lib Python package wraps it, and pip cannot install the C part |
| Docker with Compose | docker-compose.yml runs this project's Redis, MongoDB and TimescaleDB |
A running UBI on 127.0.0.1:8080 |
Every candle, quote and order comes from it |
| UBI's order engine running | UBI places every order through it, and refuses orders while it is stopped |
| UBI's api key and secret | The client logs in with them, reading them from this project's MongoDB |
UBI trades with real money
UBI is connected to live broker accounts, and there is no paper trading mode. Nothing in this tab places an order: the one order in First steps is a dry run, which UBI builds and hands back without sending.
The path through this tab¶
Setting up happens in a fixed order, because each step needs the one before it. The numbered list below is that order.
- Install the software. You install the TA-Lib C library, create the virtual environment, install the library, and start the three containers. This is on Installation.
- Configure it. You write the
.envfile that says where UBI and MongoDB are, and put UBI's api key and secret into MongoDB. This is on Configuration. - Use it. You look up a share, read its candles and quote, search for instruments, read an option chain and rehearse an order. This is on First steps.
The diagram below shows the same path, with the place each step writes to or reads from.
flowchart LR
A["TA-Lib C library"] --> B["venv and<br/>pip install -e"]
B --> C["docker compose up -d"]
C --> D[".env and the<br/>MongoDB settings document"]
D --> E["UBI and its<br/>order engine running"]
E --> F["First steps<br/>in Python"]
C -.-> MG[("MongoDB<br/>port 2003")]
D -.-> MG
F -.-> U["UBI<br/>127.0.0.1:8080"]
F -.-> MG
The pages¶
Each card below opens one page of this tab.
-
Installation
The TA-Lib C library, the virtual environment, the editable install, the three containers and their ports, and the UBI this library needs.
-
Configuration
Every environment variable the code and the containers read, the MongoDB document holding UBI's key and secret, where stored baskets are kept, and why the order engine needs no configuration here.
-
First steps
A first session built on real output: a share, its candles and quote, a search, an option chain and a dry-run order.
-
Python API
Every class and member, one page per group, in the style of a broker's API reference.