Skip to content

Weekly stock data #413

Answered by alvarobartt
amitchouksey asked this question in Q&A
Jun 29, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @amitchouksey thanks for the kind words! 🤗

It can be done indeed, you just need to set the interval='weekly' parameter, which can also be monthly and daily which is the default value.

For example:

import investpy

data = investpy.get_stock_historical_data(stock='AAPL', country='united states', from_date='01/01/2020', to_date='01/01/2021', interval='weekly')

For more information check https://investpy.readthedocs.io/_api/stocks.html#investpy.stocks.get_stock_historical_data

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@amitchouksey
Comment options

Answer selected by alvarobartt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #412 on June 29, 2021 15:01.