Begin implementing pydantic validation for OANDA
This commit is contained in:
@@ -57,7 +57,7 @@ class AlpacaExchange(BaseExchange):
|
||||
|
||||
return (True, balance)
|
||||
|
||||
def get_market_value(self, symbol):
|
||||
def get_market_value(self, symbol): # TODO: pydantic
|
||||
try:
|
||||
position = self.client.get_position(symbol)
|
||||
except APIError as e:
|
||||
@@ -65,7 +65,7 @@ class AlpacaExchange(BaseExchange):
|
||||
return False
|
||||
return float(position["market_value"])
|
||||
|
||||
def post_trade(self, trade):
|
||||
def post_trade(self, trade): # TODO: pydantic
|
||||
# the trade is not placed yet
|
||||
if trade.direction == "buy":
|
||||
direction = OrderSide.BUY
|
||||
|
||||
Reference in New Issue
Block a user