Skip to content

staff.history ​

10 methods on staff.history. Each returns the answer's data and throws NoviqaError on a failed answer.

listBars ​

GET/admin/v1/history/bars

List stored one-minute bars

The first limit stored one-minute bars of a symbol in [from, to); time is the minute the bar opens, volume its real tick volume (the sum of its ticks' volumes) and spread its smallest spread in points. Every longer chart bar is built from these. Rows live in the price history database the market data service writes; they are returned oldest first, prices as decimals with the symbol's digits. The symbol need not be active.

More details

Rights: the staff member needs at least one of: prices.raw, charts.edit.

Parameters
symbol_idinteger · queryrequired
The symbol.
fromstring · queryrequired
Start, RFC 3339 with up to nanoseconds, e.g. 2026-09-24T10:00:00.123Z (inclusive).
tostring · queryrequired
End, RFC 3339 with up to nanoseconds (exclusive); must be after from.
limitinteger · query
Rows, default 1000; more than 50000 is cut to 50000.
Returns
Promise<BarRow[]>
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
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.history.listBars({
  symbol_id: 1,
  from: "2026-09-25T10:15:00Z",
  to: "2026-09-25T10:15:00Z",
  limit: 1
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/history/bars?symbol_id=1&from=2026-09-25T10%3A15%3A00Z&to=2026-09-25T10%3A15%3A00Z&limit=1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "close": "1.08452",
      "high": "1.08452",
      "low": "1.08452",
      "open": "1.08452",
      "spread": 1,
      "ticks": 1,
      "time": "2026-09-25T10:15:00Z",
      "volume": "0.10"
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.history.listBars(query: { symbol_id, from, to, limit? }, options?: RequestOptions): Promise<influx.BarRow[]>

createBars ​

POST/admin/v1/history/bars

Write one-minute bars

Stores 1-50000 one-minute bars of the symbol, each replacing the bar of its minute. For each: time must be the start of a minute; prices with at most the symbol's digits; low above 0, high at least open and close, low at most open and close; ticks, volume and spread not negative and whole numbers. The whole write is refused on the first bad bar (the message names it). Writes a journal line. Only symbol_id is read from the query.

More details

Rights: the staff member needs every one of: charts.edit.

Parameters
symbol_idinteger · queryrequired
The symbol.
Request body
barsBarRow_input[]
One-minute bars to store, 1-50000; each replaces the stored bar of its minute.
Returns
Promise<docMarketWritten>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try 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
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.history.createBars({
  bars: [
    {
      close: "1.08530",
      high: "1.08560",
      low: "1.08480",
      open: "1.08500",
      spread: 12,
      ticks: 42,
      time: "2026-09-24T10:00:00Z",
      volume: "42"
    }
  ]
}, {
  symbol_id: 1
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/history/bars?symbol_id=1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "bars": [
    {
      "close": "1.08530",
      "high": "1.08560",
      "low": "1.08480",
      "open": "1.08500",
      "spread": 12,
      "ticks": 42,
      "time": "2026-09-24T10:00:00Z",
      "volume": "42"
    }
  ]
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "written": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.history.createBars(body: http.docMarketBarsBody, query: { symbol_id }, options?: RequestOptions): Promise<http.docMarketWritten>

deleteBars ​

DELETE/admin/v1/history/bars

Delete one-minute bars

Removes every one-minute bar of the symbol in [from, to], both ends included; without to only the bar at exactly from. Ticks are not changed. Writes a journal line.

More details

Rights: the staff member needs every one of: charts.edit.

Parameters
symbol_idinteger · queryrequired
The symbol.
fromstring · queryrequired
Start, RFC 3339 with up to nanoseconds, e.g. 2026-09-24T10:00:00.123Z (inclusive).
tostring · query
End, RFC 3339 (inclusive), not before from. Absent: from, so exactly the one row at from is removed.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try 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
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.history.deleteBars({
  symbol_id: 1,
  from: "2026-09-25T10:15:00Z",
  to: "2026-09-25T10:15:00Z"
})
bash
curl -X DELETE "$NOVIQA_API_URL/admin/v1/history/bars?symbol_id=1&from=2026-09-25T10%3A15%3A00Z&to=2026-09-25T10%3A15%3A00Z" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
staff.history.deleteBars(query: { symbol_id, from, to? }, options?: RequestOptions): Promise<null>

barsExport ​

GET/admin/v1/history/bars/export

Export one-minute bars as CSV

A CSV attachment (bars-<symbol>-<from>.csv) of the one-minute bars of a symbol in [from, to), up to 50000 rows, oldest first, with the header time,open,high,low,close,ticks,volume,spread (time RFC 3339, UTC). The file is the import format. limit is not used.

More details

Rights: the staff member needs at least one of: prices.raw, charts.edit; and every one of: export.

Parameters
symbol_idinteger · queryrequired
The symbol.
fromstring · queryrequired
Start, RFC 3339 with up to nanoseconds, e.g. 2026-09-24T10:00:00.123Z (inclusive).
tostring · queryrequired
End, RFC 3339 with up to nanoseconds (exclusive); must be after from.
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
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.history.barsExport({
  symbol_id: 1,
  from: "2026-09-25T10:15:00Z",
  to: "2026-09-25T10:15:00Z"
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/history/bars/export?symbol_id=1&from=2026-09-25T10%3A15%3A00Z&to=2026-09-25T10%3A15%3A00Z" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
ts
// text/csv file: the SDK returns the raw Response
ts
staff.history.barsExport(query: { symbol_id, from, to }, options?: RequestOptions): Promise<Response>

barsImport ​

POST/admin/v1/history/bars/import

Import one-minute bars from CSV

The body is a CSV file (at most 8 MB) whose first line is the header time,open,high,low,close,ticks,volume,spread (case and spaces ignored), then one bar per line: time RFC 3339, prices as decimals, ticks, volume and spread whole numbers. The rows are then stored as by POST /admin/v1/history/bars (1-50000 rows, same checks). A bad line refuses the whole file with its line number. Writes a journal line. Only symbol_id is read from the query.

More details

Rights: the staff member needs every one of: charts.edit.

Parameters
symbol_idinteger · queryrequired
The symbol.
Returns
Promise<docMarketWritten>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try 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
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.history.barsImport({
  symbol_id: 1
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/history/bars/import?symbol_id=1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "written": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.history.barsImport(query: { symbol_id }, options?: RequestOptions): Promise<http.docMarketWritten>

listTicks ​

GET/admin/v1/history/ticks

List stored ticks

The first limit stored prices of a symbol in [from, to), accepted and refused ones (rejected), with manual marking prices staff threw in, volume its real tick volume (every stored tick is one distinct price event; 0 for a tick stored before this field existed) and feed the datafeed name that supplied it (empty for staff-thrown-in or unknown). Rows live in the price history database the market data service writes; they are returned oldest first, prices as decimals with the symbol's digits. The symbol need not be active.

More details

Rights: the staff member needs at least one of: prices.raw, charts.edit.

Parameters
symbol_idinteger · queryrequired
The symbol.
fromstring · queryrequired
Start, RFC 3339 with up to nanoseconds, e.g. 2026-09-24T10:00:00.123Z (inclusive).
tostring · queryrequired
End, RFC 3339 with up to nanoseconds (exclusive); must be after from.
limitinteger · query
Rows, default 1000; more than 50000 is cut to 50000.
Returns
Promise<TickRow[]>
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
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.history.listTicks({
  symbol_id: 1,
  from: "2026-09-25T10:15:00Z",
  to: "2026-09-25T10:15:00Z",
  limit: 1
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/history/ticks?symbol_id=1&from=2026-09-25T10%3A15%3A00Z&to=2026-09-25T10%3A15%3A00Z&limit=1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "ask": "1.08460",
      "bid": "1.08452",
      "feed": "string",
      "last": "1.08452",
      "manual": true,
      "rejected": true,
      "time": "2026-09-25T10:15:00Z",
      "volume": "0.10"
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.history.listTicks(query: { symbol_id, from, to, limit? }, options?: RequestOptions): Promise<influx.TickRow[]>

createTicks ​

POST/admin/v1/history/ticks

Write ticks

Stores 1-50000 prices of the symbol as accepted prices, each replacing the one stored at the same time. For each: time required, prices with at most the symbol's digits, bid above 0, ask at least the bid, last not negative, volume a whole number not negative (absent or 0 = 1, since a stored tick is always at least the one price event it holds); manual marks a staff price. The whole write is refused on the first bad row (the message names it). Bars already built are NOT changed: edit them apart. Writes a journal line. Only symbol_id is read from the query.

More details

Rights: the staff member needs every one of: charts.edit.

Parameters
symbol_idinteger · queryrequired
The symbol.
Request body
ticksTickRow_input[]
Prices to store, 1-50000; each replaces the stored price at its time. rejected is ignored.
Returns
Promise<docMarketWritten>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try 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
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.history.createTicks({
  ticks: [
    {
      ask: "1.08520",
      bid: "1.08500",
      last: "0",
      time: "2026-09-24T10:00:00.123Z",
      volume: "1"
    }
  ]
}, {
  symbol_id: 1
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/history/ticks?symbol_id=1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "ticks": [
    {
      "ask": "1.08520",
      "bid": "1.08500",
      "last": "0",
      "time": "2026-09-24T10:00:00.123Z",
      "volume": "1"
    }
  ]
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "written": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.history.createTicks(body: http.docMarketTicksBody, query: { symbol_id }, options?: RequestOptions): Promise<http.docMarketWritten>

deleteTicks ​

DELETE/admin/v1/history/ticks

Delete stored ticks

Removes every stored price (accepted and refused) of the symbol in [from, to], both ends included; without to only the price at exactly from. Bars are not changed. Writes a journal line.

More details

Rights: the staff member needs every one of: charts.edit.

Parameters
symbol_idinteger · queryrequired
The symbol.
fromstring · queryrequired
Start, RFC 3339 with up to nanoseconds, e.g. 2026-09-24T10:00:00.123Z (inclusive).
tostring · query
End, RFC 3339 (inclusive), not before from. Absent: from, so exactly the one row at from is removed.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try 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
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.history.deleteTicks({
  symbol_id: 1,
  from: "2026-09-25T10:15:00Z",
  to: "2026-09-25T10:15:00Z"
})
bash
curl -X DELETE "$NOVIQA_API_URL/admin/v1/history/ticks?symbol_id=1&from=2026-09-25T10%3A15%3A00Z&to=2026-09-25T10%3A15%3A00Z" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
staff.history.deleteTicks(query: { symbol_id, from, to? }, options?: RequestOptions): Promise<null>

ticksExport ​

GET/admin/v1/history/ticks/export

Export stored ticks as CSV

A CSV attachment (ticks-<symbol>-<from>.csv) of the accepted prices of a symbol in [from, to), up to 50000 rows, oldest first, with the header time,bid,ask,last,volume (time RFC 3339 with nanoseconds, UTC). Refused prices are left out. The file is the import format. limit is not used.

More details

Rights: the staff member needs at least one of: prices.raw, charts.edit; and every one of: export.

Parameters
symbol_idinteger · queryrequired
The symbol.
fromstring · queryrequired
Start, RFC 3339 with up to nanoseconds, e.g. 2026-09-24T10:00:00.123Z (inclusive).
tostring · queryrequired
End, RFC 3339 with up to nanoseconds (exclusive); must be after from.
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
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.history.ticksExport({
  symbol_id: 1,
  from: "2026-09-25T10:15:00Z",
  to: "2026-09-25T10:15:00Z"
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/history/ticks/export?symbol_id=1&from=2026-09-25T10%3A15%3A00Z&to=2026-09-25T10%3A15%3A00Z" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
ts
// text/csv file: the SDK returns the raw Response
ts
staff.history.ticksExport(query: { symbol_id, from, to }, options?: RequestOptions): Promise<Response>

ticksImport ​

POST/admin/v1/history/ticks/import

Import ticks from CSV

The body is a CSV file (at most 8 MB) whose first line is the header time,bid,ask,last,volume (case and spaces ignored), then one price per line: time RFC 3339 (up to nanoseconds), prices and volume as decimals. The rows are then stored as by POST /admin/v1/history/ticks (1-50000 rows, same checks, same replace-by-time). A bad line refuses the whole file with its line number. Writes a journal line. Only symbol_id is read from the query.

More details

Rights: the staff member needs every one of: charts.edit.

Parameters
symbol_idinteger · queryrequired
The symbol.
Returns
Promise<docMarketWritten>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try 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
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.history.ticksImport({
  symbol_id: 1
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/history/ticks/import?symbol_id=1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "written": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.history.ticksImport(query: { symbol_id }, options?: RequestOptions): Promise<http.docMarketWritten>