Skip to content

staff.system ​

6 methods on staff.system. Each returns the answer's data and throws NoviqaError on a failed answer.

endOfDay ​

GET/admin/v1/system/end-of-day

Get the day end settings

The minute (server time) the trading day rolls over, and whether the day end charges swaps, the daily and monthly commission rules, and pays interest. The minute is the same value as the server clock's day_ends_at_min. Also carries the rest of the server clock read-only, so this screen needs one call: utc_offset_min, daylight_saving, ntp_server and ntp_sync_status (a live reachability check, not OS synchronization), last_rollover_at and previous_rollover_at (latest confirmed successful execution runs, UTC; null if none), last_month_rollover_at and previous_month_rollover_at (when the current and the previous month-end runs completed, UTC; null if none), and settings_updated_at (when the clock settings were last changed on /server-time or here).

More details

Rights: the staff member needs every one of: config.time.

Returns
Promise<DayEnd>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.system.endOfDay()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/system/end-of-day" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "charge_commissions": true,
    "charge_swaps": true,
    "daily_statement_mode": "string",
    "day_ends_at_min": 1,
    "daylight_saving": "none",
    "eod_weekdays": 1,
    "last_month_rollover_at": "2026-09-25T10:15:00Z",
    "last_rollover_at": "2026-09-25T10:15:00Z",
    "monthly_statement_mode": "string",
    "ntp_server": "string",
    "ntp_sync_status": "string",
    "pay_interest": true
  },
  "request_id": "5b7f2c1e"
}
ts
staff.system.endOfDay(options?: RequestOptions): Promise<calendar.DayEnd>

updateEndOfDay ​

PUT/admin/v1/system/end-of-day

Set the day end settings

Replaces the day end settings; all four fields are required. day_ends_at_min 0-1439 (it also changes the server clock's roll-over minute). Unknown fields are refused. A request that changes nothing answers the settings as they are. Optional eod_weekdays and rollover_weekdays are 0-127 masks (Sunday bit 0), default all days. Daily statements respect eod_weekdays; monthly statements are independent. Rollover weekdays gate daily charges, not monthly charges. daily_statement_mode and monthly_statement_mode select legacy (existing aggregate reports), before or after charges. Before/after require verified boundary snapshots and contiguous immutable event coverage; missing evidence is never replaced by estimates. statement_boundaries reports availability, not successful statement delivery. Existing modes and masks survive omitted fields. Send version from GET to prevent overwriting concurrent Time/EOD edits. Writes a journal line and server_time config.changed event.

More details

Rights: the staff member needs every one of: config.time.

Request body
charge_commissionsboolean
charge_swapsboolean
daily_statement_modestring
day_ends_at_mininteger
eod_weekdaysinteger
monthly_statement_modestring
pay_interestboolean
rollover_weekdaysinteger
versioninteger
Returns
Promise<DayEnd>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.system.updateEndOfDay({
  charge_commissions: true,
  charge_swaps: true,
  day_ends_at_min: 0,
  pay_interest: false
})
bash
curl -X PUT "$NOVIQA_API_URL/admin/v1/system/end-of-day" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "charge_commissions": true,
  "charge_swaps": true,
  "day_ends_at_min": 0,
  "pay_interest": false
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "charge_commissions": true,
    "charge_swaps": true,
    "daily_statement_mode": "string",
    "day_ends_at_min": 1,
    "daylight_saving": "none",
    "eod_weekdays": 1,
    "last_month_rollover_at": "2026-09-25T10:15:00Z",
    "last_rollover_at": "2026-09-25T10:15:00Z",
    "monthly_statement_mode": "string",
    "ntp_server": "string",
    "ntp_sync_status": "string",
    "pay_interest": true
  },
  "request_id": "5b7f2c1e"
}
ts
staff.system.updateEndOfDay(body: http.docDayEndUpdate, options?: RequestOptions): Promise<calendar.DayEnd>

endOfDayRun ​

