---
title: "Start a candle export as a background job; poll GET /v1/candles/export/{exportId}"
method: POST
path: "/v1/candles/export"
---

# Start a candle export as a background job; poll GET /v1/candles/export/{exportId}

`POST /v1/candles/export`

## Request

- Base URL: `https://app.texttoquant.com/api`
- URL: `https://app.texttoquant.com/api/v1/candles/export`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Same request fields as the GET, in the JSON body (or the query). Answers 202 { exportId, status: "queued", estimatedSeconds }, or 200 { status: "done", url, ... } at once when the window is closed and already built. The same request from the same account while one is in flight (or within a few minutes after it finished) returns that export (`deduplicated: true`) and is not counted by the per account limit, which counts requests that start new work.

## Request body

- object
  - `symbol` string, required
  - `timeframe` string, required
  - `start` string, date, required
  - `end` string, date, required
  - `format` 'csv' | 'jsonl'

## Response `200`

done: the closed window was already built; the link is in the answer

- object
  - `success` true, required
  - `data` object, required

## Other responses

- `202`: queued or running: { exportId, status, estimatedSeconds, deduplicated }
- `400`: invalid_request | symbol_ambiguous
- `403`: Plan does not include marketData
- `413`: export_too_large: the message gives the computed bar count and the limit
- `429`: rate_limited: too many new exports this minute; the message says how many seconds to wait
- `500`: internal_error: the export could not be started; retryable
- `503`: export_queue_unavailable: the export could not be queued and nothing was started; retryable, retry in a moment

---

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