Skip to content

trader.register ​

3 methods on trader.register. Each returns the answer's data and throws NoviqaError on a failed answer.

retrieve ​

GET/trader/v1/register

Which sign-ups are open

Whether demo and real sign-up are open and which need an e-mailed confirmation code. Includes country/brand-filtered allocation offers without internal group paths, the first applicable corporate link set and external signup URLs. demo=false with demo_url means use that external page. Offer leverages=[] permits its default only. Public.

Parameters
countrystring · query
Country value (ISO code recommended), matched case-insensitively against configured countries.
langstring · query
Language to fill link macros.
Returns
Promise<Options>
The answer's data.
Errors
400invalid_input: invalid input
500internal: something went wrong
ts
import { trader } from "@/lib/noviqa"

const data = await trader.register.retrieve({
  country: "string",
  lang: "string"
})
bash
curl -X GET "$NOVIQA_API_URL/trader/v1/register?country=string&lang=string" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "allocations": [
      {
        "allocation_id": 1,
        "countries": [
          "string"
        ],
        "currency": "USD",
        "default_leverage": 1,
        "description": "string",
        "kind": "string",
        "leverages": [
          1
        ]
      }
    ],
    "confirm_demo": true,
    "confirm_real": true,
    "demo": true,
    "demo_url": "string",
    "deposit_url": "string",
    "links": [
      {
        "caption": "string",
        "caption_type": 1,
        "sort": 1,
        "url": "string"
      }
    ],
    "real": true,
    "withdraw_url": "string"
  },
  "request_id": "5b7f2c1e"
}
ts
trader.register.retrieve(query?: { country?, lang? }, options?: RequestOptions): Promise<client.Options>

create ​

POST/trader/v1/register

Open a demo account or apply for a real one

Public sign-up, at most 5 per address per hour. type demo opens an account at once in the server's demo group (password is its master password) and answers its login; real files an application for staff to approve and only says it was received. When GET /trader/v1/register says the kind needs a confirmed e-mail, first ask POST /trader/v1/register/code and send the e-mailed code. Optional allocation_id and leverage select a currently enabled offer for the request host's brand and submitted country; invalid choices are rejected. Real applications persist the preferred group and requested leverage without creating or funding an account. language is en, de or empty to inherit. A configured external demo_url disables local demo registration.

Request body
addressstring
allocation_idinteger
citystring
codestring
the code e-mailed to Email, when this kind needs it
countrystring
emailstring
languagestring
leverageinteger
namestring
first and last name
passwordstring
demo only: the master password of the new account
phonestring
typestring
demo or real
Returns
Promise<Registered>
The answer's data.
Errors
400auth.code_invalid: the verification code is wrong or has expired
400auth.password_weak: password must be 8-16 characters with a lower, upper, digit and symbol
400invalid_input: invalid input
403forbidden: you do not have access to this action
409conflict: already exists
429auth.too_many_attempts: too many attempts, try again later
500internal: something went wrong
ts
import { trader } from "@/lib/noviqa"

const data = await trader.register.create({
  address: "1 High St",
  city: "London",
  code: "123456",
  country: "GB",
  email: "ann@example.com",
  name: "Ann Smith",
  password: "Str0ng#Pass",
  phone: "+44 20 7946 0000",
  type: "demo"
})
bash
curl -X POST "$NOVIQA_API_URL/trader/v1/register" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "address": "1 High St",
  "city": "London",
  "code": "123456",
  "country": "GB",
  "email": "ann@example.com",
  "name": "Ann Smith",
  "password": "Str0ng#Pass",
  "phone": "+44 20 7946 0000",
  "type": "demo"
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "currency": "USD",
    "deposit": "1.08452",
    "group": "real\\standard",
    "leverage": 100,
    "login": 1001,
    "status": "active",
    "type": "string"
  },
  "request_id": "5b7f2c1e"
}
ts
trader.register.create(body: client.Registration, options?: RequestOptions): Promise<client.Registered>

code ​

POST/trader/v1/register/code

E-mail a sign-up code

Sends a 6-digit confirmation code to the address. The answer is the same for any address; confirmed true means this address already confirmed it in the last 72 hours and needs no code. Rate limited per address and per e-mail.

Request body
emailstring
where the sign-up code is sent
Returns
Promise<CodeSent>
The answer's data.
Errors
400invalid_input: invalid input
429auth.too_many_attempts: too many attempts, try again later
500internal: something went wrong
ts
import { trader } from "@/lib/noviqa"

const data = await trader.register.code({
  email: "ann@example.com"
})
bash
curl -X POST "$NOVIQA_API_URL/trader/v1/register/code" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "email": "ann@example.com"
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "confirmed": true,
    "sent": true
  },
  "request_id": "5b7f2c1e"
}
ts
trader.register.code(body: http.docEmail, options?: RequestOptions): Promise<client.CodeSent>