PRO: Big numbers, many positions after decimal points

Challenge: Get data from https://api.cryptonator.com/api/full/dash-btc. Unfortunaletly this API requests more than a simple and pure http-request.
Local stored JSON: https://api.json-content-importer.com/extra/json/api_cryptonator_com_dash-btc.json

Shortcode:
convertjsonnumbers2strings=yes is curial here. With this the Numbers are transformed to strings. Otherwise PHP would round the number due to it’s number formats.
Rounded: 437578.372398
In the JSON: 437578.37239754

[[jsoncontentimporterpro nameoftemplate="api.cryptonator.com" convertjsonnumbers2strings=yes]]

Create a new JCI-Template:

  • Name: api.cryptonator.com
  • URL: https://api.json-content-importer.com/extra/json/api_cryptonator_com_dash-btc.json
  • twig-template:
volume: {{ticker.volume}}<br>
change: {{ticker.change}}<br>
price: {{ticker.price}}
<ul>
{% for m in ticker.markets %} 
    <li>
        Base: {{m.market}}: price={{m.price}} / volume={{m.volume}}
    </li>
{% endfor %}
</ul>

In Action:

volume: 449676.60344854
change: -0.00000379
price: 0.00249032
  • Base: Binance: price=0.00244800 / volume=8300.99
  • Base: BitFinex: price=0.00245190 / volume=157.33825946
  • Base: Bittrex: price=0.00245824 / volume=76.64201527
  • Base: Cex.io: price=0.00244100 / volume=11.22432999
  • Base: Coinbase Pro: price=0.00241778 / volume=789.20411834
  • Base: Exmo: price=0.00244691 / volume=2055.64645903
  • Base: Kraken: price=0.00244000 / volume=327.20536902
  • Base: Poloniex: price=0.00245238 / volume=379.98049989
  • Base: YoBit: price=0.00249155 / volume=437578.37239754