GET Controls
Read your global trading controls.
Elite
The Management API requires an Elite subscription. See Authentication.
Endpoint
GET https://app.crosstrade.io/v1/api/manage/controls
Headers
| Name | Required | Value |
|---|---|---|
| Authorization | Yes | Bearer <your API token> |
| If-None-Match | No | ETag from a previous read. Returns 304 with no body if nothing changed |
Code examples
- Python
- JavaScript
- cURL
import requests
resp = requests.get(
"https://app.crosstrade.io/v1/api/manage/controls",
headers={"Authorization": "Bearer YOUR_TOKEN"},
)
print(resp.status_code, resp.json())
const resp = await fetch("https://app.crosstrade.io/v1/api/manage/controls", {
headers: { "Authorization": "Bearer YOUR_TOKEN" },
});
console.log(resp.status, await resp.json());
curl https://app.crosstrade.io/v1/api/manage/controls \
-H "Authorization: Bearer YOUR_TOKEN"
Responses
- 200
- Other responses
{
"success": true,
"data": {
"killSwitch": false,
"closingOnly": false,
"tradingWindow": {
"days": ["mon", "tue", "wed", "thu", "fri"],
"start": "09:30",
"end": "16:00",
"closingOnlyAfter": "15:45"
},
"monitorLock": true,
"enhancedClosingOnly": false
},
"meta": { "requestId": "req_9f2c1a0b7d3e4f51", "etag": "\"c2:7Q0xMmZ3bTRkWmRVdz\"" }
}
A read can include warnings when a saved value was stored in an older form. For example, trading days saved without a start time read as "start": null with a legacy_value_normalized warning.
| Status | error | When |
|---|---|---|
| 304 | If-None-Match matched; no body | |
| 400 | unexpected_body, unknown_parameter | A body or a query parameter was sent |
| 401 | unauthorized | Missing or invalid token |
| 403 | elite_required | Your plan is not Elite |
| 403 | not_available | The Management API is not open for your account yet |
| 429 | rate_limited, too_many_concurrent_requests | See Rate limits |
| 503 | management_unavailable, management_busy, storage_unavailable | See Errors |
Notes
Field details are in the Controls field reference.