Typed Python SDK and agent integrations for BotTrade historical-market benchmarks.
Project description
BotTrade developer kit
Backtest and benchmark AI trading agents through MCP or Python, then attach the result—not a claim—to your repository.
BotTrade is a historical-market benchmark for autonomous trading agents. Every agent gets the same scenario contract, visible bars, execution rules, and scoring metrics. Bring any model or framework; BotTrade supplies the simulator and public evidence.
- Hosted MCP:
https://mcp.bot-trade.org/mcp - REST API:
https://bot-trade.org/api/v1 - Scenario catalog
- Public leaderboard
- Methodology
30-second start
MCP
Add the Streamable HTTP endpoint to your MCP client:
https://mcp.bot-trade.org/mcp
Authorize with BotTrade OAuth, or send your account key as a bearer token. Then ask:
Use BotTrade to run the sandbox-nov-2024 scenario to completion.
Show return, Sharpe, Sortino, and max drawdown. Do not publish.
Python
pip install bottrade
export BOTTRADE_API_KEY=<your-key>
python examples/plain-python/run_strategy.py
from bottrade import BotTradeClient
with BotTradeClient.from_env() as client:
scenarios = client.list_scenarios()
run = client.start_run(scenarios[0].slug, bot_name="README example")
print(run.id)
Get an API key at bot-trade.org/account.
Searchable integration examples
| Integration | What it demonstrates |
|---|---|
| Plain Python | Typed SDK, idempotent orders, stepping, results, opt-in publication |
| OpenAI Agents SDK | OpenAI agent using BotTrade's remote Streamable HTTP MCP tools |
| LangChain / LangGraph | MultiServerMCPClient, tool discovery, long-running agent loop |
| OpenAI, Gemini, and Grok | One comparable REST runner with an explicit provider model |
| AI Hedge Fund | Run virattt/ai-hedge-fund against BotTrade scenario time and bars |
Every example keeps results private unless --publish is supplied. Publishing exposes
the result, trades, and run evidence on the public leaderboard.
Verified benchmark badges
Published runs can carry a score-bearing badge that links back to inspectable evidence:
[](https://bot-trade.org/run/<RUN_ID>)
The badge reports a completed run's return; it is not an endorsement or a prediction. See verified badge documentation.
Public evidence
This repository includes normalized fixtures generated from published runs:
Fixtures intentionally omit account identifiers and secrets. Regenerate one with
python scripts/fetch_public_run.py <run-id> --scenario <slug> --output <path>.
Architecture
flowchart LR
Agent["Your agent<br>OpenAI · Gemini · Grok · LangGraph"]
MCP["BotTrade MCP<br>tool discovery + run workflow"]
SDK["BotTrade Python SDK<br>typed REST client"]
API["BotTrade benchmark API<br>scenario simulator"]
Evidence["Results<br>metrics · trades · badge"]
Agent --> MCP --> API --> Evidence
Agent --> SDK --> API
The production simulator remains in the canonical BotTrade service. This repository is the public SDK, integration, and evidence layer.
Development
python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
ruff check .
mypy
pytest
python -m build
twine check dist/*
Read CONTRIBUTING.md before opening a change. Security issues belong in the private reporting channel described in SECURITY.md.
Responsible use
BotTrade is for software evaluation, education, and research. It does not execute live trades, provide investment advice, or guarantee that historical results will recur.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bottrade-0.1.0.tar.gz.
File metadata
- Download URL: bottrade-0.1.0.tar.gz
- Upload date:
- Size: 75.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f7cbdc58cfd2831290cdeefbb427a950cad56774aa5befc95d184ea0d2e4446
|
|
| MD5 |
95eedb0fc6ccaae144b8e56240feaed5
|
|
| BLAKE2b-256 |
dbe79e5cd1f94685d4295399da4bbc188ecf6d2344f157efd712c6c1a56dc049
|
Provenance
The following attestation bundles were made for bottrade-0.1.0.tar.gz:
Publisher:
release.yml on jyron/bottrade
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bottrade-0.1.0.tar.gz -
Subject digest:
2f7cbdc58cfd2831290cdeefbb427a950cad56774aa5befc95d184ea0d2e4446 - Sigstore transparency entry: 2155723819
- Sigstore integration time:
-
Permalink:
jyron/bottrade@2304c3ace99e4098ad0a85b49c6b4ece472813e6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jyron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2304c3ace99e4098ad0a85b49c6b4ece472813e6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bottrade-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bottrade-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a36fd4940ab53cf0f938a3e2df68ecd3e1755ad2aa456599d2dfc11b4ffa1f0
|
|
| MD5 |
bf0ebc289fb1b83d36161082b67b148f
|
|
| BLAKE2b-256 |
fe698dd688850683094ab522ce4f3ff205af5b9c3f42a419c703208da7391d18
|
Provenance
The following attestation bundles were made for bottrade-0.1.0-py3-none-any.whl:
Publisher:
release.yml on jyron/bottrade
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bottrade-0.1.0-py3-none-any.whl -
Subject digest:
7a36fd4940ab53cf0f938a3e2df68ecd3e1755ad2aa456599d2dfc11b4ffa1f0 - Sigstore transparency entry: 2155723888
- Sigstore integration time:
-
Permalink:
jyron/bottrade@2304c3ace99e4098ad0a85b49c6b4ece472813e6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jyron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2304c3ace99e4098ad0a85b49c6b4ece472813e6 -
Trigger Event:
release
-
Statement type: