const res = await fetch('https://app.trdrs.co/api/account/brackets', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/account/brackets' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/account/brackets"
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/account/brackets",
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/account/brackets"
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/account/brackets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/account/brackets")
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{
"revision": 412,
"items": [
{
"id": "b41e7d2a-9c58-4f03-a6b1-2e8d5c7f0a94",
"accountId": "c3e81b5f0a9d47e2b6f14d8a2c7e9031",
"instrument": "ESU6",
"side": "buy",
"state": "active",
"clientOrderId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"entryOrderId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"positionId": null,
"qty": 2,
"filledQty": 2,
"avgEntry": 6480.5,
"takeProfits": [
{
"id": "5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75",
"rank": 1,
"price": 6485.5,
"qty": 1,
"filledQty": 0,
"state": "working",
"automation": null
}
],
"stopLosses": [
{
"id": "3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83",
"rank": 1,
"price": 6477.5,
"qty": 2,
"filledQty": 0,
"state": "working",
"automation": {
"rules": {
"breakeven": {
"triggerTicks": 8,
"plusTicks": 0
},
"trail": [
{
"triggerTicks": 16,
"distanceTicks": 8,
"frequencyTicks": 2
}
]
},
"state": "managing",
"phase": "protecting",
"pauseReason": null,
"failureReason": null
}
}
],
"orders": [
{
"id": "8f2c5a91-3d6e-4b07-a1c8-5e9f0d2b7a46",
"legId": "5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75",
"role": "target",
"pairId": "e7a40c2d-95b1-4f68-8d3e-2c1b6a0f9e57",
"qty": 1,
"filledQty": 0,
"state": "working",
"providerOrderId": "1b8e6d24-07c3-4a9f-b5e2-9d4a7c0f3e18",
"clientOrderId": "1b8e6d24-07c3-4a9f-b5e2-9d4a7c0f3e18",
"holding": null,
"rejectReason": null
},
{
"id": "2a7d9e03-6c18-4f52-b4a9-0e3c8d1f6b25",
"legId": "3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83",
"role": "stop",
"pairId": "e7a40c2d-95b1-4f68-8d3e-2c1b6a0f9e57",
"qty": 1,
"filledQty": 0,
"state": "working",
"providerOrderId": "4c0f2b87-9e15-4d63-a8b7-6f1e3d5c2a90",
"clientOrderId": "4c0f2b87-9e15-4d63-a8b7-6f1e3d5c2a90",
"holding": null,
"rejectReason": null
},
{
"id": "6e1b4c78-2f9a-4d05-9c63-b8a2e7d0f413",
"legId": "3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83",
"role": "stop",
"pairId": "9d5f2e60-4b83-4a1c-be07-3a6c9f1d8e24",
"qty": 1,
"filledQty": 0,
"state": "working",
"providerOrderId": "7a3e9c15-8d40-4f2b-91e6-c5b0a2d7f839",
"clientOrderId": "7a3e9c15-8d40-4f2b-91e6-c5b0a2d7f839",
"holding": null,
"rejectReason": null
}
],
"runner": 1,
"unprotected": 0,
"endReason": null,
"createdAt": 1787581400000,
"updatedAt": 1787581460000
}
]
}{
"error": "invalid_instrument"
}List brackets
Returns the brackets around the account’s positions: the live ones and those that ended in the last day, each with its ladders, the automation its stop losses run and the orders resting for it, and the account revision they were read at. Where a stop loss’s automation is paused, it says why nothing is moving the stop; the stop resting at the provider still protects the position while it is paused. If you already hold a snapshot, you don’t need this: the snapshot’s brackets is the same list. This read makes no call to the provider and doesn’t advance the revision.
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:read or 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/account/brackets', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/account/brackets' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/account/brackets"
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/account/brackets",
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/account/brackets"
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/account/brackets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/account/brackets")
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{
"revision": 412,
"items": [
{
"id": "b41e7d2a-9c58-4f03-a6b1-2e8d5c7f0a94",
"accountId": "c3e81b5f0a9d47e2b6f14d8a2c7e9031",
"instrument": "ESU6",
"side": "buy",
"state": "active",
"clientOrderId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"entryOrderId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"positionId": null,
"qty": 2,
"filledQty": 2,
"avgEntry": 6480.5,
"takeProfits": [
{
"id": "5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75",
"rank": 1,
"price": 6485.5,
"qty": 1,
"filledQty": 0,
"state": "working",
"automation": null
}
],
"stopLosses": [
{
"id": "3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83",
"rank": 1,
"price": 6477.5,
"qty": 2,
"filledQty": 0,
"state": "working",
"automation": {
"rules": {
"breakeven": {
"triggerTicks": 8,
"plusTicks": 0
},
"trail": [
{
"triggerTicks": 16,
"distanceTicks": 8,
"frequencyTicks": 2
}
]
},
"state": "managing",
"phase": "protecting",
"pauseReason": null,
"failureReason": null
}
}
],
"orders": [
{
"id": "8f2c5a91-3d6e-4b07-a1c8-5e9f0d2b7a46",
"legId": "5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75",
"role": "target",
"pairId": "e7a40c2d-95b1-4f68-8d3e-2c1b6a0f9e57",
"qty": 1,
"filledQty": 0,
"state": "working",
"providerOrderId": "1b8e6d24-07c3-4a9f-b5e2-9d4a7c0f3e18",
"clientOrderId": "1b8e6d24-07c3-4a9f-b5e2-9d4a7c0f3e18",
"holding": null,
"rejectReason": null
},
{
"id": "2a7d9e03-6c18-4f52-b4a9-0e3c8d1f6b25",
"legId": "3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83",
"role": "stop",
"pairId": "e7a40c2d-95b1-4f68-8d3e-2c1b6a0f9e57",
"qty": 1,
"filledQty": 0,
"state": "working",
"providerOrderId": "4c0f2b87-9e15-4d63-a8b7-6f1e3d5c2a90",
"clientOrderId": "4c0f2b87-9e15-4d63-a8b7-6f1e3d5c2a90",
"holding": null,
"rejectReason": null
},
{
"id": "6e1b4c78-2f9a-4d05-9c63-b8a2e7d0f413",
"legId": "3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83",
"role": "stop",
"pairId": "9d5f2e60-4b83-4a1c-be07-3a6c9f1d8e24",
"qty": 1,
"filledQty": 0,
"state": "working",
"providerOrderId": "7a3e9c15-8d40-4f2b-91e6-c5b0a2d7f839",
"clientOrderId": "7a3e9c15-8d40-4f2b-91e6-c5b0a2d7f839",
"holding": null,
"rejectReason": null
}
],
"runner": 1,
"unprotected": 0,
"endReason": null,
"createdAt": 1787581400000,
"updatedAt": 1787581460000
}
]
}{
"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. Omit it to use your default provider.
The account number at that provider. It must be one of your own accounts.
Response
The brackets.