get_stock_ohlcv
Retrieve historical OHLCV stock data for KOSPI/KOSDAQ markets by specifying ticker symbol and date range to analyze price movements and trading volume.
Instructions
Retrieves OHLCV (Open/High/Low/Close/Volume) data for a specific stock.
Args:
fromdate (str): Start date for retrieval (YYYYMMDD)
todate (str): End date for retrieval (YYYYMMDD)
ticker (str): Stock ticker symbol
adjusted (bool, optional): Whether to use adjusted prices (True: adjusted, False: unadjusted). Defaults to True.
Returns:
DataFrame:
>> get_stock_ohlcv("20210118", "20210126", "005930")
Open High Low Close Volume
Date
2021-01-26 89500 94800 89500 93800 46415214
2021-01-25 87300 89400 86800 88700 25577517
2021-01-22 89000 89700 86800 86800 30861661
2021-01-21 87500 88600 86500 88100 25318011
2021-01-20 89000 89000 86500 87200 25211127
2021-01-19 84500 88000 83600 87000 39895044
2021-01-18 86600 87300 84100 85000 43227951Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fromdate | Yes | ||
| todate | Yes | ||
| ticker | Yes | ||
| adjusted | No |