Track your stock and cryptocurrency portfolio directly in Home Assistant. The Advanced Trading Wallet integration allows you to monitor your investments, view real-time data, and perform virtual buy/sell transactions, all within your smart home ecosystem.
The Advanced Trading Wallet (ATW) integration brings your financial portfolio into Home Assistant, providing real-time tracking of stocks and cryptocurrencies. With support for multiple API providers and customizable updates, you can keep a close eye on your investments and manage them efficiently.
-
Portfolio Tracking: Monitor your stocks and cryptocurrencies in real-time.
-
Virtual Transactions: Log virtual buy and sell orders for stocks and cryptocurrencies.
-
Comprehensive Sensors: Access detailed information through various sensors, including total portfolio value, percentage change, and individual asset summaries.
-
Lovelace Cards: Visualize your portfolio using custom Lovelace cards.
- Portfolio Summary Card: Overview of your entire portfolio.
- Transaction Recorder Card: Log virtual transactions directly from the UI.
- Asset Summary Card: Detailed view of individual assets.
-
Localization: Support for multiple languages, including English and Spanish.
-
Customizable Update Intervals: Set how often the integration fetches data from API providers.
-
Historical Data Import: Available as a service, you may import historical data from each API for a specific asset. (still under testing)
- Ensure you have HACS installed in your Home Assistant setup.
- Go to HACS in the sidebar.
- Click on Integrations.
- Click the + Explore & Download Repositories button.
- Search for Advanced Trading Wallet.
- Click Download to install the integration.
- Restart Home Assistant.
- Download the
advanced_trading_wallet
folder from the GitHub repository and place it in yourconfig/custom_components
directory.- Your directory structure should look like this:
config/custom_components/advanced_trading_wallet/
- Your directory structure should look like this:
- Restart Home Assistant.
- In Home Assistant, go to Settings > Devices & Services.
- Click on + Add Integration.
- Search for Advanced Trading Wallet and select it.
- Follow the setup wizard:
- API Provider: Choose your preferred API provider (e.g., Yahoo Finance, CoinGecko).
- Preferred Currency: Optionally set your preferred currency (default is USD).
- Select the asset type you want to track:
- Stocks or Cryptocurrencies.
- Enter the details of the assets you wish to track:
- Symbol: Stock ticker or cryptocurrency symbol (e.g., AAPL, bitcoin).
- Amount Owned: The amount of the asset you own.
- Purchase Price: The average price at which you purchased the asset.
- Repeat the process to add more assets or asset types.
You can adjust the scan interval to control how often the integration updates data from API providers.
- Go to Settings > Devices & Services.
- Find the Advanced Trading Wallet integration and click Configure.
- Set the desired Scan Interval in minutes.
The integration provides services to log virtual buy and sell transactions, allowing you to update your portfolio dynamically.
advanced_trading_wallet.buy_stock
advanced_trading_wallet.sell_stock
advanced_trading_wallet.buy_crypto
advanced_trading_wallet.sell_crypto
service: advanced_trading_wallet.buy_stock
data:
stock_symbol: "AAPL"
amount: 10
purchase_price: 150.25
service: advanced_trading_wallet.sell_crypto
data:
crypto_symbol: "bitcoin"
amount: 0.5
service: advanced_trading_wallet.gest_historical_data
data:
crypto_symbol: AAPL
asset_type: stock
interval: 1mo
The integration creates various sensors to help you monitor your portfolio:
- Total Portfolio Value (sensor.total_portfolio_value)
- Total Stocks Value (sensor.total_stocks_value)
- Total Crypto Value (sensor.total_crypto_value)
- Total Investment (sensor.total_investment)
- Percentage Change (sensor.percentage_change)
- Total Variation (sensor.total_variation)
- Individual Asset Sensors:
- Stock Price (sensor.{symbol}_stock_price)
- Crypto Price (sensor.{symbol}_crypto_price)
- Amount Owned (sensor.{symbol}_total_amount)
- Purchase Price (sensor.{symbol}_purchase_price)
IMPORTANT NOTE: Lovelace cards will be moved into a specific frontend integration to ease the setup process. WIP
Enhance your Home Assistant dashboard with custom Lovelace cards designed for the Advanced Trading Wallet integration.
Add the resources to your Lovelace configuration:
resources:
- url: /hacsfiles/advanced_trading_wallet/lovelace/portfolio-card.js
type: module
- url: /hacsfiles/advanced_trading_wallet/lovelace/transaction-card.js
type: module
- url: /hacsfiles/advanced_trading_wallet/lovelace/asset-summary-card.js
type: module
Restart Home Assistant or reload the Lovelace resources.
type: 'custom:portfolio-card'
type: 'custom:transaction-card'
type: 'custom:asset-summary-card'
symbol: 'AAPL' # Replace with your asset symbol
The integration itself supports multiple languages. Translations are stored in the translations directory.
- English (en.json)
- Spanish (es.json)
Contributions are welcome! If you have suggestions, encounter issues, or wish to add support for more languages, please open an issue or submit a pull request on the GitHub repository.
0.1.2
* Fix sensor updating intervals
* Refactor Coordinator and Sensors Deployement
* Fix additional transactions not being kept after restart
* Fix translation files
0.1.0
* Initial release of the Advanced Trading Wallet integration.
* Support for tracking stocks and cryptocurrencies.
* Virtual buy and sell services.
* Custom Lovelace cards for portfolio summary, transaction recording, and asset summaries.
* Localization support for English and Spanish.
This integration was inspired by the need to monitor investment portfolios within Home Assistant, providing a seamless and integrated experience.
This project is licensed under the MIT License - see the LICENSE file for details.
THIS PROJECT IS NOT IN ANY WAY ASSOCIATED OR RELATED TO YAHOO OR COINGECKO. The use of Yahoo Finance and CoinGecko APIs is intended only to retrieve realtime data as provided by the APIs. The information here and online is for educational and resource purposes only and therefore the developers do not endorse or condone any inappropriate use of it, and take no legal responsibility for the functionality or security of your devices. Stock markets or cryptomarkets are volatile and your investments may suffer losses, which cannot, in any way, endorsed to the developers of this project. This integration is limited to show the current data and status fof your investments or general stocks or crypto coins, and is not to be used as an advisor as it does not provide any relevant information or recommendation on actions to be taken with your own investments.