# Losbeto Backtest — Trading Strategy Backtesting API

> Losbeto Backtest — Trading Strategy Backtesting API is a paid API for AI agents from markets.losbeto.xyz, paid per call via x402, $0.06/call, status unknown (last checked 2026-09-14).

Runs a backtest of a trading strategy against historical market data, returning performance metrics and results.

## Facts

- Endpoint: GET https://markets.losbeto.xyz/backtest
- Price: $0.06/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/losbeto-backtest-trading-strategy-backtesting-api-2c013f77
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Deg5EzusvloAgaw4dNeLk

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability losbeto-backtest-trading-strategy-backtesting-api-2c013f77
```

Example prompt: Can you backtest a simple moving average crossover strategy for me — run it against historical crypto data and show me the performance metrics like total return, max drawdown, and win rate?

## When to prefer this

Choose this endpoint when you need to programmatically evaluate a trading strategy's historical performance with micropayment-based access via x402 on Solana or Base. Preferred over manual backtesting tools when integrating into an AI agent workflow that requires automated strategy validation at low per-call cost ($0.06 USDC).

## Known failure modes

- Missing or malformed 'properties' parameter returns an error or empty result
- Invalid strategy configuration causes computation failure
- Strategy parameters outside supported range may return 400 or empty JSON
- Payment of $0.06 USDC required; unpaid requests return HTTP 402
- Server-side timeout for computationally expensive backtests

## How this service works

Losbeto: 67 endpoints x402 monetizados. Solana + Base. USDC micropayments para AI agents. Preços a partir de $0.003.

## Output

Returns a JSON object containing historical backtest performance metrics such as total return, annualized return, maximum drawdown, win rate, Sharpe ratio, and a log of simulated trades executed during the backtest period.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "properties": {
  "input": {
   "properties": {
    "queryParams": {
     "properties": {
      "strategy": {
       "description": "Strategy label, e.g. momentum, mean-reversion",
       "type": "string"
      },
      "symbol": {
       "description": "Asset ticker, e.g. AAPL, TSLA, BTC, GOLD",
       "type": "string"
      }
     },
     "type": "object"
    }
   },
   "type": "object"
  },
  "output": {
   "properties": {
    "example": {
     "description": "Strategy backtest with PnL, win rate, drawdown and a written read of where the strategy actually makes its money.",
     "type": "object"
    }
   },
   "type": "object"
  }
 },
 "required": [
  "input"
 ],
 "type": "object"
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/losbeto-backtest-trading-strategy-backtesting-api-2c013f77/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from markets.losbeto.xyz](https://www.zero.xyz/host/markets.losbeto.xyz/llms.txt)
