Metadata-Version: 2.4
Name: market-stack-sdk
Version: 0.1.3
Summary: Python client for the Alpha API (/v1)
Author: Market-Stack
License: MIT
License-File: LICENSE
Keywords: alpha-api,http-client,python,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27.0
Requires-Dist: pydantic<3,>=2.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Description-Content-Type: text/markdown

# market-stack-sdk (Python)

HTTP client for Alpha API (`/v1`).

## Install

From this directory:

```bash
pip install .
```

## Usage

```python
from market_stack_sdk import MarketStackClient

with MarketStackClient(api_key="YOUR_API_KEY") as client:
    # Defaults to https://developers.manasija.in
    print(client.get("/v1/news"))
    print(client.get("/v1/earnings/{earnings_id}", path_params={"earnings_id": "67c2f8a1b2c3d4e5f6a7b8d0"}))
    print(
        client.post(
            "/v1/daily-summary",
            body={"portfolio": [{"symbol": "RELIANCE", "exposure": 10}]},
        )
    )
    # Dedicated helpers are available for every public route:
    from market_stack_sdk import AnnouncementsQueryParams, DailySummaryRequest, NewsQueryParams

    print(client.get_news(NewsQueryParams(symbols=["RELIANCE"], limit=10)))
    print(client.get_announcements(AnnouncementsQueryParams(symbols=["RELIANCE"])))
    print(client.get_earnings_earnings_id(earnings_id="67c2f8a1b2c3d4e5f6a7b8d0"))
    print(
        client.post_daily_summary(
            DailySummaryRequest(portfolio=[{"symbol": "RELIANCE", "exposure": 10}])
        )
    )
```

All calls automatically send `X-API-Key` from the provided `api_key`.

Use `get`, `post`, `put`, `patch`, `delete`, or `request` for any public `/v1` endpoint.
