_context[0], _parent: Bitcoin-Data APIs

Task: Display all data from https://coinmarketcap-nexuist.rhcloud.com/api/btc/price and https://api.coinmarketcap.com/v1/ticker/bitcoin/


See how this works:

  1. Template for https://coinmarketcap-nexuist.rhcloud.com/api/btc/price:

    <ul>{% for key, val in _parent %}<li>{{key}}: {{val  | number_format(20, ',', '.') }}</li>{% endfor %}</ul>

    Remember ID of this Template, e.g. TEMPLATE1

    Shortcode:
    [jsoncontentimporterpro url=https://coinmarketcap-nexuist.rhcloud.com/api/btc/price convertjsonnumbers2strings=yes parser=twig id=TEMPLATE1]

  2. Template for https://api.coinmarketcap.com/v1/ticker/bitcoin/:

    <ul>{% for key, val in _context[0] %}<li>{{key}}: {{val }}</li>{% endfor %}</ul>

    Remember ID of this Template, e.g. TEMPLATE2

    Shortcode:
    [jsoncontentimporterpro url=https://api.coinmarketcap.com/v1/ticker/bitcoin/ convertjsonnumbers2strings=yes parser=twig id=TEMPLATE2]


In Action:
https://coinmarketcap-nexuist.rhcloud.com/api/btc/price


https://api.coinmarketcap.com/v1/ticker/bitcoin/
  • id: bitcoin
  • name: Bitcoin
  • symbol: BTC
  • rank: 1
  • price_usd: 6387.34778179
  • price_btc: 1.0
  • 24h_volume_usd: 4482090485.9
  • market_cap_usd: 110424864467
  • available_supply: 17288062.0
  • total_supply: 17288062.0
  • max_supply: 21000000.0
  • percent_change_1h: -0.14
  • percent_change_24h: -3.83
  • percent_change_7d: 0.43
  • last_updated: 1537903468