PRO plugin: api.coingecko.com

API: https://api.coingecko.com/api/v3/simple/price?ids=safemoon%2Cbitcoin%2Cethereum&vs_currencies=usd&include_market_cap=true&include_24hr_vol=true&include_24hr_change=true&include_last_updated_at=true


Local stored JSON: api_coingecko_com_api_v3_simple_price.json


Shortcode for showing “usd_market_cap” of “ethereum”:

[jsoncontentimporterpro nameoftemplate=apicoingeckocom convertjsonnumbers2strings=yes]

Twig-Code:

{% for k,v in _parent %}
<strong>{{k}}</strong><br>
{% for k1,v1 in v %}
{{k1}}: {{v1}}
<br>
{% endfor %}
<hr>
{% endfor %}

In action, show all data:

ethereum
usd: 2252.42
usd_market_cap: 261884616886.15475
usd_24h_vol: 26688530419.190025
usd_24h_change: -4.08725349014
last_updated_at: 1624089927


bitcoin
usd: 35925
usd_market_cap: 672364466926.1401
usd_24h_vol: 35564578981.89552
usd_24h_change: -4.94368393903
last_updated_at: 1624089918

safemoon
usd: 0.00000398
usd_market_cap: 2314614323.2933064
usd_24h_vol: 11238777.094546229
usd_24h_change: -0.937400991766
last_updated_at: 1624089901