xbbg icon indicating copy to clipboard operation
xbbg copied to clipboard

async with blp.live

Open maurohamz opened this issue 2 years ago • 1 comments

Trying to set up a live feed as shown in the Jupyter example unsuccessfully:

async for snap in blp.live(['ESA Index', 'NQA Index'], max_cnt=2):
    print(snap)

Tried to define an async function like this:

async def live_data():
    async for snap in blp.live(['ESA Index', 'NQA Index'], max_cnt=2):
        print(snap)

def run_data():
    loop = asyncio.get_event_loop()
    loop.run_until_complete(live_data())
    loop.close()

run_data()

Still doesn't work for me. any help appreciated.

maurohamz avatar Feb 07 '22 18:02 maurohamz

your codes are working via recent xbbg.

mrhaa avatar Apr 28 '22 04:04 mrhaa