Skip to navigation

Set Demo Halt

View as Markdown

Halt or resume trading for a risk category on Demo.

Available to: Organization administrators (risk categories in their organization)

Environments: Demo

Rate Limit: 20 requests per hour, 5-second back-off, counts all requests

Halt trading for every account assigned to a risk category, or resume it. Pass the riskCategoryId and set halt to true to halt or false to resume. Trading stays halted until you resume it. If the risk category is already in the state you request, the call succeeds without changing anything.

To find your risk category IDs, call riskCategoryList.

Common Failure Scenarios

  • The request is sent to Live. This returns HTTP 200 with "Demo only" in errorText and ok: false.
  • The caller isn’t an organization administrator. This returns HTTP 401 with "mustBeOrganizationAdmin".
  • No risk category matches riskCategoryId, or the caller can’t access it. Both return HTTP 404 with an empty body.
  • The caller’s user type, or the API key’s permissions, don’t include full access to the Risks resource. This returns HTTP 401 with "Access is denied".
  • riskCategoryId isn’t greater than 0. This returns HTTP 400.

This endpoint returns HTTP 200 for both successful and rejected requests, so check the ok field to confirm the result (a response with ok: false means the request was rejected). Other failures, such as denied access or an invalid request, return their own HTTP status.

Error Messages

MessageResponseTrigger
"Risk Category Id should be greater than 0"400riskCategoryId isn’t greater than 0.
"Access is denied"401The caller’s user type, or the API key’s permissions, don’t include full access to the Risks resource.
"mustBeOrganizationAdmin"401The caller isn’t an organization administrator.
(no message text)404No risk category matches riskCategoryId, or the caller can’t see it.
"Demo only"200 (in errorText)Called on the Live environment.

Authentication

AuthorizationBearer

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

Request

This endpoint expects an object.
riskCategoryIdlongRequired
haltbooleanRequired

Response

SimpleResponse
okboolean
errorTextstringOptional<=8192 characters

Non-empty if the request failed