BitMEX Trading Service
- What is Included
- Setup Instructions
- Difference Between BitMEX Testnet Data and Live Trading Data
- Setting Order Execution Instructions
- Using Multiple BitMEX Accounts
- Bitmex Connection Problems
- Setting BitMEX Leverage
- Historical Daily Data
- BitMex System Status (Not status of Sierra Chart systems)
Sierra Chart fully supports trading and market data from the BitMEX exchange.
BitMEX is a trading platform that gives retail investors access to the global financial markets using Bitcoin, the Blockchain, and financial derivatives. Ultimately BitMEX uses digital currencies as a common form of collateral to allow anyone, anywhere, to trade anything. Currently clients can trade Bitcoin and other digital currency based derivatives with up to 100x leverage. To date, over US$2.0 billion worth of digital currency financial products have been traded on the BitMEX platform.
You are now able to trade on BitMEX using the powerful Sierra Chart trading platform.
Historical Daily, historical Intraday, market depth and streaming real-time data is provided.
The interface Sierra Chart provides to BitMex is not considered a beta. It is stable and fully supported.
What is Included
- Streaming Real-Time Data: Yes.
- Market Depth Data: Yes.
- Historical Intraday Data: Yes. Detailed tick by tick with Bid Volume and Ask Volume.
- Historical Daily Data: Yes.
- Historical BidVolume and AskVolume: Yes.
- Live Trading: Yes.
- Simulated Trading: Yes.
- Order Types Supported: All order types supported.
- Server Managed OCO (Order Cancels Order): Yes. Requires current version.
- Server Managed Bracket Orders: Yes. Requires current version.
- Automated Trading (applies to Live or Simulated): Yes.
- Update Sierra Chart to the current version. Refer to the Fast Update instructions. You will need to be on version 1781 or higher. This is essential.
- Select Global Settings >> Data/Trade Service Settings.
- Set the Service to BitMEX Trading Direct.
- Set Service Setting >> Server to Live or Testnet depending upon whether you want to use your Live or Testnet BitMEX account.
- Obtain an API Key and Secret for your BitMEX account. For instructions to do this for your Live account, go to the DTC Integration page on the BitMEX website.
For instructions to do this for your Testnet account, go to the DTC Integration page on the BitMEX Testnet website.
- Enter your API key and API Secret you have obtained from the BitMEX website into the corresponding Service Settings fields within Sierra Chart.
- You will have a different API key and secret for your Live account as compared to Testnet. So you do not have to keep reentering these when you change between Live or Testnet, use the ability to save and load Service Settings configurations.
- Press OK to close the Data/Trade Service Settings window.
- Select File >> Connect to Data Feed.
- If there any connection problems, they will be displayed in Window >> Message Log. In this case, refer to Help Topic 1.2.
- To open a chart select File >> Find Symbol from the main menu. In the list, select BitMEX >> Get BitMEX Symbols to access the Live data and trading symbols. Or, select BitMEX Testnet >> Get BitMEX Symbols to access the Testnet data and trading symbols.
- Press the Get Symbols button. The available symbols will then be automatically listed.
- Select one of the symbols from the list and press the appropriate button to open a chart or Trading DOM.
- This connection to BitMEX supports both the market data from the Live server and the Testnet server no matter how the Server is set above. Whether Live or Testnet market data is used depends upon the exchange suffix at the end of the symbol. Testnet symbols end with a T.
- You can use either BitMEX Live and/or Testnet symbols. However, when trading if you are using the Live Server, you can only trade from a chart that uses the BitMEX Live symbols. If you are using the BitMEX Testnet Server, you can only trade from a chart that uses the BitMEX Testnet symbols. Otherwise, an error will occur on order submission.
- Continue with Step 3 in the Getting Started instructions.
- For trading instructions, refer to Overview of Trading.
- For non-simulated trading where the orders are routed to BitMEX, make sure that Trade >> Trade Simulation Mode On is disabled.
- Make sure your computer's Date-Time is set correctly. Refer to Setting Computer System Date-Time and Time Zone. If it is not set correctly, you could encounter this error with orders: New order rejected - BitMEX Trading Direct error: This request has expired - `expires` is in the past. Current time: #. Internal Order ID: #. Service Order ID: #. Symbol: XBTUSD-BMEX.
Difference Between BitMEX Testnet Data and Live Trading Data
With the BitMEX exchange, there is a significant difference between BitMEX Testnet data and Live data. The Testnet data has dramatically less trading and is more sparse compared to the BitMEX Live trading data.
Below are two charts. Both of these charts are for the symbol XBTUSD-. The first one is using Live trading data. And the second one uses Testnet data. Notice how the Testnet symbol ends with an extra T.
Setting Order Execution Instructions
There are various order execution instructions which can be globally set to use with orders sent to BitMEX. Make sure you are running Sierra Chart version 1711 or higher for these settings. Refer to Fast Update for instructions to update.
To set these, select Global Settings >> Data/Trade Service Settings. In the list of Service Settings on the left you can set any of the following settings as required:
- Specify 'ParticipateDoNotInitiate' for Limit Orders: Refer to BitMEX API documentation for further information about this particular setting.
- Additional 'execInst' for Limit Orders: Text field to specify BitMEX execution instructions. This applies to Limit orders only. Separate the execution instructions with a , if there is more than one. Refer to BitMEX API documentation for specific instructions.
- Additional 'execInst' for Stop Orders: Text field to specify BitMEX execution instructions. This applies to Stop orders only. Separate the execution instructions with a , if there is more than one. Refer to BitMEX API documentation for specific instructions.
- Stop Order Price Reference: This can be set to one of the following: LastPrice, MarkPrice, IndexPrice. We recommend using LastPrice (the default).
Press OK when done changing the settings. These settings go into effect immediately for any new orders. They will not affect existing orders.
Using Multiple BitMEX Accounts
The method by which you can use multiple BitMex trading accounts is to install multiple Sierra Chart instances. Use one for each separate trading account. For the documentation, refer to Multiple Services.
Bitmex Connection Problems
There can be different reasons why you may have trouble connecting to the BitMex system from Sierra Chart. One common reason is that the BitMex system is not allowing the connection due to too many previous connection attempts which were unsuccessful for whatever reason.
In this case you need to wait a period of time and then try connecting again. How long that period of time is, we do not know.
To prevent Sierra Chart from connecting to BitMex, select File >> Disconnect.
If you have trouble connecting to BitMex you may want to create a new API key and secret. Therefore, go through the Setup Instructions again and be sure to generate a new key.
Setting BitMEX Leverage
Effective with Sierra Chart version 1839 and higher, it is possible to control the leverage for a symbol being traded on BitMex from within Sierra Chart.
The way that BitMex supports doing this is that the leverage has to be controlled for an existing Position for the symbol. There is no other way to do this.
The setting to control this is in Global Settings >> Data/Trade Service Settings. It is Service Setting >> Leverage.
When this is set to a nonzero value, then the leverage is set to the specified setting, for each and every Symbol there is a current Position for. From the Sierra Chart perspective this is the only reasonable way that this can be implemented. If this is not what you require, then do not use this setting as it can have unintended consequences!
Historical Daily Data
Historical Daily data which is used for historical charts opened with File >> Find Symbol >> Open Historical Chart, are built from the trading data that goes from 00:00:00 UTC to 23:59:59.999 UTC.
*Last modified Monday, 17th June, 2019.