Derive HD Wallet (xPub, yPub, zPub) Change Or Receiving Addresses

Through this endpoint, customers can derive up to 10 addresses - both change and receive, from a certain HD Wallet (xPub, yPub, zPub), by providing an extended public key. By default the system creates a receiving/deposit address, unless the isChange attribute is set to 'true'. In that case the system derives a 'change' address. The change address can be derived only for UTXO based blockchains, for all the rest, this endpoint always creates a deposit/receiving address.

Single Result - This endpoint returns only one single result. GET /blockchain-tools/{blockchain}/{network}/hd/{extendedPublicKey}/addresses/derive-address

Path Parameters

  • Required
    blockchain string

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

    Example : bitcoin
    Possible Values : bitcoin bitcoin-cash litecoin dogecoin dash ethereum ethereum-classic xrp binance-smart-chain zcash tron
  • Required
    extendedPublicKey string

    Defines the account extended publicly known key which is used to derive all child public keys.

    Example : upub5Ei6bRNneqozk6smK7dvtXHC5PjUyEL4ynCfMKvjznLcXi9DQaikETzQjHvJC43XexMvQs64jxB1njMjCHpRZ4xQWAmv3ge9cVtjfsHmbvQ
  • Required
    network string

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten" are test networks.

    Example : testnet
    Possible Values : mainnet testnet mordor nile sepolia

Query parameters

  • Optional
    context string

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

    Example : yourExampleString
  • Optional
    addressFormat string

    Represents the format of the address.

    Example : p2sh
    Possible Values : p2pkh p2sh p2wpkh standard p2sh-cash p2pkh-cash classic base58
  • Optional
    addressesCount integer

    Represents the addresses count.

    Example : 2
  • Optional
    isChange boolean

    Defines if the specific address is a change or deposit address. If the value is True - it is a change address, if it is False - it is a Deposit address.

    Example : True
  • Optional
    startIndex integer

    The starting index of the response items, i.e. where the response should start listing the returned items.

    Example : 3

Response schema

200 400 401 402 403 409 415 422 429 500
HTTP Status Code: 200
Content-Type: application/json

The request has been successful.

  • Object :

  • Required
    apiVersion string

    Specifies the version of the API that incorporates this endpoint.

    Example : 2023-04-25
  • Required
    requestId string

    Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.

    Example : 601c1710034ed6d407996b30
  • Optional
    context string

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

    Example : yourExampleString
  • Required
    data object
    • Required
      item object
      • Required
        addresses array

        Represents the address details.

        • Required
          address string

          Represents the public address, which is a compressed and shortened form of a public key.

          Example : muZxmnQiz8gZgpYmUoTHpD2CFTHWYEjTwB
        • Required
          index integer

          Represents the output index. It refers to the UTXO sequence in the transaction outputs (vout).

          Example : 1

Credits Cost : 100 Credits For 1 Result(s)

Try it out

Request Example

GET
https://rest.cryptoapis.io/blockchain-tools/bitcoin/testnet/hd/upub5Ei6bRNneqozk6smK7dvtXHC5PjUyEL4ynCfMKvjznLcXi9DQaikETzQjHvJC43XexMvQs64jxB1njMjCHpRZ4xQWAmv3ge9cVtjfsHmbvQ/addresses/derive-address?context=yourExampleString&addressFormat=p2sh&addressesCount=2&isChange=1&startIndex=3
Headers
Content-Type: application/json
X-API-Key: my-api-key

Response Example

{
    "apiVersion": "2023-04-25",
    "requestId": "601c1710034ed6d407996b30",
    "context": "yourExampleString",
    "data": {
        "item": {
            "addresses": [
                {
                    "address": "muZxmnQiz8gZgpYmUoTHpD2CFTHWYEjTwB",
                    "index": 1
                }
            ]
        }
    }
}