Skip to main content
POST
/
v1
/
admin
/
instruments
/
pause-by-expiration
Pause or resume trading on every instrument with the given expiration
curl --request POST \
  --url https://joyride.exchange/api/v1/admin/instruments/pause-by-expiration \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expiration": 1740816000,
  "paused": true
}
'
{
  "expiration": 1740816000,
  "paused": true,
  "db_updated": 50,
  "engine_updated": 50,
  "engine_missing": []
}

Documentation Index

Fetch the complete documentation index at: https://docs.joyride.exchange/llms.txt

Use this file to discover all available pages before exploring further.

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:
[]