Perform execution action
curl --request PATCH \
--url https://api.example.com/api/graph/v1/execution/{execution_id}/action \
--header 'Content-Type: application/json' \
--data '{
"params": {}
}'import requests
url = "https://api.example.com/api/graph/v1/execution/{execution_id}/action"
payload = { "params": {} }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({params: {}})
};
fetch('https://api.example.com/api/graph/v1/execution/{execution_id}/action', 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}/action",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'params' => [
]
]),
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 := "https://api.example.com/api/graph/v1/execution/{execution_id}/action"
payload := strings.NewReader("{\n \"params\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/api/graph/v1/execution/{execution_id}/action")
.header("Content-Type", "application/json")
.body("{\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/execution/{execution_id}/action")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"params\": {}\n}"
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
Perform execution action
Perform a user-initiated action on a trade execution.
## Available Actions
- **disarm**: Cancel awaiting entry, return to cancelled state
- **force_entry**: Force immediate market entry (bypasses entry conditions)
- **close**: Close an open position at market
- **cancel**: Cancel pending orders
- **tighten_stop**: Adjust stop loss tighter (params: {stop_price: float})
PATCH
/
api
/
graph
/
v1
/
execution
/
{execution_id}
/
action
Perform execution action
curl --request PATCH \
--url https://api.example.com/api/graph/v1/execution/{execution_id}/action \
--header 'Content-Type: application/json' \
--data '{
"params": {}
}'import requests
url = "https://api.example.com/api/graph/v1/execution/{execution_id}/action"
payload = { "params": {} }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({params: {}})
};
fetch('https://api.example.com/api/graph/v1/execution/{execution_id}/action', 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}/action",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'params' => [
]
]),
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 := "https://api.example.com/api/graph/v1/execution/{execution_id}/action"
payload := strings.NewReader("{\n \"params\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/api/graph/v1/execution/{execution_id}/action")
.header("Content-Type", "application/json")
.body("{\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/execution/{execution_id}/action")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"params\": {}\n}"
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
Body
application/json
Response
Action performed successfully
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