Bitmex Copy service allows you to copy all your actions from one account to another, or a group of accounts, through API. The service was created for people who have a large number of accounts and traders who manage client accounts. Also, the service will be able to turn a simple bot into a multi-user and copy its transactions into several accounts, such as friends. Bitmex Copy Trade Service is a cloud solution located on AWS servers in the same location as the Bitmex exchange, to ensure high speed of copying.
How does it work? When a bot or you trade on your account, Copy-Bot reads all your actions through the Web Socket (to achieve minimum delays) from the Bitmex exchange and, in proportion to the size of the deposit, copies to all the keys included in the group. When the bot has received the information that you have created an order, it also receives the Order Value in XBT, calculates the percentage that this transaction takes in your deposit and creates a "deferred order" in the system, where instead of the value of the sum is the percentage of the deposit. (You can read more about the types of orders in the system here)
After creating a "deferred order" in the system, it is automatically executed with the parameters created. Thus, a transaction appears on each of the accounts included in the group for the same deposit percentage as on the main account. The system is multi-threaded and can simultaneously execute tens and hundreds of orders.
With this calculation there are small rounding errors. For example, such an error may affect the closing position. After such a closure may leave a small residue in one way or another. This can also happen if the balance changes in the course of trading on one of the accounts. To avoid such situations, the system has an additional type of “deferred order” - a percentage of the position. When using this type, neither a change in the deposit nor an error will affect the closing of your position.
For example, a limit order for a 100% position is placed on the main account, applications for opening a limit order for a 100% position will appear on all accounts followed, which will completely close the position. Similarly, it is possible to set "Deferred Order" to 50%, 30%, 20% of the position or 200% or more. When you want to completely close a position or set a stop or profit to close it, we strongly recommend using the “Reduce Only” parameter, which is guaranteed to close positions on all accounts.
This solution also has a drawback, if there is a position on the main account when the bot starts up, the bot will not be able to place new orders as a percentage of the position until the position is closed. In this case, you need to disable the use of a percentage of the position in the bot settings, until all accounts have a position or it does not close on the main one. In the professional version of the bot there are more settings, among which is the ability to specify actions at startup with a position on the main account. A bot can automatically open market positions on all copied accounts. (You can read more about its functionality and settings here) If the possibilities of any of the versions do not satisfy your cases, please contact us and we can quickly add any functionality you need.