Halt the strategy, refuse its REST token, cancel every open order and log
POST
/admin/strategies/{code}/kill
curl --request POST \ --url http://localhost:3001/admin/strategies/string/kill \ --header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3001/admin/strategies/string/kill"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.json())use reqwest;
#[tokio::main]pub async fn main() { let url = "http://localhost:3001/admin/strategies/string/kill";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.post(url) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}Its FIX session out. Positions are left as they are.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”code
required
string
Strategy code
Responses
Section titled “Responses”Killed
Media typeapplication/json
What a control action did, for the cockpit.
object
cancel_failures
required
Array<string>
cancelled
required
integer
flatten_orders
required
integer
skipped
required
Array<string>
Example generated
{ "cancel_failures": [ "example" ], "cancelled": 1, "flatten_orders": 1, "skipped": [ "example" ]}Not found