// 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}/oauth/{provider}', {
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}/oauth/{provider}' \
-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}/oauth/{provider}"
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}/oauth/{provider}",
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}/oauth/{provider}"
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}/oauth/{provider}")
.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}/oauth/{provider}")
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{
"url": "https://provider.example.com/oauth/authorize?state=example"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Start a provider sign-in window
Starts the provider’s own sign-in page, for a provider that signs traders in that way. Open the returned URL in a new window. When the trader finishes, the window returns to hosted Connect and hands a one-time result to the frame that opened it, so the sign-in is never bound to an account without that frame. Send an empty JSON body. 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}/oauth/{provider}', {
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}/oauth/{provider}' \
-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}/oauth/{provider}"
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}/oauth/{provider}",
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}/oauth/{provider}"
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}/oauth/{provider}")
.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}/oauth/{provider}")
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{
"url": "https://provider.example.com/oauth/authorize?state=example"
}{
"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
A provider that signs traders in on its own page.
tastytrade Body
The body is of type object.
Response
Success. The response is sent with Cache-Control: no-store, so don't cache it.
The provider sign-in page to open in a new window.