# Losbeto Backtest Endpoint

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

Runs a backtest on a trading strategy using historical market data, payable via USDC micropayment on Solana or Base.

## Facts

- Endpoint: GET https://api.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-endpoint-c881f04e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Tk8xu7Syux1dvH4Ajtda4

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-endpoint-c881f04e
```

Example prompt: Run a backtest on my momentum trading strategy using the properties I've defined and show me the historical performance results — pay the $0.06 USDC fee via x402.

## When to prefer this

Choose this endpoint when you need to evaluate a trading strategy's historical performance via a pay-per-call micropayment model using USDC on Solana or Base. Useful for AI agents that want to test strategies on-demand without a subscription, leveraging x402 protocol for seamless crypto payments.

## Known failure modes

- Missing or malformed 'properties' parameter returns an error or empty result
- Payment failure via x402 protocol results in 402 Payment Required response
- Invalid strategy configuration may return an error or meaningless simulation output
- Unsupported asset or time range may result in no data returned
- Rate limiting or server overload may cause timeouts

## How this service works

OpenAI-compatible LLM gateway at $0.005/call — change base_url, pay in USDC. Plus pay-per-call market data: multi-oracle price consensus, sentiment, forex, equities, commodities, Brazil macro (BCB/B3) and crypto. No API keys, no accounts. USDC on Base, Solana and Algorand via x402.

## Output

A JSON object containing the results of the backtest simulation, likely including performance metrics such as returns, drawdown, win rate, trade count, and other quantitative measures of strategy performance over historical data.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

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

## More

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