const res = await fetch('https://sandbox.trdrs.co/api/connect/links/{linkId}', {
method: 'DELETE',
headers: {
'content-type': 'application/json',
Authorization: `Bearer ${process.env.TRDRS_API_KEY}`,
"Idempotency-Key": "example-request-1",
},
body: JSON.stringify({}),
})
const data = await res.json()curl -X DELETE 'https://sandbox.trdrs.co/api/connect/links/{linkId}' \
-H "Authorization: Bearer $TRDRS_API_KEY" \
-H 'Idempotency-Key: example-request-1' \
-H 'content-type: application/json' \
-d '{}'import requests
url = "https://sandbox.trdrs.co/api/connect/links/{linkId}"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.trdrs.co/api/connect/links/{linkId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.trdrs.co/api/connect/links/{linkId}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sandbox.trdrs.co/api/connect/links/{linkId}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.trdrs.co/api/connect/links/{linkId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"link": {
"id": "00000000-0000-0000-0000-000000000001",
"state": "connected",
"trader": "trader-8841",
"result": {
"status": "connected",
"accountId": "4f1c2a9b8e7d6c5b4a39281706f5e4d3"
},
"expiresAt": "2026-09-14T12:00:00.000Z",
"createdAt": "2026-09-14T12:00:00.000Z",
"updatedAt": "2026-09-14T12:00:00.000Z"
}
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Close a Connect link
Closes one of your Connect links so its token can no longer open hosted Connect, and ends the frame session open on it: the trader’s next step there is refused. Send an empty JSON body with an Idempotency-Key. Closing twice changes nothing, and closing never undoes a connection the trader completed: a connected link stays connected. The response is the link as it now stands. It takes your app’s API key, sent from your server: a request that also carries a cookie or a browser’s Origin is refused. Preview: served on the sandbox, where it is free.
const res = await fetch('https://sandbox.trdrs.co/api/connect/links/{linkId}', {
method: 'DELETE',
headers: {
'content-type': 'application/json',
Authorization: `Bearer ${process.env.TRDRS_API_KEY}`,
"Idempotency-Key": "example-request-1",
},
body: JSON.stringify({}),
})
const data = await res.json()curl -X DELETE 'https://sandbox.trdrs.co/api/connect/links/{linkId}' \
-H "Authorization: Bearer $TRDRS_API_KEY" \
-H 'Idempotency-Key: example-request-1' \
-H 'content-type: application/json' \
-d '{}'import requests
url = "https://sandbox.trdrs.co/api/connect/links/{linkId}"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.trdrs.co/api/connect/links/{linkId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.trdrs.co/api/connect/links/{linkId}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sandbox.trdrs.co/api/connect/links/{linkId}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.trdrs.co/api/connect/links/{linkId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"link": {
"id": "00000000-0000-0000-0000-000000000001",
"state": "connected",
"trader": "trader-8841",
"result": {
"status": "connected",
"accountId": "4f1c2a9b8e7d6c5b4a39281706f5e4d3"
},
"expiresAt": "2026-09-14T12:00:00.000Z",
"createdAt": "2026-09-14T12:00:00.000Z",
"updatedAt": "2026-09-14T12:00:00.000Z"
}
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Authorizations
A Connect app's API key (trdrs_ck_sandbox_… or trdrs_ck_production_…), in preview. It belongs to one app in one environment, has a name and an expiry, and carries the whole Connect API. An owner of the app creates it in the Connect dashboard. It creates, reads and closes the app's Connect links under /api/connect/links, and on the account, market and trading routes it reads the app's own traders' accounts and market data and routes their orders, each request naming its trader in x-trdrs-trader. It stops working when it is revoked or expires, or when the owner who created it stops being an owner. Keep it on your server.
Headers
A key you choose, 1 to 128 characters, that identifies this write. Send the same key when you retry it, so the write is never applied twice.
1 - 128Path Parameters
Body
The body is of type object.
Response
Success. The response is sent with Cache-Control: no-store, so don't cache it.
One of your Connect links as your backend reads it: where it stands, its trader and how it ended.
Show child attributes
Show child attributes