API view basic text

This commit is contained in:
shunmugam 2019-09-06 19:04:36 +05:30
parent 00916c0658
commit b375aaa153

View File

@ -1 +1,26 @@
<p>api-view works!</p> <p>api-view works!</p>
<h3>Query API</h3>
<p>
The API function to call is specified through the <code>q</code> parameter.<br>
For instance you can ask the current difficulty of Riecoin with "<i>https://explorer.epic.tech/api?q=totalcoins</i>".
</p>
<h4>Real-Time Simple Queries</h4>
<ul>
<li><b>circulating</b>: returns the number of circulating coins (minus reserve, Prime holdings...)</li>
<li><b>getblockcount</b>: returns the current block height as a plain text string</li>
<li><b>getdifficulty-randomx</b>: returns the RandomX difficulty as a plain text string</li>
<li><b>getdifficulty-progpow</b>: returns the ProgPow difficulty as a plain text string</li>
<li><b>getdifficulty-cuckoo</b>: returns the Cuckoo difficulty as a plain text string</li>
<li><b>totalcoins</b>: returns the outstanding number of coins</li>
</ul>
<h4>Block Queries</h4>
<p>
Block APIs only consider blocks in the "main" chain (as determined by the explorer wallet).
</p>
<ul>
<li><b>getblockhash</b>: takes a <code>height</code> parameter and returns corresponding block hash.</li>
<li><b>getblockheight</b>: takes a <code>hash</code> parameter and returns corresponding block height.</li>
<li><b>getblocktime</b>: takes a <code>height</code> parameter and returns unixtime of the block.</li>
</ul>