---
title: "Set Backfill"
method: PUT
path: "/v1/backfills/{symbol}"
tags: ["Backfills"]
---

# Set Backfill

`PUT /v1/backfills/{symbol}`

## Request

- Base URL: `https://api.ensemble.markets` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ensemble.markets/v1/backfills/{symbol}`
- Auth: HTTP bearer

Extend one symbol's price history with a longer-lived stand-in.

Use this when a wrapper has the treatment you want but not the history
your backtest needs: OILK avoids a K-1 but starts in 2016, so backfilling
it from USO lets a model hold OILK across a window that predates it. A
model source lets you shape the stand-in's risk profile first (a lightly
levered TLT model standing in for EDV, say). The source's returns are
spliced in before the target's first bar, scaled so the two series join
continuously. Setting a symbol that already has a rule replaces the rule.

## Path parameters

- `symbol` string, required: The ticker whose history the rule extends, e.g. OILK

## Request body

- BackfillSetRequest: The stand-in for one symbol. Setting a symbol that has a rule replaces it.
  - `source` string, required: A ticker (`USO`) or one of your built models' IDs (`model_...` or legacy `m-...`)
  - `source_type` 'asset' | 'model': asset: another ticker's history; model: a model's return stream

## Response `200`

Successful Response

- Backfill: One stored backfill rule.
  - `symbol` string, required: The target ticker, uppercase
  - `source_type` 'asset' | 'model', required
  - `source` string, required: Ticker or model ID supplying the history
  - `source_name` string, nullable: The asset's or model's name, when it has one
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `4XX`: The request was refused; `error.type` says why
- `5XX`: The server failed; quote `X-Request-Id` when reporting it

---

[API](https://skmtc.dev/ensemble/apis/ensemble-api.md) · [All operations](https://skmtc.dev/ensemble/apis/ensemble-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ensemble/apis/ensemble-api/revisions/4c0fbd80c197?raw)
