Connect to the Bitmex exchange and calculate my overall exposure to XBTUSD and Futures contracts (addition calculations). Based on the results, the bot will place buy or/and sell order according to the Bid, Ask, and Mark Price (almost like a market maker bot). The amount of contract to be bought or sold will be based on the exposure.
The bot will also need to be able to open/close new positions based on Bid, Ask, and Mark price according to the user needs.