GetTradingReadiness¶
Read-only TCP command for checking the license gates used when opening trades. No HTTP route is registered. Access: SESSION_ADMIN, SESSION_DEALER, SESSION_SYSTEM, SESSION_MANAGER; no additional command-specific permission is required.
Request¶
No command-specific fields are required in data.
| Envelope field | Type | Description |
|---|---|---|
| command | string | GetTradingReadiness. |
| extID | string | Caller-supplied correlation ID, echoed in the response. |
| __token | string | Authentication token from the session authentication command. |
| data | object | Empty object. |
{
"command": "GetTradingReadiness",
"extID": "readiness-1",
"__token": "<session-token>",
"data": {}
}
Response¶
The envelope contains extID (string), status (integer HTTP-style status), and data (object). A successful read returns status 200 even when trading_ready is false.
| Data field | Type | Description |
|---|---|---|
| server_ready | integer | Common-config runtime initialization flag. 1 means the license state has been applied; initial value is 0. Not a general server-health indicator. |
| license_status | integer | License status from the common configuration snapshot. |
| runtime_license_status | integer | License status used by the runtime config license check. |
| license_expire | integer | Common-config license expiration as Unix seconds in UTC; 0 when unset. |
| trading_ready | boolean | True only when server_ready == 1, both license statuses are trial (0), active (1), or development (2), and any required v2 license lease is active. Legacy v1 runtimes do not require a v2 lease. |
License status values: blocked/uninitialized -1, trial 0, active 1, development 2, expired 3.
Complete ready response:
{
"extID": "readiness-1",
"status": 200,
"data": {
"server_ready": 1,
"license_status": 1,
"runtime_license_status": 1,
"license_expire": 1791000000,
"trading_ready": true
}
}
Complete initialization-in-progress response:
{
"extID": "readiness-1",
"status": 200,
"data": {
"server_ready": 0,
"license_status": -1,
"runtime_license_status": -1,
"license_expire": 0,
"trading_ready": false
}
}
If the common configuration cannot be obtained, status is 500 and data contains only error (string code CANT_GET_CONFIG):
{
"extID": "readiness-1",
"status": 500,
"data": { "error": "CANT_GET_CONFIG" }
}
Standard transport authentication/access errors may occur before this handler runs.
Integration notes¶
The command reads in-memory configuration, does not expose license keys or authentication credentials, and does not modify license policy. Common and runtime values are separate reads, not a transactional snapshot. The result can change immediately after the response.
This is license admission readiness only: for v2 it includes the active runtime lease, in addition to initialization and status. It does not guarantee quote freshness, account or symbol access, execution routing, absence of a restore barrier, or successful trade execution. The expiration timestamp is diagnostic; trading_ready follows the status-based license gates and the runtime lease state. HealthCheck continues to report service availability only.
The test stand waits before fixture provisioning and after scenario restarts, polling once per second with a separate server.startTimeoutMs deadline. Timeout or an invalid response fails preflight with scoped evidence. Trading commands rejected by licensing are not automatically retried.