View on GitHub


generate Bitcoin address from an xpub address from a REST API


generate a Bitcoin address from an xpub address using a REST API

Using this simple REST API to generate a bitcoin address from an xpub makes it easy to integrate into e-commerce gateways etc. And yes I know it is Xpub is not secure, I do not want to hear it.



xpub = xpub key (required)

network = bitcoin / testnet (network) defaults to mainnet

biptype = 44,49,84 (address type) defaults to 84

newaddresscheck = 0 / 1 boolean (loop until we get an address with a 0 balance) defaults to 1

startaddress = start address defaults to 0

numberofaddresses = max number of addresses to check defaults to 1000

randomaddress = 0 / 1 boolean (get a random address between paramter 5 and 6 if paramater 4 is 1 then it will use this as the start for the loop)


return an array of addresses

endpoint to show the state of an address