Metadata-Version: 2.4
Name: bmv-cli
Version: 0.1.0
Summary: CLI tool for Mexican stock market (BMV/BIVA) data via DataBursatil API
Author: Axel Berrelleza
License-Expression: MIT
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Terminals
Requires-Dist: python-dotenv>=1.2.1
Requires-Dist: requests>=2.32.5
Requires-Dist: rich>=14.2.0
Requires-Dist: typer>=0.20.0
Requires-Dist: pytest>=8.3.5 ; extra == 'dev'
Requires-Dist: requests-mock>=1.12.1 ; extra == 'dev'
Requires-Dist: ruff>=0.9.0 ; extra == 'dev'
Requires-Dist: mypy>=1.15.0 ; extra == 'dev'
Requires-Dist: types-requests>=2.32.0.20241016 ; extra == 'dev'
Requires-Python: >=3.12
Project-URL: Homepage, https://github.com/AxelBerrelleza/bmv-cli
Project-URL: Issues, https://github.com/AxelBerrelleza/bmv-cli/issues
Provides-Extra: dev
Description-Content-Type: text/markdown

# bmv-cli

A command-line interface for Mexican stock market (BMV/BIVA) data via the [DataBursatil](https://www.databursatil.com) API v2.

Get real-time quotes, currency rates, API credits, search for symbols, and dividend information — all from your terminal.

## Installation

### uv tool (recommended)
```bash
uv tool install bmv-cli
```

### pipx
```bash
pipx install bmv-cli
```

### pip
```bash
pip install bmv-cli
```

## Setup

You need a DataBursatil API token. Get one at <https://www.databursatil.com>.

Set the token as an environment variable:

```bash
export BMV_API_TOKEN="your-token-here"
```

For local development, you can also create a `.env` file in the project root:

```bash
cp .env.sample .env
# Edit .env and add your BMV_API_TOKEN
```

## Usage

All commands require the `BMV_API_TOKEN` environment variable.

### Get real-time prices
```bash
bmv price GFNORTEO WALMEX*
```

### Get currency exchange rates
```bash
bmv currencies
```

### Check remaining API credits
```bash
bmv credits
```

### Search for stock symbols
```bash
bmv search WALMEX
bmv search GFNORTE --market global
```

### Get dividend information
```bash
bmv dividend FMTY14
bmv dividend WALMEX*
```

## Development

```bash
# Clone and setup
git clone https://github.com/AxelBerrelleza/bmv-cli.git
cd bmv-cli
uv sync --extra dev

# Run quality gates
uv run ruff format --check .
uv run ruff check .
uv run mypy src/bmv_cli/api src/bmv_cli/commands
uv run pytest

# Run the CLI during development
uv run bmv --help
```

See [AGENTS.md](AGENTS.md) for detailed development instructions.