Split

Split UTXO

POST /utxo/split

This endpoint handles the creation of a PSBT that splits a Bitcoin address's UTXOs into smaller ones. It validates the request, constructs the transaction, and returns the result.

  • Splits UTXOs into the specified number of outputs with equal value.

  • Returns the unsigned PSBT (base64) ready for signing and broadcasting.

Body

Name
Type
Description

inAddress*

string

Bitcoin address to get the UTXOs from

outAddress (optional)

string

Bitcoin address to send the splits. If not set then UTXOs will be sent to inAddress

splits*

array:

{ value: number, count: number }

Array containing split objects

value*

number

Value of each UTXO split

feeRate*

number

Fee rate in sats/vByte

publicKey

string

Address associated public key, needed for p2sh only

excludeUTXOs

array of outpoints ("txid:vout")

Array containing UTXOs not to spend

ignorePadding

boolean

If true padding outputs (600sats) will be ignored (Default = true)

Example:

{
  "inAddress": "tb1qr4...",
  "outAddress": "tb1qr4sw...",
  "splits": [
    {
        "value": 600,
        "count": 2
    },
    {
        "value": 1000,
        "count": 3
    }
  ],
  "feeRate": "10",
  "publicKey": "03725d3f189...",
  "excludeUTXOs": [
    "b591b8b5ba6c54ce65bc72ea20a9e0ed4f50eccaaa8669b542932b8687b2ef37:0",
    "b591b8b5ba6c54ce65bc72ea20a9e0ed4f50eccaaa8669b542932b8687b2ef37:0"
  ],
  "ignorePadding": true
}

Response

{
  "psbt": "cHNidP8BAJACAAAA..."
}

Last updated