const res = await fetch('https://app.trdrs.co/api/risk/unlock?broker=rithmic&account=PA-4821-07', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl -X POST 'https://app.trdrs.co/api/risk/unlock?broker=rithmic&account=PA-4821-07' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/risk/unlock"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/risk/unlock",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trdrs.co/api/risk/unlock"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.trdrs.co/api/risk/unlock")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/risk/unlock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"lock": {
"broker": "rithmic",
"accountNumber": "PA-4821-07",
"tradingLocked": false,
"settingsLocked": false,
"lockReason": null,
"lockWindow": null,
"tradingUnlockAt": null,
"settingsUnlockAt": null,
"triggerPnl": null,
"flattenConfirmed": false,
"monitoring": "live",
"settings": {
"broker": "rithmic",
"accountNumber": "PA-4821-07",
"dailyLossEnabled": true,
"dailyLossValue": 1000,
"weeklyLossEnabled": false,
"weeklyLossValue": null,
"dailyProfitEnabled": false,
"dailyProfitValue": null,
"weeklyProfitEnabled": false,
"weeklyProfitValue": null,
"eodCloseEnabled": true,
"eodCloseValue": 15,
"lockSettingsWhenTradingLocked": true,
"updatedAt": 1787581500
}
}
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Clear the risk lock
Clears the trading lock and the fired-control latches, so any control can protect again this period. Refused with 423 settings_locked while the account is settings-locked, so a hard lock cannot be self-cleared early. An eval_breach or firm_halt lock is not the caller’s to clear: the call succeeds and the lock stands (the evaluation lifecycle or the firm resume releases it). The body is empty.
const res = await fetch('https://app.trdrs.co/api/risk/unlock?broker=rithmic&account=PA-4821-07', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl -X POST 'https://app.trdrs.co/api/risk/unlock?broker=rithmic&account=PA-4821-07' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/risk/unlock"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/risk/unlock",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trdrs.co/api/risk/unlock"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.trdrs.co/api/risk/unlock")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/risk/unlock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"lock": {
"broker": "rithmic",
"accountNumber": "PA-4821-07",
"tradingLocked": false,
"settingsLocked": false,
"lockReason": null,
"lockWindow": null,
"tradingUnlockAt": null,
"settingsUnlockAt": null,
"triggerPnl": null,
"flattenConfirmed": false,
"monitoring": "live",
"settings": {
"broker": "rithmic",
"accountNumber": "PA-4821-07",
"dailyLossEnabled": true,
"dailyLossValue": 1000,
"weeklyLossEnabled": false,
"weeklyLossValue": null,
"dailyProfitEnabled": false,
"dailyProfitValue": null,
"weeklyProfitEnabled": false,
"weeklyProfitValue": null,
"eodCloseEnabled": true,
"eodCloseValue": 15,
"lockSettingsWhenTradingLocked": true,
"updatedAt": 1787581500
}
}
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Authorizations
Your firm’s API key (the API calls this the tenant key; trdrs_sk_…), server-to-server only.
Query Parameters
A connected broker. Required.
Pick an account within that broker. Validated against the caller's own set; out-of-set is a 400.
Response
The lock state after the unlock
RiskUnlockResponse. The lock state after the unlock.
RiskLock. The lock and monitoring state the risk monitor holds for one account. tradingLocked is the fail-closed gate every order-placing route reads (423 risk_locked while true); settingsLocked refuses control edits and the manual unlock until settingsUnlockAt.
Show child attributes
Show child attributes