ButKoin Public API

A listing of public API endpoints for retrieving ButKoin coin data from the network without the need for a local wallet
API Documentation

API Calls

Return data from coind


Extended API

Return data from local indexes


Linking (GET)

Linking to the explorer

ElectrumX API (JSON-RPC 2.0)

ElectrumX servers for ButKoin light wallets (former Bitcoin Lightning) are available at

  • 88.99.186.230
  • 95.216.204.251
  • 116.203.130.246
  • 135.181.36.174

ports

  • 50001 TCP
  • 50002 TLS
  • 50003 Websocket
  • 50004 TLS Websocket

 

  • version
    Returns the server version (all clients must request this resource first, but only once per session).

    {"id": "clientID", "method": "server.version", "params": []}

    -> {"jsonrpc":"2.0","result":["ElectrumX 1.16.0","1.4"],"id":"clientID"}

  • ping
    Pings the server.

    {"id": "clientID", "method": "server.ping", "params": []}

    -> {"jsonrpc":"2.0","result":null,"id":"clientID"}

  • banner
    Returns the server banner.

    {"id": "clientID", "method": "server.banner", "params": []}

    -> {"jsonrpc":"2.0","result":"You are connected to an ElectrumX 1.16.0 server.","id":"clientID"}

  • donation address
    Returns the servers donation address.

    {"id": "clientID", "method": "server.donation_address", "params": []}

    -> {"jsonrpc":"2.0","result":" XvrHWjw7zd4CQZkxbiZGt3dGE53vjrUGrs","id":"clientID"}

  • features
    Returns the servers service list.

    {"id": "clientID", "method": "server.features", "params": []}

    -> {"jsonrpc":"2.0","result":{"hosts":{"88.99.186.230":{"tcp_port":50001,"ssl_port":50002,"ws_port":50003,"wss_port":50004}},"pruning":null,"server_version":"ElectrumX 1.16.0","protocol_min":"1.4","protocol_max":"1.4.2","genesis_hash":"001787e5f9c3cd249f84f0142071f6098d9e3b7ec8591ff73543ddc4900c1dc2","hash_function":"sha256","services":["tcp://88.99.186.230:50001","ssl://88.99.186.230:50002","ws://88.99.186.230:50003","wss://88.99.186.230:50004"]},"id":"clientID"}

  • estimate transaction fee
    Returns the estimated transaction fee for the given number of confirmations.

    {"id": "clientID", "method": "blockchain.estimatefee", "params": ["5"]}

    -> {"jsonrpc":"2.0","result":1.047e-05,"id":"clientID"}

  • relay fee
    Returns the minimum fee a low-priority transaction has to pay.

    {"id": "clientID", "method": "blockchain.relayfee", "params": []}

    -> {"jsonrpc":"2.0","result":1e-05,"id":"clientID"}

  • subscribe peer discovery
    Returns the list of But ElectrumX network peers and subscribes to changes of this list.

    {"id": "clientID", "method": "server.peers.subscribe", "params": []}

    -> {"jsonrpc":"2.0","result":[["135.181.36.174","135.181.36.174",["v1.4.2","s50002","t50001"]],["116.203.130.246","116.203.130.246",["v1.4.2","s50002","t50001"]],["88.99.186.230","88.99.186.230",["v1.4.2","s50002","t50001"]]],"id":"clientID"}

  • get block header
    Returns the list of block header for the given height.

    {"id": "clientID", "method": "blockchain.block.header", "params": ["10"]}

    -> {"jsonrpc":"2.0","result":"00080020...92010000","id":"clientID"}

  • get block headers
    Returns a given number of block headers from the height given as one string. Max number is 2016.

    {"id": "clientID", "method": "blockchain.block.headers", "params": ["437123", "100"]}

    -> {"jsonrpc":"2.0","result":{"hex":"00280020...c1ea84fa","count":11,"max":2016},"id":"clientID"}

  • address balance
    Returns the balance for the given script hash in BUTK .

    {"id": "clientID", "method": "blockchain.scripthash.get_balance", "params": ["b8b56d50373d2c9b57d623e5379dd7a10708a563372a18b6d7ddedf4f2400855"]}

    -> {"jsonrpc":"2.0","result":{"confirmed":11321996296013,"unconfirmed":0},"id":"clientID"}

  • list unspent
    Returns unspent transaction outputs for the given script hash in BUTK.

    {"id": "clientID", "method": "blockchain.scripthash.listunspent", "params": ["b8b56d50373d2c9b57d623e5379dd7a10708a563372a18b6d7ddedf4f2400855"]}

    -> {"jsonrpc":"2.0","result":[{"tx_hash":"d554ac7a95b0f363fa6fd691acec43afb2ccd7cb4c7d4383d97ca62e26413af5","tx_pos":1,"height":80666,"value":8796296296300},{"tx_hash":"2599c9ac54b86cf9d5e9fd0dac21d9ebd39ab73510f3b3a10a894c35f1b3f0e8","tx_pos":1,"height":83930,"value":2435800000000},{"tx_hash":"d73530da14f5075f9976d9a17f1722bb2a42bd0d9893995b4e6f76001837ecb2","tx_pos":0,"height":331057,"value":87899999713},{"tx_hash":"87bc2c0ceae472f8865055713f64ff49fcd93fd739d52ced85f9df2b2cb8ba50","tx_pos":0,"height":414048,"value":2000000000}],"id":"clientID"}

  • mempool transactions
    Returns the transactions in the mempool for the given script hash.

    {"id": "clientID", "method": "blockchain.scripthash.get_mempool", "params": ["8b01df4e368ea28f8dc0423bcf7a4923e3a12d307c875e47a0cfbf90b5c39161"]}

    -> {"jsonrpc":"2.0","result":[],"id":"clientID"}

  • subscribe to script hash
    Subcribes to the given script hash and the changes of the address balance and transactions.

    {"id": "clientID", "method": "blockchain.scripthash.subscribe", "params": ["8b01df4e368ea28f8dc0423bcf7a4923e3a12d307c875e47a0cfbf90b5c39161"]}

    -> {"jsonrpc":"2.0","result":null,"id":"clientID"}