Skip to content

Update Plot Charts #2080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AlexCatarino opened this issue Mar 31, 2025 · 0 comments
Open

Update Plot Charts #2080

AlexCatarino opened this issue Mar 31, 2025 · 0 comments

Comments

@AlexCatarino
Copy link
Member

Plot Charts should use api.read_live_chart to get the data:

import pandas as pd
qb = QuantBook()

series = api.read_live_chart(14988739, 'Strategy Equity',
    0, datetime.now().timestamp(), 100).chart.series

equity = {x.time:x.close for x in series['Equity'].values}
daily_performance = {datetime.fromtimestamp(x.x): x.y for x in series['Daily Performance'].values}
returns = {datetime.fromtimestamp(x.x): x.y for x in series['Return'].values}

Members should use 'Return', which provides daily updates, while 'Daily Performance' has as many datapoints as 'Equity',. 'Equity' may not be updated daily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant