update_strategy
PATCH
/admin/strategies/{code}
curl --request PATCH \ --url http://localhost:3001/admin/strategies/string \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{"allowed_addresses":null,"dead_man_secs":0,"follow_environment":null,"kill_when_unmonitored":false,"max_order_notional":0,"max_order_quantity":0,"max_orders_per_sec":0,"max_position_notional":0,"max_position_quantity":0,"mode":null,"name":null,"price_band_pct":0,"sender_comp_id":null,"target_comp_id":null}'import requests
url = "http://localhost:3001/admin/strategies/string"
payload = { "allowed_addresses": None, "dead_man_secs": 0, "follow_environment": None, "kill_when_unmonitored": False, "max_order_notional": 0, "max_order_quantity": 0, "max_orders_per_sec": 0, "max_position_notional": 0, "max_position_quantity": 0, "mode": None, "name": None, "price_band_pct": 0, "sender_comp_id": None, "target_comp_id": None}headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())use std::str::FromStr;use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "http://localhost:3001/admin/strategies/string";
let payload = json!({ "allowed_addresses": json!(null), "dead_man_secs": 0, "follow_environment": json!(null), "kill_when_unmonitored": false, "max_order_notional": 0, "max_order_quantity": 0, "max_orders_per_sec": 0, "max_position_notional": 0, "max_position_quantity": 0, "mode": json!(null), "name": json!(null), "price_band_pct": 0, "sender_comp_id": json!(null), "target_comp_id": json!(null) });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”code
required
string
Strategy code
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
allowed_addresses
Comma-separated IP addresses; empty means any.
string
dead_man_secs
integer format: int32
follow_environment
string
kill_when_unmonitored
boolean
max_order_notional
number format: double
max_order_quantity
number format: double
max_orders_per_sec
integer format: int32
max_position_notional
number format: double
max_position_quantity
number format: double
mode
VIA_OMS (default) or COLOCATED.
string
name
string
price_band_pct
number format: double
sender_comp_id
string
target_comp_id
string
Example generated
{ "allowed_addresses": "example", "dead_man_secs": 1, "follow_environment": "example", "kill_when_unmonitored": true, "max_order_notional": 1, "max_order_quantity": 1, "max_orders_per_sec": 1, "max_position_notional": 1, "max_position_quantity": 1, "mode": "example", "name": "example", "price_band_pct": 1, "sender_comp_id": "example", "target_comp_id": "example"}Responses
Section titled “Responses”Updated
Media typeapplication/json
object
acked_limits_version
required
integer format: int64
alarm
string
allowed_addresses
required
Comma-separated IP addresses; empty means any.
string
cancelled_per_min
required
integer format: int64
code
required
string
dead_man_secs
required
integer format: int32
fighting
required
boolean
follow_environment
string
has_fix_password
required
boolean
has_follow_credentials
required
boolean
kill_ack_late
required
Killed, and the strategy has not acknowledged it within 5 s.
boolean
kill_when_unmonitored
required
boolean
last_heard_secs
integer format: int64
last_logon_error
string
limits_version
required
integer format: int64
link_connected
required
Co-located strategies: the control link and the followed account.
boolean
max_order_notional
number format: double
max_order_quantity
number format: double
max_orders_per_sec
integer format: int32
max_position_notional
number format: double
max_position_quantity
number format: double
mode
required
string
name
required
string
open_orders
required
integer format: int64
owner_principal_id
required
string format: uuid
placed_per_min
required
integer format: int64
portfolio_id
required
string format: uuid
price_band_pct
number format: double
principal_id
required
string format: uuid
rest_enabled
required
boolean
sender_comp_id
required
string
session_live
required
Whether its FIX session is logged on right now.
boolean
state
required
string
target_comp_id
required
string
Example generated
{ "acked_limits_version": 1, "alarm": "example", "allowed_addresses": "example", "cancelled_per_min": 1, "code": "example", "dead_man_secs": 1, "fighting": true, "follow_environment": "example", "has_fix_password": true, "has_follow_credentials": true, "kill_ack_late": true, "kill_when_unmonitored": true, "last_heard_secs": 1, "last_logon_error": "example", "limits_version": 1, "link_connected": true, "max_order_notional": 1, "max_order_quantity": 1, "max_orders_per_sec": 1, "max_position_notional": 1, "max_position_quantity": 1, "mode": "example", "name": "example", "open_orders": 1, "owner_principal_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "placed_per_min": 1, "portfolio_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "price_band_pct": 1, "principal_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rest_enabled": true, "sender_comp_id": "example", "session_live": true, "state": "example", "target_comp_id": "example"}Not found