Derive And Sync New Change Addresses

Through this endpoint users can derive 100 change addresses, starting from the last index we have data for, which are then added to the xPub, subscribed for syncing, and start recording data. If no data is available, it will start from index 0. We use type P2WPKH.

Single Result - This endpoint returns only one single result. POST /blockchain-data/{blockchain}/{network}/hd/derive-sync-change

Path Parameters

  • Required
    blockchain string

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

    Example : bitcoin
    Possible Values : bitcoin bitcoin-cash litecoin dash dogecoin zcash
  • 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

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

Request body schema application/json

  • 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
        extendedPublicKey string

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

        Example : xpub6BuJ8T4xTEePRTWxEcyyZRHPRZw91GFRjuu4H1eNqNGDswpraD5Hthf7JBbK7iQayuLf2MbxT6MVrKGbY7HvBcQo937Qiwmxz7Fzy9S5y9q

Response schema

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

Successfull Request

  • 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
      limit integer

      Defines how many items should be returned in the response per page basis.

      Example : 50
    • Required
      offset integer

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

      Example : 0
    • Required
      total integer

      Defines the total number of items returned in the response.

      Example : 100
    • Required
      items array
      Example : Array ( )
      • Required
        address string

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

        Example : tb1q2sy5l2vn4p648g3ttjxegghp6w9nycvdxap4ef
      • Required
        addressFormat string

        Represents the format of the address.

        Example : P2WPKH
      • Required
        addressType string

        Defines the address type.

        Example : change
        Possible Values : change
      • Required
        derivationType string

        Represents the derivation type.

        Example : bip32
        Possible Values : account bip32
      • Required
        index string

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

        Example : 1

Credits Cost : 10000 Credits For 1 Result(s)

Try it out

Request Example

POST
https://rest.cryptoapis.io/blockchain-data/bitcoin/testnet/hd/derive-sync-change?context=yourExampleString
Headers
Content-Type: application/json
X-API-Key: my-api-key

Request Body
{
    "context": "yourExampleString",
    "data": {
        "item": {
            "extendedPublicKey": "xpub6BuJ8T4xTEePRTWxEcyyZRHPRZw91GFRjuu4H1eNqNGDswpraD5Hthf7JBbK7iQayuLf2MbxT6MVrKGbY7HvBcQo937Qiwmxz7Fzy9S5y9q"
        }
    }
}

Response Example

{
    "apiVersion": "2023-04-25",
    "requestId": "601c1710034ed6d407996b30",
    "context": "yourExampleString",
    "data": {
        "limit": 50,
        "offset": 0,
        "total": 100,
        "items": [
            {
                "address": "tb1q2sy5l2vn4p648g3ttjxegghp6w9nycvdxap4ef",
                "addressFormat": "P2WPKH",
                "addressType": "change",
                "derivationType": "bip32",
                "index": "1"
            }
        ]
    }
}