<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
- Configure
allowed_embed_originson your firm record — in Backoffice → Firm Control → Embed, or viaPATCH /v1/firm-control/firm. Optionally setembed_theme_presetfor a branded palette. - Provision the trader with an ACTIVE
TRADERrelationship and at least one account (Account provisioning). - Mint an embed session from your backend with
POST /v1/firm-control/embed-sessions. Requires a firm API key withembed:write. - Render the returned
embed_urlin an<iframe>on a page you control. - The terminal bootstraps inside the iframe, exchanges the single-use
ettoken, and keeps the session alive with embed refresh tokens.
Prerequisites
Embed an iframe
Mint the session server-side — never expose your firm API key in the browser.Server-side mint (Node example)
Security model
Single-use bootstrap token
Theet 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 withsession_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 browserOrigin header against allowed_embed_origins stored on your firm when the token was minted.
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.

