Methods for managing markets

On this page:

POST[host]/back-api/backoffice/market

Add a new market

PUT[host]/back-api/backoffice/market/{market_id}

Update market settings

GET[host]/back-api/backoffice/markets/available-assets

Get the available currency pairs

GET[host]/back-api/backoffice/liquidity-provider/markets/{id}

Get a liquidity provider market

GET[host]/back-api/backoffice/liquidity-provider/markets

Get a list of liquidity provider markets


Add a new market

Use this method to add a new market (currency pair) to the exchange.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Body:

id string

The market identifier (such as btc_usdt): {baseAsset}_{quoteAsset}.

base_asset string

The base asset (or transaction currency), which is the first currency appearing in a currency pair.

quote_asset string

The quote asset, which is the second currency appearing in a currency pair (both direct and indirect). It is used to determine the value of a base asset.

amount_scale integer

The maximum number of decimal places allowed for representing asset amounts on a market. This value also determines the minimum amount that can be traded on a market.

Typically, the amount scale is equal to the scale specified for a base asset in a pair.

This value cannot exceed the scale of a base asset and must be within 2–18 range.

min_amount number

The minimum amount that can be traded on a market.

Orders with a lesser amount are rejected.

price_deviation number

The allowed price deviation for limit orders placed on a market.

When the requested price deviates too much from the best bid or ask prices, exceeding the limit defined by this parameter, an order is rejected.

This value is normalized to 0–1 range: for example, 0.15 indicates the allowed deviation of 15%.

price_scale integer

The maximum number of decimal places allowed for representing asset prices. This value also determines the minimum amount that can be traded on a market.

Typically, the price scale is equal to the scale specified for a quote asset in a pair.

This value cannot exceed the scale of a quote asset and must be within 2–18 range.

max_price number

The maximum allowed price for assets traded on a market.

min_price number

The minimum allowed price for assets traded on a market.

base_fee number

The fee charged for a base asset traded on a market.

quote_fee number

The fee charged for a quote asset traded on a market.

maker_fee number

The fee charged for orders placed by market makers providing liquidity to a market.

This value is normalized to 0–1 range: for example, 0.05 indicates a fee of 5%. A maker fee of 5% is considered substantial and may be detrimental to business.

taker_fee number

The fee charged for orders placed by market takers diminishing market liquidity.

This value is normalized to 0–1 range: for example, 0.05 indicates a fee of 5%. A taker fee of 5% is considered substantial and may be detrimental to business.

status string

The market status indicating whether new orders can be placed on a market:

  • Open — new orders can be placed on a market using the UI or API

  • Paused — order placement requests made using the UI or API are rejected on a market (previously placed limit orders still await execution as per their time-in-force settings)

  • Halted — new orders cannot be placed on a market using the UI or API

For newly created markets, status is always set to Halted.

To allow trading on a created market, use a separate method to update market settings with the status parameter set to Open.

side string

The market side. Possible values:

  • BuySell

  • Buy

  • Sell

POST[host]/back-api/backoffice/market/

POST /back-api/backoffice/market HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g

{
  "id": "btc_usdt",
  "base_asset": "btc",
  "quote_asset": "usdt",
  "amount_scale": 8,
  "min_amount": 1.0,
  "price_deviation": 0.1,
  "price_scale": 8,
  "max_price": 0,
  "min_price": 0,
  "base_fee": 0,
  "quote_fee": 0,
  "maker_fee":  0.002,
  "taker_fee":  0.002,
  "status": "Halted", // optional, always Halted
  "side": "BuySell"
}

Response

In case of success, HTTP code 200 is returned.


Update market settings

Use this method to customize an existing market.

Important

This operation can be performed only by users assigned the Admin role.

Users with the Support role can only update the Hidden field value.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters:

market_id required

The market identifier (corresponds to the id parameter value specified when adding a market).

Body:

base_fee number

The fee charged for a base asset traded on a market.

quote_fee number

The fee charged for a quote asset traded on a market.

maker_fee number

The fee charged for orders placed by market makers providing liquidity to a market.

This value is normalized to 0–1 range: for example, 0.05 indicates a fee of 5%. A maker fee of 5% is considered substantial and may be detrimental to business.

taker_fee number

The fee charged for orders placed by market takers diminishing market liquidity.

