Skip to content

How to keep pulling quote forever? Details on how the streamer works? #72

Discussion options

You must be logged in to vote

Here are a couple of things I found it that helps someone else.

async for item in streamer.listen():

This will not run properly during off hours it seems. When market is closed, this will return the requested values once and then will just wait but not get any new values. It will work properly (meaning keep pulling data) during market hours.

Here is an example that I made inside the main_loop() that allows to keep pulling data during off hours and store the data in a pandas data frame. You will need to install pandas and import. Not sure if this is clean but it works. It also works during normal hours.

     import pandas as pd

    # Example to keep collection quotes every 1 second until …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by perigvennetier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant