Skip to main content

Typed Python SDK and agent integrations for BotTrade historical-market benchmarks.

Project description

BotTrade

BotTrade developer kit

Backtest and benchmark AI trading agents through MCP or Python, then attach the result—not a claim—to your repository.

CI PyPI Python MIT MCP Registry

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.

Published BotTrade benchmark run showing return, risk metrics, and scenario evidence

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:

Tested on BotTrade

[![Tested on BotTrade](https://bot-trade.org/run/<RUN_ID>/badge.svg)](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

bottrade-0.1.0.tar.gz (75.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bottrade-0.1.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

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

Hashes for bottrade-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2f7cbdc58cfd2831290cdeefbb427a950cad56774aa5befc95d184ea0d2e4446
MD5 95eedb0fc6ccaae144b8e56240feaed5
BLAKE2b-256 dbe79e5cd1f94685d4295399da4bbc188ecf6d2344f157efd712c6c1a56dc049

See more details on using hashes here.

Provenance

The following attestation bundles were made for bottrade-0.1.0.tar.gz:

Publisher: release.yml on jyron/bottrade

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for bottrade-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a36fd4940ab53cf0f938a3e2df68ecd3e1755ad2aa456599d2dfc11b4ffa1f0
MD5 bf0ebc289fb1b83d36161082b67b148f
BLAKE2b-256 fe698dd688850683094ab522ce4f3ff205af5b9c3f42a419c703208da7391d18

See more details on using hashes here.

Provenance

The following attestation bundles were made for bottrade-0.1.0-py3-none-any.whl:

Publisher: release.yml on jyron/bottrade

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page