Store the OMS's follow-only key for a co-located strategy, sealed with the
PUT
/admin/strategies/{code}/follow-credentials
curl --request PUT \ --url http://localhost:3001/admin/strategies/string/follow-credentials \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{"api_key":"string","private_key":"string"}'import requests
url = "http://localhost:3001/admin/strategies/string/follow-credentials"
payload = { "api_key": "string", "private_key": "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/follow-credentials";
let payload = json!({ "api_key": "string", "private_key": "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);}Master key. It is never returned.
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
api_key
required
The OMS’s own key on the strategy’s venue account (read + cancel).
string
private_key
required
Its Ed25519 private key (PEM).
string
Example generated
{ "api_key": "example", "private_key": "example"}Responses
Section titled “Responses”Stored
Not found
No master key