- Activating the OKEx account mode
- Adding funds to your trading account
- Creating a v5 API key on OKEx
- Adding the created API key to RevenueBot
- Creating a futures trading bot for the OKEx exchange
- The position mode
- Features and recommendations for trading futures on the OKEx exchange
- General recommendations for Trading Cryptocurrency futures using leverage
1. Activating the OKEx account mode
Perpetual futures contracts on the OKeh exchange are called perpetual swaps.
To be able to trade futures on the OKeh exchange, you need to activate the account mode by selecting “multi-currency margin”. Go to https://www.okex.com/ru/trade-swap/xtz-usdt-swap and click on the gear.
choose “single-currency margin” (suitable for most)
2. Adding funds to your trading account
Both for spot trading and for futures, you need to transfer the necessary amount from the main account to the trading account:
3. Creating a v5 API key on OKEx
- Go to the API menu from the profile.
- If you do not have two-factor authorization enabled (via sms or google authenticator), then this must be done.
- As soon as two-factor authorization is enabled, you will be able to add the “Apply for V5 API” key to the API menu.
- In the window that appears, you need to fill in the fields: key name, password for accessing the key, IP (optional). Rights: Enquiry and Trade.
Attention: remember your API Password (Passphrase is the password for accessing the key), you will need it when connecting to RevenueBot
- Now, to view the key data, you need to click the “View” button.
8.In the window that appears, enter the password to access the key and pass authorization via sms (or google authenticator).
- You have been given key data. You need to save apiKey and secretKey fields to connect RevenueBot.
4. Adding the created API key to RevenueBot
- Go to “API keys” and click “Add API key”
- We add the data of our OKEx key (apiKey and SecretKey) to the corresponding fields.
- Create a virtual wallet – determine the deposit that will use the bot for trading (recommended at least 150$ in cryptocurrency equivalent).
- Choose a strategy, set basic and additional settings. If you have any questions or need any advice on how to configure, please contact us in chat!
5. Creating a futures trading bot for the OKEx exchange
Go to the tab «Bots», in the personal office, and press «Create a new bot».
In order we fill in all fields that appear. After the exchange and API key are specified, you will be given a detailed bot configuration. Initially, we choose a trading pair, an algorithm, a deposit and the amount of leverage. All the settings presented are used solely for informational purposes.
An example of a created bot for OKEx Futures with automatic selection of a trading pair:
Description of the settings:
- Overlap of the price change. This setting essentially sets how many percent the bot will cover a possible price change in a trading pair with its insurance orders. This setting sets the limits within which the bot will be able to average. If the price changes more than indicated in the Overlap of price changes setting, the bot will no longer be averaged there, since the last order of the safety net will already be executed. We do not recommend setting the overlap of price changes below 30-40%.
- The indent of the first order. Sets how many percent of the current price will be the first order in the order grid. For example, BTC costs $50,000, you want the first order in the grid to open at $49,000. To do this, it is necessary to set the indent of the first order of 2%.
- The price is on the exchange. The price to be used in calculating the orders. The sales price is recommended for the LONG algorithm, the purchase price for the SHORT algorithm.
- Grid of orders, % of martingale. The number of orders in the grid depends on the deposit allocated to the bot. The deposit should be enough to create all the grid orders. We usually recommend a deposit of at least 200-300 USD and the number of orders is 15-20. The martingale sets by how many percent the volume of each next grid order will be greater than the previous one. The larger the martingale, the smaller the price rebound will be needed for the take profit order to be executed. The larger the martingale, the smaller the first grid orders will be in volume, which reduces the profit, but reduces the risks. We usually recommend using a martingale of at least 3-5%. With large deposits, you can increase the martingale up to 10%. By clicking on the PRO button, you can create your own grid of orders, which is not available in the presented options.
- Enable partial placement of the order grid. This setting allows you to set the number of simultaneously active orders that will be placed on the exchange from the entire grid of orders. As they are executed, the bot will place new orders so that there are exactly as many active orders on the exchange at the same time as specified in this setting.
- Enable cycle restructuring. Using this mechanism, you can increase the value of the “price change overlap ( % )” setting in the current active bot cycle. The new value will be applied when the specified number of safety net orders is executed on the exchange. Thus, you can move the prices of the remaining (new) insurance orders further from the current price on the exchange, when the price changes strongly and some of the bot’s insurance orders have already been executed.
- Profit. Take profit order, here you specify the percentage of profit at which the bot will complete the working cycle. Important: the exchange commission is not taken into account when placing a take profit order.
- Profit coin. This indicates the cryptocurrency in which the profit will be made. It is impossible to configure this for futures trading, where the profit is always obtained in USD.
- A trading strategy based on a grid of pending orders. The market is not static, so a price reversal in the wrong direction is a common thing. In order not to wait for the price to return to the desired level to start executing orders, you can configure a Trading strategy based on a grid of pending orders, which will update the grid to the current price. It is worth noting that this parameter should not be less than the Indent of the first order. This contributes to a large number of cancellations of orders, and this is not welcomed by exchanges.
- The delay before canceling the grid of orders for tightening. Here you can set the time after which the current grid will be canceled and there will be a pull-up to the current price on the exchange. This allows you to avoid false positives of the order grid, a trading strategy based on a grid of pending orders.
- The delay after the cancellation of the grid of orders for a trading strategy based on a grid of pending orders. Here you can set the time after which the new grid will be set. It happens that the price very quickly returns to its previous place, so the grid may be irrelevant.
- The delay after the end of the cycle. Sets the time after which the new cycle will start, after the end of the old one.
Advanced Bot Settings:
- Capitalization of profit. The bot will add all the profit received or the specified percentage to its deposit, thereby increasing it.
- Logarithmic distribution of the price. When there is a small volatility in the market, only the first grid orders will be executed, the rest will remain unfulfilled and will be canceled after the take is executed and the bot cycle is completed. To use more deposits in trading, you can resort to a logarithmic distribution of order prices. With its help, the density of orders is adjusted. The values of the logarithmic coefficient > 1 will increase the density of orders near the current price (it involves more deposit in trading with low volatility, which will increase the profit, but we will also increase the risks). The values of the logarithmic coefficient < 1 will increase the density of orders when moving away from the current price near the last order of the grid (we greatly reduce the risks of trading, the profit will also be less). Using the logarithmic distribution of prices, always check which grid of orders is obtained. By clicking Show Grid of orders, you can see the calculated prices and volumes of grid orders.
- Price restriction. Here, the price level is set, above which, with the LONG algorithm, the bot will not start a cycle. With the SHORT algorithm, you need to set the minimum price at which the bot will not start a cycle.
- Fix a partially executed order. By enabling this setting, you can set the profit percentage for calculating such a price, at which we will get a profit if we cancel a partially executed order.
After filling all the above configurations click on «Create a new bot».
Now in the starting page of the tab «Bots», in the table below, your created bot is located.
6. Features and recommendations for trading futures on the Okex exchange
6. The position mode
In the settings of futures bots, you can set the position mode.
At the moment, there are 2 position modes on Binance Futures. They are “one-way mode” and “hedging mode”.
One-way position mode (Net)
By default, the exchange sets “One-way position mode”. You should 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).
Two settings have been added for the one-way position mode. We recommend you to turn them on. For most cases, these settings will further secure futures trading.
1) Do not start the bot if there is an open position or active orders for the current pair.
This setting will not allow the bot to interfere with an already started trade by affecting the open position (manually or by another bot). Bots with automatic switching of a trading pair will not be able to enter the same pair.
2) Place a take profit order with the “position reduction” parameter.
This setting will not allow the bot to go beyond the open position or open a position in the opposite direction.
Hedging mode (Long/Short)
In hedging mode, you can open independent multidirectional positions for one trading pair at the same time (keep LONG and SHORT positions open for one trading pair at the same time).
This position mode allows you to run two bots simultaneously in the same pair with different algorithms. Two multidirectional positions will be opened, and each bot will only control its own position.
Attention! The position mode is set the same for all trading pairs, so you can’t run bots with different position modes.
The position mode can be set (changed) only if there are no open positions. Therefore, if you decide to change the position mode, you need to make sure that all bots are stopped, and their positions are closed. In addition, you need to close all manually opened positions and only then change the position mode. You don’t need to manually change the position mode on the exchange for the bot to work. The bot checks the startup mode’s position mode and changes it to the one set in the bot settings.
You can see what position mode is set on Okex here:
7. Features and recommendations for trading futures on the Okex exchange
- There is no position – hedging mode on the OKEx exchange.If you want to implement risk hedging mechanisms, you can use subaccounts that can be created in the settings of your account on the exchange. Subaccounts can be used to implement various trading strategies and at the same time exclude the influence of open positions on each other.
- On the OKEx exchange, the minimum order size is very different for different trading pairs. This should be taken into account, since the size of the minimum order affects the size of the deposit allocated to the bot.
Recall that the deposit allocated to the bot should be enough to create all the orders of the safety net.
For some trading pairs, for example, BTC/USDT, ETC/USDT, LTC/USDT, DOGE/USDT, ETH/USDT, the minimum order size is greater than 100USD.
For the BTC/USDT trading pair, the minimum order size is 326.152 USD, for the ETC/USDT trading pair, the minimum order size is 498.1 USD.
If you use the automatic selection of a trading pair, then you should definitely use a black or white list of coins.
In the blacklist, you can set coins where the minimum order size is very large, so that the bot does not take such coins into trading .
In the white list of coins, you can set coins so that the bot selects only from them.
Below are the minimum order size for all futures trading pairs of OKEx at the time of writing this article:
BZZ/USDT : 0.8368 USD
BTC/USDT : 326.152 USD
ETH/USDT : 218 USD
LTC/USDT : 130.45 USD
DOT/USDT : 15.531 USD
DOGE/USDT : 213.389 USD
XRP/USDT : 62.227 USD
EOS/USDT : 36.252 USD
ETC/USDT : 498.1 USD
MATIC/USDT : 10.787 USD
1INCH/USDT : 2.5746 USD
AAVE/USDT : 28.438 USD
ADA/USDT : 136.494 USD
ALGO/USDT : 8.594 USD
ALPHA/USDT : 0.7525 USD
ANC/USDT : 2.164 USD
ANT/USDT : 3.729 USD
ATOM/USDT : 11.944 USD
AVAX/USDT : 12.136 USD
BADGER/USDT : 0.9001 USD
BAL/USDT : 2.259 USD
BAND/USDT : 6.156 USD
BAT/USDT : 5.74 USD
BCH/USDT : 48.748 USD
BNT/USDT : 32.35 USD
BSV/USDT : 135.89 USD
BTM/USDT : 6.052 USD
BTT/USDT : 25.222 USD
CFX/USDT : 2.398 USD
CHZ/USDT : 2.5801 USD
COMP/USDT : 42.016 USD
CONV/USDT : 0.26391 USD
CRO/USDT : 1.121 USD
CRV/USDT : 1.816 USD
CVC/USDT : 24.67 USD
CSPR/USDT : 0.0912 USD
DASH/USDT : 12.79 USD
DORA/USDT : 0.547 USD
EGLD/USDT : 9.016 USD
ENJ/USDT : 1.303 USD
FIL/USDT : 5.5594 USD
FLM/USDT : 3.84 USD
FTM/USDT : 2.406 USD
GRT/USDT : 6.486 USD
ICP/USDT : 0.422 USD
IOST/USDT : 21.372 USD
IOTA/USDT : 8.114 USD
JST/USDT : 5.04 USD
KNC/USDT : 1.5323 USD
KSM/USDT : 21.75 USD
LAT/USDT : 2.14 USD
LINK/USDT : 18.754 USD
LON/USDT : 2.737 USD
LPT/USDT : 1.568 USD
LRC/USDT : 2.392 USD
LUNA/USDT : 0.671 USD
MASK/USDT : 3.488 USD
MANA/USDT : 7.402 USD
MIR/USDT : 3.742 USD
MINA/USDT : 1.31 USD
MKR/USDT : 26.753 USD
NEAR/USDT : 21.387 USD
NEO/USDT : 33.906 USD
OMG/USDT : 4.132 USD
ONT/USDT : 6.966 USD
PERP/USDT : 9.392 USD
QTUM/USDT : 6.537 USD
REN/USDT : 3.66 USD
RSR/USDT : 2.441 USD
RVN/USDT : 0.5005 USD
SAND/USDT : 4.708 USD
SC/USDT : 1.332 USD
SHIB/USDT : 7.97 USD
SNX/USDT : 9.835 USD
SOL/USDT : 34.707 USD
SRM/USDT : 3.356 USD
STORJ/USDT : 9.274 USD
SUSHI/USDT : 8.278 USD
SWRV/USDT : 0.68 USD
THETA/USDT : 65.561 USD
TORN/USDT : 0.3619 USD
TRB/USDT : 3.834 USD
TRX/USDT : 61.38 USD
UMA/USDT : 0.9415 USD
UNI/USDT : 20.495 USD
WAVES/USDT : 15.535 USD
WNXM/USDT : 6.159 USD
XCH/USDT : 2.829 USD
XEM/USDT : 1.24 USD
XLM/USDT : 24.263 USD
XMR/USDT : 20.618 USD
XTZ/USDT : 2.6815 USD
YFI/USDT : 3.2986 USD
YFII/USDT : 2.103 USD
ZEC/USDT : 11.259 USD
ZEN/USDT : 60.66 USD
ZIL/USDT : 7.554 USD
ZRX/USDT : 7.203 USD
7. General recommendations for Trading Cryptocurrency futures using leverage
We usually recommend using no more than 20-30% of the funds that are on your futures wallet on the exchange in trading, bots and manually. The remaining 70-80% will provide a margin and will allow you to pull open positions into a plus, with an extreme price change in the wrong direction. The main purpose of trading should be to prevent liquidation (margin call).
We also recommend trading only coins from the TOP-20 coinmarketcap.com and we do not recommend using extreme leverage >20.
Overlap of price changes use at least 40%, use the cycle restructuring setting, which will increase the overlap of price changes to for example 60% with a strong price change, which will allow the bot to expand its averaging capabilities.