Binance Broker Plug-in

From MultiCharts
Jump to navigation Jump to search

Since MultiCharts 14 Release 2 you can connect Binance Futures and Binance Spot broker profiles.

OCO group is emulated by MultiCharts. Simulated OCO-group means that all OCO orders are sent to the broker, price is monitored by MultiCharts and once one of the orders is filled, other orders from this OCO group are cancelled by MultiCharts. When one of the OCO orders is filled, MultiCharts sends a command to cancel the second OCO order to the broker. Note that the second order may also be filled if price reaches its level before the cancellation is processed by the broker (see OCO-Orders Risk).

Binance Futures Broker Profile

All types of orders are supported:

  • Market orders
  • Limit orders
  • Stop orders
  • Stop-Limit orders

Binance provides information on the list of accounts, balance, and open positions. Equity is calculated by MultiCharts. Open position Profit/Loss and Unrealized Profit/Loss is calculated in MultiCharts as it is not provided by Binance.

Setting up Binance Futures Broker Profile

In the Binance Futures Properties window (see Managing Broker Profiles) enter the information provided by Binance.

1. Main tab:
Connectivity section
  • Enter your API key and Secret key for Binance.
  • Select the USDT Futures server for unexpired futures or Coin Futures server for the futures with the expiry date.
  • In the Currency section you can select the base currency.
Default Order Settings section
  • Select Time in Force.
  • Use the option Orders request waiting limits to enable automatic monitoring or requests from MultiCharts.
Note: Binance has limitations for the number of requests from one IP per minute.
  • Use the Reduce Only option to enable Reduce Only orders and avoid the Binance minimum trade size limit when closing a position.
Global section
  • You can set the Timing security interval to specify the time during which the request is considered to be active.
  • Enable the option Use heartbeats for connection loss detection to automatically restore the connection with the Binance server in case of temporary connection loss.
  • Use Show Error pop-up alert to receive alerts.
2. Contracts Ratio tab:
  • Here you can check the ratio for one contract in MultiCharts.
Note: MultiCharts does not support fractional shares. For trading crypto symbols Contracts Ratio was added into Binance broker settings. For example, the Contracts Ratio for BTCUSDT futures is 0.001. When you buy 1 contact in MultiCharts, 0.001 contract will be bought at Binance.
3. Leverage tab:
  • Press Lookup to synchronize the symbol list and leverage with the broker.

The leverage value will be applied at the moment when you connect the broker profile.

Note: It is required to press Lookup each time when you connect Binance Broker profile for correct operation.

Binance Spot Broker Profile

  • Stop orders are not supported by the exchange.
  • Market, Limit, and Stop-Limit orders are supported.

Balance, equities, the list of accounts, and open positions are emulated by MultiCharts since this data is not provided by Binance.

Setting up Binance Spot Broker Profile

In the Binance Spot Properties window (see Managing Broker Profiles) enter the information provided by Binance.

1. Main tab:
Connectivity section
  • Enter your API key and Secret key for Binance.
  • In the Currency section you can select the base currency.
Default Order Settings section
  • Select Time in Force.
  • Use the option Orders request waiting limits to enable automatic monitoring or requests from MultiCharts.
Note: Binance has limitations for the number of requests from one IP per minute.
Global section
  • You can set the Timing security interval to specify the time during which the request is considered to be active.
  • Enable the option Use heartbeats for connection loss detection to automatically restore the connection with the Binance server in case of temporary connection loss.
  • Use Show Error pop-up alert to receive alerts.
2. Contracts Ratio tab:
  • Here you can check the ratio for one contract in MultiCharts.
Note: MultiCharts does not support fractional shares. For trading crypto symbols Contracts Ratio was added into Binance broker settings. For example, the Contracts Ratio for BTCUSDT futures is 0.001. When you buy 1 contact in MultiCharts, 0.001 contract will be bought at Binance.
3. Open Positions tab:

As Binance Spot operates with wallets, MultiCharts has to emulate positions.
The first time you connect to the Binance Spot broker profile in MultiCharts, MultiCharts considers the position to be flat. When you open a position in MultiCharts, it will be displayed in this tab.

  • Click Lookup to emulate positions based on the orders sent from MultiCharts.
Note: If a position was opened/changed outside MultiCharts, MultiCharts will not be aware of it.
  • Click Recalculate to recalculate all the positions based on orders starting from the set date.

To recalculate a position for a specific symbol click the button next to it.

  • Click “Add” to select symbols to add to the positions list.
Note: The position on Spot accounts is emulated on MultiCharts end. After you open the position, its volume will always be less than the one you specified while opening the position due to the commission taken on Spot accounts. In order to close this position properly, please use From Broker To Strategy MP Synchronizer.