Jump to
Ctrl
+
/

Prepare A UTXO-Based Transaction From HD Wallet (xPub, yPub, zPub)

POST
/hd-wallets/utxo/{blockchain}/{network}/{extendedPublicKey}/transactions/prepare

Through the “Prepare a UTXO-based transaction from xPub” endpoint users can prepare a transaction for signing from all synced with Crypto APIs addresses for the specific xPub. This is based on the selectionStrategy and the addresses’ balances. In the case a user has an address not synced with Crypto APIs, it will not be included. This endpoint applies to all supported UTXO-based blockchain protocols, e.g. Bitcoin, Litecoin, etc.

Path Parameters

blockchain string Required

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

network string Required

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 network like "testnet" is a test network.

extendedPublicKey string Required

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

Query Parameters

context string Optional

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.

Request Body Schema application/json

context string Optional

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.

data object Required
item object Required
additionalData string Optional

Representation of the additional data.

locktime integer Optional

Represents the time at which a particular transaction can be added to the blockchain.

fee object Required

When isConfirmed is True - Defines the amount of the transaction fee When isConfirmed is False - For ETH-based blockchains this attribute represents the max fee value.

address string Optional

Representation of the address

exactAmount string Optional

Representation of the exact amount

priority string Optional

Representation of the fee priority

prepareStrategy string Optional

Representation of the transaction's strategy type

recipients array Items (object) Required

Object Array representation of transaction receivers

address string Required

Representation of the receiver address

amount string Required

Representation of the amount

replaceable boolean Optional

Representation of whether the transaction is replaceable. This is an Optional attribute that is not supported for Dogecoin, Dash and Bitcoin-Cash.

Response Schema

apiVersion string Required

Specifies the version of the API that incorporates this endpoint.

2024-12-12
requestId string Required

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

601c1710034ed6d407996b30
context string Optional

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.

yourExampleString
data object Required
item object Required
additionalData string Required

Representation of the additional data

yourAdditionalDataHere
locktime integer Required

Represents the time at which a particular transaction can be added to the blockchain.

1781965
size integer Required

Represents the total size of this transaction.

243
version integer Required

Representation of the transaction's version

2
fee object Required
amount string Required

When isConfirmed is True - Defines the amount of the transaction fee When isConfirmed is False - For ETH-based blockchains this attribute represents the max fee value.

0.0000279
unit string Required
ZEC
feePerByte object Required
amount string Required

Defines the fee per byte value

0.00000014
unit string Required
ZEC
inputs array Items (object) Required

Represents the transaction inputs.

address string Required

Representation of the address

tmHb1bHWAvK6hHDZEq57cbEz2wgxYEMqdbd
change integer Required

Representation of the change value

0
derivationIndex integer Required

Representation of the derivation index of the xpub address.

100
outputIndex integer Required

Representation of the output index

1
satoshis integer Required

Representation of the satoshis value

100000000
script string Required

Representation of the script string

76a914565d9ded3c1b02611d94efa1edfd4a65fd4132a588ac
sighash string Required

Representation of the hash that should be signed.

c6616518a5b4dd01a9c76d021fafda817d3ea22d2e8f09f7fbae71ad83596e5c
transactionId string Required

Represents the reference transaction identifier.

f27ac39bec0e620fc0d5a25b1a3f5d1fd8e8f023234a615c79101db9cc8c58c1
outputs array Items (object) Required

Represents the transaction outputs.

address string Required

Representation of the address

tmG2WnrxrpfXxPf5Phk6yPZffqQhezhcUsz
satoshis integer Required

Representation of the satoshis value

1000
script string Required

Representation of the script

76a9144540239415ca840c496f146859374125a1ad6f6188ac
blockchainSpecific object Optional
replaceable boolean Optional

Representation of whether the transaction is replaceable

false

Credits Cost : 2500 Credits for 1 Results

Was this page helpful?
Yes
No
Powered by
Language
URL

{
    "apiVersion": "2024-12-12",
    "requestId": "601c1710034ed6d407996b30",
    "context": "yourExampleString",
    "data": {
        "item": {
            "additionalData": "yourAdditionalDataHere",
            "locktime": 1781965,
            "size": 243,
            "version": 2,
            "fee": {
                "amount": "0.0000279",
                "unit": "ZEC"
            },
            "feePerByte": {
                "amount": "0.00000014",
                "unit": "ZEC"
            },
            "inputs": [
                {
                    "address": "tmHb1bHWAvK6hHDZEq57cbEz2wgxYEMqdbd",
                    "change": 0,
                    "derivationIndex": 100,
                    "outputIndex": 1,
                    "satoshis": 100000000,
                    "script": "76a914565d9ded3c1b02611d94efa1edfd4a65fd4132a588ac",
                    "sighash": "c6616518a5b4dd01a9c76d021fafda817d3ea22d2e8f09f7fbae71ad83596e5c",
                    "transactionId": "f27ac39bec0e620fc0d5a25b1a3f5d1fd8e8f023234a615c79101db9cc8c58c1"
                }
            ],
            "outputs": [
                {
                    "address": "tmG2WnrxrpfXxPf5Phk6yPZffqQhezhcUsz",
                    "satoshis": 1000,
                    "script": "76a9144540239415ca840c496f146859374125a1ad6f6188ac"
                }
            ],
            "blockchainSpecific": {
                "replaceable": false
            }
        }
    }
}