我想知道最后一句话是什么意思,我正在看使用AlphaVantage API的示例,但没有真正理解最后一行。第一次我认为保存ts.get_daily('GOOGL',1)会产生数据和meta_data变量,但我打印了数据和meta_data,结果却不同。为甚麽呢?
from alpha_vantage.timeseries import TimeSeries
key = 'your key here'
ts = TimeSeries(key)
# Get json object with the daily data and another with the call's metadata
data, meta_data = ts.get_daily('GOOGL', 1)提前感谢
发布于 2020-09-01 13:55:54
API响应有两个部分:"Meta Data“和"Time Series (Daily)”
该库将meta_data映射为"Meta Data“,并将"Time Series (Daily)”映射为data
{
"Meta Data": {
"1. Information": "Daily Prices (open, high, low, close) and Volumes",
"2. Symbol": "IBM",
"3. Last Refreshed": "2020-08-31",
"4. Output Size": "Compact",
"5. Time Zone": "US/Eastern"
},
"Time Series (Daily)": {
"2020-08-31": {
"1. open": "125.2500",
"2. high": "125.2500",
"3. low": "123.0300",
"4. close": "123.3100",
"5. volume": "4827879"
}
}
}https://stackoverflow.com/questions/62850612
复制相似问题