Skip to content
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

How to import 3rd party data #696

Open
aburglopez1 opened this issue Mar 27, 2024 · 1 comment
Open

How to import 3rd party data #696

aburglopez1 opened this issue Mar 27, 2024 · 1 comment

Comments

@aburglopez1
Copy link

Hi,
I am just getting started using vectorbt. I am trying to import 3rd party data (interactive brokers):

stock = Stock("AAPL", "SMART" , "USD")

bars = ib.reqHistoricalData(

    stock, endDateTime='', durationStr='3000 S',
    barSizeSetting='1 min', whatToShow='MIDPOINT', useRTH=True)


bars_df = util.df(bars)

bardict = {"COIN":bars_df}
bars_2 = vbt.Data.from_data({"AAPL":bars_df})

However this gives me the following error:
TypeError: Data.__init__() missing 1 required positional argument: 'download_kwargs'

Any ideas what might be causing this?
Thanks

@polakowo
Copy link
Owner

polakowo commented Apr 3, 2024

You don't need to create a Data object, you can use pandas Series/DataFrame just as fine. But if you still want a Data object, pass download_kwargs={}

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

2 participants