Settings

Configure account margin settings, get market parameters, trading sessions, asset details, and system preferences for optimal trading setup

Accounts

Get accounts

GET /frontoffice/api/v3/accounts

Summary

Use this method to retrieve a list of all trading accounts with their basic information including account type and total balance.

Request

No request parameters.

Request example
GET /frontoffice/api/v3/accounts HTTP/1.1
Host: {host}
Authorization: Bearer JWT
Accept: */*

Response

In case of success, an array of objects will be returned.

Each object contains the following information:

accountId string

The trading account identifier.

accountName string

The account name.

accountType string

The account type.

Possible values:

  • Hedging

  • Netting

totalBalanceInRAT decimal string

The total balance, in RAT.

isCopyTradingAccount boolean

Indicates if the account is Copy.

Response example — 200: OK
[
  {
    "accountId": "685a7eaa360f9e7416221a61",
    "accountName": "B2TRADER Hedging account",
    "accountType": "Hedging",
    "totalBalanceInRAT": "6020.12",
    "isCopyTradingAccount": false
  },
  {
    "accountId": "6891e70db552ff9c6fbbccf5",
    "accountName": "B2TRADER Netting account",
    "accountType": "Netting",
    "totalBalanceInRAT": "10987.39",
    "isCopyTradingAccount": false
  }
]

Assets

Get assets

GET /frontoffice/api/v3/assets

Summary

Use this method to retrieve a list of available assets on the platform.

Request

No request parameters.

Response

In case of success, an array of objects will be returned.

Each object contains the following information:

assetId string

The asset identifier.

assetName string

The asset display name.

isRootAsset boolean

Indicates whether this is a root asset.

Markets

Get markets

GET /frontoffice/api/v5/markets

Summary

Use this method to retrieve detailed information about available markets including trading sessions, funding intervals, and market specifications.

Request

Query parameters

categoryId

The market category identifier.

dynamicCommissionGroupId

The dynamic commission group identifier.

Response

In case of success, an array of market objects will be returned.

Each market object contains the following information:

marketId string

The market identifier, in the following format: {marketType}.{baseAssetId}_{quoteAssetId}, for example: cfd.eth_eur.

displayName string

The market ticker.

fullName string | nullable

The market full name or description (optional).

type string

The market type.

Possible values:

  • Spot

  • Cfd

  • Perp

subtype string | nullable

Applicable to CFD markets only.

The market subtype.

Possible values:

  • Crypto

  • Fx

  • Metals

  • Indices

  • Energies

  • Ndf

  • Shares

  • Etf

Get market

GET /frontoffice/api/v5/markets/{marketId}

Summary

Use this method to retrieve detailed information about a specific market using its market identifier.

Request

Path parameters

marketId required

The market identifier, in the following format: {marketType}.{baseAssetId}_{quoteAssetId}, for example: cfd.eth_eur.

Response

In case of success, an object will be returned.

Each object contains the following information:

marketId string

The market identifier, in the following format: {marketType}.{baseAssetId}_{quoteAssetId}, for example: cfd.eth_eur.

displayName string

The market ticker.

fullName string | nullable

The market full name or description (optional).

baseAssetId string

The base asset identifier.

quoteAssetId string

The quote asset identifier.

minAmount decimal string | nullable

Applicable to Spot markets only.

The minimum tradable amount of the base asset.

maxBaseAmount decimal string | nullable

The maximum tradable amount of the base asset.

priceDeviation decimal string

The allowed price deviation for Limit orders placed on the market.

Supports decimal values in the range [0, 1], with up to 4 decimal places, for example:

  • 0.1 = 10%

  • 0.01 = 1%

  • 0.001 = 0.1%

  • 0.0001 = 0.01%

If set to 0, no restriction is applied, the price deviation is ignored.

priceScale integer

The price precision, which is the number of digits after a decimal separator. Also determines the minimum allowed trade price.

Supports only integer values in the range [2, 8]. For example, 2 means the following price format: 0.01, and 8: 0.00000001.

amountScale integer | nullable

Applicable to Spot markets only.

The amount precision, which is the number of digits after a decimal separator. Also determines the minimum trade amount.

Supports only integer values in the range [0, 8]. For example:

  • 0 means 1 (no digits after the decimal separator)

  • 5 means 0.00001 (five digits after the decimal separator)

  • 8 means 0.00000001 (eight digits after the decimal separator)

type string

The market type.

Possible values:

  • Spot

  • Cfd

  • Perp

subtype string | nullable

Applicable to CFD markets only.

The market subtype.

Possible values:

  • Crypto

  • Fx

  • Metals

  • Indices

  • Energies

  • Ndf

  • Shares

  • Etf

swapSettings object | nullable

Applicable to CFD markets only.

The fee type charged for holding open positions overnight. The amount can be negative for rebates.

Possible values:

  • FixPerLot: The fixed amount per lot.

  • Percent: The fixed amount in points which is applied to the position size, in the range [-1, 1], with up to 5 decimal places.

  • Points: The fixed amount of percents which is applied to the position size, with up to 3 decimal places.

Structure:

  • type string — Swap calculation type. Possible values: FixPerLot, Percent, Points.

  • shortPositionSettings object — Settings for Short positions:

    • size decimal string

    • assetId string | nullable

  • longPositionSettings object — Settings for Long positions:

    • size decimal string

    • assetId string | nullable

lotSize integer | nullable

Not applicable to Spot markets.

The standardized quantity of the base asset per lot.

Supports only integer values in the range [1, 1000000].

minLotAmount decimal string | nullable

Not applicable to Spot markets.

The minimum order amount, in lots, that can be placed and executed.

Supports values in the range [0.00000001, 1].

maxLotAmount integer | nullable

Not applicable to Spot markets.

The maximum order amount, in lots, that can be placed and executed.

Supports only integer values in the range [1, 10000].

tickSize decimal string | nullable

Not applicable to Spot markets.

The minimum price increment.

lotStep decimal string | nullable

Not applicable to Spot markets.

The minimum lot amount increment.

Supports values in the range [0.00000001, 1]. By default, equals to the minLotAmount.

slippageRate decimal string

The expected slippage, that is, the difference between the expected execution price and the actual one. This value is used as a multiplier to calculate the funds to be put on hold for a market order execution.

Supports values in the range [1, 10], including decimal values with up to 4 decimal places. The default value is 1 which means that only the current bid/ask price is put on hold. For example, 1.1 means that the current bid or ask price + 10% is put on hold for each order, to cover the 10% slippage.

Mind that the total amount funds to be held depends on the order parameters and takes into account many conditions, the slippage rate is only one of them.

calendar object

The trading calendar defining market trading hours.

Structure:

  • timeZoneId string — IANA time zone identifier.

  • tradingSessions array — Weekly trading sessions:

    • dayOfWeek string — One of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.

    • timeIntervals array — List of intervals with:

      • start string (time) — Start time in calendar.timeZoneId.

      • end string (time) — End time in calendar.timeZoneId.

  • sessionOverrides array — Optional specific-date overrides:

    • date string (date) — In YYYY-MM-DD format.

    • timeIntervals array | nullable — Intervals for that date.

fundingStartTime string | nullable

Applicable to Perpetual markets only.

The time of the first funding settlement, in the following format: HH:MM:SS.

fundingIntervalInHours integer | nullable

Applicable to Perpetual markets only.

The funding settlement interval, in hours.

Possible values: 1, 2, 3, 4, 6, 8, 12, 24.

leverageProfile object

Not applicable to Spot markets.

The leverage profile.

Structure:

  • leverageType string — Leverage type. Possible values: Fixed, Dynamic.

  • leverage object

    • useOnlyMaxLeverage boolean

    • maxLeverage integer — For Fixed leverage type only.

    • tiers array — For Dynamic leverage type only.

      • maxLeverage integer — The maximum allowed leverage for this tier.

      • maxNotionalValueInRAT string | nullable — The maximum position notional for this tier.

commissionSettings object

The commission settings.

Structure:

  • type string — Leverage type. Possible values: Fixed, Dynamic.

  • charge object

    • type string — Possible values: Percent, FixPerLot.

    • assetId string | nullable — For Fixed commission type only.

    • size decimal string — For Fixed commission type only.

    • tiers array — For Dynamic commission type only.

      • size string — The commission amount for this tier.

      • minTradingVolumeInRAT string — The minimum required trading volume for this tier.

    • minCommissionInRAT decimal string | nullable

  • dynamicCommissionGroupId

Account margin settings

Get margin assets

GET /frontoffice/api/v4/account-margin-settings/assets

Summary

Use this method to retrieve a list of assets that can be used as collateral for margin trading.

Request

No request parameters.

Response

In case of success, an object will be returned.

Each object contains the following information:

assets array

A list of assets that can be used as a collateral for margin trading.

Each array item contains:

assetId string

The asset identifier.

assetName string

The asset display name.

available decimal string

The available asset balance.

This value is calculated as Total balanceLocked balance.

total decimal string

The overall amount of the asset, including locked funds.

marginRatio decimal string

The percentage of the asset value used as a collateral.

Supports values in the range [0, 1], where 1 represents 100.00%.

isSelected boolean

Indicates whether the asset is selected to be used as collateral.

Can be true only for assets with the marginRatio more than 0.

Select margin asset

POST /frontoffice/api/v4/account-margin-settings/assets/{assetId}

Summary

Use this method to enable a particular asset to be used as collateral for margin trading.

Only assets with the marginRatio more than 0 can be selected.

Request

Path parameters

assetId required

The asset identifier.

Response

In case of success, an empty object will be returned.

Disable margin asset

DELETE /frontoffice/api/v4/account-margin-settings/assets/{assetId}

Summary

Use this method to prohibit a specific asset from being used as collateral for margin trading.

Request

Path parameters

assetId required

The asset identifier.

Response

In case of success, an empty object will be returned.

Info

Get server info

GET /frontoffice/api/v3/info

Summary

Use this method to retrieve current server time and timezone information.

Request

No request parameters.

Response

In case of success, an object will be returned.

Each object contains the following information:

serverTime string

The server time, in the Unix timestamp format.

serverTimeZone string

The server time zone.

Get server time zones

GET /frontoffice/api/v3/info/time-zones

Summary

Use this method to retrieve available server time zones.

Request

No request parameters.

Response

In case of success, an array of objects will be returned.

Each object contains the following information:

id string

The time zone identifier.

offset string

The UTC offset, in the following format: HH:MM:SS.

offsetInMinutes integer · int32

The UTC offset in minutes.

shortLabel string

The short label for the time zone.

label string

The display label for the time zone.

Last updated