const res = await fetch('https://app.trdrs.co/api/trading/actions', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/trading/actions' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/trading/actions"
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/trading/actions",
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/trading/actions"
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/trading/actions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/trading/actions")
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{
"instrument": "ES",
"actions": {
"open": {
"allowed": false,
"refusal": {
"code": "futures_exposure_refused",
"params": {
"instrument": "ES"
},
"message": "the paper book takes no new ES exposure: its futures positions are keyed by root, not by dated contract, so it cannot say which contract a new order would trade; an existing position can still be closed while its contract is priced"
}
},
"protect": {
"allowed": true,
"refusal": null
},
"reduce": {
"allowed": true,
"refusal": null
},
"close": {
"allowed": true,
"refusal": null
},
"flatten": {
"allowed": true,
"refusal": null
},
"cancel": {
"allowed": true,
"refusal": null
}
},
"checkedAt": 1788006720
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Get what the account may do
Returns, for one instrument or for the whole account, whether each trading action is allowed right now: open, reduce, close, protect, flatten and cancel, with the refusal each blocked action would get. Read it to disable what would be refused and say why before anything is sent. It runs the same checks an order runs, in the same order, but sends nothing, so the order is still checked again when you send it.
Required key: Trading API key.
const res = await fetch('https://app.trdrs.co/api/trading/actions', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/trading/actions' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/trading/actions"
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/trading/actions",
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/trading/actions"
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/trading/actions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/trading/actions")
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{
"instrument": "ES",
"actions": {
"open": {
"allowed": false,
"refusal": {
"code": "futures_exposure_refused",
"params": {
"instrument": "ES"
},
"message": "the paper book takes no new ES exposure: its futures positions are keyed by root, not by dated contract, so it cannot say which contract a new order would trade; an existing position can still be closed while its contract is priced"
}
},
"protect": {
"allowed": true,
"refusal": null
},
"reduce": {
"allowed": true,
"refusal": null
},
"close": {
"allowed": true,
"refusal": null
},
"flatten": {
"allowed": true,
"refusal": null
},
"cancel": {
"allowed": true,
"refusal": null
}
},
"checkedAt": 1788006720
}{
"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 only, never in a browser. Its scope is named tenant in the API.
Query Parameters
The provider the account is at, such as rithmic or paper. Omit it to use your default provider. An unknown value is refused with 400, never replaced with another provider.
The account number at that provider. It must be one of your own accounts, or the call is refused with 400.
The instrument to check. Omit it for the verdicts across the whole account.
Response
One verdict per action. The checks run in this order: whether live trading is switched on (feature_disabled), the account's holds (risk_locked), the asset classes the provider may trade, an issued account's venue conditions, the account's settings at its provider, and the paper book's product rules. Anything that depends on the order itself or the moment, such as its size, a venue limit or whether the price is fresh, is checked only when you send the order, and a cancel is never refused by a standing rule. An account bound to a risk policy that is held only because an instrument it holds has had no price yet shows that hold here (risk_locked, with risk_uncovered). When you send an order, one that adds to that instrument is refused as market_data_unavailable, and one that adds to any other instrument as risk_locked.
What the account may do right now, as one verdict per action. Each verdict is the answer the route that carries the action would give. Without an instrument, open, reduce, close and protect say what stops them on every instrument, and flatten says what stops flattening the whole account. On the paper book, flattening the account closes every position it can, and each position's own verdict says which one it can't. A feature the provider doesn't support at all is stated in the account's capabilities, not here.
The instrument the verdicts are for, as you requested it, or null for the account-wide verdicts.
One verdict per action. Live trading can be switched off, and then every order through POST /api/trading/order is refused, so open and reduce both follow that switch. A risk hold (risk_locked) or a reconciliation hold (reconciliation_hold) refuses an entry. A reduce-only order passes both holds where the provider enforces reduce-only, so reduce follows the holds only where it doesn't. On an account a venue issued, the venue lets a reduction through every entry check. The close route is not stopped by the switch. Under a hold, a close passes only where the provider enforces it as reduce-only, so close follows the hold elsewhere, while flatten and cancel stay available.
Show child attributes
Show child attributes
When the verdicts were worked out, in epoch seconds.