Skip to main content
POST
TypeScript

Authorizations

Authorization
string
header
required

A Connect app's API key (trdrs_ck_sandbox_… or trdrs_ck_production_…), in preview. It belongs to one app in one environment, has a name and an expiry, and carries the whole Connect API. An owner of the app creates it in the Connect dashboard. It creates, reads and closes the app's Connect links under /api/connect/links, and on the account, market and trading routes it reads the app's own traders' accounts and market data and routes their orders, each request naming its trader in x-trdrs-trader. It stops working when it is revoked or expires, or when the owner who created it stops being an owner. Keep it on your server.

Headers

Idempotency-Key
string
required

A key you choose, 1 to 128 characters, that identifies this write. Send the same key when you retry it, so the write is never applied twice.

Required string length: 1 - 128

Body

application/json
origin
string
required

The website of the page that opens hosted Connect, exactly as you added it.

trader
string
required

Your own id for the trader, the same every time they connect: letters, digits, dot, underscore, colon and hyphen, up to 128 characters, starting with a letter or a digit. Never an email or another personal detail.

Pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$
expiresInSeconds
integer
required

How long the token can open hosted Connect, from 60 to 600 seconds.

Required range: 60 <= x <= 600

Response

Success. The response is sent with Cache-Control: no-store, so don't cache it.