Skip to content

Adding A Coin Icon

Chris Lennon edited this page Jun 19, 2018 · 3 revisions

Currently all coins delivered by cryptocompare's API are supported, however not all of these have icons associated with them - this is an unfortunate byproduct of the ever growing number of coins. If there is no icon associated with a coin then a question mark will be used instead.

There are 3 ways icons for coins can be added.

1 - Manual override

Within BetterTouchTool you can add an icon to the widget - this is typically a PNG format. It will only apply to your widget on your machine.

2 - Upstream Addition

The vast majority of coin icons that are delivered from this project are the work of AllienWorks and the contributors to cryptocoins. Updates from this repository are not automatically populated, I keep a general eye on it, however if updates are required create an issue

3 - Adding to this repository

This method can be used for testing, ideally icons should be pushed to the cryptocoins repository too.

Steps for adding a new icon:

  • For this repostitory
  • Add a new section to /data/coins.js
  • In this section the following information is required:
    • Name - The name displayed on the user interface
    • Ticker - The ticker for the coin which is used on cryptocompare
    • Icon - The name of the icon file
      • For icons from cryptocoins this is the file name (without extension)
      • For custom icons this is a relative reference to the location of the icon i.e. ../../../img/temp/btg
    • Colour - The default colour for the coin - a HEX RGB value
    • ShowDefault - (Optional) - if set to true, the coin will be displayed at the top of the page in the 'showcased' section
  • Add the a icon to the /img/temp/ folder, the only icons that will work will be SVG format.
  • After making the changes you can submit a pull request

An example of this change is the adding of Binance Coin

If the pull request flow is too daunting or difficult you can always create an issue with the same infomration above (Icon file, colour and ticker).

Clone this wiki locally