fields = {'TR.EPSActValue': {'params':{"Period":"FQ0", "Frq": "FQ"},'sort_dir':'asc'} }, {'TR.EPSActValue.periodenddate': {'params':{"Period":"FQ0", "Frq": "FQ"},'sort_dir':'asc'} }, ]
I'm trying to request these fields, but I always get the following message as response:
Status received for FNOX.NGM {'status': <StreamState.Closed: 1>, 'code': 'ConnectionError', 'message': 'Cannot send request to ADS'}
NOTE: The method get_data returns the data normally with these fields, but with StramingPrices I get the error message. Any idea of the reason / solution?
Request with get_data:
df, err = ek.get_data(valid_rics, fields)
Request with StramingPrices:
def get_streaming(instruments, fields): return ek.StreamingPrices( instruments = instruments, fields = fields, on_refresh = on_update, on_update = on_update, on_status = on_status, on_complete = on_complete, ) def on_update(stream, instrument_name, fields) print(f'Upate for {instrument_name}: {fields}'.) def on_status(stream, instrument_name, status) print('Status received for {} {}'.format(instrument_name, status)) def on_complete(stream) print(stream.get_snapshot()) streaming = get_streaming(valid_rics, fields) streaming.open() asyncio.get_event_loop().run_until_complete(asyncio.sleep(600))
RICs:
valid_rics = [ 'CCHW.NLB', 'FNOX.NGM', 'MMED.NLB', 'NTAR.NLB', 'OLIS.DH', 'SOSIL.NGM', 'SYNTH.TE', ]
Thank you in advance.