Skip to content

staff.config ​

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

export ​

GET/admin/v1/config/export

Export a configuration list

A JSON snapshot of every symbol or every group in the caller's scope, in the exact shape their own GET-list route returns (reusing the same service methods, not a parallel export format). Requires config.symbols for symbols, config.groups for groups.

Parameters
kindstring · queryrequired
Which list to export or import.
symbols groups
Returns
Promise<docConfigExport>
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
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

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

import ​

POST/admin/v1/config/import

Import a configuration list

Takes back the shape GET /config/export produced (or any body of the same shape): kind and items (symbols or groups). Each item is upserted by its identity (a symbol by path, a group by path): a path already stored is changed through the normal PATCH validation (as if you had read it and sent back its fields; its stored version is used, so a version mismatch never happens on import); a new path is created through the normal POST validation. id, status, version, created_at and updated_at on an item that already exists are ignored (updating it never reuses another row's identity or bookkeeping). One item failing (e.g. a validation error) does not stop the rest; the answer lists every item's outcome, including its error if it has one. Requires config.symbols for symbols, config.groups for groups.

Request body
itemsany[]
kindstring
"symbols" or "groups"
Returns
Promise<docConfigImportResult[]>
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
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.config.import({
  items: [
    {
      path: "Forex\\EURUSD"
    }
  ],
  kind: "symbols"
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/config/import" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "items": [
    {
      "path": "Forex\\EURUSD"
    }
  ],
  "kind": "symbols"
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "action": "string",
      "error": "string",
      "identity": "string"
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.config.import(body: http.docConfigExport, options?: RequestOptions): Promise<http.docConfigImportResult[]>

transferCatalog ​

GET/admin/v1/config/transfer/catalog

List what can be exported

Every item (no paging: keys and labels are small) of each kind the caller may read, with its count and whether the caller may also write it. Kinds: symbols (key path), leverage_profiles (name), groups (path, with their symbol rows symbols and commission rules commissions), datafeeds (name), gateways (name), routing (name), holidays (year+month+day+description, e.g. 0000-12-25 Christmas) and reports (name). Each kind needs its own right: reading config.symbols (or symbols.quick_edit), config.leverage (or config.groups), config.groups, config.datafeeds, config.gateways, config.routing, config.holidays, config.reports; writing the same without the alternatives (symbols config.symbols, leverage profiles config.leverage). Groups stay inside the caller's group scope.

More details

Rights: the staff member needs at least one of: config.symbols, symbols.quick_edit, config.leverage, config.groups, config.datafeeds, config.gateways, config.routing, config.holidays, config.reports.

Returns
Promise<transferCatalog>
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.config.transferCatalog()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/config/transfer/catalog" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "kinds": [
      {
        "can_read": true,
        "can_write": true,
        "count": 1,
        "items": [
          {}
        ],
        "key_field": "string",
        "kind": "string"
      }
    ]
  },
  "request_id": "5b7f2c1e"
}
ts
staff.config.transferCatalog(options?: RequestOptions): Promise<http.transferCatalog>

transferDelete ​

POST/admin/v1/config/transfer/delete

Delete settings in bulk

Deletes the listed keys of one kind through its normal delete (a refusal, e.g. a symbol other symbols quote from, comes back as refused with the reason; nothing is forced). dry_run (default true) writes nothing and runs the same in-use checks read-only (a symbol others quote from, a leverage profile a group or switch uses, a group with accounts or groups below it, the last routing rule able to route), taking the request's earlier deletes into account: delete, refused with the reason, or not_found; a check it cannot make is named in warning ("may be refused: ..."). Needs the kind's write right. Each kind needs its own right: reading config.symbols (or symbols.quick_edit), config.leverage (or config.groups), config.groups, config.datafeeds, config.gateways, config.routing, config.holidays, config.reports; writing the same without the alternatives (symbols config.symbols, leverage profiles config.leverage). Groups stay inside the caller's group scope.

More details

Rights: the staff member needs at least one of: config.symbols, symbols.quick_edit, config.leverage, config.groups, config.datafeeds, config.gateways, config.routing, config.holidays, config.reports.

Request body
dry_runboolean
left out = true
keysstring[]
kindstring
Returns
Promise<transferDeleteResult>
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.config.transferDelete({
  dry_run: true,
  keys: [
    "0000-12-25 Christmas"
  ],
  kind: "holidays"
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/config/transfer/delete" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "dry_run": true,
  "keys": [
    "0000-12-25 Christmas"
  ],
  "kind": "holidays"
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "items": [
      {
        "action": "string",
        "error": "string",
        "key": "string",
        "warning": "string"
      }
    ]
  },
  "request_id": "5b7f2c1e"
}
ts
staff.config.transferDelete(body: http.transferDeleteBody, options?: RequestOptions): Promise<http.transferDeleteResult>

transferExport ​

POST/admin/v1/config/transfer/export

Export broker settings

One file (format hst-config, version 1) with the chosen kinds; kinds.<kind> null = every item, or a list of keys. Items are their GET shape without ids, version, timestamps, runtime and read-only fields; references by natural key (quote_source symbol path, leverage_profile name, translates[].symbol path, routing dealers gateway names). Secrets are never exported: passwords are left out and sealed parameters blanked, listed per item in export_removed (dealer logins too). A requested kind the caller may not read is left out and named in denied. Kinds: symbols (key path), leverage_profiles (name), groups (path, with their symbol rows symbols and commission rules commissions), datafeeds (name), gateways (name), routing (name), holidays (year+month+day+description, e.g. 0000-12-25 Christmas) and reports (name). Each kind needs its own right: reading config.symbols (or symbols.quick_edit), config.leverage (or config.groups), config.groups, config.datafeeds, config.gateways, config.routing, config.holidays, config.reports; writing the same without the alternatives (symbols config.symbols, leverage profiles config.leverage). Groups stay inside the caller's group scope.

More details

Rights: the staff member needs at least one of: config.symbols, symbols.quick_edit, config.leverage, config.groups, config.datafeeds, config.gateways, config.routing, config.holidays, config.reports.

Request body
kindsobject
Returns
Promise<transferEnvelope>
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.config.transferExport({
  kinds: {
    groups: [
      "real\\standard"
    ],
    symbols: null
  }
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/config/transfer/export" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "kinds": {
    "groups": [
      "real\\standard"
    ],
    "symbols": null
  }
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "denied": [
      "string"
    ],
    "exported_at": "2026-09-25T10:15:00Z",
    "format": "string",
    "key_fields": {},
    "kinds": {},
    "source": "string",
    "version": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.config.transferExport(body: http.transferExportBody, options?: RequestOptions): Promise<http.transferEnvelope>

transferImport ​

POST/admin/v1/config/transfer/import

Import settings

Applies the preview, in the order symbols, leverage profiles, groups, datafeeds, gateways, routing, holidays, reports, through the normal services (each change journalled as usual): upsert by natural key (matched case-insensitively, never renamed), never deletes an item; a group's symbol rows and commission rules are made to match the file. Unchanged items are not written. One item failing does not stop the rest (no rollback). Actions (and summary keys): created, updated, unchanged, skipped, error. New symbols arrive with trade_access disabled unless options.new_symbols_trading_disabled is false. A kind the caller may not write answers every item error: forbidden. Each kind needs its own right: reading config.symbols (or symbols.quick_edit), config.leverage (or config.groups), config.groups, config.datafeeds, config.gateways, config.routing, config.holidays, config.reports; writing the same without the alternatives (symbols config.symbols, leverage profiles config.leverage). Groups stay inside the caller's group scope.

More details

Rights: the staff member needs at least one of: config.symbols, symbols.quick_edit, config.leverage, config.groups, config.datafeeds, config.gateways, config.routing, config.holidays, config.reports.

Request body
filetransferEnvelope
transferEnvelope is the file: kinds of portable items, keyed by natural key.
optionstransferOptions
selectobject
Returns
Promise<transferResults>
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.config.transferImport({
  file: {
    denied: [
      "string"
    ],
    exported_at: "2026-09-25T10:15:00Z",
    format: "string",
    key_fields: {},
    kinds: {},
    source: "string",
    version: 1
  },
  options: {
    mode: "string",
    new_symbols_trading_disabled: true
  },
  select: {}
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/config/transfer/import" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "file": {
    "denied": [
      "string"
    ],
    "exported_at": "2026-09-25T10:15:00Z",
    "format": "string",
    "key_fields": {},
    "kinds": {},
    "source": "string",
    "version": 1
  },
  "options": {
    "mode": "string",
    "new_symbols_trading_disabled": true
  },
  "select": {}
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "items": [
      {
        "action": "string",
        "changes": [
          "string"
        ],
        "error": "string",
        "key": "string",
        "kind": "string",
        "warnings": [
          "string"
        ]
      }
    ],
    "summary": {}
  },
  "request_id": "5b7f2c1e"
}
ts
staff.config.transferImport(body: http.transferImportBody, options?: RequestOptions): Promise<http.transferResults>

transferPreview ​

POST/admin/v1/config/transfer/preview

Preview a settings import

What an import of file would do, writing nothing: per item create, update (with the changed top-level fields), unchanged, skip (options.mode create_only and the key exists) or error (a reference this server does not have, a validation failure, a company outside the licence...). select picks kinds and keys (left out = everything in the file). Validated as the real create/update does (strict decode onto the same defaults, then the model's checks). Lists whose order means nothing (symbol sessions and margin rates, translates, gateway groups) compare as sets, so a store's own order is never a change. summary counts each action. String cells of a CSV file are read as the field's number or boolean. At most 20,000 items, 10 MB. Each kind needs its own right: reading config.symbols (or symbols.quick_edit), config.leverage (or config.groups), config.groups, config.datafeeds, config.gateways, config.routing, config.holidays, config.reports; writing the same without the alternatives (symbols config.symbols, leverage profiles config.leverage). Groups stay inside the caller's group scope.

More details

Rights: the staff member needs at least one of: config.symbols, symbols.quick_edit, config.leverage, config.groups, config.datafeeds, config.gateways, config.routing, config.holidays, config.reports.

Request body
filetransferEnvelope
transferEnvelope is the file: kinds of portable items, keyed by natural key.
optionstransferOptions
selectobject
Returns
Promise<transferResults>
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.config.transferPreview({
  file: {
    denied: [
      "string"
    ],
    exported_at: "2026-09-25T10:15:00Z",
    format: "string",
    key_fields: {},
    kinds: {},
    source: "string",
    version: 1
  },
  options: {
    mode: "string",
    new_symbols_trading_disabled: true
  },
  select: {}
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/config/transfer/preview" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "file": {
    "denied": [
      "string"
    ],
    "exported_at": "2026-09-25T10:15:00Z",
    "format": "string",
    "key_fields": {},
    "kinds": {},
    "source": "string",
    "version": 1
  },
  "options": {
    "mode": "string",
    "new_symbols_trading_disabled": true
  },
  "select": {}
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "items": [
      {
        "action": "string",
        "changes": [
          "string"
        ],
        "error": "string",
        "key": "string",
        "kind": "string",
        "warnings": [
          "string"
        ]
      }
    ],
    "summary": {}
  },
  "request_id": "5b7f2c1e"
}
ts
staff.config.transferPreview(body: http.transferImportBody, options?: RequestOptions): Promise<http.transferResults>