Start an analysis
curl --request POST \
--url http://127.0.0.1:8900/v1/analyses \
--header 'Content-Type: application/json' \
--data '
{
"ticker": "NVDA",
"trade_date": "2024-05-10",
"asset_type": "stock",
"analysts": [],
"max_debate_rounds": 5
}
'import requests
url = "http://127.0.0.1:8900/v1/analyses"
payload = {
"ticker": "NVDA",
"trade_date": "2024-05-10",
"asset_type": "stock",
"analysts": [],
"max_debate_rounds": 5
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
ticker: 'NVDA',
trade_date: '2024-05-10',
asset_type: 'stock',
analysts: [],
max_debate_rounds: 5
})
};
fetch('http://127.0.0.1:8900/v1/analyses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8900",
CURLOPT_URL => "http://127.0.0.1:8900/v1/analyses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ticker' => 'NVDA',
'trade_date' => '2024-05-10',
'asset_type' => 'stock',
'analysts' => [
],
'max_debate_rounds' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:8900/v1/analyses"
payload := strings.NewReader("{\n \"ticker\": \"NVDA\",\n \"trade_date\": \"2024-05-10\",\n \"asset_type\": \"stock\",\n \"analysts\": [],\n \"max_debate_rounds\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1:8900/v1/analyses")
.header("Content-Type", "application/json")
.body("{\n \"ticker\": \"NVDA\",\n \"trade_date\": \"2024-05-10\",\n \"asset_type\": \"stock\",\n \"analysts\": [],\n \"max_debate_rounds\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8900/v1/analyses")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ticker\": \"NVDA\",\n \"trade_date\": \"2024-05-10\",\n \"asset_type\": \"stock\",\n \"analysts\": [],\n \"max_debate_rounds\": 5\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "queued",
"poll": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>"
}Analyses
Start an analysis
Queue an analysis and return immediately with 202 Accepted.
The response is a job reference, not a result — poll poll until status
leaves queued/running.
POST
/
v1
/
analyses
Start an analysis
curl --request POST \
--url http://127.0.0.1:8900/v1/analyses \
--header 'Content-Type: application/json' \
--data '
{
"ticker": "NVDA",
"trade_date": "2024-05-10",
"asset_type": "stock",
"analysts": [],
"max_debate_rounds": 5
}
'import requests
url = "http://127.0.0.1:8900/v1/analyses"
payload = {
"ticker": "NVDA",
"trade_date": "2024-05-10",
"asset_type": "stock",
"analysts": [],
"max_debate_rounds": 5
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
ticker: 'NVDA',
trade_date: '2024-05-10',
asset_type: 'stock',
analysts: [],
max_debate_rounds: 5
})
};
fetch('http://127.0.0.1:8900/v1/analyses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8900",
CURLOPT_URL => "http://127.0.0.1:8900/v1/analyses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ticker' => 'NVDA',
'trade_date' => '2024-05-10',
'asset_type' => 'stock',
'analysts' => [
],
'max_debate_rounds' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:8900/v1/analyses"
payload := strings.NewReader("{\n \"ticker\": \"NVDA\",\n \"trade_date\": \"2024-05-10\",\n \"asset_type\": \"stock\",\n \"analysts\": [],\n \"max_debate_rounds\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1:8900/v1/analyses")
.header("Content-Type", "application/json")
.body("{\n \"ticker\": \"NVDA\",\n \"trade_date\": \"2024-05-10\",\n \"asset_type\": \"stock\",\n \"analysts\": [],\n \"max_debate_rounds\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8900/v1/analyses")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ticker\": \"NVDA\",\n \"trade_date\": \"2024-05-10\",\n \"asset_type\": \"stock\",\n \"analysts\": [],\n \"max_debate_rounds\": 5\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "queued",
"poll": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>"
}Headers
Body
application/json
Instrument symbol, e.g. NVDA or BTC.
Required string length:
1 - 32Example:
"NVDA"
The as-of date, YYYY-MM-DD. The graph reasons as though standing on this date, so a future one yields nothing useful.
Pattern:
^\d{4}-\d{2}-\d{2}$Example:
"2024-05-10"
Selects the stock or crypto pipeline.
Available options:
stock, crypto Analyst agents to include. Fewer analysts is cheaper and faster, and narrows what the debate can consider.
Minimum array length:
1The analyst agents available to a run.
Available options:
market, social, news, fundamentals Overrides TRADINGAGENTS_MAX_DEBATE_ROUNDS for this run. Cost scales roughly linearly with it.
Required range:
1 <= x <= 10