Kill, leave the strategy reducing only, and close every position with a
POST
/admin/strategies/{code}/flatten
curl --request POST \ --url http://localhost:3001/admin/strategies/string/flatten \ --header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3001/admin/strategies/string/flatten"
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/flatten";
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);}Limit order inside its price band.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”code
required
string
Strategy code
Responses
Section titled “Responses”Flattening
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