Connect a Brokerage
This is how users connect their existing brokerage accounts so they can place trades on your platform.
How It Works
- Your server uses the user's Trade It token to request a connect session URL.
- Your client-side app passes that URL into the React SDK.
- The user selects a brokerage, authorizes it, and returns to your platform flow.
Server-side: Request a Connect Session URL
Call Trade It's API server-side to get a url to the connection portal. The URL is pre-authenticated so the user does not need to log in.
Request
POST <api endpoint>/api/session/url
Content-Type: application/json
Authorization: Bearer <user's trade it access token>
{
"target": "connect",
// "brokerageId": 1 (Optional)
}Response
{
"url": "https://tradeit.app/connect?token=ti:...&embedded=1",
"expiresAt": "2026-02-27T19:35:12.000Z",
"feature": "connect"
}Client-side: Open the Connection Modal
import { TradeItModal, useTradeIt } from '@trade-it/react';
function ConnectBrokerageButton() {
const tradeIt = useTradeIt();
async function openConnect() {
const res = await fetch('/your-server/tradeit/connect');
const data = await res.json();
tradeIt.openConnect({
launch: {
mode: 'connect',
url: data.url,
},
});
}
return (
<>
<button onClick={openConnect}>Connect a Brokerage</button>
{tradeIt.modalProps && <TradeItModal {...tradeIt.modalProps} />}
</>
);
}Connection Flow
This is the experience your users see inside your platform when they connect a brokerage.
Step 1: Select a Brokerage
Trade It opens a brokerage picker inside your site. Users choose from supported brokerages, and existing/expired connections are labeled clearly.

Step 2: Complete Brokerage Authentication
After selection, Trade It starts that brokerage's auth flow. Depending on brokerage behavior, users may be redirected to an auth tab/window while the modal tracks progress.



Step 3: Return to Your Platform
After success, Trade It confirms completion and hands control back to your client-side flow so users can move directly into trading.
