Appearance
staff.deals
2 methods on staff.deals. Each returns the answer's data and throws NoviqaError on a failed answer.
list
GET
/admin/v1/dealsList deals
One page of deals across accounts, newest first, each with its account's group, and totals over every matching deal (not only the page). Rows are limited to trading accounts whose group is in the caller's group scope. Filters: group a group mask (at most 128 characters), company the licence company, login an exact login, symbol an exact symbol name (any case, at most 64 characters), from (inclusive) and to (exclusive) RFC3339 times such as 2026-09-24T00:00:00Z, either may be left out, to after from. page is 1-based (default 1), limit defaults to 100, at most 1000. action narrows to one deal action: buy, sell, balance, credit, bonus, charge, correction, commission, dividend, tax, swap or interest.
More details
Rights: the staff member needs every one of: trades.view.
Parameters
groupstring · querymask
companystring · querylogininteger · querysymbolstring · queryactionstring · queryfromstring · 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 action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.deals.list({
group: "string",
company: "string",
login: 1001
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/deals?group=string&company=string&login=1001" \
-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.deals.list(query?: { group?, company?, login?, symbol?, action?, from?, to?, page?, limit? }, options?: RequestOptions): Promise<report.DealPage>delete
POST
/admin/v1/deals/deleteDelete deals of any accounts
The Deals list delete: removes 1-1000 deals (ids, repeats counted once) of any accounts. Each id's account is looked up and each account is deleted from on its own, as the single-account route does. Answers every id in id order with its login and result: deleted; not_found (unknown id, or already gone); forbidden (the account is out of the caller's group scope or hidden); error with error saying why (that account's delete failed; other accounts still run). deleted counts the deleted. Money is not moved and positions are not rebuilt: check and fix them per account afterwards. An Idempotency-Key header (UUID): a retry with the same key and ids answers the first run's results verbatim (kept 24 hours), deletes nothing more and journals nothing again; the same key with other ids is conflict. Ids not yet in the lists (a deal made a moment ago) are waited for up to about 1.5 seconds. 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.
More details
Rights: the staff member needs every one of: trades.edit, trades.delete.
Parameters
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 disabled500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.deals.delete({
ids: [
10452,
20981
]
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/deals/delete" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"ids": [
10452,
20981
]
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"deleted": 1,
"items": [
{
"error": "string",
"id": 1,
"login": 1001,
"result": "string"
}
]
},
"request_id": "5b7f2c1e"
}ts
staff.deals.delete(body: account.idList, options?: RequestOptions): Promise<account.DeleteResult>