get_index_ohlcv
Retrieve OHLCV data for KOSPI/KOSDAQ market indices to analyze historical price movements and trading volumes for specific date ranges and frequencies.
Instructions
Retrieves OHLCV data for a specific index.
Args:
fromdate (str): Start date for retrieval (YYYYMMDD)
todate (str): End date for retrieval (YYYYMMDD)
ticker (str): Index ticker symbol (e.g., 1001 for KOSPI, 2001 for KOSDAQ)
freq (str, optional): d - daily / m - monthly / y - yearly. Defaults to 'd'.
Returns:
DataFrame:
>> get_index_ohlcv("20210101", "20210130", "1001")
Open High Low Close Volume Trading Value
Date
2021-01-04 2874.50 2946.54 2869.11 2944.45 1026510465 25011393960858
2021-01-05 2943.67 2990.57 2921.84 2990.57 1519911750 26548380179493
2021-01-06 2993.34 3027.16 2961.37 2968.21 1793418534 29909396443430
2021-01-07 2980.75 3055.28 2980.75 3031.68 1524654500 27182807334912
2021-01-08 3040.11 3161.11 3040.11 3152.18 1297903388 40909490005818Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fromdate | Yes | ||
| todate | Yes | ||
| ticker | Yes | ||
| freq | No | d |