---
title: "Check a formula without saving it. Free, not metered."
method: POST
path: "/api/v1/formulas/validate"
tags: ["formulas"]
---

# Check a formula without saving it. Free, not metered.

`POST /api/v1/formulas/validate`

## Request

- Base URL: `https://api.blackforge.so` (the document declares no server; this is the origin it was published from)
- URL: `https://api.blackforge.so/api/v1/formulas/validate`
- Auth: API key in header `x-api-key`

Returns the normalised source, the pairs, the primitives, the horizon and the cost in rows (1 row per referenced pair per evaluation). A refusal is one located error object a model can correct. Trade and book-change terms cover the w seconds ending one second before the value's timestamp; book terms are read at the timestamp. Ultra only; any other plan gets 403 {"error":{"code":"plan_required","plan":"ultra","upgrade":"https://blackforge.so/pricing"}}.

## Request body

- ValidateFormulaDto
  - `expr` string, required: The formula source, e.g. `mid(binance:BTCUSDT) - mid(okx:BTC-USDT)`. Trade and book-change terms cover the w seconds ending one second before the value's timestamp; book terms are read at the timestamp.
  - `interval` number: Update interval in whole seconds, 1 to 60. Default 1.

## Response `200`

---

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