Skip to content

trader.history ​

1 method on trader.history. Each returns the answer's data and throws NoviqaError on a failed answer.

positions ​

GET/trader/v1/history/positions

Closed positions

One row per closed position (open and close price, volume, profit, swap, commission, fee), newest close first, with totals over every match (not only the page). from/to filter the close time; to must be after from. symbol narrows to one symbol by exact name (any case, at most 64 characters). 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
tostring · query
pageinteger · query
limitinteger · query
symbolstring · query
Symbol name, exact (any case); empty = every symbol.
Returns
Promise<ClosedPage>
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.history.positions({
  from: "2026-09-25T10:15:00Z",
  to: "2026-09-25T10:15:00Z",
  page: 1
})
bash
curl -X GET "$NOVIQA_API_URL/trader/v1/history/positions?from=2026-09-25T10%3A15%3A00Z&to=2026-09-25T10%3A15%3A00Z&page=1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "items": [
      {
        "closed_at": "2026-09-25T10:15:00Z",
        "commission": "1.08452",
        "contract_size": "1.08452",
        "digits": 5,
        "fee": "1.08452",
        "group": "real\\standard",
        "login": 1001,
        "opened_at": "2026-09-25T10:15:00Z",
        "position_id": 1,
        "price_close": "1.08452",
        "price_open": "1.08452",
        "profit": "12.40"
      }
    ],
    "page": 1,
    "total": 1,
    "totals": {
      "commission": "1.08452",
      "count": 1,
      "fee": "1.08452",
      "profit": "12.40",
      "swap": "1.08452",
      "volume": "0.10"
    }
  },
  "request_id": "5b7f2c1e"
}
ts
trader.history.positions(query?: { from?, to?, page?, limit?, symbol? }, options?: RequestOptions): Promise<report.ClosedPage>