kospi-kosdaq

by dragon1086
Verified
MIT License
10
  • Apple

get_stock_ohlcv

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 43227951

Input Schema

NameRequiredDescriptionDefault
adjustedNo
fromdateYes
tickerYes
todateYes

Input Schema (JSON Schema)

{ "properties": { "adjusted": { "default": true, "title": "Adjusted", "type": "boolean" }, "fromdate": { "anyOf": [ { "type": "string" }, { "type": "integer" } ], "title": "Fromdate" }, "ticker": { "title": "Ticker", "type": "string" }, "todate": { "anyOf": [ { "type": "string" }, { "type": "integer" } ], "title": "Todate" } }, "required": [ "fromdate", "todate", "ticker" ], "title": "get_stock_ohlcvArguments", "type": "object" }