Global

Type Definitions




CoinObject :object

Properties:
Name Type Description
CoinName string

The string name for the coin

Properties
Name Type Description
Fiat FiatObject

Information about the Fiat to convert for the specific coin

Source:
Example
{
  'bitcoin': {
    'usd': {
      'url': 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd',
      'transform': function (response) {
        if (response && response.bitcoin && response.bitcoin.usd) {
          return response.bitcoin.usd
        }
      }
    }
  }
}



FiatObject :object

Properties:
Name Type Description
FiatType string

The Fiat Type you are defining (i.e. "usd")

Properties
Name Type Attributes Description
url string <optional>

The URL to scrape for the Coin to Fiat conversion

insight string <optional>

The Insight API server to scrape for the Coin to Fiat conversion

transform function <optional>

A function that transforms the data response from the URL/Insight server to return the float conversion value

Source:
Example
{
  'usd': {
    'url': 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd',
    'transform': function (response) {
      if (response && response.bitcoin && response.bitcoin.usd) {
        return response.bitcoin.usd
      }
    }
  }
}