This value is normalized to 0–1 range: for example, 0.05 indicates a fee of 5%. A taker fee of 5% is considered substantial and may be detrimental to business.

hidden boolean

If true, a market is not available to exchange users.

price_scale integer

The maximum number of decimal places allowed for representing asset prices. This value also determines the minimum amount that can be traded on a market.

Typically, the price scale is equal to the scale specified for a quote asset in a pair.

This value cannot exceed the scale of a quote asset and must be within 2–18 range.

amount_scale integer

The maximum number of decimal places allowed for representing asset amounts on a market. This value also determines the minimum amount that can be traded on a market.

Typically, the amount scale is equal to the scale specified for a base asset in a pair.

This value cannot exceed the scale of a base asset and must be within 2–18 range.

status string

The market status indicating whether new orders can be placed on a market:

  • Open — new orders can be placed on a market using the UI or API

  • Paused — order placement requests made using the UI or API are rejected on a market (previously placed limit orders still await execution as per their time-in-force settings)

  • Halted — new orders cannot be placed on a market using the UI or API

For newly created markets, status is always set to Halted.

To change the market status, specify the status parameter in a separate method call to avoid possible errors.

side string

The market side. Possible values:

  • BuySell

  • Buy

  • Sell

min_amount number

The minimum amount that can be traded on a market.

Orders with a lesser amount are rejected.

price_deviation number

The allowed price deviation for limit orders placed on a market.

When the requested price deviates too much from the best bid or ask prices, exceeding the limit defined by this parameter, an order is rejected.

This value is normalized to 0–1 range: for example, 0.15 indicates the allowed deviation of 15%.

PUT[host]/back-api/backoffice/market/{market_id}

PUT /back-api/backoffice/market/btc_usdt HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g

{
  "base_fee": 0.0025,
  "quote_fee": 0.0025,
  "maker_fee": 0.0025,
  "taker_fee": 0.0028,
  "hidden": false,
  "price_scale": 8,
  "amount_scale": 8,
  "status": "Open",
  "side": "BuySell",
  "min_amount": 1.0,
  "price_deviation": 0.1
}

Response

In case of success, HTTP code 200 is returned.

Note

Users with the Support role can only update the Hidden field value.

Upon attempting to customize other fields, the Forbidden status is returned, along with the name of the first encountered field that is not allowed to be changed. In this case, the new value specified for the Hidden field in this request is not applied as well.


Get the available currency pairs

Use this method to get a list of assets and currency pairs that are supported for markets available on the exchange.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters:

isCustomMarket required

If true, only the instruments available for custom markets are included in a response.

GET[host]/back-api/backoffice/markets/available-assets

GET /back-api/backoffice/markets/available-assets HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g

{
  "isCustomMarket": true
}

Response

The response includes the following fields:

assetInfos array

An array of string values indicating the requested assets.

id string

The asset identifier (such as btc).

name string

The full asset name, such as defined by a token proprietor undertaking an ICO (initial coin offering). The maximum length is 50 characters.

availablePairs array

An array of string values indicating the available currency pairs.

baseAsset string

The base asset (or transaction currency), which is the first currency appearing in a currency pair.

quoteAsset string

The quote asset, which is the second currency appearing in a currency pair (both direct and indirect). It is used to determine the value of a base asset.

RESPONSE EXAMPLE
{
  "assetInfos": [
    {
      "id": "btc",
      "name": "Bitcoin"
    },
    {
      "id": "eth",
      "name": "Ethereum"
    },
    {
      "id": "usdt",
      "name": "Usdt"
    },
    {
      "id": "ltc",
      "name": "Litecoin"
    },
    {
      "id": "usd",
      "name": "USD"
    },
    {
      "id": "bch",
      "name": "Bitcoin Cash"
    }
  ],
  "availablePairs": [
  {
      "baseAsset": "bch",
      "quoteAsset": "btc"
    },
    {
      "baseAsset": "bch",
      "quoteAsset": "usd"
    },
    {
      "baseAsset": "bch",
      "quoteAsset": "usdt"
    },
    {
      "baseAsset": "eth",
      "quoteAsset": "usd"
    },
    {
      "baseAsset": "ltc",
      "quoteAsset": "btc"
    },
    {
      "baseAsset": "ltc",
      "quoteAsset": "usd"
    },
    {
      "baseAsset": "ltc",
      "quoteAsset": "usdt"
    },
    {
      "baseAsset": "usdt",
      "quoteAsset": "usd"
    }
  ]
}

