// Runs inside hosted Connect. frameToken is the frame session its sign-in returned, held in memory only.
const res = await fetch('https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper', {
method: 'POST',
headers: {
'content-type': 'application/json',
'x-trdrs-connect-frame': frameToken,
},
credentials: 'omit',
body: JSON.stringify({}),
})
const data = await res.json()curl -X POST 'https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper' \
-H "x-trdrs-connect-frame: $TRDRS_CONNECT_FRAME" \
-H 'content-type: application/json' \
-d '{}'import requests
url = "https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper"
payload = {}
headers = {
"x-trdrs-connect-frame": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-trdrs-connect-frame: <api-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://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-trdrs-connect-frame", "<api-key>")
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.post("https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper")
.header("x-trdrs-connect-frame", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-trdrs-connect-frame"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"session": {
"id": "00000000-0000-0000-0000-000000000001",
"state": "connected",
"accountId": "4f1c2a9b8e7d6c5b4a39281706f5e4d3"
},
"account": {
"accountNumber": "DEMO-7C21A9",
"currency": "USD",
"balance": "100000.000000000000000000",
"startingBalance": "100000",
"created": true
}
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Open Paper in Connect
Opens the session’s trader’s Paper account while the venue offers Paper, or finds the one they already hold, and completes the Connect Link session with it. A new account opens at the venue’s balance, and an account already open is never funded again. Send an empty JSON body: the venue’s settings and the frame session decide everything. Preview: served on the sandbox to every venue, and production availability is arranged when a venue qualifies. Trading API keys and Partner keys do not authorize these routes.
// Runs inside hosted Connect. frameToken is the frame session its sign-in returned, held in memory only.
const res = await fetch('https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper', {
method: 'POST',
headers: {
'content-type': 'application/json',
'x-trdrs-connect-frame': frameToken,
},
credentials: 'omit',
body: JSON.stringify({}),
})
const data = await res.json()curl -X POST 'https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper' \
-H "x-trdrs-connect-frame: $TRDRS_CONNECT_FRAME" \
-H 'content-type: application/json' \
-d '{}'import requests
url = "https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper"
payload = {}
headers = {
"x-trdrs-connect-frame": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-trdrs-connect-frame: <api-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://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-trdrs-connect-frame", "<api-key>")
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.post("https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper")
.header("x-trdrs-connect-frame", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/connect-link/sessions/{sessionId}/paper")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-trdrs-connect-frame"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"session": {
"id": "00000000-0000-0000-0000-000000000001",
"state": "connected",
"accountId": "4f1c2a9b8e7d6c5b4a39281706f5e4d3"
},
"account": {
"accountNumber": "DEMO-7C21A9",
"currency": "USD",
"balance": "100000.000000000000000000",
"startingBalance": "100000",
"created": true
}
}{
"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
The frame session the mount opens for a Connect session's trader, lasting 30 minutes at most. Hosted Connect sends it; your page and your server never hold it. An API key or a Venue key cannot reach a route secured this way.
Path Parameters
Body
The body is of type object.
Response
Success. The response is sent with Cache-Control: no-store, so don't cache it.
The response is of type object.