def login(self, api_key, secret_key, server) -> bool async def get_mark_price(self) -> None: self.prices[symbol] = Prices(mark_price, bid, ask) async def get_candles_klines(self) -> None: self.candles[symbol] = candlestick data async def get_instruments(self) -> None: self.symbols.append(symbol) # add symbols to a class variable list self.symbol_info[symbol]["contract_size"] # add contract size to class variable list SymbolInfo.rounding[symbol] = # add symbol rounding to SymbolInfo object dict SymbolInfo.quantity[symbol] = # add quantity precision to SymbolInfo object dict SymbolInfo.pip_size[symbol] = # add symbol pip size to SymbolInfo object dict async def get_exchange_balance(self, api_key, secret_key, server, testing=False) -> Decimal # opens a trade with tp and sl async def open_trade( self, position, quantity, tp, sl, api_key, secret_key, server, symbol, limit=False, limit_price=0, ) -> bool (success), str (order_id): # closes a trade via id, returns status and the last trade async def close_trade( self, position, quantity, order_id, api_key, secret_key, server, symbol, ) -> bool (success) async def get_open_positions( self, api_key, secret_key, server, symbol, ) -> dict: { "timestamp": , "order_id": , "position_side": , "quantity": , "entry": , "liquidation_price": 0, "margin": 0, "tp": , "sl": , "reason": "Manual" "symbol": , } async def get_open_orders( self, api_key, secret_key, server, symbol, ) -> list[dict]: [ { "timestamp": , "order_id": , "client_id": , "type": , "price": , "quantity": , "symbol": , } ] async def get_trade_by_id( self, api_key, secret_key, server, order_id, symbol, ) -> dict: { "order_id": , "exit_price": , "quantity": , "profit": , "commission": , "symbol": , } async def get_all_trades(self, api_key, secret_key, server) -> list[dict]: { "open_time": , "symbol": , "exchange": "DXTrade", "order_id": , "strategy": "Manual", "position": , "reason": , "entry": , "quantity": , "initial_margin": 0, "tp": , "sl": , "liquidation": 0, "exit": , "exit_time": , "fees": , "pl": , "roi": , "balance": , "equity": , "status": , } async def get_order_by_id( self, api_key, secret_key, server, order_id, symbol ) -> dict: { "order_id": , "status": , "position": , "quantity": , "price": , "tp": , "sl": , "reason": comment if there is one?, "symbol": , } async def cancel_order( self, order_id, api_key, secret_key, server, symbol ) -> bool: async def cancel_all_orders( self, api_key, secret_key, server, symbol="EURUSD", testing=False ) -> bool: async def update_tp( self, tp, order_id, api_key, secret_key, server, symbol, ) -> bool: async def update_sl( self, sl, order_id, api_key, secret_key, server, symbol, ) -> bool: