Appearance
trader.market
3 methods on trader.market. Each returns the answer's data and throws NoviqaError on a failed answer.
dayStats
GET
/trader/v1/market/day-statsDay statistics
Each symbol's latest trading day (server calendar): open, high, low, close of the chart price, bid/ask/last highs and lows, the previous close and the change in percent, with the group's markup, ordered by symbol name. Prices are zero until seen that day. Symbols the group does not trade are left out.
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.
idsstring · querySymbol ids separated by commas, e.g.
1,2,7; none = every symbol the account's group trades. At most 500.Returns
Promise<DayStats[]>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.market.dayStats({
ids: "string"
})bash
curl -X GET "$NOVIQA_API_URL/trader/v1/market/day-stats?ids=string" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": [
{
"ask_high": "1.08452",
"ask_low": "1.08452",
"bid_high": "1.08452",
"bid_low": "1.08452",
"change_pct": "1.08452",
"close": "1.08452",
"day": "string",
"digits": 5,
"high": "1.08452",
"last_high": "1.08452",
"last_low": "1.08452",
"low": "1.08452"
}
],
"request_id": "5b7f2c1e"
}ts
trader.market.dayStats(query?: { ids? }, options?: RequestOptions): Promise<market.DayStats[]>history
GET
/trader/v1/market/historyChart bars
The newest count_back bars of a symbol that start before to, oldest first. Bars follow the symbol's chart price (price_side bid or last); bid charts include the group's bid markup so history lines up with live prices. Day, week and month bars start at server midnight (server_offset_sec); weeks start on Sunday. no_data is true when nothing exists before to: stop paging back. not_found when the group does not trade the symbol.
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.
symbolstring · queryrequiredSymbol name, e.g. EURUSD.
timeframestring · queryBar length, default H1.
M1 M5 M15 M30 H1 H4 D1 W1 MNtointeger · queryUnix seconds; bars start before it. Default now.
count_backinteger · queryHow many bars, default 500.
Returns
Promise<History>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 wrongts
import { trader } from "@/lib/noviqa"
const data = await trader.market.history({
symbol: "string",
timeframe: "M1",
to: 1,
count_back: 1
})bash
curl -X GET "$NOVIQA_API_URL/trader/v1/market/history?symbol=string&timeframe=M1&to=1&count_back=1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"bars": [
{
"c": "1.08452",
"h": "1.08452",
"l": "1.08452",
"n": 1,
"o": "1.08452",
"t": 1
}
],
"digits": 5,
"no_data": true,
"price_side": "string",
"server_offset_sec": 1,
"symbol": "EURUSD",
"timeframe": "string"
},
"request_id": "5b7f2c1e"
}ts
trader.market.history(query: { symbol, timeframe?, to?, count_back? }, options?: RequestOptions): Promise<market.History>ticks
GET
/trader/v1/market/ticksStored ticks
The newest limit accepted prices of a symbol in [from, to), oldest first, with the group's bid and ask markup. At most 7 days per call; from must be before to. not_found when the group does not trade the symbol.
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.
symbolstring · queryrequiredSymbol name, e.g. EURUSD.
frominteger · queryUnix seconds, inclusive. Default one hour before
to.tointeger · queryUnix seconds, exclusive. Default now.
limitinteger · queryMost ticks to return, default 1000.
Returns
Promise<Ticks>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 wrongts
import { trader } from "@/lib/noviqa"
const data = await trader.market.ticks({
symbol: "string",
from: 1,
to: 1,
limit: 1
})bash
curl -X GET "$NOVIQA_API_URL/trader/v1/market/ticks?symbol=string&from=1&to=1&limit=1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"digits": 5,
"symbol": "EURUSD",
"ticks": [
{
"ask": "1.08460",
"bid": "1.08452",
"last": "1.08452",
"rejected": true,
"t": 1
}
]
},
"request_id": "5b7f2c1e"
}ts
trader.market.ticks(query: { symbol, from?, to?, limit? }, options?: RequestOptions): Promise<market.Ticks>