Use new call helper for all OANDA commands
This commit is contained in:
@@ -18,8 +18,7 @@ class OANDAExchange(BaseExchange):
|
||||
|
||||
def get_account(self):
|
||||
r = accounts.AccountDetails(self.account_id)
|
||||
self.client.request(r)
|
||||
return r.response
|
||||
return self.call(r)
|
||||
|
||||
def get_supported_assets(self):
|
||||
return False
|
||||
@@ -38,8 +37,7 @@ class OANDAExchange(BaseExchange):
|
||||
|
||||
def get_trade(self, trade_id):
|
||||
r = accounts.TradeDetails(accountID=self.account_id, tradeID=trade_id)
|
||||
self.client.request(r)
|
||||
return r.response
|
||||
return self.call(r)
|
||||
|
||||
def update_trade(self, trade):
|
||||
raise NotImplementedError
|
||||
@@ -54,8 +52,7 @@ class OANDAExchange(BaseExchange):
|
||||
|
||||
def get_position_info(self, symbol):
|
||||
r = positions.PositionDetails(self.account_id, symbol)
|
||||
self.client.request(r)
|
||||
return r.response
|
||||
return self.call(r)
|
||||
|
||||
def get_all_positions(self):
|
||||
items = []
|
||||
|
||||
Reference in New Issue
Block a user