Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions degiroapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,15 @@ def getdata(self, datatype, filter_zero=None):
error_message='Could not get data')

def real_time_price(self, product_id, interval):
vw_id = self.product_info(product_id)['vwdId']
tmp = vw_id
try:
int(tmp)
except:
vw_id = self.product_info(product_id)['vwdIdSecondary']

product_info = self.product_info(product_id)

vw_id = product_info['vwdId']
vw_id_type = product_info['vwdIdentifierType']

price_payload = {
'requestid': 1,
'period': interval,
'series': ['issueid:' + vw_id, 'price:issueid:' + vw_id],
'series': [vw_id_type + ':' + vw_id, 'price:' + vw_id_type + ':' + vw_id],
'userToken': self.client_token
}

Expand Down