POST/admin/v1/system/end-of-day/run

Run the day end now

Asks execution to close every trading day owed now (swaps, period commissions, interest, as set) and waits up to 2 minutes. Answers the run: accounts whose day closed, failed left to retry, and the target day; status is idle/completed/catching_up/failed and pending counts accounts needing another bounded catch-up pass. No historical day is skipped. Manual and failed runs are recorded even with zero completed accounts. Writes a trade line to the journal. trade.timeout when execution did not answer in time.

More details

Rights: the staff member needs every one of: config.time.

Returns
Promise<DayEndRun>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
504trade.timeout: request timed out
ts
import { staff } from "@/lib/noviqa"

const data = await staff.system.endOfDayRun()
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/system/end-of-day/run" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "accounts": 1,
    "actor": 1,
    "completed_months": [
      "string"
    ],
    "day": "string",
    "failed": 1,
    "finished_at": "2026-09-25T10:15:00Z",
    "id": 1,
    "manual": true,
    "pending": 1,
    "recording_pending": true,
    "run_uuid": "string",
    "started_at": "2026-09-25T10:15:00Z"
  },
  "request_id": "5b7f2c1e"
}
ts
staff.system.endOfDayRun(options?: RequestOptions): Promise<models.DayEndRun>

endOfDayRuns ​

GET/admin/v1/system/end-of-day/runs

List day end runs

The newest day end passes with completed accounts or failures, plus all manual runs. Legacy rows have status legacy.

More details

Rights: the staff member needs every one of: config.time.

Parameters
limitinteger · query
How many runs; default 50, 0 or less = 50, more than 500 = 500.
Returns
Promise<DayEndRun[]>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.system.endOfDayRuns({
  limit: 1
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/system/end-of-day/runs?limit=1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "accounts": 1,
      "actor": 1,
      "completed_months": [
        "string"
      ],
      "day": "string",
      "failed": 1,
      "finished_at": "2026-09-25T10:15:00Z",
      "id": 1,
      "manual": true,
      "pending": 1,
      "recording_pending": true,
      "run_uuid": "string",
      "started_at": "2026-09-25T10:15:00Z"
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.system.endOfDayRuns(query?: { limit? }, options?: RequestOptions): Promise<models.DayEndRun[]>

marketWatch ​

GET/admin/v1/system/market-watch

Get the default Market Watch

The symbol names a new account's Market Watch starts with, in order. An account without a saved list sees these, cut to the symbols its group trades.

More details

Rights: the staff member needs every one of: config.symbols.

Returns
Promise<docMarketWatch>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.system.marketWatch()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/system/market-watch" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "symbols": [
      "string"
    ]
  },
  "request_id": "5b7f2c1e"
}
ts
staff.system.marketWatch(options?: RequestOptions): Promise<http.docMarketWatch>

updateMarketWatch ​

PUT/admin/v1/system/market-watch

Set the default Market Watch

Replaces the whole list. symbols is required (an empty list clears the default), at most 200 names; each must be an existing, active symbol (matched by name), else invalid_input. A name listed twice is kept once, at its first place. Accounts that already saved a list keep it. Writes a config line to the journal. Answers the list as stored.

More details

Rights: the staff member needs every one of: config.symbols.

Request body
symbolsstring[]
symbol names in display order
Returns
Promise<docMarketWatch>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.system.updateMarketWatch({
  symbols: [
    "EURUSD",
    "GBPUSD",
    "USDJPY",
    "XAUUSD"
  ]
})
bash
curl -X PUT "$NOVIQA_API_URL/admin/v1/system/market-watch" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "symbols": [
    "EURUSD",
    "GBPUSD",
    "USDJPY",
    "XAUUSD"
  ]
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "symbols": [
      "string"
    ]
  },
  "request_id": "5b7f2c1e"
}
ts
staff.system.updateMarketWatch(body: http.docMarketWatch, options?: RequestOptions): Promise<http.docMarketWatch>