Skip to main content
POST
Pause or resume trading on every instrument with the given expiration

Authorizations

Authorization
string
header
required

Admin token set via the ADMIN_TOKEN environment variable.

Body

application/json
expiration
integer
required

Expiration timestamp (Unix seconds). All instruments with this exact expiration are flipped.

Example:

1740816000

paused
boolean
required

Target state. true blocks new orders; false lifts the block.

Example:

true

Response

Pause/resume applied

expiration
integer
required
Example:

1740816000

paused
boolean
required
Example:

true

db_updated
integer
required

Number of rows updated in the instruments table. Only rows whose paused value actually changed are counted (idempotent SQL via IS DISTINCT FROM).

Example:

50

engine_updated
integer
required

Number of in-memory engine instruments whose pause flag was flipped this call. May be lower than db_updated even in the happy path if the engine was already at the target state for some instruments (drift correction). A separate signal from engine_missing.

Example:

50

engine_missing
string[]
required

Instrument ids that were updated in the database but are NOT registered in the in-memory engine at all (engine has no entry for them). A non-empty list signals genuine DB-vs-engine membership drift — likely a gateway restart in progress, or a row inserted directly without going through engine.create_expiration. The "engine knew about it but was already at target" case is distinct and shows up as engine_updated < db_updated with an empty engine_missing.

Example: