API Calls
Return data from coind
Extended API
Return data from local indexes
getmoneysupply [net]
Returns current money supply
https://x.butkoin.com/ext/getmoneysupplygetdistribution [net]
Returns wealth distribution stats
https://x.butkoin.com/ext/getdistributiongetaddress [net] [hash]
Returns information for given address
https://x.butkoin.com/ext/getaddress/XkffzeBW9S39X6zwEVpNrRsdSx5sfRK8orgetaddresstxs [hash] [net] [start] [length]
Returns last [length] transactions for address [hash], starting from offset [start]
https://x.butkoin.com/ext/getaddresstxs/XkffzeBW9S39X6zwEVpNrRsdSx5sfRK8or/mainnet/0/50gettx [hash] [net]
Returns information for given tx hash
https://x.butkoin.com/ext/gettx/e8e0eab741bf3d249f4c0e90a9315a774f40b3e9d92fdf6baa5d26741088ce7agetbalance [hash] [net]
Returns current balance of given address
https://x.butkoin.com/ext/getbalance/XkffzeBW9S39X6zwEVpNrRsdSx5sfRK8orgetlasttxs [net] [min] [length] [start] [tx_type]
Returns the latest [length] transactions greater than [min] coins, starting from offset [start], optionally only the given transaction type, either by its index (starting with 0) or type. - 0 - TRANSACTION_NORMAL
- 1 - TRANSACTION_PROVIDER_REGISTER
- 2 - TRANSACTION_PROVIDER_UPDATE_SERVICE
- 3 - TRANSACTION_PROVIDER_UPDATE_REGISTRAR
- 4 - TRANSACTION_PROVIDER_UPDATE_REVOKE
- 5 - TRANSACTION_COINBASE
- 6 - TRANSACTION_QUORUM_COMMITMENT
- 7 - TRANSACTION_FUTURE
Note: [length] is limited to returning 1000 records per query
getcurrentprice [net]
Returns last known exchange prices in- US Dollar (USD)
- Theter (USDT)
- Euro (EUR)
- Chinese Yuan (CNY)
- Indian Rupees (INR)
- Japanese Yen (JPY)
- British Pound Sterling (GBP)
- Russian Rubel (RUB)
- Brazilian Real (BRL)
- Bitcoin (BTC)
https://x.butkoin.com/ext/getcurrentpricegetnetworkpeers [net]
Returns the list of network peers that have connected to the but-x node in the last 24 hours
https://x.butkoin.com/ext/getnetworkpeersgetbasicstats [net]
Returns basic statistics about the coin including: block count, circulating supply, USD price, USDT price, # of masternodes
https://x.butkoin.com/ext/getbasicstatsgetticker [mode] [net] Use 'all' for mode.
Returns the ticker about the coin, optional about a certain category, including: block count, circulating supply, USD price, ...
https://x.butkoin.com/ext/getticker/allgetmarkets [mode] [net] Use 'summary' or 'full' for mode.
Returns the list of markets with summary and optional buys, sells, and chart data if mode is 'full'.
getsummary [net]
Returns a summary of coin data including: difficulty, hybrid difficulty, circulating supply, hash rate, USDT price, network connection count, block count, count of online masternodes, count of offline masternodes
https://x.butkoin.com/ext/getsummarygetmasternodelist [net]
Returns the complete list of masternodes on the network.
https://x.butkoin.com/ext/getmasternodelist
Net API
Data accross all chains.
Peers API (restricted)
X P2P layer.
Linking (GET)
Linking to X
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"}