Replace the strategy's connections. Each account must belong to the
PUT
/admin/strategies/{code}/connections
curl --request PUT \ --url http://localhost:3001/admin/strategies/string/connections \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '[{"account_id":"00000000-0000-0000-0000-000000000000","broker_code":"string"}]'import requests
url = "http://localhost:3001/admin/strategies/string/connections"
payload = [ { "account_id": "00000000-0000-0000-0000-000000000000", "broker_code": "string" }]headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.status_code)use std::str::FromStr;use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "http://localhost:3001/admin/strategies/string/connections";
let payload = ( json!({ "account_id": "00000000-0000-0000-0000-000000000000", "broker_code": "string" }) );
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("PUT").unwrap(), url) .headers(headers) .json(&payload) .send() .await;
let status = response.unwrap().status();
dbg!(status);}Strategy’s portfolio and sit on a connection of the named broker; a broker code may appear once.
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
Array<object>
object
account_id
required
string format: uuid
broker_code
required
string
Example generated
[ { "account_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "broker_code": "example" }]Responses
Section titled “Responses”Replaced
A broker twice, or an account of another portfolio or broker
Not found