Adds an admin screen to enter in your cryptocurrency purchases and then exposes a simple to use shortcode and simple API to output your cryptocurrency portfolio’s performance on the frontend.
Please note that this plugin makes use of a 3rd party service to retrieve cryptocurrency prices. This means that a request is made to third party servers (coinmarketcap.com) requesting current cryptocurrency prices. See https://coinmarketcap.com/api/ for more information.
Adding your portfolio
- Download, install and activate the plugin.
- Go to
- Set your fiat currency (USD by default and you can optionally set it to use the euro)
- Populate your coin purchases and your cost bases. You can enter multiple entries for the same currency (i.e. you have bought the same currency multiple times at different cost bases).
- Profit!… or look and see how to output the table on the frontend.
Outputting the data
For the sake of brevity, by default, the table outputs (1) the current price of each currency and does NOT output the last time the price was retrieved (see API section below), both of which can be toggled by adding the following:
Hiding the current price:
add_filter( 'cryptocurrency/show_current_price', '__return_false’ );
Showing the last updated:
add_filter( 'cryptocurrency/show_last_updated', '__return_true' );
Changing how currency is displayed:
If you are using Euro as your fiat currency it defaults to outputting the € symbol after the amount, you can easily switch it to show the € symbol before by doing the following
add_filter(‘cryptocurrency/currency_symbol_after’, ‘__return_null’ );
This plugin uses the public API made available by coinmarketcap.com. It is built to cache responses for 60 seconds so as to not flood the API. The plugin injects the last updated date/time as part of the response object which can be exposed via a filter (see Filters above). Please make sure to follow their API rules. See https://coinmarketcap.com/api/ for more information.
update to support euro as the fiat currency
add in a version checker, the plugin requires PHP 5.5 or greater
bugfixes, analytics data
frontend updates for the shortcode (thanks /u/ZSsDesign)
update plugin title (thanks /u/you-cant-twerk)
update readme to be more explicit that this plugin makes requests to a third party server.
update language on purchase spend field
don’t rely on composer’s autoloader, use spl’s
fix for readme.txt
adding back composer.lock
setting current price to be displayed by default
move dependencies to dev-dependencies in composer.json
remove composer.lock to stop dependency recursion
fix typo in documentation
remove title from table
adding translation template
Things I’d like to add in the future
– Ability to set and display data based on a specific currency (currently only supports USD).
- Translations, feel free to translate this into your own language,
cryptocurrencyis the text domain.
This section describes how to install the plugin and get it working.
- Upload the plugin files to the
/wp-content/plugins/cryptocurrencydirectory, or install the plugin through the WordPress plugins screen directly.
- Activate the plugin through the ‘Plugins’ screen in WordPress
- Use the Settings->Cryptocurrency screen to add your cryptocurrency portfolio
- Use the shortcode or API (examples for both above) to output your portfolio data
ਯੋਗਦਾਨੀ ਤੇ ਵਿਕਾਸਕਾਰ
“Cryptocurrency Portfolio Tracker” is open source software. The following people have contributed to this plugin.ਯੋਗਦਾਨੀ