const res = await fetch('https://app.trdrs.co/api/partner/accounts/risk', {
method: 'PUT',
headers: {
'content-type': 'application/json',
Authorization: `Bearer ${process.env.TRDRS_API_KEY}`,
},
body: JSON.stringify({
"accountNumber": "EVAL-7C21A9",
"dailyLossEnabled": true,
"dailyLossValue": 1000,
"eodCloseEnabled": true,
"eodCloseValue": 15
}),
})
const data = await res.json()curl -X PUT 'https://app.trdrs.co/api/partner/accounts/risk' \
-H "Authorization: Bearer $TRDRS_API_KEY" \
-H 'content-type: application/json' \
-d '{"accountNumber":"EVAL-7C21A9","dailyLossEnabled":true,"dailyLossValue":1000,"eodCloseEnabled":true,"eodCloseValue":15}'import requests
url = "https://app.trdrs.co/api/partner/accounts/risk"
payload = {
"accountNumber": "EVAL-7C21A9",
"dailyLossEnabled": True,
"dailyLossValue": 1000,
"eodCloseEnabled": True,
"eodCloseValue": 15
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/partner/accounts/risk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'accountNumber' => 'EVAL-7C21A9',
'dailyLossEnabled' => true,
'dailyLossValue' => 1000,
'eodCloseEnabled' => true,
'eodCloseValue' => 15
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trdrs.co/api/partner/accounts/risk"
payload := strings.NewReader("{\n \"accountNumber\": \"EVAL-7C21A9\",\n \"dailyLossEnabled\": true,\n \"dailyLossValue\": 1000,\n \"eodCloseEnabled\": true,\n \"eodCloseValue\": 15\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.trdrs.co/api/partner/accounts/risk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountNumber\": \"EVAL-7C21A9\",\n \"dailyLossEnabled\": true,\n \"dailyLossValue\": 1000,\n \"eodCloseEnabled\": true,\n \"eodCloseValue\": 15\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/partner/accounts/risk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountNumber\": \"EVAL-7C21A9\",\n \"dailyLossEnabled\": true,\n \"dailyLossValue\": 1000,\n \"eodCloseEnabled\": true,\n \"eodCloseValue\": 15\n}"
response = http.request(request)
puts response.read_body{
"accountNumber": "EVAL-7C21A9",
"settings": {
"dailyLossEnabled": true,
"dailyLossValue": 1000,
"weeklyLossEnabled": false,
"weeklyLossValue": null,
"dailyProfitEnabled": false,
"dailyProfitValue": null,
"weeklyProfitEnabled": false,
"weeklyProfitValue": null,
"eodCloseEnabled": true,
"eodCloseValue": 15,
"updatedAt": 1787582400
},
"halted": false,
"lockReason": null
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Set an account’s risk controls
Replaces the five controls on one firm-issued account in a single write. An enabled control needs a positive value (loss/profit in account currency; the EOD close in whole minutes before the 16:00 CT close, 1–240); a disabled control’s value is ignored. Enforcement is live from the write: the risk monitor re-arms immediately, and a control that fires flattens and locks the account exactly as if the trader had set it themselves.
This writes the same settings row the trader edits — last write wins, and the response returns the state as stored so your system can mirror it. The trader’s own “prevent changes while locked” preference is not on this surface and survives your write.
const res = await fetch('https://app.trdrs.co/api/partner/accounts/risk', {
method: 'PUT',
headers: {
'content-type': 'application/json',
Authorization: `Bearer ${process.env.TRDRS_API_KEY}`,
},
body: JSON.stringify({
"accountNumber": "EVAL-7C21A9",
"dailyLossEnabled": true,
"dailyLossValue": 1000,
"eodCloseEnabled": true,
"eodCloseValue": 15
}),
})
const data = await res.json()curl -X PUT 'https://app.trdrs.co/api/partner/accounts/risk' \
-H "Authorization: Bearer $TRDRS_API_KEY" \
-H 'content-type: application/json' \
-d '{"accountNumber":"EVAL-7C21A9","dailyLossEnabled":true,"dailyLossValue":1000,"eodCloseEnabled":true,"eodCloseValue":15}'import requests
url = "https://app.trdrs.co/api/partner/accounts/risk"
payload = {
"accountNumber": "EVAL-7C21A9",
"dailyLossEnabled": True,
"dailyLossValue": 1000,
"eodCloseEnabled": True,
"eodCloseValue": 15
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/partner/accounts/risk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'accountNumber' => 'EVAL-7C21A9',
'dailyLossEnabled' => true,
'dailyLossValue' => 1000,
'eodCloseEnabled' => true,
'eodCloseValue' => 15
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trdrs.co/api/partner/accounts/risk"
payload := strings.NewReader("{\n \"accountNumber\": \"EVAL-7C21A9\",\n \"dailyLossEnabled\": true,\n \"dailyLossValue\": 1000,\n \"eodCloseEnabled\": true,\n \"eodCloseValue\": 15\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.trdrs.co/api/partner/accounts/risk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountNumber\": \"EVAL-7C21A9\",\n \"dailyLossEnabled\": true,\n \"dailyLossValue\": 1000,\n \"eodCloseEnabled\": true,\n \"eodCloseValue\": 15\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/partner/accounts/risk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountNumber\": \"EVAL-7C21A9\",\n \"dailyLossEnabled\": true,\n \"dailyLossValue\": 1000,\n \"eodCloseEnabled\": true,\n \"eodCloseValue\": 15\n}"
response = http.request(request)
puts response.read_body{
"accountNumber": "EVAL-7C21A9",
"settings": {
"dailyLossEnabled": true,
"dailyLossValue": 1000,
"weeklyLossEnabled": false,
"weeklyLossValue": null,
"dailyProfitEnabled": false,
"dailyProfitValue": null,
"weeklyProfitEnabled": false,
"weeklyProfitValue": null,
"eodCloseEnabled": true,
"eodCloseValue": 15,
"updatedAt": 1787582400
},
"halted": false,
"lockReason": null
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Authorizations
A partner-scoped API key (trdrs_sk_…), issued to a trdrs Connect partner firm and accepted only under /api/partner/. Same format as the firm (tenant) key, different scope: a firm API key is refused here, and this key is refused everywhere else.
Body
PartnerRiskSetRequest. Replaces the account’s five controls in one write. An enabled control must carry a positive value; a disabled control’s value is ignored and stored as null.
A firm-issued account number.
Whole minutes before the 16:00 CT close, 1–240.
Response
The controls as stored + current lock state (PartnerRiskStateResponse)
PartnerRiskStateResponse. The account’s risk controls plus whether trading is currently blocked, and by what.
PartnerRiskSettings. The five per-account controls, each a toggle plus a threshold. Loss/profit values are in account currency and positive; a disabled control’s value is null. eodCloseValue is minutes before the 16:00 CT session close, 1–240.
Show child attributes
Show child attributes
{
"dailyLossEnabled": true,
"dailyLossValue": 1000,
"weeklyLossEnabled": false,
"weeklyLossValue": null,
"dailyProfitEnabled": false,
"dailyProfitValue": null,
"weeklyProfitEnabled": false,
"weeklyProfitValue": null,
"eodCloseEnabled": true,
"eodCloseValue": 15,
"updatedAt": 1787582400
}
True when trading on the account is currently blocked — by your halt, a risk trigger, or an evaluation breach.
Why trading is blocked: firm_halt (yours), daily_loss, weekly_loss, daily_profit, weekly_profit, eod_close, or eval_breach. Null when trading.