B2PRIME Docs

Settings

Configure interface, widgets, margin accounts, trading reports, and API tokens in the Trading terminal settings

Access settings by clicking the gear icon in the topbar of the Trading terminal.

Settings

Settings are organized into tabs:

Interface

Configure global interface preferences:

Language

Select the interface language from the dropdown menu.

24 hour mode

  • Enable: Display time in 24-hour format.
  • Disable: Display time in 12-hour format with AM/PM.

Dark theme

  • Enable: Apply dark color scheme.
  • Disable: Apply light color scheme.

Widgets

Configure display options for the following widgets.

Price chart

Display positions

When enabled, open positions are shown on the chart along with:

  • Position size and current PnL.
  • Quick access to edit price triggers and close positions.
  • Color coding: Long positions (green), Short positions (red).

Display orders and triggers

When enabled, the following orders and triggers are displayed on the chart:

  • Active Limit and Stop orders with order type, price, and amount.
  • Stop loss, Take profit, and Trailing stop triggers.
  • Quick access to edit triggers and cancel orders.
  • Color coding: Buy orders (green), Sell orders (red).

Display executed orders

When enabled, executed orders are shown on the chart with order type indicators:

  • Green B tag for Buy orders.
  • Red S tag for Sell orders.

Clicking B or S will open details of one or more orders that were executed during the candle interval.

Market quick trade panel

When enabled, a panel is displayed on the chart for placing Market orders with:

  • Quick amount selection from preset values.
  • Leverage ratio input (when applicable).

Amount presets can be configured in the corresponding field displayed when the option is enabled.

Limit quick trade panel

When enabled, a panel is displayed on the chart for placing Limit orders with:

  • Quick amount selection from preset values.
  • Leverage ratio input (when applicable).

Amount presets can be configured in the corresponding field displayed when the option is enabled.

Action Confirmation

Choose which trading actions require an additional confirmation dialog before execution.

Cancel orders

  • Enable: A confirmation dialog is displayed before canceling orders.
  • Disable: Orders are canceled immediately without confirmation.

This setting applies to single and bulk order cancellations from the Open Orders widget and the Price chart.

The confirmation dialog includes a "Don't ask again" checkbox. To skip the confirmation for future order cancellations, check this box.

Full Close Positions

  • Enable: A confirmation dialog is displayed before closing positions.
  • Disable: Positions are closed immediately without confirmation.

This setting applies to single and bulk position closures from the Open Positions widget.

Limit order cross-TOB warning

  • Enable: A confirmation dialog is displayed before a Limit order is submitted if its price crosses the current top-of-book — that is, when a Buy price is at or above the best ask, or a Sell price is at or below the best bid. The dialog shows the entered price and the current best bid/ask, and includes a Do not show this warning again checkbox.
  • Disable: Crossing Limit orders are submitted immediately without the warning.

The warning is enabled by default. The dialog checkbox and this toggle share the same global setting and stay in sync.

The warning is informational only — it does not block the order. If you confirm, the order is submitted with the original price. The warning applies only to standard Limit orders; Stop-limit, Take-profit-limit, IOC, FOK, and other order types are not affected. If best bid or best ask data is unavailable (empty book or disconnected feed), the order is submitted without the warning.

Account margin

Control which assets can be used as collateral for margin trading.

Asset list

The following information is provided about each asset:

Asset

The alphabetical code of the asset.

The first asset in the list is the root asset of the platform.


Caption

The asset name.


Available

The balance available for trading, calculated as Total – Halted, where Halted represents funds locked for pending Limit orders.


Total

The complete asset balance including locked funds.


Margin ratio

The percentage of asset value that can be used as collateral for margin trading.


Use as margin

Enable this toggle to use the asset as collateral for margin trading.

Configure which assets can be used as collateral for margin trading by toggling the Use as margin setting for each asset.

Only assets with Margin ratio greater than 0 (zero) can be enabled.

The platform root asset is enabled by default and can't be disabled.

Filtering options

Click the funnel icon to configure the asset list display:

  • Show/Hide zero balances: Control visibility of assets with zero balance. By default, hidden.
  • Show/Hide assets unused as margin: Control visibility of assets with disabled margin usage.
  • Show/Hide assets with zero margin ratio: Control visibility of assets that can't be used as collateral. By default, hidden.

Trading report

Generate comprehensive reports containing:

  • Trade history

    • Closed positions
    • Executed orders
    • Individual trades
  • Transfers history

    • All account transfers
  • Account statistics

    • Total balance
    • Realized PnL
    • Position swaps
    • Position funding
    • Commissions

To generate a report:

  1. Select a custom period of time (UTC time), or generate a report for your entire account history using the All data range. The following timeframe presets have been implemented for your convenience:
  • Today
  • Current: week, month, quarter
  • Previous: week, month, quarter
  • All data.
  1. Click Download.

