← Developer Hub
Quant Models
Quantitative Model Execution
Execute a validated deterministic FinanceGPT quantitative model with supplied inputs.
Version: v2
Stability: stable
Sandbox: Available
Production: Entitlement required
Target latency: ≤ 900 ms
POST
/api/v2/quant/models/{key}/runRuns the same versioned deterministic engine used by FinanceGPT workspaces. Inputs and outputs are hashed for reproducibility; the endpoint never executes trades.
Required scope:
quant:models:runTry it in the FinanceGPT sandbox
The playground uses deterministic isolated sandbox fixtures. It never queries production workspace data and does not require you to paste an API secret into the browser.
Sign in to runExample response
{
"data": {
"run_uid": "00000000-0000-4000-8000-000000000018",
"model_key": "derivatives.black_scholes",
"version": "v1",
"output": {
"price": 10.449999999999999289457264239899814128875732421875
}
}
}Code examples
curl
curl -X POST \
https://financegpt.dev/api/v2/quant/models/derivatives.black_scholes/run \
-H "Authorization: Bearer $FINANCEGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"spot":100,"strike":100,"risk_free_rate":0.05000000000000000277555756156289135105907917022705078125,"volatility":0.200000000000000011102230246251565404236316680908203125,"time_to_expiry_years":1,"dividend_yield":0,"option_type":"call"}}'python
import os, requests
url = "https://financegpt.dev/api/v2/quant/models/derivatives.black_scholes/run"
headers = {"Authorization": f"Bearer {os.environ['FINANCEGPT_API_KEY']}"}
payload = {
"input": {
"spot": 100,
"strike": 100,
"risk_free_rate": 0.05000000000000000277555756156289135105907917022705078125,
"volatility": 0.200000000000000011102230246251565404236316680908203125,
"time_to_expiry_years": 1,
"dividend_yield": 0,
"option_type": "call"
}
}
response = requests.request("POST", url, headers=headers, json=payload)
response.raise_for_status()
print(response.json())javascript
const response = await fetch('https://financegpt.dev/api/v2/quant/models/derivatives.black_scholes/run', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.FINANCEGPT_API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"input":{"spot":100,"strike":100,"risk_free_rate":0.05000000000000000277555756156289135105907917022705078125,"volatility":0.200000000000000011102230246251565404236316680908203125,"time_to_expiry_years":1,"dividend_yield":0,"option_type":"call"}})
});
if (!response.ok) throw new Error(`FinanceGPT ${response.status}`);
console.log(await response.json());php
<?php
$ch = curl_init('https://financegpt.dev/api/v2/quant/models/derivatives.black_scholes/run');
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => ['Authorization: Bearer '.getenv('FINANCEGPT_API_KEY'), 'Content-Type: application/json'], CURLOPT_POSTFIELDS => '{\"input\":{\"spot\":100,\"strike\":100,\"risk_free_rate\":0.05000000000000000277555756156289135105907917022705078125,\"volatility\":0.200000000000000011102230246251565404236316680908203125,\"time_to_expiry_years\":1,\"dividend_yield\":0,\"option_type\":\"call\"}}']);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) throw new RuntimeException($response);
echo $response;Versions & changelog
v2 published
M18 publication of this governed FinanceGPT API operation.
Ready to build?
Explorer gives immediate isolated sandbox access. Production plans require a commercial entitlement.
Create account