Appearance
staff.accounts
36 methods on staff.accounts. Each returns the answer's data and throws NoviqaError on a failed answer.
list
GET
/admin/v1/accountsList trading accounts
One page of the trading accounts whose group is in the caller's group scope (staff groups appear with config.staff), ordered by login, each with its live money from execution (money is null when execution does not answer in time). Filters: group is a group mask (e.g. real\*), company the licence company of the group, login an exact login, name a case-insensitive part of the name, email a case-insensitive part of the email. page is 1-based (default 1), limit defaults to 100, at most 1000. total counts every match. Optional min_projection_seq is a canonical nonnegative signed-int64 string. With this explicit fence, checkpoint and authorized account rows are read in one read-only repeatable-read SQL snapshot. The response adds exact-string projection_seq and consistency=current or projection_pending. When pending it returns items=[], total=0 and retry_after_ms=1000; these are not deletion or empty-list proof. Do not replace current membership until consistency is current and projection_seq meets the requested minimum. The fenced path is structural only and leaves money null; subscribe to authorized visible account_money for producer freshness. The deals checkpoint proves processed TRADES sequence at this SQL snapshot; it does not version direct account metadata writes or prove live Money freshness. Omitting the fence preserves the legacy response and execution Money read. Linked-client and select-by reads do not support this fence.
More details
Rights: the staff member needs every one of: accounts.view.
Parameters
min_projection_seqstring · queryCanonical nonnegative int64 TRADES checkpoint; explicit opt-in.
Returns
Promise<AccountPage>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.list()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"consistency": "string",
"items": [
{
"address": "1 High St",
"agent": 1,
"api_enabled": true,
"api_password_set": true,
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"bank_account": "string",
"city": "London",
"client_id": 1,
"color": "string",
"comment": "Deposit via bank"
}
],
"page": 1,
"projection_seq": "string",
"retry_after_ms": 1,
"total": 1
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.list(query?: { min_projection_seq? }, options?: RequestOptions): Promise<account.AccountPage>create
POST
/admin/v1/accountsOpen a trading account
Opens an account with zero money in a trading group of the caller's scope (a group out of scope is forbidden, an unknown one not_found, a staff group requires config.staff). Required: group, master_password, investor_password; phone_password is optional (confirms the account holder over the phone). Passwords: 8-16 characters with a lower case letter, an upper case letter, a digit and a symbol, at least the group's minimum length, and the two must differ. name and email at most 128 characters (email a plain address); leverage 1-10000 is an explicit account selection; 0 or absent inherits future changes to the group default. Existing accounts retain their migrated explicit leverage. Limits not negative (0 = the group's); trading_enabled defaults to true. When the group asks for it the account must change its password at first sign-in. Supply login for a preferred login, or omit it for the next free login. Staff accounts need a separate POST /staff with this login before manager sign-in. Journaled; the trading services are told about the new account. Unknown fields are refused.
More details
Rights: the staff member needs every one of: accounts.edit.
Request body
addressstringcitystringcommentstringcompanystringcountrystringemailstringgroupstringid_numberstringpassport, tax id or another unique identifier
investor_passwordstringlast_namestringlead_campaignstringlead_sourcestringleverageinteger0 = the group's default
limit_ordersintegerlimit_positionsintegerlogininteger0 = the next free login Login is the numeric identity of every account, trader or staff.
master_passwordstringmiddle_namestringnamestringphonestringphone_passwordstringoptional, confirms callers over the phone
statestringstatusstringRE resident, NR non-resident, "" not set
trading_enabledbooleandefault true
zip_codestringReturns
Promise<Account>The answer's
data.Errors
400
auth.password_weak: password must be 8-16 characters with a lower, upper, digit and symbol400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.create({
email: "ann@example.com",
group: "real\\standard",
investor_password: "Inv3st#Pass",
leverage: 100,
master_password: "Str0ng#Pass",
name: "Ann Smith",
trading_enabled: true
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"email": "ann@example.com",
"group": "real\\standard",
"investor_password": "Inv3st#Pass",
"leverage": 100,
"master_password": "Str0ng#Pass",
"name": "Ann Smith",
"trading_enabled": true
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"agent": 1,
"api_enabled": true,
"api_password_set": true,
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"bank_account": "string",
"city": "London",
"client_id": 1,
"color": "string",
"comment": "Deposit via bank"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.create(body: account.NewAccount, options?: RequestOptions): Promise<account.Account>count
GET
/admin/v1/accounts/countCount trading accounts
How many accounts GET /admin/v1/accounts would list with the same authorized filters. Reads a database count only, without account rows, personal field values or execution valuations. Name/email filters still require their field rights. Page and limit do not restrict the count (for navigator badges).
More details
Rights: the staff member needs every one of: accounts.view.
Parameters
groupstring · querymask, e.g. real\*
companystring · querylogininteger · querynamestring · queryemailstring · querypageinteger · querylimitinteger · queryReturns
Promise<count>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.count({
group: "string",
company: "string",
login: 1001
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/count?group=string&company=string&login=1001" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"total": 1
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.count(query?: { group?, company?, login?, name?, email?, page?, limit? }, options?: RequestOptions): Promise<http.count>groups
GET
/admin/v1/accounts/groupsTrading groups in scope
The groups in the caller's group scope (including staff groups with config.staff), for account filters and for moving an account to another group. Each item has the group path, deposit currency and company.
More details
Rights: the staff member needs every one of: accounts.view.
Returns
Promise<docAccountGroups>The answer's
data.Errors
401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.groups()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/groups" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"items": [
{
"company": "HS Markets Ltd",
"currency": "USD",
"password_min_length": 1,
"path": "real\\standard"
}
]
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.groups(options?: RequestOptions): Promise<http.docAccountGroups>window
GET
/admin/v1/accounts/windowRead a bounded stored Accounts window
Additive stored SQL read, fixed100 default/max rows; no Execution Money calls. first/last/before/after/around query-, resource-, actor-, rights- and resolved-scope-bound keyset cursors. IDs login/agent/client_id/policy_revision and all decimals are strings; nullable optional IDs use null. Other stored Account fields preserve the existing masks and version; currency/digits use effective stored group, money is null and valuation unavailable. Typed AND filters/sorts support login,group,name,last_name,middle_name,email,phone,country,city,company,comment,agent,client_id,leverage,balance,credit,enabled,trading_enabled,created_at,updated_at,last_access. Private filter/sort/search fields require their field rights before SQL. Numeric search targets exactlogin; text search is persisted name contains and requires name right. group is the existing mask; group_path is exact path or backslash descendants excluding sibling prefixes. client is canonical positive bigint, requires clients.view and individually authorized linked trading accounts; login in predicates allow at most100 operands. Current AccountsView, scope, hidden and staff rights remain additive. Page/checkpoint share read-only repeatable-read snapshot; ahead minimum returns projection_pending, empty unaccepted items/no navigation, retry1000; count independently returns null while pending. TRADES checkpoint covers trade projection only, not direct account/group metadata or liveMoney freshness. Existing Caller/schema has no independent broker selector guarantee. Legacy routes remain unchanged. Requires accounts_window_v1 for optional snapshot admission.
More details
Rights: the staff member needs every one of: accounts.view.
Parameters
clientstring · querygroup_pathstring · queryReturns
Promise<AccountWindowRow_>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.window({
client: "string",
group_path: "string"
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/window?client=string&group_path=string" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"after": "string",
"before": "string",
"calculated_at": "2026-09-25T10:15:00Z",
"consistency": "string",
"first_key": "string",
"has_after": true,
"has_before": true,
"items": [
{
"address": "1 High St",
"agent": "string",
"api_enabled": true,
"api_password_set": true,
"balance": "1000.00",
"balance_prev_day": "string",
"balance_prev_month": "string",
"bank_account": "string",
"city": "London",
"client_id": "string",
"color": "string",
"comment": "Deposit via bank"
}
],
"last_key": "string",
"page_id": "string",
"projection_seq": "string",
"proof": "string"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.window(query?: { client?, group_path? }, options?: RequestOptions): Promise<account.TradeWindowPage_account.AccountWindowRow_>windowCount
GET
/admin/v1/accounts/window/countCount a filtered stored Accounts window
Independent exact authorized stored count with identical typed predicates/privatefield gates/current scope, from its own read-only repeatable-read checkpoint snapshot. Page/navigation does not bound total. projection_seq is exactstring; consistency projection_pending returns total:null and retry_after_ms1000. Do not infer deletion or join page/count from mismatched checkpoints. No account DTO materialization or Execution Money valuation.
More details
Rights: the staff member needs every one of: accounts.view.
Parameters
clientstring · querygroup_pathstring · queryReturns
Promise<PositionWindowCount>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.windowCount({
client: "string",
group_path: "string"
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/window/count?client=string&group_path=string" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"consistency": "string",
"projection_seq": "string",
"query_id": "string",
"resource": "string",
"retry_after_ms": 1,
"total": 1
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.windowCount(query?: { client?, group_path? }, options?: RequestOptions): Promise<account.PositionWindowCount>retrieve
GET
/admin/v1/accounts/{login}Get a trading account
The account with its live money (money null when execution does not answer). leverage is the current effective account/group value; policy_revision identifies explicit individual selections. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.view.
Parameters
logininteger · pathrequiredAccount login.
Returns
Promise<Live>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.retrieve(1001)bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/1001" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"agent": 1,
"api_enabled": true,
"api_password_set": true,
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"bank_account": "string",
"city": "London",
"client_id": 1,
"color": "string",
"comment": "Deposit via bank"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.retrieve(login: number, options?: RequestOptions): Promise<account.Live>update
PATCH
/admin/v1/accounts/{login}Change a trading account
Changes any of name, email, leverage, group, enabled, trading_enabled, limit_orders, limit_positions, agent, trade_accounts, server_reports_enabled, api_enabled, sponsored_vps, push_enabled and expert_advisors_enabled; any other field is refused. version is required and must be the one last read, else conflict (reload and retry). Same limits as on create. A new group must be in scope and cannot change between staff and trading account types; an agent must be another trading account in scope (0 removes it). Moving the account to another group or disabling it closes its sessions. A body that changes nothing answers the account unchanged. Journaled with the changed fields; the trading services are told. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.edit.
Parameters
logininteger · pathrequiredAccount login.
Request body
addressstringagentinteger0 = none Login is the numeric identity of every account, trader or staff.
api_enabledbooleanbank_accountstringcitystringcolorstring#rrggbb, the row colour in account lists
commentstringcompanystringcountrystringemailstringenabledbooleanexpert_advisors_enabledbooleangroupstringmove to another trading group in scope; signs the account out
id_numberstringlast_namestringPersonal data; each field needs its accounts.field.* right to be read or changed (else blank / 403).
lead_campaignstringlead_sourcestringleverageintegerlimit_ordersinteger0 = the group's limit
limit_positionsinteger0 = the group's limit
middle_namestringmust_reset_passwordbooleannamestringotp_enabledbooleanpassword_change_allowedbooleanphonestringpush_enabledbooleanreports_enabledbooleanserver_reports_enabledbooleansponsored_vpsbooleanstatestringstatusstringRE (real client data checked) or NR (not checked)
technicalbooleanleft out of reports and exposure; changing it needs accounts.hidden_edit
trade_accountsstringfree-text note of the account's other trading accounts
trading_enabledbooleantrailing_allowedbooleanFlags.
versionintegerrequired: the version you last read
zip_codestringReturns
Promise<Account>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.update(1001, {
leverage: 200,
trading_enabled: false,
version: 3
})bash
curl -X PATCH "$NOVIQA_API_URL/admin/v1/accounts/1001" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"leverage": 200,
"trading_enabled": false,
"version": 3
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"agent": 1,
"api_enabled": true,
"api_password_set": true,
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"bank_account": "string",
"city": "London",
"client_id": 1,
"color": "string",
"comment": "Deposit via bank"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.update(login: number, body: http.docAccountsEdit, options?: RequestOptions): Promise<account.Account>delete
DELETE
/admin/v1/accounts/{login}Delete a trading account
Removes the account for good and closes its sessions. An account with open positions or open orders (conflict), or a non-zero balance (conflict), cannot be removed. Staff accounts must be removed through /staff. No body. Journaled. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.edit, accounts.delete.
Parameters
logininteger · pathrequiredAccount login.
Returns
Promise<null>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.delete(1001)bash
curl -X DELETE "$NOVIQA_API_URL/admin/v1/accounts/1001" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": null,
"request_id": "5b7f2c1e"
}ts
staff.accounts.delete(login: number, options?: RequestOptions): Promise<null>agent
GET
/admin/v1/accounts/{login}/agentAn agent account's earnings
For an account that acts as an agent: its clients (only those in the caller's scope) with the agent commission accrued and not yet paid, in the client's currency, and the payouts it received (agent deals, newest first, at most 100) with their total. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.view.
Parameters
logininteger · pathrequiredAccount login.
Returns
Promise<AgentEarnings>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.agent(1001)bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/1001/agent" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"agent": 1,
"clients": [
{
"accrued": "1.08452",
"group": "real\\standard",
"login": 1001,
"name": "Ann Smith"
}
],
"paid_total": "1.08452",
"payouts": [
{
"action": "buy",
"calc_type": "forex",
"comment": "Deposit via bank",
"commission": "1.08452",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"entry": "in",
"external_id": "string",
"fee": "1.08452",
"gateway_id": 1,
"id": 1
}
]
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.agent(login: number, options?: RequestOptions): Promise<account.AgentEarnings>balance
POST
/admin/v1/accounts/{login}/balancePost a money operation
Deposit, withdrawal or another money operation on the account, run by execution. Required: request_id (a new UUID per operation: sending the same id again returns the first answer and never pays twice), action (one of balance, credit, bonus, charge, correction, commission, dividend, dividend_franked, tax), amount (not zero; positive in, negative out). comment at most 64 characters. A refusal by execution is a normal answer with status rejected and a code, e.g. trade.no_money (a withdrawal larger than the balance or leaving free margin negative), trade.disabled; otherwise status is done and deals holds the new deal. Journaled; the change reaches the account's terminals as a balance event. skip_margin_check true skips the free margin and balance check (MT5 "without checking the free margin"). With the confirm_actions right send confirm_token and confirm_code from POST /admin/v1/confirmations, else 403 confirmation_required. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.balance.
Parameters
logininteger · pathrequiredAccount login.
Request body
actionDealActionDealAction is the kind of deal: a trade or a money operation. -
balance: deposit (+) or withdrawal (-) - bonus: moves credit - correction: may leave the account short - dividend_franked: MT5 franked dividend: a dividend with tax already paid - interest: the month's interest paid on free margin - agent: agent commission paid to the agent account; Value is the amount in the client's currencybuy sell balance credit bonus charge correction commission dividend dividend_franked tax swap interest agentamountstring+ in, - out Exact decimal as a string. Never parse it into a binary float for money or prices.
commentstringconfirm_codestringthe code as the user typed it
confirm_tokenstringfrom POST /admin/v1/confirmations
request_idstringskip_margin_checkbooleanSkipMarginCheck is MT5's "Conduct balance operation without checking the free margin and the current balance on the account".
Returns
Promise<TradeResult>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
confirmation_required: confirm this action with the code shown403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.balance(1001, {
action: "balance",
amount: "1000.00",
comment: "Deposit via bank",
request_id: "7d3f1c2a-5b6e-4f80-9a1b-2c3d4e5f6a7b"
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/balance" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"action": "balance",
"amount": "1000.00",
"comment": "Deposit via bank",
"request_id": "7d3f1c2a-5b6e-4f80-9a1b-2c3d4e5f6a7b"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{
"action": "buy",
"calc_type": "forex",
"comment": "Deposit via bank",
"commission": "1.08452",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"entry": "in",
"external_id": "string",
"fee": "1.08452",
"gateway_id": 1,
"id": 1
}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"group": "real\\standard",
"projected": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"shortfall": "1.08452",
"symbol": "EURUSD",
"virtual_credit": "1.08452"
},
"message": "string",
"money": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"order": {
"activated_at": "2026-09-25T10:15:00Z",
"by_position_id": 1,
"comment": "Deposit via bank",
"contract_size": "1.08452",
"created_at": "2026-09-25T10:15:00Z",
"dealer": 1,
"deviation_pts": 1,
"digits": 5,
"done_at": "2026-09-25T10:15:00Z",
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"external_id": "string"
},
"positions": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.balance(login: number, body: account.BalanceOp, options?: RequestOptions): Promise<models.TradeResult>deals
GET
/admin/v1/accounts/{login}/dealsAn account's deals
One page of the account's deals, newest first, with totals over every deal in the range (not only the page). from (inclusive) and to (exclusive) are RFC3339 times of the deal; either may be left out; to must be after from. page is 1-based, limit defaults to 100, at most 1000. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.view.
Parameters
logininteger · pathrequiredAccount login.
fromstring · querytostring · querypageinteger · querylimitinteger · queryReturns
Promise<DealPage>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.deals(1001, {
from: "2026-09-25T10:15:00Z",
to: "2026-09-25T10:15:00Z",
page: 1
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/1001/deals?from=2026-09-25T10%3A15%3A00Z&to=2026-09-25T10%3A15%3A00Z&page=1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"items": [
{
"action": "buy",
"calc_type": "forex",
"comment": "Deposit via bank",
"commission": "1.08452",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"entry": "in",
"external_id": "string",
"fee": "1.08452",
"gateway_id": 1,
"group": "real\\standard"
}
],
"page": 1,
"total": 1,
"totals": {
"commission": "1.08452",
"count": 1,
"deposits": "1.08452",
"fee": "1.08452",
"other": "1.08452",
"profit": "12.40",
"swap": "1.08452",
"volume": "0.10",
"withdrawals": "1.08452"
}
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.deals(login: number, query?: { from?, to?, page?, limit? }, options?: RequestOptions): Promise<report.DealPage>dealsDelete
POST
/admin/v1/accounts/{login}/deals/deleteDelete deals
Removes deals of the account from its history. ids holds 1-1000 deal ids (repeats counted once). Execution finds the deals in the account's history as written up to its last event (not the possibly lagging lists), so a deal just made is deleted and one deleted already answers not_found. Answers every id in id order: result is deleted, or not_found for an id that is not this account's or is already gone (never a not_found error for the request), plus deleted (how many). Money is not moved and positions are not rebuilt: check and fix positions and the balance afterwards. An Idempotency-Key header (UUID) is used as the correction's request id: a retry with the same key and ids answers the first run's results, deletes nothing more and journals nothing again. Journaled per deal. Runs in execution under the account's lock and is written to the trade log as one correction event (sent to the account's open terminals). A refusal by execution comes back as an error with its code. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.edit, trades.delete.
Parameters
logininteger · pathrequiredAccount login.
Idempotency-Keystring · headerOptional UUID used as the correction request id: a retry with the same key is applied once.
Request body
idsinteger[]Returns
Promise<DeleteResult>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action403
trade.disabled: trading is disabled404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.dealsDelete(1001, {
ids: [
10452,
10453
]
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/deals/delete" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"ids": [
10452,
10453
]
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"deleted": 1,
"items": [
{
"error": "string",
"id": 1,
"login": 1001,
"result": "string"
}
]
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.dealsDelete(login: number, body: account.idList, options?: RequestOptions): Promise<account.DeleteResult>updateDeals
PATCH
/admin/v1/accounts/{login}/deals/{id}Correct a deal
Rewrites a deal of the account in history: any of volume, price, profit, swap, commission, fee and comment (no version). Money is not moved: run a balance fix afterwards. Volume and price not negative, and positive on a buy or sell deal; comment at most 64 characters. A body that changes nothing answers the deal unchanged. A deal id that is not this account's is not_found. Journaled with the changes. Runs in execution under the account's lock and is written to the trade log as one correction event (sent to the account's open terminals). A refusal by execution comes back as an error with its code. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.edit.
Parameters
logininteger · pathrequiredAccount login.
idinteger · pathrequiredDeal id.
Request body
commentstringcommissionstringExact decimal as a string. Never parse it into a binary float for money or prices.
feestringExact decimal as a string. Never parse it into a binary float for money or prices.
pricestringExact decimal as a string. Never parse it into a binary float for money or prices.
profitstringExact decimal as a string. Never parse it into a binary float for money or prices.
swapstringExact decimal as a string. Never parse it into a binary float for money or prices.
volumestringExact decimal as a string. Never parse it into a binary float for money or prices.
Returns
Promise<Deal>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action403
trade.disabled: trading is disabled404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.updateDeals(1001, 1, {
comment: "price corrected",
price: "1.08512",
profit: "12.40"
})bash
curl -X PATCH "$NOVIQA_API_URL/admin/v1/accounts/1001/deals/1" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"comment": "price corrected",
"price": "1.08512",
"profit": "12.40"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"action": "buy",
"calc_type": "forex",
"comment": "Deposit via bank",
"commission": "1.08452",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"entry": "in",
"external_id": "string",
"fee": "1.08452",
"gateway_id": 1,
"id": 1
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.updateDeals(login: number, id: number, body: account.DealEdit, options?: RequestOptions): Promise<models.Deal>historyReport
GET
/admin/v1/accounts/{login}/history/reportTrade History Report
The MT5 Trade History Report of the account for exactly [from, to) (RFC 3339 times; not older than the caller's report history depth), as an attachment ReportHistory-<login>.html (printable page, no scripts) or ReportHistory-<login>.csv (format). Header lines: Trade History Report, Name, Account <login> (<currency>, 1:<leverage>, <server>, <group>) (server = the trade server name of the group's broker company's brand, left out when none), Broker (company), Date (generated), Period. Sections: Orders (history orders of the period: Time, Order, Symbol, Type, Volume filled / requested, Price, S / L, T / P, Time done, State, Comment); Deals (Time, Deal, Order, Symbol, Type, Entry, Volume, Price, Commission, Fee, Swap, Profit, running Balance, Comment; money operations included; footer row Closed P/L with the commission, fee, swap and trade profit totals and the final balance); Open Positions and Working Orders (current, with the market price; footer Floating P/L); Summary (the A/C Summary lines of the statements, over the period: Closed Trade P/L [trades' profit, swap and commission], Deposit/Withdrawal [balance], Credit Facility [credit and bonus, apart from the balance], Round Commission [commission operations], Additional Operations [charge, correction, dividend, franked dividend, tax, interest, agent], Fee, Total; Previous Balance + Total = Balance at the period end; then the current Credit, Equity, Floating P/L, Margin, Free Margin); Results (Gross Profit/Loss, Total Net Profit, Profit Factor, Expected Payoff, Balance Drawdown Absolute / Maximal (%) / Relative % (money), trade counts and percentages, largest/average trades, consecutive wins/losses). A trade is a deal that closed a position (result = profit + swap + commission + fee); drawdowns follow the running balance (MT5: Absolute = initial − minimal balance, Maximal = max(local high − next low), Relative = max of that in percent of the high). The running balance starts from the deals before the period. The CSV starts with a UTF-8 BOM and ends lines with CRLF; cells starting with = + - @ are guarded. Order types read as in the terminal (buy market, sell limit); volumes have at least 2 decimals. Each table stops at 20000 rows. Journaled ('<staff>': export history report of account '<login>' (<from> – <to>), N records — 1 record for one). The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.view, trades.view, export.
Parameters
logininteger · pathrequiredAccount login.
fromstring · queryrequiredStart, RFC 3339, inclusive.
tostring · queryrequiredEnd, RFC 3339, exclusive.
formatstring · queryrequiredhtml or csv.
html csvReturns
Promise<Response>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.historyReport(1001, {
from: "string",
to: "string",
format: "html"
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/1001/history/report?from=string&to=string&format=html" \
-H "Authorization: Bearer $NOVIQA_TOKEN"ts
// text/html file: the SDK returns the raw Responsets
staff.accounts.historyReport(login: number, query: { from, to, format }, options?: RequestOptions): Promise<Response>language
GET
/admin/v1/accounts/{login}/languageGet an account's mail language
The language the account chose ("" = its group's), the group's default, the one its e-mails are written in now, and the available languages. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.view, accounts.field.general.
Parameters
logininteger · pathrequiredAccount login.
Returns
Promise<Language>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.language(1001)bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/1001/language" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"available": [
"string"
],
"default": "string",
"effective": "string",
"language": "string"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.language(login: number, options?: RequestOptions): Promise<account.Language>updateLanguage
PUT
/admin/v1/accounts/{login}/languageSet an account's mail language
Sets the language its e-mails are written in: one of the available languages (en, de), or "" to follow the group. language is required. Journaled. Answers the language as GET does. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.edit, accounts.field.general.
Parameters
logininteger · pathrequiredAccount login.
Request body
languagestringone of the available languages, or "" for the group's
Returns
Promise<Language>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.updateLanguage(1001, {
language: "de"
})bash
curl -X PUT "$NOVIQA_API_URL/admin/v1/accounts/1001/language" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"language": "de"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"available": [
"string"
],
"default": "string",
"effective": "string",
"language": "string"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.updateLanguage(login: number, body: http.docAccountsLanguage, options?: RequestOptions): Promise<account.Language>orders
GET
/admin/v1/accounts/{login}/ordersAn account's order history
One page of the account's finished orders (filled, cancelled, expired, rejected), newest first. from and to are RFC3339 times; to may not be before from. page is 1-based, limit defaults to 100, at most 1000. Open pending orders are in GET /admin/v1/accounts/{login}/state. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.view.
Parameters
logininteger · pathrequiredAccount login.
fromstring · querytostring · querypageinteger · querylimitinteger · queryReturns
Promise<Order_>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.orders(1001, {
from: "2026-09-25T10:15:00Z",
to: "2026-09-25T10:15:00Z",
page: 1
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/1001/orders?from=2026-09-25T10%3A15%3A00Z&to=2026-09-25T10%3A15%3A00Z&page=1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"items": [
{
"activated_at": "2026-09-25T10:15:00Z",
"by_position_id": 1,
"comment": "Deposit via bank",
"contract_size": "1.08452",
"created_at": "2026-09-25T10:15:00Z",
"dealer": 1,
"deviation_pts": 1,
"digits": 5,
"done_at": "2026-09-25T10:15:00Z",
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"external_id": "string"
}
],
"page": 1,
"total": 1
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.orders(login: number, query?: { from?, to?, page?, limit? }, options?: RequestOptions): Promise<http.tradePage_models.Order_>ordersDelete
POST
/admin/v1/accounts/{login}/orders/deleteDelete orders
The MT5 admin order Delete: removes orders of the account, open or in the history, as records (not a cancel). ids holds 1-1000 order ids (repeats counted once). Nothing is recalculated and no deal is made: an open order simply disappears (terminals see it leave as cancelled), its deals and positions stay; check and fix positions and the balance after if needed. An order being filled right now refuses the request (conflict). Answers every id in id order: deleted, or not_found (not this account's, or already gone), plus deleted (how many). Idempotency-Key (UUID) works as for deal deletes. Journaled per order (order #N of account 'L' deleted). Runs in execution under the account's lock and is written to the trade log as one correction event (sent to the account's open terminals). A refusal by execution comes back as an error with its code. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.edit, trades.delete.
Parameters
logininteger · pathrequiredAccount login.
Idempotency-Keystring · headerOptional UUID used as the correction request id: a retry with the same key is applied once.
Request body
idsinteger[]Returns
Promise<DeleteResult>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action403
trade.disabled: trading is disabled404
not_found: not found409
conflict: already exists500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.ordersDelete(1001, {
ids: [
20451,
20452
]
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/orders/delete" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"ids": [
20451,
20452
]
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"deleted": 1,
"items": [
{
"error": "string",
"id": 1,
"login": 1001,
"result": "string"
}
]
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.ordersDelete(login: number, body: account.idList, options?: RequestOptions): Promise<account.DeleteResult>ordersActivate
POST
/admin/v1/accounts/{login}/orders/{id}/activateActivate a pending order
MT5 Manager Activate: the dealer triggers the pending order now, as if the market reached its price, through the same activation a price makes. A stop limit order becomes a limit order at its price; any other order fills at the current price (buy at ask, sell at bid) with the opening margin checked, or goes to its liquidity provider when routing sends it there (status placed). Answers the trade result like POST /admin/v1/accounts/{login}/trades: status done with order / deals, or rejected with a code (trade.no_money - the order is then rejected and removed, as a reached price would do; trade.order_not_found - not a pending order; conflict - being filled; trade.no_prices). An Idempotency-Key header (UUID) is the request id: a retry with the same key answers the first run and activates nothing again. Journaled (order #N of account 'L' activated, or a warning on a refusal) with the fill's deal lines. No body. Runs in execution under the account's lock and is written to the trade log as one correction event (sent to the account's open terminals). A refusal by execution comes back as an error with its code. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.edit.
Parameters
logininteger · pathrequiredAccount login.
idinteger · pathrequiredOrder id.
Idempotency-Keystring · headerOptional UUID used as the correction request id: a retry with the same key is applied once.
Returns
Promise<TradeResult>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.ordersActivate(1001, 1)bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/orders/1/activate" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{
"action": "buy",
"calc_type": "forex",
"comment": "Deposit via bank",
"commission": "1.08452",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"entry": "in",
"external_id": "string",
"fee": "1.08452",
"gateway_id": 1,
"id": 1
}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"group": "real\\standard",
"projected": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"shortfall": "1.08452",
"symbol": "EURUSD",
"virtual_credit": "1.08452"
},
"message": "string",
"money": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"order": {
"activated_at": "2026-09-25T10:15:00Z",
"by_position_id": 1,
"comment": "Deposit via bank",
"contract_size": "1.08452",
"created_at": "2026-09-25T10:15:00Z",
"dealer": 1,
"deviation_pts": 1,
"digits": 5,
"done_at": "2026-09-25T10:15:00Z",
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"external_id": "string"
},
"positions": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.ordersActivate(login: number, id: number, options?: RequestOptions): Promise<models.TradeResult>ordersReopen
POST
/admin/v1/accounts/{login}/orders/{id}/reopenReopen an order from history
Puts a limit, stop or stop limit order from the account's history back as an open pending order. Correct the account first: delete the order's deals, fix positions and fix the balance. Other kinds, or an order that is still open, are invalid_input; an id not in this account's history is not_found. No body. Journaled. Runs in execution under the account's lock and is written to the trade log as one correction event (sent to the account's open terminals). A refusal by execution comes back as an error with its code. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.edit.
Parameters
logininteger · pathrequiredAccount login.
idinteger · pathrequiredOrder id.
Returns
Promise<TradeResult>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action403
trade.disabled: trading is disabled404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.ordersReopen(1001, 1)bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/orders/1/reopen" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{
"action": "buy",
"calc_type": "forex",
"comment": "Deposit via bank",
"commission": "1.08452",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"entry": "in",
"external_id": "string",
"fee": "1.08452",
"gateway_id": 1,
"id": 1
}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"group": "real\\standard",
"projected": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"shortfall": "1.08452",
"symbol": "EURUSD",
"virtual_credit": "1.08452"
},
"message": "string",
"money": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"order": {
"activated_at": "2026-09-25T10:15:00Z",
"by_position_id": 1,
"comment": "Deposit via bank",
"contract_size": "1.08452",
"created_at": "2026-09-25T10:15:00Z",
"dealer": 1,
"deviation_pts": 1,
"digits": 5,
"done_at": "2026-09-25T10:15:00Z",
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"external_id": "string"
},
"positions": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.ordersReopen(login: number, id: number, options?: RequestOptions): Promise<models.TradeResult>ordersToHistory
POST
/admin/v1/accounts/{login}/orders/{id}/to-historyMove a pending order to history
Cancels an open pending order of the account by staff correction: it moves to the history, never fills and holds no margin. An order not open is trade.order_not_found; one being filled right now is conflict. No body. Journaled. Runs in execution under the account's lock and is written to the trade log as one correction event (sent to the account's open terminals). A refusal by execution comes back as an error with its code. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.edit.
Parameters
logininteger · pathrequiredAccount login.
idinteger · pathrequiredOrder id.
Returns
Promise<TradeResult>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action403
trade.disabled: trading is disabled403
trade.order_not_found: order not found404
not_found: not found409
conflict: already exists500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.ordersToHistory(1001, 1)bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/orders/1/to-history" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{
"action": "buy",
"calc_type": "forex",
"comment": "Deposit via bank",
"commission": "1.08452",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"entry": "in",
"external_id": "string",
"fee": "1.08452",
"gateway_id": 1,
"id": 1
}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"group": "real\\standard",
"projected": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"shortfall": "1.08452",
"symbol": "EURUSD",
"virtual_credit": "1.08452"
},
"message": "string",
"money": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"order": {
"activated_at": "2026-09-25T10:15:00Z",
"by_position_id": 1,
"comment": "Deposit via bank",
"contract_size": "1.08452",
"created_at": "2026-09-25T10:15:00Z",
"dealer": 1,
"deviation_pts": 1,
"digits": 5,
"done_at": "2026-09-25T10:15:00Z",
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"external_id": "string"
},
"positions": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.ordersToHistory(login: number, id: number, options?: RequestOptions): Promise<models.TradeResult>otpReset
POST
/admin/v1/accounts/{login}/otp/resetRemove an account's one-time password key
Unbinds the account's authenticator (for a holder who lost it); the next sign-in binds a new one. invalid_input when no key is bound. Journaled. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.edit.
Parameters
logininteger · pathrequiredAccount login.
Returns
Promise<null>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.otpReset(1001)bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/otp/reset" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": null,
"request_id": "5b7f2c1e"
}ts
staff.accounts.otpReset(login: number, options?: RequestOptions): Promise<null>passwords
POST
/admin/v1/accounts/{login}/passwordsReset an account's passwords
Sets a new master password, investor password, api_password and/or phone_password (at least one; an empty one is kept). Same password rules as on create; master and investor must differ. Closes every session of the account. Journaled (never the passwords). The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.edit.
Parameters
logininteger · pathrequiredAccount login.
Request body
api_passwordstringsigns in the web API terminal
investor_passwordstringmaster_passwordstringphone_passwordstringconfirms callers over the phone
Returns
Promise<null>The answer's
data.Errors
400
auth.password_weak: password must be 8-16 characters with a lower, upper, digit and symbol400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.passwords(1001, {
master_password: "N3w#Master1"
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/passwords" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"master_password": "N3w#Master1"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": null,
"request_id": "5b7f2c1e"
}ts
staff.accounts.passwords(login: number, body: account.Passwords, options?: RequestOptions): Promise<null>positionsCheck
GET
/admin/v1/accounts/{login}/positions/checkCheck positions against history
Compares the account's open positions with the positions its deals history builds: invalid differ, missed should be open and are not, extra are open but not in history; ok when all agree. Changes nothing; the journal says positions of account 'x' have been checked, then account 'x' has valid positions or (warning) account 'x' has n invalid positions: .... trade.timeout when the history is not written yet (try again). The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.view.
Parameters
logininteger · pathrequiredAccount login.
Returns
Promise<PositionCheck>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action403
trade.disabled: trading is disabled404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.positionsCheck(1001)bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/1001/positions/check" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"current": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"extra": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"invalid": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"login": 1001,
"missed": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"ok": true
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.positionsCheck(login: number, options?: RequestOptions): Promise<models.PositionCheck>positionsDelete
POST
/admin/v1/accounts/{login}/positions/deleteDelete positions
Removes open positions of the account with no order and no deal (money is not moved), several at once; the single DELETE route does one. ids holds 1-1000 position ids. Answers every id in id order: deleted, or not_found (not an open position of this account), plus deleted. Idempotency-Key (UUID) works as for deal deletes. Journaled per position (position #N of account 'L' deleted). Runs in execution under the account's lock and is written to the trade log as one correction event (sent to the account's open terminals). A refusal by execution comes back as an error with its code. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.edit, trades.delete.
Parameters
logininteger · pathrequiredAccount login.
Idempotency-Keystring · headerOptional UUID used as the correction request id: a retry with the same key is applied once.
Request body
idsinteger[]Returns
Promise<DeleteResult>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action403
trade.disabled: trading is disabled404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.positionsDelete(1001, {
ids: [
20451,
20452
]
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/positions/delete" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"ids": [
20451,
20452
]
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"deleted": 1,
"items": [
{
"error": "string",
"id": 1,
"login": 1001,
"result": "string"
}
]
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.positionsDelete(login: number, body: account.idList, options?: RequestOptions): Promise<account.DeleteResult>positionsFix
POST
/admin/v1/accounts/{login}/positions/fixRebuild positions from history
Rebuilds the account's open positions from its deals history and answers the check as it was before the fix (see the check route). Journaled with what changed, e.g. positions of account 'x' have been fixed: 1 rebuilt, 1 removed, or positions of account 'x' are valid, nothing to fix (corrected = differed, rebuilt = missed, removed = extra). No body. Runs in execution under the account's lock and is written to the trade log as one correction event (sent to the account's open terminals). A refusal by execution comes back as an error with its code. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.edit.
Parameters
logininteger · pathrequiredAccount login.
Returns
Promise<PositionCheck>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action403
trade.disabled: trading is disabled404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.positionsFix(1001)bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/positions/fix" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"current": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"extra": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"invalid": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"login": 1001,
"missed": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"ok": true
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.positionsFix(login: number, options?: RequestOptions): Promise<models.PositionCheck>updatePositions
PATCH
/admin/v1/accounts/{login}/positions/{id}Correct an open position
Rewrites an open position of the account: any of volume, price_open, stop_loss, take_profit, swap and comment (no version). Volume and open price must stay positive, stops not negative; comment at most 64 characters. No order or deal is made. Answers the position as saved. Journaled. Runs in execution under the account's lock and is written to the trade log as one correction event (sent to the account's open terminals). A refusal by execution comes back as an error with its code. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.edit.
Parameters
logininteger · pathrequiredAccount login.
idinteger · pathrequiredPosition id.
Request body
commentstringprice_openstringExact decimal as a string. Never parse it into a binary float for money or prices.
stop_lossstringExact decimal as a string. Never parse it into a binary float for money or prices.
swapstringExact decimal as a string. Never parse it into a binary float for money or prices.
take_profitstringExact decimal as a string. Never parse it into a binary float for money or prices.
volumestringExact decimal as a string. Never parse it into a binary float for money or prices.
Returns
Promise<Position>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action403
trade.disabled: trading is disabled403
trade.position_not_found: position not found404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.updatePositions(1001, 1, {
comment: "fixed stops",
stop_loss: "1.08000",
take_profit: "0"
})bash
curl -X PATCH "$NOVIQA_API_URL/admin/v1/accounts/1001/positions/1" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"comment": "fixed stops",
"stop_loss": "1.08000",
"take_profit": "0"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {
"expert_id": "string",
"name": "Ann Smith",
"run_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"type": "string",
"version": 1
},
"price_current": "1.08452",
"price_open": "1.08452"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.updatePositions(login: number, id: number, body: account.PositionEdit, options?: RequestOptions): Promise<models.Position>deletePositions
DELETE
/admin/v1/accounts/{login}/positions/{id}Delete an open position
Removes an open position of the account with no order and no deal (money is not moved). Answers {"deleted": id}. Journaled. Runs in execution under the account's lock and is written to the trade log as one correction event (sent to the account's open terminals). A refusal by execution comes back as an error with its code. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.edit, trades.delete.
Parameters
logininteger · pathrequiredAccount login.
idinteger · pathrequiredPosition id.
Returns
Promise<object>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action403
trade.disabled: trading is disabled403
trade.position_not_found: position not found404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.deletePositions(1001, 1)bash
curl -X DELETE "$NOVIQA_API_URL/admin/v1/accounts/1001/positions/1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {},
"request_id": "5b7f2c1e"
}ts
staff.accounts.deletePositions(login: number, id: number, options?: RequestOptions): Promise<object>settings
GET
/admin/v1/accounts/{login}/settingsRead individual account settings
Explicit sparse selections, inherited and effective settings for the assigned group, available symbols, commission rules and safe scoped choices. Requires accounts.overrides.view and account scope; no configuration rights required. Missing leaves inherit. Legacy account security flags and group connection/EA prohibitions remain hard ceilings. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.overrides.view.
Parameters
logininteger · pathrequiredAccount login.
Returns
Promise<Settings>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.settings(1001)bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/1001/settings" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"commissions": [
{
"effective": {},
"id": 1,
"inherited": {}
}
],
"companies": [
"string"
],
"effective": {
"allow_multiple_trader_sessions": true,
"auth_type": "plain",
"clear_accumulated_eod": true,
"close_fifo": true,
"company": "HS Markets Ltd",
"company_email": "string",
"company_website": "string",
"compensate_credit": true,
"connections_enabled": true,
"created_at": "2026-09-25T10:15:00Z",
"currency": "USD",
"currency_digits": 1
},
"fields": [
{
"field": "string",
"nullable": true,
"scope": "string",
"type": "string"
}
],
"group": "real\\standard",
"inherited": {
"allow_multiple_trader_sessions": true,
"auth_type": "plain",
"clear_accumulated_eod": true,
"close_fifo": true,
"company": "HS Markets Ltd",
"company_email": "string",
"company_website": "string",
"compensate_credit": true,
"connections_enabled": true,
"created_at": "2026-09-25T10:15:00Z",
"currency": "USD",
"currency_digits": 1
},
"leverage_profiles": [
{
"id": 1,
"name": "Ann Smith"
}
],
"login": 1001,
"mail_servers": [
{
"id": 1,
"name": "Ann Smith"
}
],
"overrides": {
"commissions": {},
"group": {},
"revision": 1,
"symbols": {}
},
"policy_revision": 1,
"settings_version": 1
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.settings(login: number, options?: RequestOptions): Promise<account.Settings>updateSettings
PATCH
/admin/v1/accounts/{login}/settingsSet or reset individual account settings atomically
Requires accounts.overrides.edit and accounts.edit. Supply account version and inherited settings_version; stale revisions return conflict. set carries explicit typed leaves (including false, zero, empty lists); reset removes only named selections. A field cannot be set and reset together. Symbols use stable symbol IDs; margin_rates.<kind>.initial/maintenance and swap_multipliers.<weekday 0..6> reset independently. spread_diff/spread_balance are logical points with exact signed difference and independent inheritance; cannot mix with raw bid/ask leaves. Commissions use inherited rule IDs and tiers.<stable ID>.<field>; no new rule membership. Company must be licensed and inside caller company scope. Currency/margin changes require disabled, flat account without unsettled work; currency changes also require no financial history. All fields, account version, policy revision and durable scoped audit/invalidation outbox commit together. No automatic permission grants.
More details
Rights: the staff member needs every one of: accounts.overrides.edit, accounts.edit.
Parameters
logininteger · pathrequiredAccount login.
Request body
resetAccountPolicyResetsetAccountPolicyAccountPolicy contains only explicitly selected leaves. Absence inherits; false, zero, empty lists and nullable values remain explicit choices. The catalog derives types from the domain models, not arbitrary JSON paths.
settings_versionintegerversionintegerReturns
Promise<Settings>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.updateSettings(1001, {
reset: {
commissions: {},
group: [
"string"
],
symbols: {}
},
set: {
commissions: {},
group: {},
revision: 1,
symbols: {}
},
settings_version: 1,
version: 1
})bash
curl -X PATCH "$NOVIQA_API_URL/admin/v1/accounts/1001/settings" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"reset": {
"commissions": {},
"group": [
"string"
],
"symbols": {}
},
"set": {
"commissions": {},
"group": {},
"revision": 1,
"symbols": {}
},
"settings_version": 1,
"version": 1
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"commissions": [
{
"effective": {},
"id": 1,
"inherited": {}
}
],
"companies": [
"string"
],
"effective": {
"allow_multiple_trader_sessions": true,
"auth_type": "plain",
"clear_accumulated_eod": true,
"close_fifo": true,
"company": "HS Markets Ltd",
"company_email": "string",
"company_website": "string",
"compensate_credit": true,
"connections_enabled": true,
"created_at": "2026-09-25T10:15:00Z",
"currency": "USD",
"currency_digits": 1
},
"fields": [
{
"field": "string",
"nullable": true,
"scope": "string",
"type": "string"
}
],
"group": "real\\standard",
"inherited": {
"allow_multiple_trader_sessions": true,
"auth_type": "plain",
"clear_accumulated_eod": true,
"close_fifo": true,
"company": "HS Markets Ltd",
"company_email": "string",
"company_website": "string",
"compensate_credit": true,
"connections_enabled": true,
"created_at": "2026-09-25T10:15:00Z",
"currency": "USD",
"currency_digits": 1
},
"leverage_profiles": [
{
"id": 1,
"name": "Ann Smith"
}
],
"login": 1001,
"mail_servers": [
{
"id": 1,
"name": "Ann Smith"
}
],
"overrides": {
"commissions": {},
"group": {},
"revision": 1,
"symbols": {}
},
"policy_revision": 1,
"settings_version": 1
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.updateSettings(login: number, body: models.AccountPolicyPatch, options?: RequestOptions): Promise<account.Settings>state
GET
/admin/v1/accounts/{login}/stateLive state of an account
Live money, open positions and pending orders, read from execution. trade.timeout when execution does not answer. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: trades.view.
Parameters
logininteger · pathrequiredAccount login.
Returns
Promise<AccountState>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.state(1001)bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/1001/state" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"error": "ok",
"money": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"orders": [
{
"activated_at": "2026-09-25T10:15:00Z",
"by_position_id": 1,
"comment": "Deposit via bank",
"contract_size": "1.08452",
"created_at": "2026-09-25T10:15:00Z",
"dealer": 1,
"deviation_pts": 1,
"digits": 5,
"done_at": "2026-09-25T10:15:00Z",
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"external_id": "string"
}
],
"positions": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"risk": {
"free_margin_mode": "ignore_pl",
"level_type": "percent",
"leverage": 100,
"leverage_profile": "string",
"margin_call_level": "1.08452",
"margin_mode": "netting",
"stop_out_level": "1.08452"
}
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.state(login: number, options?: RequestOptions): Promise<models.AccountState>statements
GET
/admin/v1/accounts/{login}/statementsRead an account's statement switch
Whether the account gets daily and monthly statements. The account must be in the caller's group scope, else not_found.
More details
Rights: the staff member needs every one of: accounts.view.
Parameters
logininteger · pathrequiredAccount login.
Returns
Promise<docReportsEnabled>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.statements(1001)bash
curl -X GET "$NOVIQA_API_URL/admin/v1/accounts/1001/statements" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"enabled": true
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.statements(login: number, options?: RequestOptions): Promise<http.docReportsEnabled>updateStatements
PUT
/admin/v1/accounts/{login}/statementsTurn an account's statements on or off
Sets whether the account gets daily and monthly statements (also whether a trader sees their own daily reports). The account must be in the caller's group scope, else not_found. Writes an account journal line. Answers the new value.
More details
Rights: the staff member needs every one of: accounts.edit.
Parameters
logininteger · pathrequiredAccount login.
Request body
enabledbooleanwhether the account gets daily and monthly statements
Returns
Promise<docReportsEnabled>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.updateStatements(1001, {
enabled: false
})bash
curl -X PUT "$NOVIQA_API_URL/admin/v1/accounts/1001/statements" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"enabled": false
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"enabled": true
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.updateStatements(login: number, body: http.docReportsEnabled, options?: RequestOptions): Promise<http.docReportsEnabled>trades
POST
/admin/v1/accounts/{login}/tradesTrade for an account
Sends a trade request for the account with the caller as its dealer. It runs the same checks as a trader's own request (validation, routing, execution) and is journaled. Body at most 4 KB; login, group and leverage come from the account and must not be sent.
More details
request_id is required: a new UUID per request; sending the same id again returns the first answer and never trades twice. action is required:
open: market order; needssymbol_id,side,volume,price(the price seen, for the deviation check) and optionallydeviation_pts,stop_loss,take_profit,fill_policy.place: pending order; needssymbol_id,side,kind(limit, stop or stop_limit),volume,price,trigger_pricefor stop_limit, optionally stops,expiration(until_cancelled, today, specified_time, specified_day) withexpires_at.close: needsposition_id;volumecloses part (0 or absent = all).close_by: needsposition_idand a different oppositeby_position_id.modify: newstop_loss/take_profitofposition_id(0 removes).modify_pending: changesorder_id's price, trigger, stops or expiration.cancel: deletes pendingorder_id.
fill_policy is fill_or_kill, immediate_or_cancel, book_or_cancel or return (empty = the symbol's). Volumes and prices are decimal strings and not negative; ids and deviation_pts not negative; comment at most 64 characters.
The answer is a trade result, not an error, whenever the trading services decided: status done, placed (pending order accepted), partial, requote (bid/ask carry the new prices), queued (a dealer holds it; the outcome arrives on the live socket) or rejected with a code: trade.symbol_unavailable, trade.disabled, trade.close_only, trade.side_not_allowed, trade.market_closed, trade.no_prices, trade.order_type_not_allowed, trade.invalid_volume, trade.invalid_price, trade.invalid_stops, trade.frozen, trade.fill_policy_not_supported, trade.invalid_expiration, trade.no_money, trade.too_many_orders, trade.volume_limit, trade.hedging_not_allowed, trade.position_not_found, trade.order_not_found, trade.requote, trade.rejected (by a dealer or routing rule), trade.timeout, invalid_input or not_found, with message saying why. The error answers below are refusals before the request reached the trading services: malformed body, the account's rate limit (20 requests a second), or no answer in time (up to about two minutes while a dealer decides). The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
Rights: the staff member needs every one of: trades.edit.
Parameters
logininteger · pathrequiredAccount login.
Request body
actionTradeActionTradeAction is what a trade request asks for. -
open: market order - close: close all or part of a position - close_by: close a position by an opposite one (hedging) - modify: change a position's stop loss / take profit - place: place a pending order - modify_pending: change a pending order - cancel: cancel a pending order - activate: Requests the engine makes itself when a price reaches a level. Routing sees each as its own kind, so a rule can send it to a liquidity provider; the side is the position's (stop loss, take profit, stop out) or the order's. a pending order reached its price - activate_stop_limit: the stop price of a stop-limit order was reached: it becomes a limit order - stop_loss: a position's stop loss was reached - take_profit: a position's take profit was reached - stop_out: a stop out closes a position - stop_out_order: a stop out removes the pending order holding the most marginopen close close_by modify place modify_pending cancel activate activate_stop_limit stop_loss take_profit stop_out stop_out_orderby_position_idanyTrade target identity, 0 through 9223372036854775807. Browsers must send exact decimal strings; never convert IDs to JavaScript numbers. Legacy integers remain accepted. Null preserves an existing value; fresh null or omitted optional IDs mean zero; the action still validates its required target.
commentstringdeviation_ptsintegerexpirationstringexpires_atstringUTC time, RFC 3339.
fill_policystringkindOrderKindOrderKind is how an order waits for its price. -
market: fill now - limit: fill at this price or better - stop: becomes market when the price reaches it - stop_limit: becomes a limit order when the price reaches itmarket limit stop stop_limitorder_idanyTrade target identity, 0 through 9223372036854775807. Browsers must send exact decimal strings; never convert IDs to JavaScript numbers. Legacy integers remain accepted. Null preserves an existing value; fresh null or omitted optional IDs mean zero; the action still validates its required target.
originanyposition_idanyTrade target identity, 0 through 9223372036854775807. Browsers must send exact decimal strings; never convert IDs to JavaScript numbers. Legacy integers remain accepted. Null preserves an existing value; fresh null or omitted optional IDs mean zero; the action still validates its required target.
pricestringExact decimal as a string. Never parse it into a binary float for money or prices.
request_idstringnew UUID per request; the same id twice runs once
sideSideSide is the direction of an order, position or deal.
buy sellstop_lossstringExact decimal as a string. Never parse it into a binary float for money or prices.
symbol_idanyTrade target identity, 0 through 9223372036854775807. Browsers must send exact decimal strings; never convert IDs to JavaScript numbers. Legacy integers remain accepted. Null preserves an existing value; fresh null or omitted optional IDs mean zero; the action still validates its required target.
take_profitstringExact decimal as a string. Never parse it into a binary float for money or prices.
trigger_pricestringExact decimal as a string. Never parse it into a binary float for money or prices.
volumestringExact decimal as a string. Never parse it into a binary float for money or prices.
Returns
Promise<TradeResult>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found429
auth.too_many_attempts: too many attempts, try again later500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.trades(1001, {
action: "open",
comment: "by dealer",
deviation_pts: 20,
price: "1.08500",
request_id: "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
side: "buy",
stop_loss: "1.08000",
symbol_id: 12,
take_profit: "1.09500",
volume: "0.10"
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/trades" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"action": "open",
"comment": "by dealer",
"deviation_pts": 20,
"price": "1.08500",
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"side": "buy",
"stop_loss": "1.08000",
"symbol_id": 12,
"take_profit": "1.09500",
"volume": "0.10"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{
"action": "buy",
"calc_type": "forex",
"comment": "Deposit via bank",
"commission": "1.08452",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"entry": "in",
"external_id": "string",
"fee": "1.08452",
"gateway_id": 1,
"id": 1
}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"group": "real\\standard",
"projected": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"shortfall": "1.08452",
"symbol": "EURUSD",
"virtual_credit": "1.08452"
},
"message": "string",
"money": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"order": {
"activated_at": "2026-09-25T10:15:00Z",
"by_position_id": 1,
"comment": "Deposit via bank",
"contract_size": "1.08452",
"created_at": "2026-09-25T10:15:00Z",
"dealer": 1,
"deviation_pts": 1,
"digits": 5,
"done_at": "2026-09-25T10:15:00Z",
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"external_id": "string"
},
"positions": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.trades(login: number, body: account.Trade, options?: RequestOptions): Promise<models.TradeResult>transfer
POST
/admin/v1/accounts/{login}/transferTransfer funds to another account
Moves amount from the account to to, as a debit and a credit deal on each. Required: request_id (a new UUID per transfer; a repeat never moves money twice) and to (a different trading account you manage). amount must be positive. Allowed only when the account's group's fund_transfer_mode permits it: disabled refuses every transfer; same_client needs both accounts linked to the same client; same_group needs to in the same group or one of its subgroups; same_client_group needs both, same client and the same group; any always allows it. The two legs are not one transaction: if the debit succeeds and the credit fails, the answer for the credit leg is returned and the money is short at to until a dealer reconciles it. comment at most 64 characters. Journaled on both accounts. The account must be in the caller's group scope; otherwise forbidden. Staff accounts additionally require config.staff and rights covering the target manager. An unknown login is not_found.
More details
Rights: the staff member needs every one of: accounts.balance.
Parameters
logininteger · pathrequiredAccount login.
Request body
amountstringpositive, moved from the URL's account to
to Exact decimal as a string. Never parse it into a binary float for money or prices.commentstringrequest_idstringtointegerLogin is the numeric identity of every account, trader or staff.
Returns
Promise<TradeResult>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.accounts.transfer(1001, {
amount: "250.00",
comment: "Consolidating accounts",
request_id: "8e4f2d3b-6c7f-4091-8b2c-3d4e5f6a7b8c",
to: 1002
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/accounts/1001/transfer" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"amount": "250.00",
"comment": "Consolidating accounts",
"request_id": "8e4f2d3b-6c7f-4091-8b2c-3d4e5f6a7b8c",
"to": 1002
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{
"action": "buy",
"calc_type": "forex",
"comment": "Deposit via bank",
"commission": "1.08452",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"entry": "in",
"external_id": "string",
"fee": "1.08452",
"gateway_id": 1,
"id": 1
}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"group": "real\\standard",
"projected": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"shortfall": "1.08452",
"symbol": "EURUSD",
"virtual_credit": "1.08452"
},
"message": "string",
"money": {
"agent_commission": "1.08452",
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"blocked_commission": "1.08452",
"blocked_profit": "1.08452",
"credit": "0.00",
"currency": "USD",
"currency_digits": 1,
"day": "2026-09-25T10:15:00Z",
"effective_leverage": "1.08452",
"equity": "1012.40"
},
"order": {
"activated_at": "2026-09-25T10:15:00Z",
"by_position_id": 1,
"comment": "Deposit via bank",
"contract_size": "1.08452",
"created_at": "2026-09-25T10:15:00Z",
"dealer": 1,
"deviation_pts": 1,
"digits": 5,
"done_at": "2026-09-25T10:15:00Z",
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"external_id": "string"
},
"positions": [
{
"comment": "Deposit via bank",
"contract_size": "1.08452",
"dealer": 1,
"digits": 5,
"external_id": "string",
"id": 1,
"login": 1001,
"margin": "108.45",
"opened_at": "2026-09-25T10:15:00Z",
"origin": {},
"price_current": "1.08452",
"price_open": "1.08452"
}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"request_id": "5b7f2c1e"
}ts
staff.accounts.transfer(login: number, body: account.Transfer, options?: RequestOptions): Promise<models.TradeResult>