OKX Broker Profile
OCO group is emulated by MultiCharts.
Emulated 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).
OKX Futures Broker Profile
All types of orders are supported:
- Market orders
- Limit orders
- Stop orders
- Stop-Limit orders
OKX 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 OKX.
Setting up OKX Futures Broker Profile
In the OKX Futures Settings window (see Managing Broker Profiles) enter the information provided by OKX.
Main Tab
Connectivity Section
- Enter your API key,Secret key, and API key password for OKX.
- 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.OKX has limitations for the number of requests from one IP per minute.
- Use the Isolated Margin Modeto isolate the margin allocated to a specific position from the rest of the account balance.
- Use the Reduce Only option to enable Reduce Only orders and avoid the OKX 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 OKX server in case of temporary connection loss.
- Use Show Error pop-up alert to receive alerts.
Contracts Ratio Tab
Here you can check the ratio for one contract in MultiCharts.
For example, the Contracts Ratio for AVAX-USDT-SWAP futures is 0.1. When you buy 1 contact in MultiCharts, 0.1 contract will be bought at OKX.
OKX 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 OKX.
Setting up OKX Spot Broker Profile
In the OKX Spot Settings window (see Managing Broker Profiles) enter the information provided by OKX.
Main Tab
Connectivity Section
- Enter your API key, Secret key, and API key password for OKX
- Select the base currency in the Currency field.
- Check the Demo box if your account is demo.
Default Order Settings Section
- Select Time in Force.
- Use the option Orders request waiting limits to enable automatic monitoring or requests from MultiCharts.OKX 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 OKX server in case of temporary connection loss.
- Use Show Error pop-up alert to receive alerts.
Contracts Ratio Tab
Here you can check the ratio for one contract in MultiCharts.
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 OKX.
Open Positions Tab
As OKX Spot operates with wallets, MultiCharts has to emulate positions.
The first time you connect to the OKX 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.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.
After the broker profile is set up, you can select it for trading, see the How to Select a Broker Account For Trading guide.
Troubleshooting
Broker Profile Is Not Connecting
If broker profile connection is not established after you click Connect:
- Make sure you pressed the Lookup button in the Leverage tab (for OKX Futures).
- Check the Order and Position Tracker → Logs tab.
- If you see the Timestamp for this request is outside of the recvWindow messages, synchronize the time of your PC: right-click your PC time → Adjust date/time → in the Date&time tab click Sync now.
- If you see the Invalid API-key, IP, or permissions for action messages, check your email for notifications from OKX, contact them directly for details or create a new API and Secret Key.
Orders Are Rejected
If your orders get rejected, check the Order and Position Tracker → Logs tab to see the rejection reason.
- Minimum trade volume = X. Price: Y * Quantity: Z =
Adjust your trade size to fit the OKX limit taking into account the Contract Ratio.
In MultiCharts it is only possible to trade integer values. For trading crypto symbols Contracts Ratio was added into OKX broker settings. You can access it in OKX Settings → Contracts Ratio tab.Contracts Ratio for BNBUSDT is 0,01. So, when you buy 1 BNBUSDT contract in MC, you buy 0,01 (1*0,01) contract at OKX, which doesn’t correspond to their minimal allowed trade size – 5. - Not found symbol from server X and currency Y
- Re-add the symbol in QuoteManager → Instrument → Add Symbol → From Data Source → OKX.
- Make sure you trade Futures with OKX Futures and Cryptocurrencies with OKX Spot.
- Make sure the correct server and currency is selected in the OKX broker profile settings depending on the traded symbol.
- Order’s notional must be no smaller than 5.0 (unless you choose reduce only)
Enable the Reduce Only option in the Main tab of the OKX Futures settings to avoid the OKX minimum trade size limit when closing a position.