Skip to main content
Embed the Tradara terminal on your prop firm website so traders can chart and trade without leaving your portal. Your backend mints a short-lived bootstrap URL; the trader’s browser loads it in an <iframe>; Tradara exchanges the token server-side and issues a restricted embed session.
Embed is not a replacement for the Trading API. Use embed when you want Tradara’s hosted terminal UI inside your site. Use the Trading API when you build your own order entry and dashboards.

How it works

  1. Configure allowed_embed_origins on your firm record — in Backoffice → Firm Control → Embed, or via PATCH /v1/firm-control/firm. Optionally set embed_theme_preset for a branded palette.
  2. Provision the trader with an ACTIVE TRADER relationship and at least one account (Account provisioning).
  3. Mint an embed session from your backend with POST /v1/firm-control/embed-sessions. Requires a firm API key with embed:write.
  4. Render the returned embed_url in an <iframe> on a page you control.
  5. The terminal bootstraps inside the iframe, exchanges the single-use et token, and keeps the session alive with embed refresh tokens.
Bootstrap tokens expire in about 60 seconds. Mint the URL immediately before you show the iframe, or when the trader navigates to your trading page — not hours in advance.

Prerequisites

Embed an iframe

Mint the session server-side — never expose your firm API key in the browser.

Server-side mint (Node example)

Treat embed_url like a one-time login link. Generate it when the trader opens the page, or expose a “Open terminal” action that fetches a fresh URL. If the token expires before the iframe loads, mint again.

Security model

Single-use bootstrap token

The et query parameter is consumed on first exchange. Reusing or sharing the URL returns 401. Pending tokens for the same user and firm are invalidated when a new session is minted.

One active embed session per trader per firm

Starting a new embed session for the same trader at the same firm revokes the prior embed access and refresh tokens. A trader cannot hold multiple concurrent embed sessions for your firm.

Firm-scoped API access

Embed sessions receive short-lived JWTs with session_type: embed. The API gateway injects X-Session-Type, X-Firm-ID, and optional X-Embed-Account-IDs. Embed tokens can call trading and market-data routes (orders, positions, balances, /v1/ws, and related reads), plus market-data onboarding (/v1/profiles, /v1/address, /v1/agreements, entitlements classification, and /v1/firm-control/me/market-data-onboarding/*). They cannot call Prop Firm admin APIs, journal, layout sharing, or full-terminal auth flows.

Origin allowlist

At exchange time, Tradara checks the browser Origin header against allowed_embed_origins stored on your firm when the token was minted.
allowed_embed_origins lists Tradara terminal origins (where /embed is hosted), not your website’s domain. The exchange request is sent from JavaScript running inside the iframe — its Origin is the terminal host (for example https://terminal.tradara.com), not https://portal.acme.example.
Your portal can live on any HTTPS origin. Tradara sets Content-Security-Policy: frame-ancestors * on /embed so third-party sites may frame the terminal.

Account scoping

By default (embed_account_scope: "all", or unset), one iframe exposes every account the trader can access at your firm. Traders switch accounts inside the embed — you do not need a separate session per account. Set embed_account_scope: "explicit" only when you want 1:1 iframes; then each mint must pass account_ids. See Configure account scope.

Session lifetimes

The terminal handles refresh automatically. Traders do not sign in with username and password inside the embed.

Endpoints

Public auth routes (POST /v1/auth/embed/exchange, POST /v1/auth/embed/refresh) are called by the terminal — your integration does not call them directly.

Common errors