Appearance
staff.dealing
13 methods on staff.dealing. Each returns the answer's data and throws NoviqaError on a failed answer.
list
GET
/admin/v1/dealingList the dealer queue
Every request waiting in the dealer queue whose client group is in the caller's group scope, oldest first (by queued_at), in any state: waiting, taken or requoted. Decided requests leave the queue. Keep it current with the desk socket messages.
More details
A routing rule may send a trade request to dealers instead of filling it; it then waits in the dealer queue until one answer decides it, or until its deadline (the symbol's request timeout, 30 s when unset, never more than 2 minutes) rejects it with trade.timeout. Each waiting request is offered to one dealer at a time (holder): the first in the rule's dealer list, or every online dealer by login, who is online, may see the client's group and has not returned it. Only the holder may answer; another dealer gets forbidden. Every queue change is pushed to the dealers who may see the group as a desk socket message.
Rights: the staff member needs every one of: dealing.
Returns
Promise<DeskItem[]>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 wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.dealing.list()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/dealing" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": [
{
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {
"channel": "string",
"ip": "string",
"login": 1001,
"platform": "string"
},
"queued_at": "2026-09-25T10:15:00Z",
"request": {
"account_policy_revision": 1,
"action": "open",
"actor": {},
"by_position_id": 1,
"command_hash": "string",
"comment": "Deposit via bank",
"dealer": 1,
"deviation_pts": 1,
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"fill_policy": "string",
"group": "real\\standard"
},
"reserved": "1.08452",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {},
"message": "string",
"money": {},
"order": {},
"positions": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"returned": [
1
]
}
],
"request_id": "5b7f2c1e"
}ts
staff.dealing.list(options?: RequestOptions): Promise<models.DeskItem[]>connect
POST
/admin/v1/dealing/connectConnect as a dealer
Puts the caller on the desk for 90 seconds: from now on routing rules offer requests to them. A dealer counts as online only while this connection lasts AND a staff socket (/admin/v1/ws) of theirs is open. Send POST /admin/v1/dealing/heartbeat well inside expires_in (every 30 s is safe) to stay connected. Execution learns of the change at once. Writes a journal line. Calling it again restarts the 90 seconds. No body.
More details
Rights: the staff member needs every one of: dealing.
Returns
Promise<DealerState>The answer's
data.Errors
401
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 action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.dealing.connect()bash
curl -X POST "$NOVIQA_API_URL/admin/v1/dealing/connect" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"expires_in": 1,
"login": 1001,
"online": true,
"supervising": true
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.connect(options?: RequestOptions): Promise<models.DealerState>disconnect
POST
/admin/v1/dealing/disconnectDisconnect as a dealer
Takes the caller off the desk, back to watching; requests offered to them pass to the next dealer. Execution learns of the change at once. Writes a journal line. No body.
More details
Rights: the staff member needs every one of: dealing.
Returns
Promise<DealerState>The answer's
data.Errors
401
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 action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.dealing.disconnect()bash
curl -X POST "$NOVIQA_API_URL/admin/v1/dealing/disconnect" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"expires_in": 1,
"login": 1001,
"online": true,
"supervising": true
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.disconnect(options?: RequestOptions): Promise<models.DealerState>heartbeat
POST
/admin/v1/dealing/heartbeatKeep the dealer connection alive
Restarts the 90-second connection time. A connection that already lapsed is NOT revived: the answer then has online false and the caller must connect again. Requests offered to a dealer who lapsed or closed the socket pass to the next dealer within a few seconds. No body.
More details
Rights: the staff member needs every one of: dealing.
Returns
Promise<DealerState>The answer's
data.Errors
401
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 action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.dealing.heartbeat()bash
curl -X POST "$NOVIQA_API_URL/admin/v1/dealing/heartbeat" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"expires_in": 1,
"login": 1001,
"online": true,
"supervising": true
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.heartbeat(options?: RequestOptions): Promise<models.DealerState>log
GET
/admin/v1/dealing/logDealing log
Desk changes that moved or decided a request (take, return, requote, confirm, reject, accept, decline, cancel, timeout, restored), newest first, limited to clients whose group is in the caller's group scope (staff groups never show). A dealer sees only their own answers (dealer is forced to the caller); a holder of the dealing supervisor right sees every dealer's, and the timeouts. Paging: limit lines (default 100, above 500 is cut to 500); for the next page send before = the seq of the last line received. to must be after from.
More details
Rights: the staff member needs every one of: dealing.
Parameters
frominteger · queryStart, unix seconds (inclusive). Default: open.
tointeger · queryEnd, unix seconds (exclusive). Default: open.
logininteger · queryOnly this client account. 0 or absent: all.
dealerinteger · queryOnly this dealer (supervisors; ignored for a dealer). 0 or absent: all.
decisionstring · queryOnly this decision.
take return requote confirm reject accept decline cancel timeout restoredbeforeinteger · queryPage cursor: lines older than this seq. 0 or absent: newest.
limitinteger · queryLines per page, default 100, at most 500.
Returns
Promise<DealingLogEntry[]>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.dealing.log({
from: 1,
to: 1,
login: 1001
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/dealing/log?from=1&to=1&login=1001" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": [
{
"action": "open",
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"dealer": 1,
"decision": "list",
"fill_price": "1.08452",
"group": "real\\standard",
"last_name": "Smith",
"login": 1001,
"message": "string",
"name": "Ann Smith"
}
],
"request_id": "5b7f2c1e"
}ts
staff.dealing.log(query?: { from?, to?, login?, dealer?, decision?, before?, limit? }, options?: RequestOptions): Promise<models.DealingLogEntry[]>state
GET
/admin/v1/dealing/stateOwn dealer connection
Whether the caller is connected as a dealer (online), and, when connected, expires_in: the seconds the connection lasts without a heartbeat (90). supervising is true for a holder of the dealing supervisor right who is not connected: they watch every dealer's work in the log.
More details
Rights: the staff member needs every one of: dealing.
Returns
Promise<DealerState>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.dealing.state()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/dealing/state" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"expires_in": 1,
"login": 1001,
"online": true,
"supervising": true
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.state(options?: RequestOptions): Promise<models.DealerState>accept
POST
/admin/v1/dealing/{request_id}/acceptAccept a requote for the client
A dealer accepts an open requote on the client's behalf (any dealer whose scope holds the client's group, before the requote deadline). It fills at the requote price (ask for a buy, bid for a sell). When the symbol needs the dealer to confirm once more, the item instead goes back to taken for the dealer who requoted, with a fresh deadline, and result.status is queued. No body. Writes a journal line.
More details
Rights: the staff member needs every one of: dealing.
Parameters
request_idstring · pathrequiredThe trade request id.
Returns
Promise<DeskReply>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.dealing.accept("3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b")bash
curl -X POST "$NOVIQA_API_URL/admin/v1/dealing/3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b/accept" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"code": "ok",
"item": {
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {
"channel": "string",
"ip": "string",
"login": 1001,
"platform": "string"
},
"queued_at": "2026-09-25T10:15:00Z",
"request": {
"account_policy_revision": 1,
"action": "open",
"actor": {},
"by_position_id": 1,
"command_hash": "string",
"comment": "Deposit via bank",
"dealer": 1,
"deviation_pts": 1,
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"fill_policy": "string",
"group": "real\\standard"
},
"reserved": "1.08452",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {},
"message": "string",
"money": {},
"order": {},
"positions": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"returned": [
1
]
},
"items": [
{
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {},
"queued_at": "2026-09-25T10:15:00Z",
"request": {},
"reserved": "1.08452",
"result": {},
"returned": [
1
]
}
],
"message": "string",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {},
"group": "real\\standard",
"projected": {},
"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": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
}
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.accept(requestId: string, options?: RequestOptions): Promise<models.DeskReply>cancel
POST
/admin/v1/dealing/{request_id}/cancelCancel a requoted request for the client
Ends an open requote: the request is rejected with trade.rejected ("request canceled by the dealer") and leaves the queue. Any dealer whose scope holds the client's group, before the requote deadline. No body. Writes a journal line.
More details
Rights: the staff member needs every one of: dealing.
Parameters
request_idstring · pathrequiredThe trade request id.
Returns
Promise<DeskReply>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.dealing.cancel("3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b")bash
curl -X POST "$NOVIQA_API_URL/admin/v1/dealing/3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b/cancel" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"code": "ok",
"item": {
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {
"channel": "string",
"ip": "string",
"login": 1001,
"platform": "string"
},
"queued_at": "2026-09-25T10:15:00Z",
"request": {
"account_policy_revision": 1,
"action": "open",
"actor": {},
"by_position_id": 1,
"command_hash": "string",
"comment": "Deposit via bank",
"dealer": 1,
"deviation_pts": 1,
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"fill_policy": "string",
"group": "real\\standard"
},
"reserved": "1.08452",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {},
"message": "string",
"money": {},
"order": {},
"positions": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"returned": [
1
]
},
"items": [
{
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {},
"queued_at": "2026-09-25T10:15:00Z",
"request": {},
"reserved": "1.08452",
"result": {},
"returned": [
1
]
}
],
"message": "string",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {},
"group": "real\\standard",
"projected": {},
"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": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
}
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.cancel(requestId: string, options?: RequestOptions): Promise<models.DeskReply>confirm
POST
/admin/v1/dealing/{request_id}/confirmConfirm a request
Fills the request and takes it out of the queue: the first deciding answer wins. The price is price when above 0; else the accepted requote price (ask for a buy, bid for a sell) when the item was requoted; else the request's own price; else the market. volume above 0 fills only that much (at most the request's own volume, else invalid_input); 0 or absent fills it in full. The body is optional. The answer's result is the trade result the client also receives; a fill that fails (e.g. not enough money) comes back there as a rejected result, not as an error. Writes a journal line.
More details
Rights: the staff member needs every one of: dealing.
Parameters
request_idstring · pathrequiredThe trade request id.
Request body
askstringrequote Exact decimal as a string. Never parse it into a binary float for money or prices.
bidstringrequote Exact decimal as a string. Never parse it into a binary float for money or prices.
pricestringconfirm: 0 = the request price, or the market Exact decimal as a string. Never parse it into a binary float for money or prices.
reasonstringreject
volumestringconfirm: 0 = the request's full volume, otherwise a partial fill Exact decimal as a string. Never parse it into a binary float for money or prices.
Returns
Promise<DeskReply>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.dealing.confirm("3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b", {
price: "1.08512",
volume: "0.50"
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/dealing/3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b/confirm" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"price": "1.08512",
"volume": "0.50"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"code": "ok",
"item": {
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {
"channel": "string",
"ip": "string",
"login": 1001,
"platform": "string"
},
"queued_at": "2026-09-25T10:15:00Z",
"request": {
"account_policy_revision": 1,
"action": "open",
"actor": {},
"by_position_id": 1,
"command_hash": "string",
"comment": "Deposit via bank",
"dealer": 1,
"deviation_pts": 1,
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"fill_policy": "string",
"group": "real\\standard"
},
"reserved": "1.08452",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {},
"message": "string",
"money": {},
"order": {},
"positions": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"returned": [
1
]
},
"items": [
{
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {},
"queued_at": "2026-09-25T10:15:00Z",
"request": {},
"reserved": "1.08452",
"result": {},
"returned": [
1
]
}
],
"message": "string",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {},
"group": "real\\standard",
"projected": {},
"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": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
}
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.confirm(requestId: string, body: account.DeskAnswer, options?: RequestOptions): Promise<models.DeskReply>reject
POST
/admin/v1/dealing/{request_id}/rejectReject a request
Rejects the request with trade.rejected and takes it out of the queue, releasing the margin it held. reason (optional, at most 64 characters) is the message the client sees; default "request rejected". Writes a journal line.
More details
Rights: the staff member needs every one of: dealing.
Parameters
request_idstring · pathrequiredThe trade request id.
Request body
askstringrequote Exact decimal as a string. Never parse it into a binary float for money or prices.
bidstringrequote Exact decimal as a string. Never parse it into a binary float for money or prices.
pricestringconfirm: 0 = the request price, or the market Exact decimal as a string. Never parse it into a binary float for money or prices.
reasonstringreject
volumestringconfirm: 0 = the request's full volume, otherwise a partial fill Exact decimal as a string. Never parse it into a binary float for money or prices.
Returns
Promise<DeskReply>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.dealing.reject("3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b", {
reason: "Price moved, try again"
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/dealing/3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b/reject" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"reason": "Price moved, try again"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"code": "ok",
"item": {
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {
"channel": "string",
"ip": "string",
"login": 1001,
"platform": "string"
},
"queued_at": "2026-09-25T10:15:00Z",
"request": {
"account_policy_revision": 1,
"action": "open",
"actor": {},
"by_position_id": 1,
"command_hash": "string",
"comment": "Deposit via bank",
"dealer": 1,
"deviation_pts": 1,
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"fill_policy": "string",
"group": "real\\standard"
},
"reserved": "1.08452",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {},
"message": "string",
"money": {},
"order": {},
"positions": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"returned": [
1
]
},
"items": [
{
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {},
"queued_at": "2026-09-25T10:15:00Z",
"request": {},
"reserved": "1.08452",
"result": {},
"returned": [
1
]
}
],
"message": "string",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {},
"group": "real\\standard",
"projected": {},
"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": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
}
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.reject(requestId: string, body: account.DeskAnswer, options?: RequestOptions): Promise<models.DeskReply>requote
POST
/admin/v1/dealing/{request_id}/requoteRequote a request
Offers the client new prices: bid above 0 and ask at least the bid are required. The client's open trade request is answered with trade.requote and these prices, and the item becomes requoted with a fresh deadline (the symbol's request timeout). The client (or a dealer for them) may then accept or decline until the deadline; after it the request is rejected with trade.timeout. A request the server made itself (stop out, expiry) cannot be requoted. A requoted request can no longer be taken, returned, confirmed or rejected. Writes a journal line.
More details
Rights: the staff member needs every one of: dealing.
Parameters
request_idstring · pathrequiredThe trade request id.
Request body
askstringrequote Exact decimal as a string. Never parse it into a binary float for money or prices.
bidstringrequote Exact decimal as a string. Never parse it into a binary float for money or prices.
pricestringconfirm: 0 = the request price, or the market Exact decimal as a string. Never parse it into a binary float for money or prices.
reasonstringreject
volumestringconfirm: 0 = the request's full volume, otherwise a partial fill Exact decimal as a string. Never parse it into a binary float for money or prices.
Returns
Promise<DeskReply>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.invalid_price: invalid price404
not_found: not found500
internal: something went wrong504
trade.timeout: request timed outts
import { staff } from "@/lib/noviqa"
const data = await staff.dealing.requote("3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b", {
ask: "1.08510",
bid: "1.08490"
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/dealing/3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b/requote" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"ask": "1.08510",
"bid": "1.08490"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"code": "ok",
"item": {
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {
"channel": "string",
"ip": "string",
"login": 1001,
"platform": "string"
},
"queued_at": "2026-09-25T10:15:00Z",
"request": {
"account_policy_revision": 1,
"action": "open",
"actor": {},
"by_position_id": 1,
"command_hash": "string",
"comment": "Deposit via bank",
"dealer": 1,
"deviation_pts": 1,
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"fill_policy": "string",
"group": "real\\standard"
},
"reserved": "1.08452",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {},
"message": "string",
"money": {},
"order": {},
"positions": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"returned": [
1
]
},
"items": [
{
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {},
"queued_at": "2026-09-25T10:15:00Z",
"request": {},
"reserved": "1.08452",
"result": {},
"returned": [
1
]
}
],
"message": "string",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {},
"group": "real\\standard",
"projected": {},
"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": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
}
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.requote(requestId: string, body: account.DeskAnswer, options?: RequestOptions): Promise<models.DeskReply>return
POST
/admin/v1/dealing/{request_id}/returnReturn a request
Hands a waiting or taken request on: the caller is added to returned and it is offered to the next eligible dealer (holder 0 when none is online; it then waits for one until its deadline). No body. Writes a journal line.
More details
Rights: the staff member needs every one of: dealing.
Parameters
request_idstring · pathrequiredThe trade request id.
Returns
Promise<DeskReply>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.dealing.return("3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b")bash
curl -X POST "$NOVIQA_API_URL/admin/v1/dealing/3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b/return" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"code": "ok",
"item": {
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {
"channel": "string",
"ip": "string",
"login": 1001,
"platform": "string"
},
"queued_at": "2026-09-25T10:15:00Z",
"request": {
"account_policy_revision": 1,
"action": "open",
"actor": {},
"by_position_id": 1,
"command_hash": "string",
"comment": "Deposit via bank",
"dealer": 1,
"deviation_pts": 1,
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"fill_policy": "string",
"group": "real\\standard"
},
"reserved": "1.08452",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {},
"message": "string",
"money": {},
"order": {},
"positions": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"returned": [
1
]
},
"items": [
{
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {},
"queued_at": "2026-09-25T10:15:00Z",
"request": {},
"reserved": "1.08452",
"result": {},
"returned": [
1
]
}
],
"message": "string",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {},
"group": "real\\standard",
"projected": {},
"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": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
}
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.return(requestId: string, options?: RequestOptions): Promise<models.DeskReply>take
POST
/admin/v1/dealing/{request_id}/takeTake a request
Locks a waiting request to the caller (state taken) while they work on it; the deadline keeps running. Then answer it with confirm, requote or reject, or hand it on with return. The request must be offered to the caller. No body. Writes a journal line.
More details
A routing rule may send a trade request to dealers instead of filling it; it then waits in the dealer queue until one answer decides it, or until its deadline (the symbol's request timeout, 30 s when unset, never more than 2 minutes) rejects it with trade.timeout. Each waiting request is offered to one dealer at a time (holder): the first in the rule's dealer list, or every online dealer by login, who is online, may see the client's group and has not returned it. Only the holder may answer; another dealer gets forbidden. Every queue change is pushed to the dealers who may see the group as a desk socket message.
Rights: the staff member needs every one of: dealing.
Parameters
request_idstring · pathrequiredThe trade request id.
Returns
Promise<DeskReply>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.dealing.take("3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b")bash
curl -X POST "$NOVIQA_API_URL/admin/v1/dealing/3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b/take" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"code": "ok",
"item": {
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {
"channel": "string",
"ip": "string",
"login": 1001,
"platform": "string"
},
"queued_at": "2026-09-25T10:15:00Z",
"request": {
"account_policy_revision": 1,
"action": "open",
"actor": {},
"by_position_id": 1,
"command_hash": "string",
"comment": "Deposit via bank",
"dealer": 1,
"deviation_pts": 1,
"expiration": "string",
"expires_at": "2026-09-25T10:15:00Z",
"fill_policy": "string",
"group": "real\\standard"
},
"reserved": "1.08452",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {},
"message": "string",
"money": {},
"order": {},
"positions": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
},
"returned": [
1
]
},
"items": [
{
"ask": "1.08460",
"bid": "1.08452",
"deadline": "2026-09-25T10:15:00Z",
"dealers": [
1
],
"holder": 1,
"last_action": "list",
"last_actor": {},
"queued_at": "2026-09-25T10:15:00Z",
"request": {},
"reserved": "1.08452",
"result": {},
"returned": [
1
]
}
],
"message": "string",
"result": {
"ask": "1.08460",
"bid": "1.08452",
"code": "ok",
"deals": [
{}
],
"deleted": [
1
],
"margin_check": {
"additional_margin": "1.08452",
"before": {},
"group": "real\\standard",
"projected": {},
"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": [
{}
],
"request_id": "3f2a9c1e-8b7d-4e6f-a5c4-1b2d3e4f5a6b",
"status": "done"
}
},
"request_id": "5b7f2c1e"
}ts
staff.dealing.take(requestId: string, options?: RequestOptions): Promise<models.DeskReply>