Metadata-Version: 2.4
Name: tradealmanac
Version: 2026.9.6
Summary: Client of the TradeAlmanac public API: dividends, screener, sentiment indicators
License-Expression: MIT
Project-URL: Homepage, https://tradealmanac.com/en/developers
Keywords: moex,dividends,screener,market-data,tradealmanac
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# tradealmanac

Russian version: the file `README.ru.md` in this package ·
[documentation in Russian](https://tradealmanac.com/ru/developers)

Client of the [TradeAlmanac](https://tradealmanac.com/en/developers) public API.

TradeAlmanac is a market-data, analytics and paper-trading platform for the
whole world of finance, investing and trading; the Russian market is its
deepest-covered market today, not the boundary of the product.

The package version is the date of the API contract: **2026.9.6** (contract
`2026-09-06`).

## Install

```bash
pip install tradealmanac
```

## Usage

```python
from tradealmanac import TradeAlmanac

api = TradeAlmanac("afk_your_key")          # the key is issued in your account, section API
print(api.dividends_by_ticker("SBER"))
print(api.screener(sector="oil-gas", dividend_yield_min=0.08, limit=20))
```

Fractions, not percentages: `dividend_yield_min=0.08` means 8 %.

## Limits of the API

60 requests a minute and 1,000 a day per key. Beyond that the answer is `429`,
and the client raises `TradeAlmanacError` with a `status` field.

Read-only: a key works with the GET method only.

## Methods

- `afgi` — TradeAlmanac Fear & Greed Index
- `afgi_components` — Fear & Greed Index components
- `afgi_history` — Fear & Greed Index history
- `analysis` — Security write-ups: the list
- `analysis_by_ticker` — Write-ups for one security
- `dividends` — Dividend calendar
- `dividends_by_ticker` — Dividends for one security, with announcement status
- `meta` — What this API serves and what it does not
- `portfolios` — Portfolios of the key owner
- `portfolios_by_portfolio_id_positions` — Portfolio positions
- `portfolios_by_portfolio_id_transactions` — Portfolio transactions
- `screener` — Screener: securities by fundamentals
- `screener_fields` — Screener fields and their units
- `sectors` — Sector breakdowns by our own metrics
- `versions` — Contract versions and what each one added

## How it is built

The file `tradealmanac/client.py` is GENERATED from the schema `/api/public/v1/openapi.json`
by `scripts/generate_sdk.py`. The client cannot drift from the server: they
have one source.

Licence: MIT.
