There was a problem loading the comments.

How to create a bot for Binance Futures COIN-M?

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Perpetual futures contracts Binance Futures COIN-margin

We have already described the advantages and disadvantages of trading cryptocurrency futures contracts with leverage, as well as the process of creating a bot for trading perpetual Profitable trading on Binance Futures USDT-margin with the bot, which appeared in September 2019.
In the summer of 2020, a new type of futures trading appeared on the Binance exchange, namely COIN-margin futures, which are represented by quarterly and perpetual futures.
In this article, we will look at perpetual COIN-Margin futures. You can trade them with a leverage of up to x125.

Contents
1. What is the difference between COIN-M and USDT-M on Binance Futures
2. How to create a bot for Binance Futures COIN-M
3. Replenishment of the COIN-M futures account
4. Create an API key for trading on Binance Futures COIN-M
5. Adding the API key to RevenueBot
6. Creating a bot for COIN-M Binance Futures using the “Quick start” menu

1. What is the difference between COIN-Margin and USDT -Margin on Futures Binance?

The main difference between USDT-Margin futures and COIN-Margin futures on the Binance exchange is in the base coin.
The base coin for USDT-Margin futures is the USDT stablecoin. In USDT, you need an initial Deposit to trade in any of the presented pairs. Profit from trading is also obtained only in USDT.
In a growing market, this can reduce the profit, since the value of the cryptocurrency is growing, and the profit is obtained not in it but in the USDT stablecoin.
In addition, not everyone trusts the USDT stablecoin and does not want to store funds in this coin.
The main advantage of USDT-Margin over COIN-Margin is a greater variety of trading pairs.
For COIN-M futures, the base coin is BTC and a number of other cryptocurrencies (ETH, ADA, LINK, BNB, TRX, DOT, EOS, LTC, BCH, XRP, ETC). Each trading pair has its own base coin.

As for COIN-Margin, USD is the counter coin that is being traded.
Price of 1 futures contract = 100USD for the BTC-USD pair.
Price of 1 futures contract = 10USD for ETH-USD, ADA-USD, LINK-USD, BNB-USD, TRX-USD, DOT-USD, EOS-USD, LTC-USD, BCH-USD, XRP-USD, ETC-USD pairs.
Cryptocurrency is used to finance the initial margin (the initial depot for the bot is needed in the base coin) and calculate profit and loss (profit is also obtained in the base coin).
The main advantage of COIN-M over USDT-M is that you get a profit in cryptocurrency, not USDT, and do not incur losses when the price of cryptocurrency increases while trading in USDT.

2. How to create a bot for Binance Futures COIN-M


fut2.jpg

  • Click on “Open now” in the lower right corner. We would be grateful if you use our referral code 40247736 =);


2f8912ab674d1d22ccafbac7318853f1.png

  • After that, the futures account will be activated, and you can start preparing for trading.

 

3. Replenishment of the COIN-M futures account

  • First, you need to transfer the necessary coin from your spot wallet to your COIN-M futures account. To do this, click on “transfer” in the lower-right corner;


22-02-2022-22-28-07.jpg

  • Enter the amount you want to transfer to your COIN-M futures account. Then, click on “Confirm transfer”. ATTENTION! If you want to trade BTC-USD, you need to top up your account in BTC. If you want to trade in ETH-USD, you need to top up your account in ETH, and so on… Remember that each pair uses its own coin in this trade;


01-03-2022-13-17-04.jpg

  • You can also use the transfer function to transfer funds back to your spot account.

 

4. Create an API key for trading on Futures COIN-M

Now we have a new way to quickly create an API key for the Binance exchange!

Binance FASTAPI is a convenient, fast and secure way to create API keys. With FASTAPI, you can automatically generate and bind API keys in a couple of clicks without having to enter them manually. 

If futures trading is enabled in your Binance account, then using Binance FASTAPI, 3 separate API keys are created at once — Spot, Futures USDS-M, Futures COIN-M. 

When FASTAPI is connected, a white list of IP addresses is used, which ensures the safety and security of user funds. All trading operations will be allowed only from IP addresses from the white list. In addition, the FASTAPI connection cancels the 90-day validity period of the API key.

 

To use this function, you need to select the Binance exchange on the API key addition page and click the link "FASTAPI connection", you will be redirected to your Binance account, where you will need to approve access. If you are not logged in to the exchange, then you will need to log in first, it is better to do this before creating an API key.

6297fc44a5530eb32944534ef34135595f680290d8fc81163e13ca064894cfca867558e73fd336aa?t=e2d33ea0dcedaf190d3228b69fc4b6a0

 

Next, approve access to your account to create an access API.

cd59899cd80e3d9bee8abdbdb411f32f84b0a6673fe20b342b34b1e61b83b47319ac12df1563703c?t=b13dede57f33018117251fe088d7e583

