Price
Price
Syntax:
Explanation:
COMMODITY_B
is optional, the default value is what you set before;- Set the PRICE manually: just use a number as PRICE like Beancount;
- If there is no PRICE found, Costflow will automatically get the latest exchange rates of currencies, or the latest price of cryptocurrencies and stock by Alpha Vantage. The priority:
- Firstly, Costflow will check whether COMMODITY_A is one of ISO 4217 currency codes. If it is, get the exchange rate;
- Secondly, Costflow will check whether COMMODITY_A is one of cryptocurrency codes that Alpha Vantage support (support list). If it is, get the cryptocurrency price;
- Finally, Costflow will treat COMMODITY_A as a stock code and get its price. Only stocks listed on NASDAQ and NYSE are supported in this version. Note, COMMODITY_B should not be set, if COMMODITY_A is a stock code, COMMODITY_B is inherited from the stock market.
Examples: