---
title: "Replay settled game-winner markets on paper"
method: POST
path: "/backtest"
tags: ["Markets"]
---

# Replay settled game-winner markets on paper

`POST /backtest`

## Request

- Base URL: `https://arena-predictions.com/api/v1`
- URL: `https://arena-predictions.com/api/v1/backtest`
- Auth: HTTP bearer

Forwards the JSON body to the backtest edge function and returns that function's JSON. Paper replay of settled Kalshi game-winner markets. Scope markets:read, the same check as the other keyed market routes. A 2xx object has mode paper (set here when the function left it out). GET and every other method answer 405 method_not_allowed with Allow: POST, OPTIONS, and are not forwarded. The function's fields are ZBGC/Bettr-backend#47; this path is what the public host serves so the route is not 404 route_not_found. Paper only. Not cached.

## Request body

- object: Forwarded as JSON to the backtest edge function. That function owns the fields.

## Response `200`

The edge function's JSON, passed through. mode is paper.

- object
  - `mode` 'paper', required: Every successful keyed answer is paper.

## Other responses

- `400`: invalid_request: the body is not a JSON object, it is too large, or the query string is not valid. A 400 from the function is passed through.
- `401`: Missing, malformed, unknown, revoked or expired key. Carries a WWW-Authenticate: Bearer challenge.
- `403`: insufficient_scope: the key does not carry markets:read.
- `429`: rate_limited (over the plan's minute limit) or quota_exceeded (over the month). Only while the limits are enforced; until then requests are counted and the headers set, and nothing is refused. error.retryAfterSeconds equals Retry-After.
- `503`: The key could not be verified, or the data could not be read, right now. Retry after the Retry-After seconds.

---

[API](https://skmtc.dev/arena-predictions/apis/arena-api.md) · [All operations](https://skmtc.dev/arena-predictions/apis/arena-api/llms.txt) · [OpenAPI document](https://skmtc.dev/arena-predictions/apis/arena-api/revisions/9d89d166dae6?raw)
