Appearance
trader.branding
2 methods on trader.branding. Each returns the answer's data and throws NoviqaError on a failed answer.
getTraderV1Branding
GET
/trader/v1/brandingThe brand of this domain (trader)
Public, read before sign-in: company name, colors, image URLs and default symbols of the white label that owns the host the app was opened on (the Origin header, else the host). ?domain= asks for another host.
Parameters
domainstring · queryHost name to resolve instead of the request's own.
Returns
Promise<brandView>The answer's
data.Errors
400
invalid_input: invalid input500
internal: something went wrongts
import { trader } from "@/lib/noviqa"
const data = await trader.branding.getTraderV1Branding({
domain: "string"
})bash
curl -X GET "$NOVIQA_API_URL/trader/v1/branding?domain=string" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"allocations": [
{
"allocation_id": 1,
"countries": [
"string"
],
"currency": "USD",
"default_leverage": 1,
"description": "string",
"kind": "string",
"leverages": [
1
]
}
],
"banner_url": "string",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"demo_url": "string",
"deposit_url": "string",
"eula_url": "string",
"icon_url": "string"
},
"request_id": "5b7f2c1e"
}ts
trader.branding.getTraderV1Branding(query?: { domain? }, options?: RequestOptions): Promise<http.brandView>getTraderV1BrandingIdImage
GET
/trader/v1/branding/{id}/{image}A brand image (trader)
Public. The URL comes from the branding answer and changes with each edit, so the image is cached for a day.
Parameters
idinteger · pathrequiredNumeric id.
imagestring · pathrequiredlogo banner iconReturns
Promise<Response>The answer's
data.Errors
400
invalid_input: invalid input404
not_found: not found500
internal: something went wrongts
import { trader } from "@/lib/noviqa"
const data = await trader.branding.getTraderV1BrandingIdImage(1, "logo")bash
curl -X GET "$NOVIQA_API_URL/trader/v1/branding/1/logo" \
-H "Authorization: Bearer $NOVIQA_TOKEN"ts
// image/* file: the SDK returns the raw Responsets
trader.branding.getTraderV1BrandingIdImage(id: number, image: string, options?: RequestOptions): Promise<Response>