ashareport

v0.1.0
io.github.CloudCorpRecords/ashareport Checked 2 days ago Published 1 month ago

A-share stock data: history, realtime, news, statements and metrics.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_hist_data

Get historical stock data.

ParameterTypeDescription
symbol *stringStock ticker symbol, for example AAPL.
adjuststringPrice adjustment mode, such as qfq (forward), hfq (backward), or none.
end_datestringEnd date of the history range, as YYYY-MM-DD.
fallbackbooleanWhen true, fall back to another source if the chosen source fails.
indicators_listarrayTechnical indicators to compute alongside the bars, such as SMA or RSI.
intervalstringBar interval unit, such as day, week, or month.
interval_multipliernumberInterval multiplier, for example 5 with interval minute gives 5-minute bars.
recent_nnumberReturn only the most recent N bars.
sourcestringData source to query, such as yahoo, sina, or eastmoney.
start_datestringStart date of the history range, as YYYY-MM-DD.

get_realtime_data

Get real-time stock data.

ParameterTypeDescription
fallbackbooleanWhen true, fall back to another source if the chosen source fails.
sourcestringData source to query, such as yahoo, sina, or eastmoney.
symbolstringStock ticker symbol, for example AAPL; omit to get the whole market snapshot.

get_news_data

Get stock news data.

ParameterTypeDescription
symbol *stringStock ticker symbol, for example AAPL.
fallbackbooleanWhen true, fall back to another source if the chosen source fails.
recent_nnumberReturn only the most recent N records.
sourcestringData source to query, such as yahoo, sina, or eastmoney.

get_balance_sheet

Get balance sheet data.

ParameterTypeDescription
symbol *stringStock ticker symbol, for example AAPL.
fallbackbooleanWhen true, fall back to another source if the chosen source fails.
recent_nnumberReturn only the most recent N records.
sourcestringData source to query, such as yahoo, sina, or eastmoney.

get_income_statement

Get income statement data.

ParameterTypeDescription
symbol *stringStock ticker symbol, for example AAPL.
fallbackbooleanWhen true, fall back to another source if the chosen source fails.
recent_nnumberReturn only the most recent N records.
sourcestringData source to query, such as yahoo, sina, or eastmoney.

get_cash_flow

Get cash flow data.

ParameterTypeDescription
symbol *stringStock ticker symbol, for example AAPL.
fallbackbooleanWhen true, fall back to another source if the chosen source fails.
recent_nnumberReturn only the most recent N records.
sourcestringData source to query, such as yahoo, sina, or eastmoney.

get_inner_trade_data

Get insider / inner trade data.

ParameterTypeDescription
symbol *stringStock ticker symbol, for example AAPL.

get_financial_metrics

Get financial metrics data.

ParameterTypeDescription
symbol *stringStock ticker symbol, for example AAPL.
fallbackbooleanWhen true, fall back to another source if the chosen source fails.
recent_nnumberReturn only the most recent N records.
sourcestringData source to query, such as yahoo, sina, or eastmoney.

get_time_info

Get current time with ISO format, timestamp, and the last trading day.