Mainnet Explorer Rest Api

Discussion in 'Technical Development' started by Satoshi, Feb 18, 2016.

Tags:
  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. Satoshi

    Satoshi New Member

    Jan 12, 2016
    27
    11
    Male
    Cycle
    3.14
    Block

    /api/block/[:hash]
    /api/block/000000000000079eda492a40088fb95e50819f50116f4e12bdb83d1e3096a3d0
    Example

    Block index (Get block hash by height)

    /api/block-index/[:height]
    /api/block-index/0
    Example
    This would return:
    {"blockHash":"298e5cc3d985bfe7f81dc135f360abe089edd4396b86d2de66b0cef42b21d980"}
    which is the hash of the Genesis block (0 height)

    Transaction

    /api/tx/[:txid]
    /api/tx/fd2c065c926205c1098af6e2f589046805267e60a0d0ee5566142c47a04e7326
    Example
    /api/rawtx/[:rawid]
    /api/rawtx/fd2c065c926205c1098af6e2f589046805267e60a0d0ee5566142c47a04e7326
    Example

    Address

    Address Properties

    /api/addr/[:addr]/balance
    /api/addr/[:addr]/totalReceived
    /api/addr/[:addr]/totalSent
    /api/addr/[:addr]/unconfirmedBalance

    Unspent Outputs for multiple addresses
    GET method:

    /api/addrs/[:addrs]/utxo
    /api/add/DsT9hojZLyEhxzkoDgT3BDRsDGwuS3XPuay,DsZKDL4fXKwMiEVv1RhEk33KHBJ6UVeVV1K/utxo

    POST method:

    /api/addrs/utxo

    POST params:

    addrs: DsT9hojZLyEhxzkoDgT3BDRsDGwuS3XPuay,DsZKDL4fXKwMiEVv1RhEk33KHBJ6UVeVV1K
    Example
    Transactions by Block

    /api/txs/?block=HASH
    /api/txs/?block=000000000000079eda492a40088fb95e50819f50116f4e12bdb83d1e3096a3d0
    Example

    Transactions by Address
    /api/txs/?address=ADDR
    /api/txs/?address=DsT9hojZLyEhxzkoDgT3BDRsDGwuS3XPuay
    Example

    Transactions for multiple addresses
    GET method:

    /api/addrs/[:addrs]/txs[?from=&to=]
    /api/addrs/DsT9hojZLyEhxzkoDgT3BDRsDGwuS3XPuay,DsZKDL4fXKwMiEVv1RhEk33KHBJ6UVeVV1K/txs?from=0&to=20
    Example

    POST method:

    /api/addrs/txs

    POST params:

    addrs: DsT9hojZLyEhxzkoDgT3BDRsDGwuS3XPuay,DsZKDL4fXKwMiEVv1RhEk33KHBJ6UVeVV1K
    from (optional): 0
    to (optional): 20
    Example

    Historic blockchain data sync status
    /api/sync
    live


    Live network p2p data sync status
    /api/peer
    live

    Utility methods
    /api/utils/estimatefee?nbBlocks=2
    live
     

Share This Page