Skip to content

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/daily

Daily 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 · header
Intended 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 · query
First day, inclusive.
tostring · query
Last day, inclusive.
pageinteger · query
1-based page, default 1.
limitinteger · query
Rows per page, default 100.
Returns
Promise<Page>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
409auth.account_changed: the signed-in account changed; sign in again before continuing
500internal: something went wrong
ts
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/export

Download 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 · header
Intended 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 · queryrequired
What to export.
statement deals orders transactions daily
formatstring · queryrequired
csv answers text/csv, html answers text/html.
csv html
fromstring · queryrequired
First day, inclusive.
tostring · queryrequired
Last day, inclusive.
Returns
Promise<Response>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
404not_found: not found
409auth.account_changed: the signed-in account changed; sign in again before continuing
500internal: something went wrong
504trade.timeout: request timed out
ts
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 Response
ts
trader.reports.export(query: { type, format, from, to }, options?: RequestOptions): Promise<Response>