After successful completion of the operation, you will receive the message "The key 'FastAPI key' has been successfully created" and you will be able to use the created keys for the Binance Spot, Futures USDS-M и COIN-M.

71f3b8e8400e6e1f0331515d6d3e7726f574a5f1ecfa482bce850367c7433b7a62b05225370a4fcb?t=4578baa9c174e701fcf570d4198eded6

Create an API key for trading on Futures COIN-M standard way 

c66c247a5f256e90a0ef1c0854d105722f55f61bafd265f6a5f063fa5b301e981d708d6cb89e2ec0?t=a09f24bd741b9fd47c70bfa790c9445c

  • Next, you need to remove the "Default Security Controls" checkbox;

c74c0b2d803a745f580d9bac9fb9c12002f32e4129616185789e7da3d4ce79ad06057e57c220c4b2?t=f2510c01000da97eeaf2fbed9d74f472

  • In the pop-up window, you need to confirm that the "default security controls" is disabled;

9e7f8ace5e0905ea6b5cbe4288df6e263483db0febd08aa4ab3849fcb929250e57cdddb3d651cf75?t=c9fd0508e5bad57ba3ba0e5c5b6160680b870008d88a809e7fa4ace0ef4a6a9a47771401d17b86684593df275fe2ed6e84ca3c9c5047190c?t=111729ea29b659dbbad24c42acad6dc9

  • Next, click "Create API" and select the key type "System generated";

a0998af7d47952c576d1d56d7f470ffa528dead486ac72465b3b410954dfdbd72d4d38736cf6f25a?t=5ae75924aafc09a5cf05eb36819a6861

  • We set the label of the API key;

37b4ccb78680cf464f86c204343cec5e3125568830195fc4b883ca4d7c66c95c747cc3b572e608fc?t=764f2f62f84927f3388766b52f1623d6

  • Passing a security check;

f374ca740f4d41dd9f8dc57c24a3222690b38b4f929f4d2954d92e7c1b875779d9e2193dfeca169c?t=02d5de58a1864a9906bc3d43ce48514d

  • Activate the restriction "Enable Futures", set IP access to "Unrestricted", save the API Key and Secret Key (they will be needed when adding a key for the RevenueBot), then click Save;

 

  • We confirm the validity period of the API key;

fef7290bde1c11b8b5124fd863797b73cc8bf763b2a7a62fbac376326e92682f731b497a8cdff8ff?t=ccdf41dd9dfcecaef89196301c4dc3bf

 

5. Adding an API key to RevenueBot

  • Go to the “API keys” menu  and click on “Add API key”;
  • Come up with a title key, for example, “revenuebot futures coin m”. In the exchange field, you should select “Binance Futures COIN-M” copy timing “API Key” and “Secret Key” in the appropriate fields and click on “Add API key”.


22-02-2022-22-40-23.jpg

6. Create a bot to Binance Futures COIN-M

  • Go to the “Quick start” menu
  • Give a name to the bot
  • Select the “Binance Futures COIN-M” exchange
  • Select the previously created API key for futures trading or create a new one.
  • Select a trading pair. At the time of writing, you can choose one of the 12 suggested pairs. You can also use the convenient menu of recommended pairs, which displays those trading pairs that had the most profitable trades in the last 24 hours (if, of course, at least one of these 12 pairs was in the top).
  • Select the algorithm
    LONG — buying cryptocurrency futures for USD, and then selling them at a higher price.— the one that was brought to the COIN-M futures account. Using the long algorithm is advantageous in a bullish trend (a growing market).
    SHORT – selling cryptocurrency futures for USD, and then buying them at a lower cost. Profit is also available only in the main coin — the one that was brought to the COIN-M futures account. Using the SHORT algorithm is advantageous in a bearish trend (a falling market).


