Skip to content

trader.charts ​

5 methods on trader.charts. Each returns the answer's data and throws NoviqaError on a failed answer.

layouts ​

GET/trader/v1/charts/layouts

Saved charts

Every saved chart slot of the account, by slot name. content is the terminal's own JSON document, stored as sent. The same list is on every device of the account.

Parameters
X-HST-Accountstring · header
Intended signed-in login captured by the browser tab before dispatch and retained across retries. A mismatch returns auth.account_changed (409) before mutation or refresh rotation. This never selects or authorizes an account; omission preserves existing API client compatibility.
Returns
Promise<docTraderLayouts>
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
409auth.account_changed: the signed-in account changed; sign in again before continuing
500internal: something went wrong
ts
import { trader } from "@/lib/noviqa"

const data = await trader.charts.layouts()
bash
curl -X GET "$NOVIQA_API_URL/trader/v1/charts/layouts" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "layouts": [
      {
        "content": null,
        "slot": "string",
        "updated_at": "2026-09-25T10:15:00Z",
        "version": 1
      }
    ]
  },
  "request_id": "5b7f2c1e"
}
ts
trader.charts.layouts(options?: RequestOptions): Promise<http.docTraderLayouts>

updateLayouts ​

PUT/trader/v1/charts/layouts/{slot}

Save a chart

Replaces one slot's document. content must be a JSON object, at most 256 KiB. expected_version is the version last read: when the server holds another version the save is refused with conflict (reload and merge); 0 overwrites whatever is there. At most 16 slots per account (a new slot beyond that is invalid_input). Answers the saved slot with its new version. An investor (read-only) session is refused with trade.read_only.

Parameters
X-HST-Accountstring · header
Intended signed-in login captured by the browser tab before dispatch and retained across retries. A mismatch returns auth.account_changed (409) before mutation or refresh rotation. This never selects or authorizes an account; omission preserves existing API client compatibility.
slotstring · pathrequired
Slot name: 1-64 lowercase letters, digits or dashes, e.g. chart-1.
Request body
contentany
Any JSON value.
expected_versioninteger
Returns
Promise<Layout>
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
403trade.read_only: read-only access cannot trade
409auth.account_changed: the signed-in account changed; sign in again before continuing
409conflict: already exists
500internal: something went wrong
ts
import { trader } from "@/lib/noviqa"

const data = await trader.charts.updateLayouts("string", {
  content: {
    symbol: "EURUSD",
    timeframe: "H1"
  },
  expected_version: 3
})
bash
curl -X PUT "$NOVIQA_API_URL/trader/v1/charts/layouts/string" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "content": {
    "symbol": "EURUSD",
    "timeframe": "H1"
  },
  "expected_version": 3
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "content": null,
    "slot": "string",
    "updated_at": "2026-09-25T10:15:00Z",
    "version": 1
  },
  "request_id": "5b7f2c1e"
}
ts
trader.charts.updateLayouts(slot: string, body: chart.Body, options?: RequestOptions): Promise<chart.Layout>

deleteLayouts ​

DELETE/trader/v1/charts/layouts/{slot}

Delete a saved chart

Clears one slot. not_found when the slot is not saved. An investor (read-only) session is refused with trade.read_only.

Parameters
X-HST-Accountstring · header
Intended signed-in login captured by the browser tab before dispatch and retained across retries. A mismatch returns auth.account_changed (409) before mutation or refresh rotation. This never selects or authorizes an account; omission preserves existing API client compatibility.
slotstring · pathrequired
Slot name: 1-64 lowercase letters, digits or dashes.
Returns
Promise<null>
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
403trade.read_only: read-only access cannot trade
404not_found: not found
409auth.account_changed: the signed-in account changed; sign in again before continuing
500internal: something went wrong
ts
import { trader } from "@/lib/noviqa"

const data = await trader.charts.deleteLayouts("string")
bash
curl -X DELETE "$NOVIQA_API_URL/trader/v1/charts/layouts/string" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
trader.charts.deleteLayouts(slot: string, options?: RequestOptions): Promise<null>

settings ​

GET/trader/v1/charts/settings

Chart settings

The account's chart settings document, shared by every chart. Never saved = an empty object at version 0. The same list is on every device of the account.

Parameters
X-HST-Accountstring · header
Intended signed-in login captured by the browser tab before dispatch and retained across retries. A mismatch returns auth.account_changed (409) before mutation or refresh rotation. This never selects or authorizes an account; omission preserves existing API client compatibility.
Returns
Promise<Settings>
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
409auth.account_changed: the signed-in account changed; sign in again before continuing
500internal: something went wrong
ts
import { trader } from "@/lib/noviqa"

const data = await trader.charts.settings()
bash
curl -X GET "$NOVIQA_API_URL/trader/v1/charts/settings" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "content": null,
    "updated_at": "2026-09-25T10:15:00Z",
    "version": 1
  },
  "request_id": "5b7f2c1e"
}
ts
trader.charts.settings(options?: RequestOptions): Promise<chart.Settings>

updateSettings ​

PUT/trader/v1/charts/settings

Save chart settings

Replaces the settings document: content a JSON object, at most 256 KiB; expected_version the version last read (another version on the server = conflict; 0 overwrites). Answers the saved document with its new version. An investor (read-only) session is refused with trade.read_only.

Parameters
X-HST-Accountstring · header
Intended signed-in login captured by the browser tab before dispatch and retained across retries. A mismatch returns auth.account_changed (409) before mutation or refresh rotation. This never selects or authorizes an account; omission preserves existing API client compatibility.
Request body
contentany
Any JSON value.
expected_versioninteger
Returns
Promise<Settings>
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
403trade.read_only: read-only access cannot trade
409auth.account_changed: the signed-in account changed; sign in again before continuing
409conflict: already exists
500internal: something went wrong
ts
import { trader } from "@/lib/noviqa"

const data = await trader.charts.updateSettings({
  content: {
    grid: true,
    theme: "dark"
  },
  expected_version: 1
})
bash
curl -X PUT "$NOVIQA_API_URL/trader/v1/charts/settings" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "content": {
    "grid": true,
    "theme": "dark"
  },
  "expected_version": 1
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "content": null,
    "updated_at": "2026-09-25T10:15:00Z",
    "version": 1
  },
  "request_id": "5b7f2c1e"
}
ts
trader.charts.updateSettings(body: chart.Body, options?: RequestOptions): Promise<chart.Settings>