Implement closing positions
This commit is contained in:
@@ -218,6 +218,10 @@ class BaseExchange(ABC):
|
||||
def get_all_positions(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def close_position(self, side, symbol):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def close_all_positions(self):
|
||||
pass
|
||||
|
||||
@@ -130,3 +130,9 @@ class AlpacaExchange(BaseExchange):
|
||||
item["unrealized_pl"] = float(item["unrealized_pl"])
|
||||
items.append(item)
|
||||
return items
|
||||
|
||||
def close_position(self, side, symbol):
|
||||
pass
|
||||
|
||||
def close_all_positions(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user