22-02-2022-22-45-02.jpg

  • Set the bot with a Deposit
    The bot needs to set a Deposit in the pair’s main coin (the coin that was brought to the COIN-M account). The profit is available only in the main coin for both the LONG algorithm and the SHORT algorithm. The example of bots in different trading pairs:— If the bot has a TRX-USD trading pair set, the bot’s deposit must be in TRX for both LONG and SHORT algorithms. The profit will also be in TRX. The COIN-M account must have TRX coins for trading such a bot.
    — If the bot has a DOT-USD trading pair set, the bot’s deposit must be in DOT for both LONG and SHORT algorithms. The profit will also be in DOT. The COIN-M account must have DOT coins for trading such a bot.
    Thus, we get that for each trading pair; the COIN-M account must have its own cryptocurrency, which will be used by the exchange to finance the initial margin.When trading COIN-M futures, when sending an order, the number of contracts that we want to buy or sell is transmitted to the exchange in addition to the price.
    Price of 1 futures contract = 100USD for the BTC-USD pair.
    Price of 1 futures contract = 10USD for ETH-USD, ADA-USD, LINK-USD, BNB-USD, TRX-USD, DOT-USD, EOS-USD, LTC-USD, BCH-USD, XRP-USD, ETC-USD pairs.To create a grid of orders, the bot calculates how many contracts the user’s allocated deposit will last and how many contracts will be in each grid order. According to the exchange’s rules, the number of contracts in order is an integer. This rule of the exchange affects the setting of the martingale in the order weights of the grid. If you want the order for the martingale to work correctly in order weights, you need to set it more than for normal trading, where signs after the dot are allowed in order amounts. This is especially important when trading with a small deposit and small leverage when the number of contracts in orders is small.
  • Set the leverage
    Setting the leverage is a multiplication of your depot (borrowed funds from the exchange). Thanks to these borrowed funds, you get the opportunity to increase the volume of your trading operations and profit.
    Don’t be greedy and don’t use maximum leverage, it’s very risky. Be sure to keep insurance funds on the futures account that are not involved in trading until the right moment. This will make it possible to get the profit out of the open position.
  • Be aware of the risks:
    — If you use a large amount of leverage, then there is a possibility that the entire margin balance in the futures wallet may be liquidated in the event of an extreme price change. Therefore, you need to fully understand and understand how this trading tool works and be able to assess risks.
    It is also important to develop and strictly adhere to money management to avoid the liquidation of all funds.
    — It is mandatory to have insurance funds on the futures account that are not involved in trading until the right moment. This will make it possible to get the profit out of the open position.
  • Set the position mode
    By default, “one-way position mode” is set on the exchange. Use this mode when configuring the bot if you don’t know which one to choose.
    In one-way mode, a position can only be opened in one direction for one trading pair at a time (this is either a SHORT or LONG position).
    More information about position modes.


22-02-2022-22-46-15.jpg

  • Set the number of insurance orders and martingale
    The Deposit must be sufficient to create all insurance orders, and each of the orders must meet the minimum size requirement of the exchange. The martingale determines how many percent each subsequent order in the grid is larger than the previous one. Using a martingale allows you to close a position with profit with a smaller price rebound.
    As noted above, you need to use more % martingale for COIN-Margin futures than for other bots. This is due to the fact that the number of contracts in the order must be an integer according to the exchange’s rules.
  • Enable partial placement of the order grid
    Due to the fact that it is not allowed to place orders more than 15% from the current price of the trading pair on the Binance Futures exchange, we recommend that you always use the partial placement of the order grid for futures bots (sets the number of simultaneously active safety orders from the entire grid that the bot will place on the exchange). If the price change overlap of more than 15% is set in the bot, the bot will not be able to place all safety orders in the grid at once. In this situation, enabling partial placement of the order grid will help. The bot will not place the entire grid of orders at once, but only the specified number. After that, the bot will track the placed orders and place new orders when active orders are executed. If you want to find out more information about the partial placement of a grid of orders, see the blog article “Setting the number of active insurance orders”.
  • Select a trading mode
    You can choose one of the ready-made templates for bot settings. We recommend using the “normal trading mode for Binance Futures”, which uses a 40% price change overlap, which is suitable for continuous operation of the bot with low risks.
    We remind you that you must enable partial placement of the order grid (sets the number of simultaneously active safety orders from the entire grid).
    There is also an aggressive trading mode with a 15% price change overlap. It is suitable for temporary trading when there is time to monitor the bot’s work. It allows you to get more profit, but at the same time the risks increase.

22-02-2022-22-48-49.jpg

  • Using filters to start the bot
    We recommend always using filters to start the bot. This is necessary so that the bot starts trading at the right time (not buying on an overbought market and selling on an oversold one). That’s why, popular and effective trading indicators such as RSI, CCI, and Bollinger Bands are used. We use RSI < 70, CCI < 110 for the LONG algorithm, and RSI > 20, CCI > -110 for the SHORT algorithm. You can change or add new filters for the start when editing the bot.
    Read more about filters in our blog “filters for a start”.
  • There are three ways to continue: Create a bot / Create and edit a bot / Create and launch a bot

22-02-2022-22-49-42.jpg
Select the “Create bot” option, if:
— you don’t understand fine-tuning yet and want first to see how the bot trades with popular and suitable settings for most cases;
— you don’t want the bot to be launched yet, but you want to read more information about the service.
The bot will be created, and the user will be able to get acquainted (before launching the bot) with all the information about how to continue working with the bot: where to view the created bots and make more subtle settings, links to the articles “how to manage the bot” and “see statistics of its work”.
Select the “Create and edit bot” option if you are familiar with the bot’s fine-grained settings and want to adjust them.
The bot will be created, and the user will have access to fine-tuning (recommended for experienced users who know what they are doing and how the bot works)
Select the “Create and launch bot” option if you want to quickly create and launch a bot with suitable settings in most cases. The bot will be created and launched. You can also find information on how to continue working with the bot: where to view the created bots and make more subtle settings, links to the articles “how to manage a bot”, and “see statistics of its work”.


Share via

Related Articles

© RevenueBot