This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import requests | |
| import os | |
| import random | |
| def fetch_exchange_rate(): | |
| random_number = random.random() | |
| # 获取深交所结算汇兑比率 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dashboards: | |
| - name: Assets | |
| panels: | |
| - title: Asset Classes 🏦 | |
| width: 50% | |
| queries: | |
| - bql: &assets_bql | | |
| SELECT currency, CONVERT(SUM(position), '{{ledger.ccy}}') as market_value | |
| WHERE account_sortkey(account) ~ '^[01]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: IncomeStatementSankey | |
| panels: | |
| - title: IncomeStatementSankey 💸 | |
| height: 800px | |
| link: /mainbook/income_statement/ | |
| queries: | |
| - bql: | | |
| SELECT account, CONVERT(SUM(position), '{{ledger.ccy}}') AS value | |
| WHERE account ~ '^(Income|Expenses):' | |
| GROUP BY account |