Once generated, the report will be automatically downloaded to your computer as a zipped CSV file.

API token management

Generate tokens for accessing the Trading API:

  • Limit: 10 tokens per account
  • Validity: 1 year
  • Management: Can be revoked or deleted at any time

To generate a token:

  1. Click + Create new.
  2. In the New API token popup, fill in a Name for the token, to help you identify it later.
  3. Click Create.

The newly generated token will be displayed and available for copying, along with its name and expiration date.

The token only reveals once in the creation popup. Copy and store it securely before closing the popup. The token can't be retrieved again after closing.

TradingView Webhooks

Use TradingView Webhooks to automatically execute orders on your trading account based on alerts from TradingView. When a TradingView alert triggers, it sends a webhook request to B2TRADER, which places an order according to the parameters specified in the alert message.

This feature supports all market types: Spot, CFD, and Perpetual Futures.

Set up the webhook

Step 1: Create a webhook API key

To create a webhook API key in the Trading terminal:

  1. Click the gear icon in the topbar to open Settings.
  2. Navigate to the TradingView Webhooks tab.
  3. Click + Create new.
  4. In the popup, fill in a Name for the key.
  5. Click Create.

The popup displays the generated API key and the webhook URL. Copy both values and store them securely.

The API key is shown only once at creation. It can't be retrieved after closing the popup.

The following limits apply:

  • Maximum 10 active keys per user
  • Each key is valid for 1 year from creation
  • Keys can be revoked at any time

Step 2: Configure the alert in TradingView

  1. In TradingView, create a new alert or edit an existing one.
  2. In the Notifications section, enable Webhook URL.
  3. Paste the webhook URL copied from the terminal.
  4. In the Message field, enter the alert body in JSON format (see Alert message format).
  5. Save the alert.

When the alert triggers, TradingView sends the message to B2TRADER, and the order is placed automatically.

Alert message format

The alert message is a JSON object with the following fields:

FieldRequiredDescription
apiKeyYesWebhook API key generated in the terminal
accountIdYesTrading account ID
symbolYesMarket symbol with type prefix (see Symbol format)
sideYesOrder side: buy or sell
quantityYesOrder quantity in base asset
orderTypeNomarket (default), limit, stop, or stop_limit
priceConditionalLimit price. Required for limit and stop_limit orders
stopPriceConditionalStop price. Required for stop and stop_limit orders
leverageNoLeverage ratio. Applicable to CFD and Perpetual Futures markets only
takeProfitNoTake profit trigger price
stopLossNoStop loss trigger price
timeInForceNogtc (default), ioc, fok, or day
commentNoCustom comment, up to 256 characters
deduplicationIdNoUUID for idempotency. Duplicates within 5 minutes return a cached response

Symbol format

The symbol must include a market type prefix:

Market typePrefixExample
Spotspot.spot.btc_usdt
CFDcfd.cfd.eur_usd
Perpetual Futuresperp.perp.btc_usdt

Examples

Market buy order (Spot):

{
  "apiKey": "wh_key_your_api_key_here",
  "accountId": "your_account_id",
  "symbol": "spot.btc_usdt",
  "side": "buy",
  "quantity": "0.01"
}

Limit sell order with TP/SL (CFD):

{
  "apiKey": "wh_key_your_api_key_here",
  "accountId": "your_account_id",
  "symbol": "cfd.eur_usd",
  "side": "sell",
  "orderType": "limit",
  "price": "1.0900",
  "quantity": "1000",
  "leverage": "10",
  "takeProfit": "1.0800",
  "stopLoss": "1.0950",
  "timeInForce": "gtc"
}

Manage webhook API keys

To view or manage your webhook API keys, navigate to Settings > TradingView Webhooks.

The following information is provided about each key:

ColumnDescription
NameThe name assigned to the key at creation
StatusCurrent key status: Active, Revoked, or Expired
CreatedThe date and time the key was generated
ExpiresThe date and time the key expires

To revoke a key, click the Revoke button next to the key entry.

Rate limits

Webhook requests are limited to 5 requests per second per user. If this limit is exceeded, the request returns a 429 error code and the order isn't placed.

Troubleshooting

The following table describes common error scenarios and their solutions:

IssueCauseSolution
Invalid API keyThe API key is incorrect or wasn't copied in fullGenerate a new key and update the TradingView alert
API key expiredThe key has passed its 1-year validity periodGenerate a new key
API key revokedThe key was manually revokedGenerate a new key
Invalid symbol formatThe symbol is missing a market type prefixAdd the prefix: spot., cfd., or perp.
Price required for limit orderA limit or stop_limit order is missing the price fieldAdd the price field to the alert message
Rate limit exceededMore than 5 requests were sent within 1 secondReduce the alert frequency in TradingView
Account not foundThe accountId doesn't exist or isn't accessibleVerify the account ID in the terminal

Dernière mise à jour le

Sur cette page