Appearance
trader.reports
2 methods on trader.reports. Each returns the answer's data and throws NoviqaError on a failed answer.
daily
GET
/trader/v1/reports/dailyDaily statements
The account's end-of-day statements (balance, equity, margin, the day's profit, deposits, withdrawals, commissions, swaps), newest day first. Empty unless the account is set to receive reports. from/to are days (2006-01-02, both inclusive, server calendar); to may not be before from. page is 1-based, limit defaults to 100, at most 1000. Only the signed-in account is ever read: the login comes from the session, never from the request.
Parameters
X-HST-Accountstring · headerIntended signed-in login captured by the browser tab before dispatch and retained across retries. A mismatch returns auth.account_changed (409) before mutation or refresh rotation. This never selects or authorizes an account; omission preserves existing API client compatibility.
fromstring · queryFirst day, inclusive.
tostring · queryLast day, inclusive.
pageinteger · query1-based page, default 1.
limitinteger · queryRows per page, default 100.
Returns
Promise<Page>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 first409
auth.account_changed: the signed-in account changed; sign in again before continuing500
internal: something went wrongts
import { trader } from "@/lib/noviqa"
const data = await trader.reports.daily({
from: "string",
to: "string",
page: 1
})bash
curl -X GET "$NOVIQA_API_URL/trader/v1/reports/daily?from=string&to=string&page=1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"items": [
{
"balance": "1000.00",
"balance_prev_day": "1.08452",
"balance_prev_month": "1.08452",
"credit": "0.00",
"daily_bonuses": "1.08452",
"daily_charges": "1.08452",
"daily_commission_instant": "1.08452",
"daily_commission_turnover": "1.08452",
"daily_compensation": "1.08452",
"daily_corrections": "1.08452",
"daily_credit": "1.08452",
"daily_deposits": "1.08452"
}
],
"page": 1,
"total": 1
},
"request_id": "5b7f2c1e"
}ts
trader.reports.daily(query?: { from?, to?, page?, limit? }, options?: RequestOptions): Promise<report.Page>export
GET
/trader/v1/reports/exportDownload a statement or history
Streams the account's records for a date range as a file to save: format csv (text/csv) or html (a printable page the browser can print to PDF; it runs no scripts). type picks the content: statement (deals, orders and money operations plus the current balance, credit, equity, margin and free margin), deals, orders, transactions or daily (daily statements). from and to are days (2006-01-02, both inclusive), at most 366 days. Each table stops at 20000 rows and says so; a longer range must be split. The file is sent as an attachment named like statement-<login>-<from>-<to>.csv. An error after the file started is written into the file itself. Only the signed-in account is ever read: the login comes from the session, never from the request.
Parameters
X-HST-Accountstring · headerIntended signed-in login captured by the browser tab before dispatch and retained across retries. A mismatch returns auth.account_changed (409) before mutation or refresh rotation. This never selects or authorizes an account; omission preserves existing API client compatibility.
typestring · queryrequiredWhat to export.
statement deals orders transactions dailyformatstring · queryrequiredcsv answers text/csv, html answers text/html.
csv htmlfromstring · queryrequiredFirst day, inclusive.
tostring · queryrequiredLast day, inclusive.
Returns
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 first404
not_found: not found409
auth.account_changed: the signed-in account changed; sign in again before continuing500
internal: something went wrong504
trade.timeout: request timed outts
import { trader } from "@/lib/noviqa"
const data = await trader.reports.export({
type: "statement",
format: "csv",
from: "string",
to: "string"
})bash
curl -X GET "$NOVIQA_API_URL/trader/v1/reports/export?type=statement&format=csv&from=string&to=string" \
-H "Authorization: Bearer $NOVIQA_TOKEN"ts
// text/csv file: the SDK returns the raw Responsets
trader.reports.export(query: { type, format, from, to }, options?: RequestOptions): Promise<Response>