Skip to main content
POST
TypeScript

Authorizations

Authorization
string
header
required

The Venue key (trdrs_vk_sandbox_… or trdrs_vk_production_…), in preview. It belongs to one venue in one environment and carries the scopes it was created with. The venue's verified owner creates it while signed in. It works on the /api/venues/{venueId} routes and, with trader:read or trader:trade, on the account, market and trading routes, reading the venue's own traders' accounts and routing their orders, each request naming its trader in x-trdrs-trader. A trdrs_sk_… key can't be used in its place. It reaches its venue's routes and its venue's own traders, and the owner manages keys from a signed-in session. 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

Path Parameters

venueId
string<uuid>
required

Body

application/json
policy
object
required

One version of an account risk policy, as the risk policy contract states it: the policy id and version, the authority (a firm, naming this venue), the account currency, the account's one thresholds term (the margin call, stop-out and recovery lines over the requirement of everything the account holds; with recoveryLevel null a stop-out closes every position of the stopped-out pool, and the account trades again once it holds nothing and owes nothing), the terms of each product class under classes (futures, crypto_derivative and fx_cfd, each stated, null for a class the policy does not offer), the settlement term, the conversion term where the policy routes another asset into its currency, and the posting term. A product class carries its futures margin by dated contract, its crypto derivative collateral or its CFD terms, and how it margins opposite tickets, each term with its own version, authority, source and effective dates. The conversion term routes each other asset, such as the euro a CFD requires, along legs that each name the pair and the source that quotes it. No route carries an asset a perpetual settles in: the settlement term counts a stablecoin as dollars instead, one for one. How old a price or a conversion quote may be and still count, and how your book reads a perpetual's funding records, are your book's own, the same for every account, and no policy states them. An account bound to the policy trades every class it offers from one balance. Anything else is refused, with field naming what.

name
string

The name your team reads the policy by, 1 to 80 characters, used once among your policies whatever its case. Taken by a policy stored for the first time; one stored before keeps its name. Without one, the name is read from the policy id.

Maximum string length: 80

Response

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

version
object
required