---
title: "Run Backtesting"
method: POST
path: "/backtesting/run-backtesting"
tags: ["Backtesting"]
---

# Run Backtesting

`POST /backtesting/run-backtesting`

Run a historical backtesting simulation for a controller configuration.

Executes a complete backtesting simulation using historical market data to evaluate
how a trading strategy would have performed over a specified time period. The backtest
simulates trade execution, tracks positions, and calculates performance metrics.

The controller configuration can be provided either as a path to a YAML file or
as a complete configuration dictionary. Historical candle data is automatically
fetched for the required trading pairs and time period.

Use this endpoint to evaluate strategy performance before deploying to live trading,
optimize strategy parameters, or compare different configurations.

## Request body

- BacktestingConfig — Configuration for running a backtesting simulation.
  - `start_time` integer — Unix timestamp for backtest start time. Default: 2025-01-01 00:00:00 UTC
  - `end_time` integer — Unix timestamp for backtest end time. Default: 2025-02-01 00:00:00 UTC
  - `backtesting_resolution` string — Candle interval for simulation. Options: '1m', '5m', '15m', '1h', '4h', '1d'
  - `trade_cost` number — Trading fee as decimal (e.g., 0.0006 = 0.06%). Applied to each trade execution
  - `config` union, required — Controller configuration - either a config name (str) referencing a YAML file, or a complete configuration dictionary with controller parameters
    - object
    - string

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

## Changes

- **2026-01-18** `576ec8539f76` — 1 breaking
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
- **2025-12-20** `1005bcd47280` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hummingbot/apis/hummingbot-api/changes/backtesting/run-backtesting/post.md)

---

[API](https://skmtc.dev/hummingbot/apis/hummingbot-api.md) · [All operations](https://skmtc.dev/hummingbot/apis/hummingbot-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hummingbot/hummingbot-api/revisions/576ec8539f76/schema)
