Implement more validation and conversion
This commit is contained in:
@@ -21,7 +21,9 @@ class OANDAExchange(BaseExchange):
|
||||
return self.call(r)
|
||||
|
||||
def get_supported_assets(self):
|
||||
return False
|
||||
r = accounts.AccountInstruments(accountID=self.account_id)
|
||||
response = self.call(r)
|
||||
return [x["name"] for x in response["itemlist"]]
|
||||
|
||||
def get_balance(self):
|
||||
raise NotImplementedError
|
||||
@@ -59,7 +61,6 @@ class OANDAExchange(BaseExchange):
|
||||
r = positions.OpenPositions(accountID=self.account_id)
|
||||
response = self.call(r)
|
||||
|
||||
print("Positions", response)
|
||||
for item in response["itemlist"]:
|
||||
item["account"] = self.account.name
|
||||
item["account_id"] = self.account.id
|
||||
|
||||
Reference in New Issue
Block a user