Get a liquidity provider market

Use this method to get the details about a specified liquidity provider market.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters:

id required

The identifier of a liquidity provider market.

GET[host]/back-api/backoffice/liquidity-provider/markets/{id}

GET /back-api/backoffice/liquidity-provider/markets/1 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g

Response

The following data is provided about each liquidity provider market:

id number

The market identifier.

name string

The market name (such as BTC/USDT).

base_asset string

The base asset (or transaction currency), which is the first currency appearing in a currency pair.

quote_asset string

The quote asset, which is the second currency appearing in a currency pair (both direct and indirect). It is used to determine the value of a base asset.

price_scale number

The maximum number of decimal places allowed for representing asset prices. This value also determines the minimum amount that can be traded on a market.

Typically, the price scale is equal to the scale specified for a quote asset in a pair.

amount_scale number

The maximum number of decimal places allowed for representing asset amounts on a market. This value also determines the minimum amount that can be traded on a market.

Typically, the amount scale is equal to the scale specified for a base asset in a pair.

depth integer

The maximum number of levels allowed for a market, determining the market depth.

created_at string

The date and time when a market was added.

updated_at string

The date and time when a market was last updated.

RESPONSE EXAMPLE
{
  "id": 1,
  "name": "BTC/USDT",
  "base_asset": "btc",
  "quote_asset": "usdt",
  "price_scale": 8,
  "amount_scale": 8,
  "depth": 100,
  "created_at": "2022-10-26T14:39:13.460308Z",
  "updated_at": "2022-10-26T14:39:13.460401Z"
}

Get a list of liquidity provider markets

Use this method to get a list of liquidity provider markets matching the specified criteria.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Filter parameters:

The following filter parameters are available for this request:

name

The market name (such as BTC/USDT).

base_asset

The base asset identifier.

quote_asset

The quote asset identifier.

created_from

The beginning of a time period during which a market was added.

created_to

The end of a time period during which a market was added.

updated_from

The beginning of a time period during which a market was last updated.

updated_to

The end of a time period during which a market was last updated.

Sorting parameters:

The following sorting options are available for this request:

field string

The name of a field used to sort the response data.

Only one sorting field can be specified at a time.

direction string

The order in which the response data is sorted: Desc or Asc.

GET[host]/back-api/backoffice/liquidity-provider/markets

GET /back-api/backoffice/liquidity-provider/markets/
    ?name=BTC/USDT
    &created_from=2019-04-04T15%3A27%3A41 HTTP/1.1
Host: host.name
Authorization: Bearer akvmn34egjidg0jifgjdg0djg34g

Response

The following data is provided about each liquidity provider market:

id number

The market identifier.

name string

The market name (such as BTC/USDT).

base_asset string

The base asset (or transaction currency), which is the first currency appearing in a currency pair.

quote_asset string

The quote asset, which is the second currency appearing in a currency pair (both direct and indirect). It is used to determine the value of a base asset.

price_scale integer

The maximum number of decimal places allowed for representing asset prices. This value also determines the minimum amount that can be traded on a market.

Typically, the price scale is equal to the scale specified for a quote asset in a pair.

amount_scale integer

The maximum number of decimal places allowed for representing asset amounts on a market. This value also determines the minimum amount that can be traded on a market.

Typically, the amount scale is equal to the scale specified for a base asset in a pair.

depth integer

The maximum number of levels allowed for a market, determining the market depth.

created_at string

The date and time when a market was added.

updated_at string

The date and time when a market was last updated.

RESPONSE EXAMPLE
{
  "metadata": {
    "limit": 10,
    "offset": 0,
    "count": 1,
    "total_count": 1
  },
  "records": [
    {
      "id": 1,
      "name": "BTC/USDT",
      "base_asset": "btc",
      "quote_asset": "usdt",
      "price_scale": 8,
      "amount_scale": 8,
      "depth": 100,
      "created_at": "2022-10-27T15:21:40.52045Z",
      "updated_at": "2022-10-27T15:21:40.52056Z"
    }
  ]
}