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

Write dataframe from alpaca-py #623

Open
r00t9 opened this issue Jan 10, 2023 · 0 comments
Open

Write dataframe from alpaca-py #623

r00t9 opened this issue Jan 10, 2023 · 0 comments

Comments

@r00t9
Copy link

r00t9 commented Jan 10, 2023

I want to save panda dataframe to marketstore but i cannot find the way. I am not sure why it doesn't support writing from the alpaca api.

How i can convert dataframe to marketstore, not sure if is possible

I have this from alpaca-py

stock_request = StockBarsRequest(
                    symbol_or_symbols=["SPY"],
                    timeframe=TimeFrame.Minute,
                    start=datetime.strptime("2022-12-30", '%Y-%m-%d')
                )

bars = stock_client.get_stock_bars(stock_request)

How i can convert all timestamps from a range

                                      open      high      low    close   volume  trade_count        vwap
symbol timestamp                                                                                        
SPY    2022-12-30 00:00:00+00:00  382.7900  382.8300  382.790  382.830   4215.0         14.0  382.819234
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