给博客添加一个自动更新基金持仓盈亏的页面

本文介绍了如何为博客添加一个自动更新基金持仓盈亏的页面。主要步骤包括: 1. 使用天天基金的API接口获取基金净值数据。 2. 创建 `update_funds.php` 脚本,用于定期更新基金净值并保存到 `funds.json` 文件中。 3. 在 `funds.json` 中手动配置基金名称、代码、持仓成本和份额等信息。 4. 通过前端模板读取 `funds.json` 数据,计算并展示持仓收益和收益率。 用户可通过设置计划任务定期运行更新脚本,实现基金净值的自动同步与展示。
Read more
You need to set client_id and slot_id to show this AD unit. Please set it in _config.yml.