# EGX.news auth.md

Agent authentication, registration discovery, and API provisioning metadata for [EGX.news](https://egx.news) per the [Auth.md Specification](https://workos.com/auth-md).

---

## 1. Overview for Autonomous Agents & LLMs

EGX.news publishes verified, real-time market data for the Egyptian Exchange (EGX), covering all 240+ listed securities, the benchmark EGX 30 index, Level 2 order book queues (up to 40 levels deep), and intraday turnover statistics.

To ensure service reliability, rate limiting, and fair usage during market trading hours (09:00 - 15:30 Cairo Local Time), **all programmatic and autonomous agent access is provisioned through RapidAPI**.

---

## 2. Agent Registration & Key Provisioning

- **Registration Portal**: [https://rapidapi.com/manwilbahaa/api/egx-live](https://rapidapi.com/manwilbahaa/api/egx-live)
- **Supported Identity Type**: `api_key`
- **Credential Type**: `api_key`
- **Provisioning Model**: Instant self-service via RapidAPI Developer Portal.
- **Pricing & Quota Tiers**:
  - **Basic Tier (Free)**: For exploratory agent evaluation and testing.
  - **Pro / Ultra Tiers**: For production algorithmic agents, high-frequency retrieval, and full order book streaming.
- **Support & Developer Inquiries**: [support@egx.news](mailto:support@egx.news)

---

## 3. Credential Usage in HTTP Requests

All requests to the live market endpoints must target the official API gateway with the following headers:

```http
GET /price/COMI HTTP/1.1
Host: egx-live.p.rapidapi.com
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY_HERE
X-RapidAPI-Host: egx-live.p.rapidapi.com
Accept: application/json
```

### Supported Scopes
- `market:quotes`: Real-time stock prices, bid/ask spreads, open, high, low, close, volume, and turnover.
- `market:depth`: Level 2 cumulative order book queues (5-level and 40-level depth).
- `market:summary`: EGX 30 constituent analytics, total market capitalization, session turnover.
- `market:movers`: Top gainers, top losers, and most active securities by volume and value.

---

## 4. Machine-Readable Discovery Documents

- **API Catalog (RFC 9727)**: `https://egx.news/.well-known/api-catalog`
- **OAuth Protected Resource Metadata (PRM)**: `https://egx.news/.well-known/oauth-protected-resource`
- **OAuth Authorization Server Discovery**: `https://egx.news/.well-known/oauth-authorization-server`
- **OpenAPI 3.1 Specification**: `https://egx.news/openapi.json`
- **Model Context Protocol (MCP) Manifest**: `https://egx.news/.well-known/mcp.json`
- **LLM Context Guide**: `https://egx.news/llms.txt`

---

## 5. Security & Infrastructure Policies

1. **Gateway Enforcement**: Programmatic agents must query endpoints via `https://egx-live.p.rapidapi.com` or through the public edge (`https://egx.news`).
2. **Strict Origin Shielding**: Internal servers, backend clusters, and WebSocket relays are dedicated solely to interactive browser sessions and internal build jobs. Any direct automated scanning, scraping, or connection attempts against origin infrastructure are strictly prohibited and actively blocked by Cloudflare WAF.
3. **Revocation**: API keys can be instantly rotated or revoked at any time through the [RapidAPI Developer Dashboard](https://rapidapi.com/developer/dashboard).
