Metadata-Version: 2.4
Name: tradia
Version: 0.1.1
Summary: Agentic trading intelligence — trade proposals, risk checks, journals, performance reports, and public accountability updates
Author: Talocode
License: MIT
Project-URL: Homepage, https://github.com/talocode/tradia
Project-URL: PyPI, https://pypi.org/project/tradia/
Project-URL: npm, https://www.npmjs.com/package/@talocode/tradia
Keywords: trading,forex,crypto,risk-management,journal,backtesting,talocode
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
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Tradia

**Agentic trading intelligence** — trade proposals, risk checks, journals, portfolio/performance reports, market analysis, backtests, and public accountability updates.

Part of **[Talocode](https://talocode.site)**. Cloud product under `/v1/tradia/*`.

| | |
|--|--|
| **Package** | `pip install tradia` |
| **Import** | `from tradia import TradiaClient` |
| **Auth** | `TALOCODE_API_KEY` |
| **Base URL** | `TALOCODE_BASE_URL` → `https://api.talocode.site` |
| **npm** | `@talocode/tradia` |
| **Repo** | [github.com/talocode/tradia](https://github.com/talocode/tradia) |
| **License** | MIT |

---

## Why Tradia?

Retail and agentic traders need **structured decision objects**, not chat logs:

- **Propose** trades with thesis / levels  
- **Risk-check** size and invalidation  
- **Journal** outcomes  
- **Report** portfolio & performance  
- **Evaluate** signals and markets  
- **Export** markdown / JSON for accountability  

Credits apply on Talocode Cloud (see host pricing; examples historically ~15–25 credits for propose / evaluate / portfolio report).

**Not financial advice.** Software for analysis workflows only.

---

## Install

```bash
pip install -U tradia
```

Python **3.10+**, stdlib HTTP client.

---

## Quickstart

```python
import os
from tradia import TradiaClient

client = TradiaClient(api_key=os.environ["TALOCODE_API_KEY"])

print(client.health())

# High-level agent plan
plan = client.agent_plan(symbol="XAUUSD", strategy="trend_continuation")
print(plan)

# Explicit trade proposal
proposal = client.trade_propose(
    market="forex",
    symbol="XAUUSD",
    account_balance=10000,
    risk_percent=1,
    entry=1950,
    stop_loss=1940,
    take_profit=1970,
    strategy="trend_continuation",
)

# Risk, journal, reports
client.risk_check(**proposal.get("result", proposal) if isinstance(proposal, dict) else {})
client.trade_journal(symbol="XAUUSD", outcome="win", notes="Followed plan")
client.portfolio_report(account_balance=10000)
client.performance_analyze(period="30d")

# Market / signals
client.market_analyze(symbol="XAUUSD", timeframe="H1")
client.signal_evaluate(symbol="XAUUSD", direction="long")

# Accountability & exports
card = client.accountability_card(summary="Weekly review")
md = client.export_markdown(card)
js = client.export_json(card)
```

Keyword args are forwarded as JSON to the API (camelCase conversion may be applied by the host). Prefer the shapes documented on [docs.talocode.site](https://docs.talocode.site) for your deployed version.

### Environment

| Variable | Default |
|----------|---------|
| `TALOCODE_API_KEY` | — |
| `TALOCODE_BASE_URL` | `https://api.talocode.site` |

---

## Client methods

| Method | Purpose |
|--------|---------|
| `health()` | Service health |
| `agent_plan(**kwargs)` | End-to-end agent planning |
| `market_analyze(**kwargs)` | Market context |
| `signal_evaluate(**kwargs)` | Signal scoring |
| `risk_check(**kwargs)` | Risk validation |
| `trade_propose(**kwargs)` | Structured trade proposal |
| `trade_journal(**kwargs)` | Journal entry |
| `portfolio_report(**kwargs)` | Portfolio snapshot |
| `performance_analyze(**kwargs)` | Performance analytics |
| `public_update_generate(**kwargs)` | Public-facing update text |
| `backtest_simulate(**kwargs)` | Lightweight simulation |
| `accountability_card(**kwargs)` | Accountability card payload |
| `export_markdown(data)` / `export_json(data)` | Export helpers |

---

## CLI

```bash
export TALOCODE_API_KEY=...

tradia health
tradia propose --data '{
  "symbol":"XAUUSD",
  "strategy":"trend_continuation",
  "accountBalance":10000,
  "riskPercent":1,
  "entry":1950,
  "stopLoss":1940,
  "takeProfit":1970
}'
```

---

## Related packages

| Package | Role |
|---------|------|
| `tradia` | **This package** |
| `talocode` | Unified cloud client |
| `talocode-tera` | General LLM capabilities |
| `talocode-searchlane` | News / research for macro context |

---

## Talocode ecosystem

| Project | Role |
|---------|------|
| **[Tradia](https://github.com/talocode/tradia)** | Trading intelligence (this product) |
| **[StackLane](https://github.com/talocode/stacklane)** | Cloud keys & credits |
| **[Tera](https://github.com/talocode/tera)** | AI capabilities |
| **[SignalLane](https://github.com/talocode/signallane)** | Growth / signal products (sibling) |
| **[SearchLane](https://github.com/talocode/searchlane)** | Web research |

[docs.talocode.site](https://docs.talocode.site) · [github.com/talocode](https://github.com/talocode)

## License

MIT © Talocode
