---
title: "Compute Formula"
method: POST
path: "/api/formulas/compute/{formula_id}"
tags: ["Formula Engine"]
---

# Compute Formula

`POST /api/formulas/compute/{formula_id}`

## Request

- Base URL: `https://api.xfinlab.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xfinlab.com/api/formulas/compute/{formula_id}`
- Auth: none declared

Runs one formula with the given kwargs, returns its result.
400 on a bad/missing required param (surfaced as the underlying
TypeError message -- e.g. "missing a required argument: 'strike'" --
which is specific enough for API callers to fix their request without
needing a hand-written validator per formula).

## Path parameters

- `formula_id` string, required

## Request body

- ComputeRequest
  - `params` object

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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