const res = await fetch('https://app.trdrs.co/api/risk?broker=rithmic&account=PA-4821-07', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/risk?broker=rithmic&account=PA-4821-07' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/risk"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/risk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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"
req, _ := http.NewRequest("GET", 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.get("https://app.trdrs.co/api/risk")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/risk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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
},
"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"
}Get the risk state
Returns the five per-account controls (daily and weekly loss limits, daily and weekly profit targets, and the end-of-day close) plus the lock state the risk monitor holds for the account. These are the controls behind every 423 risk_locked a trading route answers: when one fires, the monitor flattens the account and locks trading until the period resets (daily at the 17:00 CT roll, weekly at Sunday 17:00 CT). broker is required; account names one account under a multi-account login, else the default. The same lock object streams live as the lock event on /api/account/stream.
const res = await fetch('https://app.trdrs.co/api/risk?broker=rithmic&account=PA-4821-07', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/risk?broker=rithmic&account=PA-4821-07' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/risk"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/risk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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"
req, _ := http.NewRequest("GET", 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.get("https://app.trdrs.co/api/risk")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/risk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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
},
"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"
}Authorizations
Your firm’s API key (the API calls this the tenant key; trdrs_sk_…), server-to-server only.
Query Parameters
A connected broker (rithmic, tastytrade, paper, ...). Required: risk controls are per account, never a priority default.
Pick an account within that broker. Validated against the caller's own set; out-of-set is a 400.
Response
The controls as stored and the current lock state
RiskStateResponse. The account controls as stored, and the current lock state.
RiskSettings. The five per-account controls: four loss/profit thresholds in account currency and the end-of-day close in whole minutes before the 16:00 CT session close. An enabled control always carries a positive value; a disabled one reads null.
Show child attributes
Show child attributes
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