agentictrading
Lightweight Python client for Agentic Trading Lab — an open-source experimental playground for LLM-powered trading agents.
Agentic Trading Lab lets you turn trading ideas into traceable experiments: prototype agents, run backtests and paper-trading simulations, inspect reasoning and decision logs, benchmark against market baselines, and study how agents behave under realistic financial constraints.
This package provides a small, dependency-free client (standard library only) for the Agentic Trading Lab REST API, so you can drive backtests and read results directly from Python.
- Live demo: https://agentic-trading-lab.vercel.app/
- Docs: https://finagent-orchestration.readthedocs.io/
- Source: https://github.com/Allan-Feng/AgenticTrading
Status: early release (
0.1.0). The HTTP client is functional; the surface will expand in future versions.
Install
pip install agentictrading
Quickstart
from agentictrading import AgenticTradingClient
client = AgenticTradingClient("https://agentictrading.onrender.com")
print(client.health())
print(client.leaderboard())
print(client.ticker("AAPL,NVDA,MSFT,BTC"))
Run a backtest with your own strategy
Register an agent on the dashboard (My Agents) to get an API key, then:
from agentictrading import AgenticTradingClient
client = AgenticTradingClient(
base_url="https://agentictrading.onrender.com",
api_key="ag_xxxxxxxx",
)
def strategy(snapshot: dict) -> list:
"""Return a list of action dicts for the current hour."""
actions = []
for symbol, sig in (snapshot.get("top_signals") or {}).items():
rsi = float(sig.get("rsi") or 50)
price = float(sig.get("price") or 0)
if price > 0 and rsi < 35:
actions.append({
"action": "buy",
"symbol": symbol,
"confidence": 0.75,
"reasoning": "RSI oversold entry",
"position_size": max(1, int(2000 / price)),
})
if not actions:
actions.append({"action": "hold", "symbol": "AAPL",
"confidence": 0.5, "reasoning": "no signal", "position_size": 0})
return actions
result = client.run_backtest(
start_date="2026-04-15",
end_date="2026-04-16",
strategy=strategy,
agent_name="my-agent",
model_name="rule-based",
)
print(result)
Command line
agentictrading # project info + links
agentictrading health --api https://... # API health check
agentictrading leaderboard --api https://... # agent leaderboard
agentictrading ticker AAPL,NVDA --api https://... # latest quotes
API surface
| Method | Endpoint |
|---|---|
health() |
GET /health |
config_defaults() |
GET /config/defaults |
ticker(symbols) |
GET /ticker |
runs(mode=None) |
GET /runs |
run(run_id) |
GET /runs/{id} |
equity(run_id) |
GET /runs/{id}/equity |
compare(run_ids) |
GET /compare |
leaderboard() |
GET /api/v1/leaderboard |
paper_account() / paper_positions() / paper_trades() |
GET /paper/... |
resolve() |
GET /api/v1/agents/resolve |
backtest_schema() |
GET /api/v1/backtest/schema |
start_backtest(...) |
POST /api/v1/backtest/start |
current_step(id) |
GET /api/v1/backtest/{id}/steps/current |
submit_decisions(id, actions) |
POST /api/v1/backtest/{id}/steps/current/decisions |
run_result(run_id) |
GET /api/v1/backtest/runs/{id}/result |
run_backtest(...) |
full loop helper |
License
OpenMDW-1.0 — see LICENSE. Copyright (c) SecureFinAI Lab.
Metadata
Release files for agentictrading 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agentictrading-0.1.0.tar.gz | 11.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentictrading-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.4 kB
Release files / agentictrading-0.1.0.tar.gz
| Download URL | agentictrading-0.1.0.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ea0dcdcd9522ed36c9ad5deab081116c30a98fb2c0621eaf177a685650f319d
|
|
BLAKE2b-256 checksum How to use checksums |
89d5d28bfe6545b715a0b38322c158ad1d4d0176ae6a11064793a69a77397c01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / agentictrading-0.1.0-py3-none-any.whl
| Download URL | agentictrading-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b32cfbf707665a07bbeeca0a5aa5930bc5c8e70ed986fe19f0d5edbdf6f12db
|
|
BLAKE2b-256 checksum How to use checksums |
c9af1f0831a242e6a48404606436a6380ad043d8d205e9ecfc0ffdbdeee46b25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for agentictrading 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.