v1

latestOpenAPI 3.0.02026-07-174823135.4 KB
Derivations

Create a PSBT

A Partially Signed Bitcoin Transaction (PSBT) is a standard format to represent a transaction with pending signatures associated to it. A PSBT can be signed independently by many signers, and combined together before broadcast.

post/v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/psbt/create

Path parameters

cryptoCodestring required

The cryptocurrency code to track (e.g., 'BTC' for Bitcoin, 'LTC' for Litecoin).

derivationSchemestring required

The derivation scheme (See documentation)

Request body

PSBTVersioninteger

Optional. The format of the PSBT. (0 or 2). Default is 1.

seedinteger

Optional. A seed specific to get a deterministic PSBT, useful for testing purposes. Default is null.

rbfboolean

Optional. Determines if the transaction should have Replace-By-Fee (RBF) activated. Default is true if 'disableFingerprintRandomization' is true.

versioninteger

Optional. The version of the transaction. Default is 1 if 'disableFingerprintRandomization' is true.

timeLockinteger

Optional. The timelock (nLockTime) of the transaction. Activates RBF if not null. Default is 0 if 'disableFingerprintRandomization' is true.

includeGlobalXPubboolean

Optional. Whether to include the global xpubs of the derivation scheme in the PSBT. Default is false.

reserveChangeAddressboolean

Optional. If true, the creation of this PSBT will reserve a new change address. Default is false.

spendAllMatchingOutpointsboolean

Optional. If true, all the UTXOs that have been selected will be used as inputs in the PSBT. Default is false.

explicitChangeAddressstring

Optional. Use a specific change address or script (in hex format). Mutually exclusive with 'reserveChangeAddress'. Default is null.

minConfirmationsinteger

Optional. The minimum number of confirmations a UTXO needs to be selected. By default, both unconfirmed and confirmed UTXOs will be used.

includeOnlyOutpointsstring[]

Optional. Only select the specified outpoints for creating the PSBT. Can select outpoints that have been spent but are unconfirmed, useful for RBF. Default is null.

excludeOutpointsstring[]

Optional. Do not select the specified outpoints for creating the PSBT. Default is an empty array.

minValueinteger

Optional. UTXOs with value below this amount (in satoshis) will be ignored. Default is null.

discourageFeeSnipingboolean

Optional. If 'timeLock' is not set, sets the 'timeLock' to a random value to discourage fee sniping. Default is true if 'disableFingerprintRandomization' is true.

disableFingerprintRandomizationboolean

Optional. Disables the randomization of default parameter values to match the network's fingerprint distribution. Randomized default values include 'version', 'timeLock', 'rbf', and 'discourageFeeSniping'. Default is false.

alwaysIncludeNonWitnessUTXOboolean

Optional. If true, includes the full previous transaction in 'non_witness_utxo' even for SegWit inputs. Default is false.

mergeOutputsboolean

Optional. If true, outputs sending to the same scriptPubKey will be merged into a single output. Default is true.

Response

A PSBT get returned

psbtstring

Partially signed Bitcoin transaction in Base64 encoding

changeAddressstring

Bitcoin address where change will be sent

Example response

{
  "psbt": "cHNidP8BAHcBAAAAASjvZHM29AbxO...",
  "changeAddress": "mqVvTQKsdJ36Z8m5uFWQSA5nhrJ5NHQ2Hs",
  "suggestions": {
    "shouldEnforceLowR": true
  }
}