Skip to main content
POST
Register a simulated test account

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The account to register. All values shown are placeholders.

Registers a simulated trading account.

Every field is required. A test account is created by an operator with a specific run in mind rather than through a form with sensible defaults, and a half-specified one is more likely to be a mistake than an intention. The simulator's timings are the exception and are optional, because there is a defensible default for each.

enabled
boolean
required

Whether the scheduler should start it.

name
string
required

What to call it. Must not be blank.

organization_id
string<uuid>
required

The tenant this account trades for.

Named explicitly rather than resolved from the caller, because the caller is a service credential and has no organization of its own. This is the one privileged input on the request, and it is why the endpoint is gated on a scope rather than on a tenant role.

trading_account_id
string<uuid>
required

The account id the platform will trade under.

Supplied rather than minted so an operator can register an id a fixture or a script already refers to. Refused if it collides with a real trading account: a test row shadowing a customer's account is the one mistake here that would send their orders to a simulator.

ack_latency_ms
integer<int32> | null

Acknowledgement delay charged to every command, in milliseconds.

Defaults to 10, which is what the clients manager hard-coded before these were configurable. Note this is a per-account rate ceiling as much as a latency: the submitter awaits each command's return before claiming the account's next one, so 10ms caps the account near 100 commands a second. Set it to 0 to measure the platform rather than the simulator.

fill_max_ms
integer<int32> | null
fill_min_ms
integer<int32> | null

Bounds on the simulator's fill delay, in milliseconds. Defaults to 5 and 100. fill_min_ms may not exceed fill_max_ms.

Response

Test account registered

The registered test account, echoed back in full.

The whole row rather than just its id, because the request may have left the simulator's timings out and the operator needs to see which defaults they got without a second call.

test_account
object
required

A simulated trading account, registered by an operator for load testing.

Not a [TradingAccount] with a flag on it, and deliberately so. A trading account is a customer's broker connection: it has a broker, a credential, an append-only event stream behind it and a six year retention obligation. This has none of those. It is a row an operator adds to make the platform trade against an in-process simulator, and removes again afterwards.

Keeping the two types apart is what lets GET /v1/accounts answer one question at a time: without test_accounts=true it lists real accounts and cannot accidentally include one of these, and with it, it lists only these. A shared type carrying a boolean would have made every caller responsible for checking that boolean, and the cost of one forgetting is a customer's orders going to a simulator.