Remove asset filter and begin implementing posting trades
This commit is contained in:
@@ -6,6 +6,7 @@ from django.shortcuts import render
|
||||
from django.views import View
|
||||
from rest_framework.parsers import FormParser
|
||||
|
||||
from core.exchanges import GenericAPIError
|
||||
from core.models import Account
|
||||
from core.util import logs
|
||||
|
||||
@@ -16,7 +17,10 @@ def get_positions(user, account_id=None):
|
||||
items = []
|
||||
accounts = Account.objects.filter(user=user)
|
||||
for account in accounts:
|
||||
positions = account.client.get_all_positions()
|
||||
try:
|
||||
positions = account.client.get_all_positions()
|
||||
except GenericAPIError:
|
||||
continue
|
||||
|
||||
for item in positions:
|
||||
items.append(item)
|
||||
|
||||
Reference in New Issue
Block a user