Additionally, paste this code immediately after the opening tag:

Create UTXO Transaction Request from Vault

Through this endpoint users can create a new transaction request from the entire Wallet instead from just a specific address. This endpoint can generate transactions from multiple to multiple addresses.

This is available only for UTXO-based protocols such as Bitcoin, Bitcoin Cash, Litecoin, etc. It is not available for Account-based protocols like Ethereum.

key.singleItemTitle POST /vaults/{vaultId}/{blockchain}/{network}/transaction-requests

Path Parameters

  • Required
    blockchain string

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

    Example : bitcoin
    Possible Values : bitcoin
  • 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 network like "testnet" is test network.

    Default : testnet
    Example : testnet
    Possible Values : mainnet testnet
  • Required
    vaultId string

    Represents the sender's specific and unique Vault ID of the sender.

    Example : 609e221675d04500068718dc

Query Paramaters

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

        Represents the fee priority of the automation, whether it is "slow", "standard" or "fast".

        Example : standard
        Possible Values : slow standard fast
      • Optional
        note string

        Represents an optional note to add a free text in, explaining or providing additional detail on the transaction request.

        Example : yourAdditionalInformationhere
      • Optional
        prepareStrategy string

        Refers to a model of a UTXO spending strategy, where customers can choose how to spend their transaction outputs from multiple Bitcoin addresses. Two options available - "minimize-dust" (select lower amounts from multiple addresses) or "optimize-size" (select higher amounts from less addresses).

        Default : minimize-dust
        Example : minimize-dust
        Possible Values : minimize-dust optimize-size
      • Required
        recipients array
        items (object)

        Defines the destination of the transaction, whether it is incoming or outgoing.

        • Required
          address string

          Defines the specific recipient address.

          Example : 2MtzNEqm2D9jcbPJ5mW7Z3AUNwqt3afZH66
        • Required
          amount string

          Represents the specific amount of the transaction's destination.

          Example : 0.125

Response Schema

201 400 401 402 403 409 415 422 429 500
Http Status Code: 201
Content Type: application/json

The resource has been successfully created.

  • Object :

  • Required
    apiVersion string

    Specifies the version of the API that incorporates this endpoint.

    Example : 2024-05-09
  • Required
    requestId string

    Defines the ID of the request. The requestId is generated by Vaultody 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
        feePriority string

        Represents the fee priority of the automation, whether it is "slow", "standard" or "fast".

        Example : standard
        Possible Values : slow standard fast
      • Optional
        note string

        Represents an optional note to add a free text in, explaining or providing additional detail on the transaction request.

        Example : yourAdditionalInformationhere
      • Required
        recipients array

        Information about each recipient of the transaction.

        • Required
          address string

          Defines the specific destination address.

          Example : mmd963W1fECjLyaDCHcioSCZYHkRwjkhtr
        • Required
          amount string

          Represents the amount received by the specific destination address .

          Example : 0.00123
      • Required
        totalTransactionAmount string

        Represents the total amount sent.

        Example : 0.001
      • Required
        transactionRequestId string

        Represents a unique identifier of the transaction request (the request sent to make a transaction), which helps in identifying which callback and which referenceId concern that specific transaction request.

        Example : 6017dd02a309213863be9e55
      • Required
        transactionRequestStatus string

        Defines the status of the transaction, e.g. "created".

        Example : created
        Possible Values : created

Request Example

POST
https://rest.vaultody.com/vaults/609e221675d04500068718dc/bitcoin/testnet/transaction-requests?context=yourExampleString
Headers
Content-Type: application/json
x-api-key: cb233681a8ee35665296c1824c1f67bc46691788
x-api-sign: PSqeqRLap8rBc/wogNU1DeGGUPb2VyVtg6GiBOaBnYQ=
x-api-timestamp: 1681885776
x-api-passphrase: zYgKeueoOq

Request Body
{
    "context": "yourExampleString",
    "data": {
        "item": {
            "feePriority": "standard",
            "note": "yourAdditionalInformationhere",
            "prepareStrategy": "minimize-dust",
            "recipients": [
                {
                    "address": "2MtzNEqm2D9jcbPJ5mW7Z3AUNwqt3afZH66",
                    "amount": "0.125"
                }
            ]
        }
    }
}

Response Example

{
    "apiVersion": "2024-05-09",
    "requestId": "601c1710034ed6d407996b30",
    "context": "yourExampleString",
    "data": {
        "item": {
            "feePriority": "standard",
            "note": "yourAdditionalInformationhere",
            "recipients": [
                {
                    "address": "mmd963W1fECjLyaDCHcioSCZYHkRwjkhtr",
                    "amount": "0.00123"
                }
            ],
            "totalTransactionAmount": "0.001",
            "transactionRequestId": "6017dd02a309213863be9e55",
            "transactionRequestStatus": "created"
        }
    }
}