MIT licensed · Self-hostable · BYOK

The open-source API for Egyptian Exchange data

Self-hostable. BYOK. One docker command. Unified access to 200+ EGX symbols through configured data providers — with automatic fallback.

docker compose up200+ EGX symbolsprovider fallback
terminal

Try it now

Hits a live instance. 50 requests/day shared across all visitors — for evaluation only.

Want unlimited? Self-host in 60 seconds

Why it exists

The Egyptian Exchange is one of the oldest in the world — yet it remains dramatically underserved by developer tooling.

Fragmented data

Different providers cover different EGX symbols with different formats. Alpha Vantage may have COMI but not EAST. Yahoo coverage varies by symbol variant. You end up writing glue code forever.

No clean Python interface

yfinance partially works, but EGX symbol formats are inconsistent across providers — .CA, .EY, no suffix. You spend hours on reconciliation before writing a single line of real logic.

Open by default

MIT licensed, self-hostable, no vendor lock-in. Your API keys stay on your server. The fallback logic, the schema normalization, and the symbol dictionary are all yours to fork.

How it works

From zero to a running EGX API in under 60 seconds.

01

Clone the repo

Get the code and copy the environment template.

git clone https://github.com/7ashraf/borsa.git
cd borsa
cp .env.example .env
02

Add your API keys

Add keys for the providers you want to enable. Yahoo Finance needs no key.

# .env
ALPHA_VANTAGE_KEY=your_key_here
FINNHUB_KEY=your_key_here

# Get free keys at:
# → alphavantage.co/support/#api-key
# → finnhub.io/register
03

Start the service

One command. API live at localhost:8000. Interactive docs at /docs.

docker compose up

# Or without Docker:
uv sync && uv run uvicorn borsa.main:app --reload

# Query it:
curl http://localhost:8000/v1/quote/COMI

Code examples

Same REST API, any language. Consistent response schema regardless of which provider answered.

BASE="https://demo.borsa.ashh.me"

# Check the demo API
curl "$BASE/v1/health"

# Fetch one quote
curl "$BASE/demo/quote/COMI"

# List all EGX symbols
curl "$BASE/v1/stocks"

Features

Everything you need to build on EGX data, nothing you don't.

Multi-provider fallback

Configured providers are tried automatically. If one fails or rate-limits, borsa falls through to the next source.

200+ EGX symbols pre-configured

The EGX catalog is bundled with provider-specific ticker mapping handled for you.

In-process caching

TTL-based cache with configurable size. Responses served in microseconds on cache hit.

Async parallel fetching

Built on FastAPI and httpx. Non-blocking I/O means fast p99 even under concurrent load.

Type-safe with Pydantic

Every response is a validated Pydantic model. No surprise null fields, no string-typed numbers.

Open source (MIT)

Fork it, extend it, deploy it. No vendor lock-in, no per-seat pricing, no usage telemetry.

FAQ

borsaبورصة

MIT License · Made in 🇪🇬

borsa is not a financial advisor. Data accuracy depends on third-party providers. See DISCLAIMER.md for full terms.

© 2026 borsa contributors. MIT licensed.