Skip to content

trader.alerts ​

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

list ​

GET/trader/v1/alerts

Price alerts

The account's price alerts, newest first. When one fires the account's live socket gets an alert_triggered event.

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<Alert[]>
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.alerts.list()
bash
curl -X GET "$NOVIQA_API_URL/trader/v1/alerts" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "armed": true,
      "comment": "Deposit via bank",
      "condition": "string",
      "created_at": "2026-09-25T10:15:00Z",
      "enabled": true,
      "hits": 1,
      "id": 1,
      "login": 1001,
      "mode": "string",
      "price": "1.08452",
      "side": "string",
      "symbol": "EURUSD"
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
trader.alerts.list(options?: RequestOptions): Promise<alert.Alert[]>

create ​

POST/trader/v1/alerts

Create a price alert

symbol (a name the group trades) and a positive price (at most 8 decimals) are required. side bid (default) or ask; condition above (default) or below; mode once (default: switches itself off when it fires) or repeat (fires again after the price has gone back); enabled default true; comment at most 64 characters. Prices are checked with the group's markup. At most 100 alerts per account. 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
commentstring
conditionstring
enabledboolean
modestring
pricestring
Exact decimal as a string. Never parse it into a binary float for money or prices.
sidestring
symbolstring
Returns
Promise<Alert>
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
500internal: something went wrong
ts
import { trader } from "@/lib/noviqa"

const data = await trader.alerts.create({
  comment: "breakout",
  condition: "above",
  mode: "once",
  price: "1.09000",
  side: "bid",
  symbol: "EURUSD"
})
bash
curl -X POST "$NOVIQA_API_URL/trader/v1/alerts" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "comment": "breakout",
  "condition": "above",
  "mode": "once",
  "price": "1.09000",
  "side": "bid",
  "symbol": "EURUSD"
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "armed": true,
    "comment": "Deposit via bank",
    "condition": "string",
    "created_at": "2026-09-25T10:15:00Z",
    "enabled": true,
    "hits": 1,
    "id": 1,
    "login": 1001,
    "mode": "string",
    "price": "1.08452",
    "side": "string",
    "symbol": "EURUSD"
  },
  "request_id": "5b7f2c1e"
}
ts
trader.alerts.create(body: alert.Body, options?: RequestOptions): Promise<alert.Alert>

update ​

PATCH/trader/v1/alerts/{id}

Change a price alert

Changes the fields sent (same rules as create) and arms the alert again. No version. not_found for another account's alert. 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.
idinteger · pathrequired
Numeric id.
Request body
commentstring
conditionstring
enabledboolean
modestring
pricestring
Exact decimal as a string. Never parse it into a binary float for money or prices.
sidestring
symbolstring
Returns
Promise<Alert>
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.alerts.update(1, {
  enabled: true,
  price: "1.09500"
})
bash
curl -X PATCH "$NOVIQA_API_URL/trader/v1/alerts/1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "enabled": true,
  "price": "1.09500"
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "armed": true,
    "comment": "Deposit via bank",
    "condition": "string",
    "created_at": "2026-09-25T10:15:00Z",
    "enabled": true,
    "hits": 1,
    "id": 1,
    "login": 1001,
    "mode": "string",
    "price": "1.08452",
    "side": "string",
    "symbol": "EURUSD"
  },
  "request_id": "5b7f2c1e"
}
ts
trader.alerts.update(id: number, body: alert.Body, options?: RequestOptions): Promise<alert.Alert>

delete ​

DELETE/trader/v1/alerts/{id}

Delete a price alert

not_found for another account's alert. 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.
idinteger · pathrequired
Numeric id.
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.alerts.delete(1)
bash
curl -X DELETE "$NOVIQA_API_URL/trader/v1/alerts/1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
trader.alerts.delete(id: number, options?: RequestOptions): Promise<null>