TypeScript
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": "7a1f4c93b28d05e6f1a3c7d9b4e28f60",
"instrument": "ESU6",
"side": "buy",
"state": "pending_entry",
"clientOrderId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"entryOrderId": "234992187",
"qty": 2,
"filledQty": 0,
"legs": [
{
"id": "3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83",
"role": "stop",
"seq": 1,
"qty": 1,
"filledQty": 0,
"state": "pre_armed",
"brokerOrderId": null,
"ocoGroup": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d:oco",
"triggerPrice": 6477.5,
"limitPrice": null,
"parentOrderId": "234992187",
"parentInstrument": "ESU6",
"rejectReason": null
},
{
"id": "5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75",
"role": "target",
"seq": 1,
"qty": 1,
"filledQty": 0,
"state": "pre_armed",
"brokerOrderId": null,
"ocoGroup": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d:oco",
"triggerPrice": null,
"limitPrice": 6485.5,
"parentOrderId": "234992187",
"parentInstrument": "ESU6",
"rejectReason": null
}
],
"endReason": null,
"createdAt": 1787581400000,
"updatedAt": 1787581400000
}
]
}{
"error": "invalid_instrument"
}Account
List position exits
Returns the exits recorded around the account’s positions — the brackets array in the snapshot — with each entry’s legs and their states, at the account revision they were read at. A client that already holds a snapshot does not need this route: the same array is in the snapshot, at the revision that names it. This read takes no venue reading and allocates no revision.
GET
/
api
/
account
/
brackets
TypeScript
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": "7a1f4c93b28d05e6f1a3c7d9b4e28f60",
"instrument": "ESU6",
"side": "buy",
"state": "pending_entry",
"clientOrderId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"entryOrderId": "234992187",
"qty": 2,
"filledQty": 0,
"legs": [
{
"id": "3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83",
"role": "stop",
"seq": 1,
"qty": 1,
"filledQty": 0,
"state": "pre_armed",
"brokerOrderId": null,
"ocoGroup": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d:oco",
"triggerPrice": 6477.5,
"limitPrice": null,
"parentOrderId": "234992187",
"parentInstrument": "ESU6",
"rejectReason": null
},
{
"id": "5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75",
"role": "target",
"seq": 1,
"qty": 1,
"filledQty": 0,
"state": "pre_armed",
"brokerOrderId": null,
"ocoGroup": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d:oco",
"triggerPrice": null,
"limitPrice": 6485.5,
"parentOrderId": "234992187",
"parentInstrument": "ESU6",
"rejectReason": null
}
],
"endReason": null,
"createdAt": 1787581400000,
"updatedAt": 1787581400000
}
]
}{
"error": "invalid_instrument"
}Authorizations
Your firm’s API key (the API calls this the tenant key; trdrs_sk_…), server-to-server only.