Methods for managing API keys

The API keys are provided in the form of a UTF-8-encoded UUID string, for example: ca3a03e1-fc5c-4954-99dc-876db3997d8f.

A user can create up to three API keys, all of which will be valid until deleted.

Use the following methods to manage API keys via API:

POST[host]/frontoffice/api/key

Obtain API keys via API

POST[host]/frontoffice/api/key

Create API keys

DELETE[host]/frontoffice/key/{public_key}

Delete API keys


Obtain API keys via API

If for some reason you cannot use the recommended approach to obtaining API keys, use the following method to obtain a list of API keys via API.

Request

No parameters.

POST[host]/frontoffice/api/key

POST /frontoffice/api/key HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g

Response

publicKey string

The public key, in the UTF-8-encoded UUID string format.

name string

The public key name.

isInfo boolean

If true, the public key can be used to retrieve the market data via API.

isTrade boolean

If true, the public key can be used to place orders on the exchange via API.

ipWhiteList array

An array of string values, indicating the IP addresses included in the safelist.

RESPONSE BODY EXAMPLE
[
  {
    "publicKey": "1b674a45-9f1b-4b08-b69a-f02041a1d0f4",
    "name": "Trading key",
    "isInfo": true,
    "isTrade": true,
    "ipWhiteList": []
  },
  {
    "publicKey": "d39a6af3-ab28-4686-8526-3589452be74f",
    "name": "Market data key",
    "isInfo": true,
    "isTrade": false,
    "ipWhiteList": [
      "127.0.0.1"
    ]
  }
]

Create API keys

Use this method to create API keys in code.

You can create up to three API keys, all of which will be valid until discarded.

Request

Body:

name string required

The name of the API key.

isInfo boolean required

If true, the public key can be used to retrieve the market data via API.

isTrade boolean required

If true, the public key can be used to place orders on the exchange via API.

IpWhiteList array required

An array of string values, indicating the IP addresses included in the safelist.

POST[host]/frontoffice/api/key

POST /frontoffice/api/key HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g

{
  "name": "Trading key 3",
  "isInfo": true,
  "isTrade": true,
  "IpWhiteList": [ "127.0.0.1" ]
}

Response

publicKey string

The public key, in the UTF-8-encoded UUID string format.

privateKey string

The private key, in the UTF-8-encoded UUID string format.

name string

The public key name.

isInfo boolean

If true, the public key can be used to retrieve the market data via API.

isTrade boolean

If true, the public key can be used to place orders on the exchange via API.

ipWhiteList array

An array of string values, indicating the IP addresses included in the safelist.

RESPONSE BODY EXAMPLE
{
  "publicKey": "1b674a45-9f1b-3b08-b69a-f02041a1d0f3",
  "privateKey": "8596a4a9-b3a5-3d4c-9399-a2958de404ba",
  "name": "Trading key 3",
  "isInfo": true,
  "isTrade": true,
  "ipWhiteList": [ "127.0.0.1" ]
}

Delete API keys

Use this method to delete a set of API keys.

Request

Path parameters:

public_key required

The public key to be deleted.

DELETE[host]/frontoffice/api/key/{public_key}

DELETE /frontoffice/api/key/1b674a45-9f1b-3b08-b69a-f02041a1d0f3 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g

Response

In case of success, HTTP code 200 is returned.