Get trade execution state
curl --request GET \
--url https://api.example.com/api/graph/v1/execution/{execution_id}import requests
url = "https://api.example.com/api/graph/v1/execution/{execution_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/graph/v1/execution/{execution_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/graph/v1/execution/{execution_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/graph/v1/execution/{execution_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/graph/v1/execution/{execution_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/execution/{execution_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"execution": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "<string>",
"direction": "long",
"execution_mode": "assisted",
"status": "strategy_generated",
"debate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"strategy_name": "<string>",
"instrument_type": "option",
"contract_symbol": "<string>",
"entry_order_id": "<string>",
"entry_price": "<string>",
"entry_quantity": 123,
"entry_filled_at": "2023-11-07T05:31:56Z",
"exit_order_id": "<string>",
"exit_price": "<string>",
"exit_quantity": 123,
"exit_filled_at": "2023-11-07T05:31:56Z",
"exit_reason": "<string>",
"realized_pnl": "<string>",
"realized_pnl_pct": "<string>",
"max_favorable_excursion": "<string>",
"max_adverse_excursion": "<string>",
"risk_dollars": "<string>",
"initial_stop": "<string>",
"current_stop": "<string>",
"trading_mode": "paper",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"strategy_plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trade_execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"strategy_name": "<string>",
"direction": "long",
"entry_plan": {},
"exit_plan": {},
"position_sizing": {},
"contract_symbol": "<string>",
"contract_type": "<string>",
"strike": "<string>",
"expiration": "<string>",
"target_delta": "<string>",
"invalidation_price": "<string>",
"model_used": "<string>",
"tokens_used": 123,
"generation_latency_ms": 123,
"created_at": "2023-11-07T05:31:56Z"
},
"recent_state_log": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trade_execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"from_status": "strategy_generated",
"to_status": "strategy_generated",
"trigger": "<string>",
"agent_phase": "strategy",
"reasoning": "<string>",
"metadata": {}
}
],
"risk_validation": {
"passed": true,
"checks": [
{
"rule_name": "<string>",
"passed": true,
"action": "<string>",
"message": "<string>",
"current_value": "<string>",
"limit_value": "<string>"
}
],
"blocked_reasons": [
"<string>"
],
"size_modifier": "1.0",
"sized_position_pct": 123,
"sizing_adjustments": {},
"or05_decision": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Execution
Get trade execution state
Retrieve the current state of a trade execution including strategy plan and recent state log.
GET
/
api
/
graph
/
v1
/
execution
/
{execution_id}
Get trade execution state
curl --request GET \
--url https://api.example.com/api/graph/v1/execution/{execution_id}import requests
url = "https://api.example.com/api/graph/v1/execution/{execution_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/graph/v1/execution/{execution_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/graph/v1/execution/{execution_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/graph/v1/execution/{execution_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/graph/v1/execution/{execution_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/execution/{execution_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"execution": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "<string>",
"direction": "long",
"execution_mode": "assisted",
"status": "strategy_generated",
"debate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"strategy_name": "<string>",
"instrument_type": "option",
"contract_symbol": "<string>",
"entry_order_id": "<string>",
"entry_price": "<string>",
"entry_quantity": 123,
"entry_filled_at": "2023-11-07T05:31:56Z",
"exit_order_id": "<string>",
"exit_price": "<string>",
"exit_quantity": 123,
"exit_filled_at": "2023-11-07T05:31:56Z",
"exit_reason": "<string>",
"realized_pnl": "<string>",
"realized_pnl_pct": "<string>",
"max_favorable_excursion": "<string>",
"max_adverse_excursion": "<string>",
"risk_dollars": "<string>",
"initial_stop": "<string>",
"current_stop": "<string>",
"trading_mode": "paper",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"strategy_plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trade_execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"strategy_name": "<string>",
"direction": "long",
"entry_plan": {},
"exit_plan": {},
"position_sizing": {},
"contract_symbol": "<string>",
"contract_type": "<string>",
"strike": "<string>",
"expiration": "<string>",
"target_delta": "<string>",
"invalidation_price": "<string>",
"model_used": "<string>",
"tokens_used": 123,
"generation_latency_ms": 123,
"created_at": "2023-11-07T05:31:56Z"
},
"recent_state_log": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trade_execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"from_status": "strategy_generated",
"to_status": "strategy_generated",
"trigger": "<string>",
"agent_phase": "strategy",
"reasoning": "<string>",
"metadata": {}
}
],
"risk_validation": {
"passed": true,
"checks": [
{
"rule_name": "<string>",
"passed": true,
"action": "<string>",
"message": "<string>",
"current_value": "<string>",
"limit_value": "<string>"
}
],
"blocked_reasons": [
"<string>"
],
"size_modifier": "1.0",
"sized_position_pct": 123,
"sizing_adjustments": {},
"or05_decision": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Response
Execution state returned
Full trade execution state response.
Current trade execution state
Show child attributes
Show child attributes
Active strategy plan
Show child attributes
Show child attributes
Recent state transition log entries (last 10)
Show child attributes
Show child attributes
Latest risk validation result
Show child attributes
Show child attributes