Details of the BitMEX listing policy

Author: The grass, Created: 2019-01-15 14:53:02, Updated: 2019-01-15 14:53:26

BitMEX has become the preferred platform for leveraged virtual currency trading, but its API trading restrictions are strict and confusing. This article mainly shares some of the tricks used by the API in the FMZ quantitative trading platform in real time, mainly aimed at market strategy.

1.BitMEX的特点

The most notable advantages are active trading, especially Bitcoin perpetual contracts, which often exceed millions or even tens of millions of dollars per minute; BitMEX has a commission after the transaction is listed, although not high, but it attracts a large number of market-based traders, so buy-and-sell depth is excellent, often above a million dollars; due to the depth of buy-and-sell accumulation, the transaction price often fluctuates above $ 0.5 per unit of minimum volatility.

2. BitMEX API frequency restrictions

The request frequency of the REST API is limited to 300 requests every 5 minutes. This limit is very strict compared to other trading platforms. After exceeding the limit, it prompts the Rate limit exceeded. If the limit is exceeded, the IP may be disabled for an hour, and multiple disabilities in a short period of time will result in a week of disability.

3.使用websocket获取行情

The BitMEX REST API is more restrictive, the official recommendation is to use more websocket protocols, and more data types are pushed than the general exchange.

Push depth data can cause errors if the push time is long, and the estimated depth varies too much, pushing is omitted, but in general, due to the excellent liquidity, subscription tickers or trades can be used. The details of the order are missing, and the delivery is almost impossible. Push-to-account information can be significantly delayed, and it is best to use the REST API to confirm. The push-up time can reach a few seconds when the market is highly volatile. The following code is used to access real-time market and account information using the websocket protocol, mainly for writing market strategies. Specific use requires execution in the main () function.

The full article and the code can be viewed here:https://zhuanlan.zhihu.com/p/54881870


Related

More

wufuhao100wIs there a way that a single line of code, like a GetTicker, can even make a single request? It's easy to get out of bounds, is there a way that a single request can return a collection of data like market, depth, order, etc. and then be parsed by itself?

The bride too.In the previous article, in the fourth paragraph of the ordering technique, this sentence can be used to help judge the order status based on the position change or modification of the order failure. Well, I'm a little doubtful, my goal is to solve the problem of double-hanging two orders, how to replenish the completed order as soon as possible. If it is double-hanging the same number of orders, it is possible that both orders are completed, then the position change cannot be used as a basis for judging.

The TumbacoHMAC (("sha256", "hex", "GET/realtime" + expires, "{{secretkey}}") Error: Exchange_HMAC is not defined at main (__FILE__:41), API ID has been added before

The Little DreamPraise the Lord

wufuhao100wGood for you.

The grassI'm going to use websocket, the industry restrictions shouldn't be so strict, test it yourself.

The grassIt's just to reduce the number of API visits.

The TumbacoThe host re-downloaded and re-installed the same thing.

The grassUpdating the host