1
Create a Venue key
Install the back office with
A sandbox key works only against the sandbox. Keep
curl -fsSL https://trdrs.co/install/backoffice.sh | sh and connect it to your trdrs account.
Create a venue, or pick the one you already have, then open API keys in the sidebar and
create a Venue key with a name and a lifetime. A key made there carries every
Venue scope, so it can make every call on this page.The secret is shown once. Copy it into your server’s environment along with the venue ID:TRDRS_VENUE_KEY on your server. Don’t put
a Venue key in browser code, a mobile app or a public repository, because anyone who holds it
can configure your venue.2
Make your first call
Read your venue. This confirms that your key, its scopes and the venue ID all line up.Required scope: The response is your venue: its
venue:read.id, its environment (sandbox), its brand under company,
and whether your venue rules are on. The key works.3
Set up an evaluation group
Every account you issue lands in a group, and a group points at a route that says where its
orders go. Every venue starts with the route Each write carries an
paper, an internal route: orders fill on the
paper book, a simulated market priced from live data. Create the group, then point it at
paper.Required scope: venue:configure.Idempotency-Key, so running a command twice returns the first result
instead of doing the work again. expectedRevision: null means you expect no earlier version to
exist. Creating your first group also turns on venue rules, so your venue’s rules apply to the
accounts you issue into it.4
Publish a risk policy
A risk policy is your terms for the accounts you issue: the margin an account must hold, where
it’s stopped out, and how its money is posted. An account is issued only under a published
policy that covers it. You store a version first, then publish it to put it in force.Start from the complete policy in the example for
storing a risk policy version.
It offers futures alone: one Use your own policy id in place of
thresholds term sets the stop-out and recovery lines for the whole
account, classes.futures states the margin of each contract it covers, and the
crypto_derivative and fx_cfd classes are null. Save it as policy.json, then change three
things: set authority.venueId to your venue ID, give the policy an id of your own that doesn’t
start with trdrs-, and set every effectiveFrom to a moment that has already passed. A term
refuses orders before its effectiveFrom.Required scope: venue:configure.my-futures, and the version from your policy.json.
The publication puts that version in force for every account bound to the policy, including
the one you’re about to issue.5
Issue an evaluation account
Issue an account the way you do when a trader buys an evaluation. For this test, issue it to
yourself: use the email you sign in to the sandbox with, since the account goes to an existing
trdrs sign-in with a verified email. Name the policy you just published in The response is Sign in to the sandbox as that trader. The account is in your
account list.
riskPolicy, by its
id alone. The account trades every product class that policy offers, from one balance, so with
the example policy it trades futures.Required scope: account:issue.201 with the new account: its accountId, the accountNumber your trader
sees, its groupId, its balance of 50000 and created: true. Save the accountId:referenceId is your own id for this sale. Sending the same request again returns the same
account with created: false, so a retry never issues a second one.6
Receive a webhook
A webhook lets trdrs tell your server when something happens to your accounts, so you don’t
have to poll. Register an HTTPS endpoint you can watch, such as a request inspector, for the
The response is the Within about 15 seconds a It carries a
balance.recorded event.Required scope: venue:configure.webhook, with its id and a secret that starts with trdrs_whsec_.
Store the secret on your server: it’s how you prove each delivery came from trdrs.Now credit the account. This records a balance operation and sends a balance.recorded event
to your endpoint.Required scope: balance:write.POST arrives at your endpoint:trdrs-signature header of the form t=<unix seconds>,v1=<hex>. The v1 value is
an HMAC-SHA256 of <t>.<raw body> keyed with your webhook secret. Recompute it, compare in
constant time, and refuse a timestamp more than five minutes old.
Receive events covers signatures, retries and the delivery log.Your integration works.Test it end to end
Everything above ran in the sandbox, which is separate from production: its keys, venues, accounts and balances never cross over. Before you build on it, check the parts you’ll rely on.- Retry a write. Send the issue request again with the same
Idempotency-Keyand body. You get the same account back and nothing new is issued. - Send a test ping.
POST /api/venues/{venueId}/webhooks/{webhookId}/testwith an empty JSON body and anIdempotency-Keydelivers a signed ping right away and tells you what your endpoint answered. - Read the delivery log.
GET /api/venues/{venueId}/webhooks/{webhookId}/deliveriesshows every attempt, so you can see a delivery your server missed. - Trade the account. Activate an instrument for your venue (Run a venue shows how), then sign in as the trader and place an order to see your rules applied.
error code tell you why. Venue routes answer
{ "error": "<code>" }.
Errors lists every status the API answers.
Next steps
You have a venue that issues evaluation accounts and a server that hears about them. From here, pick the guide for what you’re building. If you work with a coding agent, the agent prompts follow the same steps.Run evaluations
Add a stage so an account is judged by your profit target and drawdown rule, and advance the traders who pass.
Run your venue
Choose the instruments your accounts trade, what they’re charged and the limits that protect them.
Pre-register traders for Connect
Put a trader’s account in Connect, the account picker, before they sign in.
Bring in your team
Bring in your team, choose the back office or your own backend, and plan your move to production.