Appearance
staff.orders
5 methods on staff.orders. Each returns the answer's data and throws NoviqaError on a failed answer.
list
GET
/admin/v1/ordersList orders
One page of open pending orders across accounts, each with its account's group and the current price from execution (0 when execution does not answer). With history=true (MT5 "Open only" unchecked) the page also holds orders of the history (filled, cancelled, expired, rejected; state and done_at tell them apart), those done in [from, to) when given (RFC 3339 times like the deals list); open orders are always listed. History orders never reach further back than the caller's report history depth. Ordered by id. Rows are limited to trading accounts whose group is in the caller's group scope. Filters: group a group mask (e.g. real\*), company the licence company of the group, login an exact login, symbol an exact symbol name (any case). page is 1-based (default 1), limit defaults to 100, at most 1000; total counts every match.
More details
Rights: the staff member needs every one of: trades.view.
Parameters
groupstring · querycompanystring · querylogininteger · querysymbolstring · querypageinteger · querylimitinteger · queryhistoryboolean · querytrue: also orders of the history (MT5 "Open only" unchecked)
fromstring · queryhistory orders done at or after; RFC 3339
tostring · queryhistory orders done before
Returns
Promise<OpenOrder_>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.orders.list({
group: "string",
company: "string",
login: 1001
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/orders?group=string&company=string&login=1001" \
-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.orders.list(query?: { group?, company?, login?, symbol?, page?, limit?, history?, from?, to? }, options?: RequestOptions): Promise<http.tradePage_account.OpenOrder_>count
GET
/admin/v1/orders/countCount pending orders
How many pending orders GET /admin/v1/orders would list with the same authorized filters. Reads a database count only, without order rows or execution prices. Page and limit do not restrict the count.
More details
Rights: the staff member needs every one of: trades.view.
Parameters
groupstring · querycompanystring · querylogininteger · querysymbolstring · 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.orders.count({
group: "string",
company: "string",
login: 1001
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/orders/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.orders.count(query?: { group?, company?, login?, symbol?, page?, limit? }, options?: RequestOptions): Promise<http.count>delete
POST
/admin/v1/orders/deleteDelete orders of any accounts
The Orders list delete: like the single-account route over 1-1000 order ids of any accounts. Answers every id in id order with its login and result: deleted, not_found, forbidden (account out of scope or hidden) or error with error saying why (that account failed; others still run). 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.orders.delete({
ids: [
20451,
31877
]
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/orders/delete" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"ids": [
20451,
31877
]
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"deleted": 1,
"items": [
{
"error": "string",
"id": 1,
"login": 1001,
"result": "string"
}
]
},
"request_id": "5b7f2c1e"
}ts
staff.orders.delete(body: account.idList, options?: RequestOptions): Promise<account.DeleteResult>window
GET
/admin/v1/orders/windowRead a bounded orders window
At most 100 stored orders using first/last/after/before/around keyset navigation and deterministic order-ID ties. Current trading group/company and hidden-account restrictions apply. IDs and decimals are strings; dealer and linked identifiers, expires_at, activated_at and done_at may be null. Stored typed sorts/filters include order_id, login, dealer, position_id, by_position_id, gateway_id, group, symbol, external_id, comment, action, kind, state, fill_policy, expiration, reason, price, trigger_price, price_sl, price_tp, volume_initial, volume_current, contract_size, rate_margin, time_create, expires_at, activated_at and done_at. Order kinds use market/limit/stop/stop_limit; expiry uses until_cancelled/today/specified_time/specified_day. Market current-price/profit ranking is unsupported. Query and resource-bound cursors confer no authority and cannot cross Orders/Positions or changed actor/rights/scope. The deals projection checkpoint and rows share one read-only repeatable-read snapshot; an ahead minimum returns projection_pending without rows/navigation and retry_after_ms 1000. This watermark covers projected trade events, not independent account/group/symbol metadata or market freshness. Current price, proof and calculated_at are null; valuation is unavailable. Legacy GET orders is unchanged. Existing authorization is group/account scoped; this endpoint does not introduce a new broker selector or token authority.
More details
Rights: the staff member needs every one of: trades.view.
Parameters
limitinteger · queryedgestring · querycursorstring · queryanchor_idstring · querysort_fieldstring · querysort_directionstring · queryfilterstring · querysearchstring · queryloginstring · querysymbolstring · querygroupstring · querycompanystring · querymin_projection_seqstring · queryReturns
Promise<OrderWindowRow_>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.orders.window({
limit: 1,
edge: "string",
anchor_id: "string"
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/orders/window?limit=1&edge=string&anchor_id=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": [
{
"activated_at": "2026-09-25T10:15:00Z",
"by_position_id": "string",
"comment": "Deposit via bank",
"contract_size": "string",
"created_at": "2026-09-25T10:15:00Z",
"dealer": "string",
"digits": 5,
"done_at": "2026-09-25T10:15:00Z",
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"external_id": "string",
"fill_policy": "string"
}
],
"last_key": "string",
"page_id": "string",
"projection_seq": "string",
"proof": "string"
},
"request_id": "5b7f2c1e"
}ts
staff.orders.window(query?: { limit?, edge?, cursor?, anchor_id?, sort_field?, sort_direction?, filter?, search?, login?, symbol?, group?, company?, min_projection_seq? }, options?: RequestOptions): Promise<account.TradeWindowPage_account.OrderWindowRow_>windowCount
GET
/admin/v1/orders/window/countCount a filtered orders window
Exact authorized full-filter structural count from its own read-only repeatable-read checkpoint snapshot, using the same typed stored predicates as orders/window. Navigation does not limit total. Total is null and consistency projection_pending with retry_after_ms 1000 when minimum exceeds the checkpoint. Count freshness is independent of a page snapshot; no live valuation or legacy orders/count behavior changes.
More details
Rights: the staff member needs every one of: trades.view.
Parameters
limitinteger · queryedgestring · querycursorstring · queryanchor_idstring · querysort_fieldstring · querysort_directionstring · queryfilterstring · querysearchstring · queryloginstring · querysymbolstring · querygroupstring · querycompanystring · querymin_projection_seqstring · 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.orders.windowCount({
limit: 1,
edge: "string",
anchor_id: "string"
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/orders/window/count?limit=1&edge=string&anchor_id=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.orders.windowCount(query?: { limit?, edge?, cursor?, anchor_id?, sort_field?, sort_direction?, filter?, search?, login?, symbol?, group?, company?, min_projection_seq? }, options?: RequestOptions): Promise<account.PositionWindowCount>