TypeScript
const res = await fetch('https://app.trdrs.co/api/account/managed-exits', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/account/managed-exits' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/account/managed-exits"
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/managed-exits",
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/managed-exits"
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/managed-exits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/account/managed-exits")
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": "9d2b6a30-4e17-4c85-b0f3-6a1c8e5d7204",
"accountId": "7a1f4c93b28d05e6f1a3c7d9b4e28f60",
"bracketId": "b41e7d2a-9c58-4f03-a6b1-2e8d5c7f0a94",
"planId": "0f6c2d18-7b4a-4a3e-9d21-8c5e4b0a9f37",
"planRevision": "q2Jm4XxT0aVnR7cLp1sZfE9d",
"instrument": "ESU6",
"side": "buy",
"state": "pending",
"phase": "awaiting_entry",
"actionable": true,
"stopLevel": null,
"targetLevels": [
6485.5
],
"relatedOrderIds": [
"234992187"
],
"pauseReason": null,
"failureReason": null,
"asOfRevision": 4831
}
]
}{
"error": "invalid_instrument"
}Account
List managed stops
Returns the stops trdrs is moving for the account, such as a move to breakeven or a trailing stop, with the phase each has reached. Where one is paused, it says why nothing is moving the stop. The stop resting at the market still protects the position while it is paused.
Required key: Trading API key.
GET
/
api
/
account
/
managed-exits
TypeScript
const res = await fetch('https://app.trdrs.co/api/account/managed-exits', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/account/managed-exits' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/account/managed-exits"
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/managed-exits",
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/managed-exits"
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/managed-exits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/account/managed-exits")
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": "9d2b6a30-4e17-4c85-b0f3-6a1c8e5d7204",
"accountId": "7a1f4c93b28d05e6f1a3c7d9b4e28f60",
"bracketId": "b41e7d2a-9c58-4f03-a6b1-2e8d5c7f0a94",
"planId": "0f6c2d18-7b4a-4a3e-9d21-8c5e4b0a9f37",
"planRevision": "q2Jm4XxT0aVnR7cLp1sZfE9d",
"instrument": "ESU6",
"side": "buy",
"state": "pending",
"phase": "awaiting_entry",
"actionable": true,
"stopLevel": null,
"targetLevels": [
6485.5
],
"relatedOrderIds": [
"234992187"
],
"pauseReason": null,
"failureReason": null,
"asOfRevision": 4831
}
]
}{
"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. Omit it to use your default provider.
The account number at that provider. It must be one of your own accounts.
Response
The managed stops.