const res = await fetch('https://app.trdrs.co/api/risk/unlock?provider=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?provider=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": {
"provider": "rithmic",
"accountNumber": "PA-4821-07",
"tradingLocked": false,
"settingsLocked": false,
"lockReason": null,
"lockWindow": null,
"tradingUnlockAt": null,
"settingsUnlockAt": null,
"triggerPnl": null,
"flattenConfirmed": false,
"monitoring": "live",
"clearable": true,
"settings": {
"provider": "rithmic",
"accountNumber": "PA-4821-07",
"dailyLossEnabled": false,
"dailyLossValue": null,
"weeklyLossEnabled": false,
"weeklyLossValue": null,
"dailyProfitEnabled": false,
"dailyProfitValue": null,
"weeklyProfitEnabled": false,
"weeklyProfitValue": null,
"eodCloseEnabled": false,
"eodCloseValue": null,
"lockSettingsWhenTradingLocked": false,
"updatedAt": 0
}
}
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Clear the risk lock (deprecated)
Deprecated: removed after 2026-10-30. No lock is cleared by hand now. While the account’s trading is locked the call is refused with 409 risk_lock_active, and otherwise it answers with the lock state, which is open. The body is empty.
Required key: Trading API key. A Connect app’s backend can also send it with the app’s API key, and a venue’s backend with its Venue key, which carries trader:trade, each naming one of its own traders in x-trdrs-trader: it then runs on that trader’s own accounts.
const res = await fetch('https://app.trdrs.co/api/risk/unlock?provider=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?provider=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": {
"provider": "rithmic",
"accountNumber": "PA-4821-07",
"tradingLocked": false,
"settingsLocked": false,
"lockReason": null,
"lockWindow": null,
"tradingUnlockAt": null,
"settingsUnlockAt": null,
"triggerPnl": null,
"flattenConfirmed": false,
"monitoring": "live",
"clearable": true,
"settings": {
"provider": "rithmic",
"accountNumber": "PA-4821-07",
"dailyLossEnabled": false,
"dailyLossValue": null,
"weeklyLossEnabled": false,
"weeklyLossValue": null,
"dailyProfitEnabled": false,
"dailyProfitValue": null,
"weeklyProfitEnabled": false,
"weeklyProfitValue": null,
"eodCloseEnabled": false,
"eodCloseValue": null,
"lockSettingsWhenTradingLocked": false,
"updatedAt": 0
}
}
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Authorizations
The Trading API key (trdrs_sk_…), for market data, orders and account state on the accounts its owner holds. Use it server-to-server, and keep it on your server. Its scope is named trading in the API.
Query Parameters
The provider the account is at. Required.
The account number, when the login holds more than one. It must be one of your own accounts, or the call is refused with 400.
Response
Nothing is locked. The body gives the lock state now.
The account's lock state after the unlock call, which clears nothing.
The lock state now.
Show child attributes
Show child attributes