Build a transaction
Build a transaction from the wallet using provided options. Use only with multisignature wallets. For MPC wallets, use Create transaction request. If you want to build, sign, and send all in one call, use Send transaction.
Path Params
-
coinstring requiredA cryptocurrency or token ticker symbol. -
walletIdstring requiredThe wallet ID.
Query Params
-
destinationTagstringRequired when sending to a BitGo wallet.
Body Params
ONE OF
-
typestringRequired for transactions from MPC wallets. "acceleration" speeds up transactions with a certain nonce by adjusting the gas setting. "accountSet" is for XRP AccountSet transactions. "consolidate" combines multiple UTXO inputs into fewer outputs. "enabletoken" is for SOL. "fanout" splits UTXO inputs into many smaller outputs (UTXO coins only). "stakingLock" and "stakingUnlock" are for Stacks delegations. "transfer" is for native-asset transfers. "trustline" is for Stellar trustline transactions. Possible types include: [acceleration, accountSet, consolidate, enabletoken, fanout, stakingLock, stakingUnlock, transfer, transfertoken, trustline]
For AVAX, possible types include:
addValidator,export, andimport.For XRP, possible types include:
paymentandaccountSet. The default ispayment.For STX, type is required.
-
messagesarray of objects[UTXO only] An array of messages that you sign with the wallet keys using the BIP322 format. If passed, therecipientsarray must be empty.messages object
-
addressstringThe address for which you're proving ownership. This address must belong to the wallet. -
messagestringMessage that is being signed.
-
-
numBlocksinteger(BTC only) The number of blocks required to confirm a transaction. You can use
numBlocksto estimate the fee rate by targeting confirmation within a given number of blocks. If bothfeeRateandnumBlocksare absent, the transaction defaults to 2 blocks for confirmation.Note: The
maxFeeRatelimits the fee rate generated bynumBlocks. -
feeRatestring or integerCustom fee rate (in base units) per kilobyte (or virtual kilobyte). For example, satoshis per kvByte.
If the
feeRateis less than the minimum required network fee, then the minimum fee applies. For example, 1000 sat/kvByte, a flat 1000 microAlgos, or a flat 10 drops of xrp. For XRP, the actual fee is usually 4.5 times the open ledger fee.Note: The
feeRateoverrides themaxFeeRateandminFeeRate. -
maxFeeRatestring or integer(BTC only) The maximum fee rate (in base units) per kilobyte (or virtual kilobyte). For example, satoshis per kvByte. The
maxFeeRatelimits the fee rate generated by bothfeeMultiplierandnumBlocks.Note: The
feeRateoverrides themaxFeeRate. -
feeMultiplierstring or number(UTXO only) Custom multiplier to the
feeRate. The resulting fee rate is limited by themaxFeeRate. For replace-by-fee (RBF) transactions (that includerbfTxIds), thefeeMultipliermust be greater than 1, since it's an absolute fee multiplier to the transaction being replaced.Note: The
maxFeeRatelimits the fee rate generated byfeeMultiplier. -
minConfirmsintegerThe unspent selection for the transaction will only consider unspents with at least this many confirmations to be used as inputs. Does not apply to change outputs unless used in combination withenforceMinConfirmsForChange. -
enforceMinConfirmsForChangebooleanWhen set to true, will enforce minConfirms for change outputs. Defaults to false. -
gasPricestring or integerCustom gas price to be used for sending the transaction. Only for ETH and ERC20 tokens. -
eip1559objecteip1559 object
-
maxPriorityFeePerGasstring or integerMax priority tip price for EIP1559 transactions. Only for ETH and ERC20 tokens. -
maxFeePerGasstring or integerMax total gasPrice for EIP1559 transactions. Only for ETH and ERC20 tokens.
-
-
gasLimitstring or integerCustom gas limit to be used for sending the transaction. Only for ETH and ERC20 tokens. -
targetWalletUnspentsintegerSpecifies the minimum count of good-sized unspents to maintain in the wallet. Change splitting ceases when the wallet has
targetWalletUnspentsgood-sized unspents.Note: Wallets that continuously send a high count of transactions will automatically split large change amounts into multiple good-sized change outputs while they have fewer than
targetWalletUnspentsgood-sized unspents in their unspent pool. Breaking up large unspents helps to reduce the amount of unconfirmed funds in flight in future transactions, and helps to avoid long chains of unconfirmed transactions. This is especially useful for newly funded wallets or recently refilled send-only wallets. -
minValuestring or integerIgnore unspents smaller than this amount of base units (e.g. satoshis). For doge, only string is allowed. -
maxValuestring or integerIgnore unspents larger than this amount of base units (e.g. satoshis). For doge, only string is allowed. -
sequenceIdstringAsequenceIdis a unique and arbitrary wallet identifier applied to transfers and transactions at creation. It is optional but highly recommended. With asequenceIdyou can easily reference transfers and transactions—for example, to safely retry sending. Because the system only confirms one send request persequenceId(and fails all subsequent attempts), you can retry sending without the risk of double spending. ThesequenceIdis only visible to users on the wallet and is not shared publicly. -
noncestring(DOT only) A nonce ID is a number used to protect private communications by preventing replay attacks. This is an advanced option where users can manually input a new nonce value in order to correct or fill in a missing nonce ID value. -
noSplitChangebooleanSet
trueto disable automatic change splitting.Also see:
targetWalletUnspents -
unspentsarray of stringsUsed to explicitly specify the unspents to be used in the input set in the transaction. Each unspent should be in the formprevTxId:nOutput. -
changeAddressstringSpecifies a custom destination address for the transaction's change output(s) -
txFormatstring enum[UTXO only] Format of the returned transaction hex serialization.legacyfor serialized transaction in custom bitcoinjs-lib format.psbtfor BIP174 serialized transactionlegacypsbtpsbt-lite -
instantboolean(DASH only) Specifies whether or not to use Dash's "InstantSend" feature when sending a transaction. -
memoobjectExtra transaction information for CSPR, EOS, HBAR, RUNE, STX, TON, XLM, and XRP. Required for XLM transactions.
Note: For XRP this is the destination tag (DT), for CSPR this is the transfer ID and for ALGO this is the message field.
memo object
-
typestring -
valuestring
-
-
commentstringOptional metadata (only persisted in BitGo) to be applied to the transaction. Use this to add transaction-specific information such as the transaction's purpose or another identifier that you want to reference later. The value is shown in the UI in the transfer listing page. -
destinationChainstring(AVAXC and AVAXP only) Destination chain for an AVAX import/export transaction. One of [P, C]. -
sourceChainstring(AVAXC and AVAXP only) Source chain for an AVAX import/export transaction. One of [P, C]. -
addressTypestring deprecatedDEPRECATED - usechangeAddressType. The type of address to create for change. One ofp2sh,p2shP2wsh,p2wsh, orp2tr. -
changeAddressTypestring or array of stringsThe address type for the change address. One ofp2sh,p2shP2wsh,p2wsh,p2trorp2trMusig2.ANY OF
string enumarray of string enums -
startTimestringUnix timestamp in seconds.nanoseconds format, denoting the start of the validity window. Only for HBAR transactions. -
consolidateIdstring(ALGO/TEZOS only) Consolidation ID of this consolidation transaction. -
lastLedgerSequenceinteger(XRP only) Absolute max ledger the transaction should be accepted in, whereafter it will be rejected -
ledgerSequenceDeltainteger(XRP only) Relative ledger height (in relation to the current ledger) that the transaction should be accepted in, whereafter it will be rejected -
rbfTxIdsarray of stringsThe list of transactions to accelerate using Replace-By-Fee (RBF) for UTXO coins (currently accelerating only one tx is supported). -
isReplaceableByFeebooleanIt is used to mark an UTXO transaction eligible for Replace-By-Fee (RBF) later. -
validFromBlockintegerOptional block this transaction is valid from -
validToBlockintegerOptional block this transaction is valid until -
trustlinesarray of objectsList of trustlines to manage on the account. Available for Stellar.trustlines object
-
tokenstringOne of the supported coin types for Stellar tokens listed in Coin-specific-implementation -
actionobjectaddremove -
limitstringString representation of the amount to limit in base units (stroops)
-
-
stakingOptionsobjectRequired object for staking. Only for CSPR and STX.ANY OF
-
amountstring or integerRequired for CSPR. String representation of the amount to stake or unstake in base units (motes). -
validatorstringRequired for CSPR. The validator address used to delegate or undelegate.
-
contractNamestringThe STX staking contract name. Use pox-3. -
functionNamestringSTX staking contract function. -
functionArgsarray of objectsThe 4 Objects are required and in the order expressed.ANY OF
-
typestringType of argument. Use the default. -
valstringAmount in micro-stx
-
typestringType of argument. Use the default. -
valstringAddress of the validator
-
typestringType of argument. Use the default. -
valstringThe number of cycles that the delegation will last. This is a mandatory field that must be greater than 1.
-
typestringType of argument. Use the default. -
valobjectval object
-
typestringType of argument. Use the default. -
valarray of objectsThe 2 objects are required and in the order expressed.ANY OF
-
keystringType of argument. Use the default. -
typestringType of argument. Use the default. -
valstringThe BTC Address hash.
-
keystringType of argument. Use the default. -
typestringType of argument. Use the default. -
valstringThe BTC Address version.
-
-
-
-
-
messageKeystringOptional parameter that takes a hexadecimal value to setmessagekeyfor an XRPaccountSettransaction. Recipients field should be empty whenmessageKeyis set. -
reservationobjectOptional parameter for UTXO coins to automatically reserve the unspents that are used in the build. Useful for Cold wallets. If using, must set expireTime.reservation object
-
expireTimestring date-timeRequired. The time that the unspent reservations should expire.
-
-
recipientsarray of objects requiredA list of recipient addresses and amounts. Must be present but empty for Child-Pays-For-Parent transactions and for ERC-7984 token enablement transactions (useenableTokensin that case — the server derives the delegation calldata and overrides this field internally).recipients object
-
amountstring or integerString representation of the amount to send in base units (satoshis/litoshis/zatoshis/duffs). For doge, only string is allowed. Passing in 'max' will send the recipient the maximum amount available, minus fees and amounts for other recipients. Only a single recipient with a 'max' amount is allowed. -
addressstringThe address to send to -
memoobjectANY OF
string-
typestring -
valuestring
-
-
-
txFormatstring enum[UTXO only] Format of the returned transaction hex serialization.legacyfor serialized transaction in custom bitcoinjs-lib format.psbtfor BIP174 serialized transactionlegacypsbtpsbt-lite -
enableTokensarray of objectsTokens to enable decryption delegation for (ERC-7984 / Zama confidential tokens, ETH family only). When present,recipientsmust be an empty array — the server derives delegation calldata from this field and overridesrecipientsinternally.enableTokens object
-
namestring requiredToken coin name (e.g. "hteth:cusdt") -
addressstring requiredWallet address that will delegate decryption rights (the owner address — must be registered to this wallet)
-
-
typestringRequired for transactions from MPC wallets. "acceleration" speeds up transactions with a certain nonce by adjusting the gas setting. "accountSet" is for XRP AccountSet transactions. "consolidate" combines multiple UTXO inputs into fewer outputs. "enabletoken" is for SOL. "fanout" splits UTXO inputs into many smaller outputs (UTXO coins only). "stakingLock" and "stakingUnlock" are for Stacks delegations. "transfer" is for native-asset transfers. "trustline" is for Stellar trustline transactions. Possible types include: [acceleration, accountSet, consolidate, enabletoken, fanout, stakingLock, stakingUnlock, transfer, transfertoken, trustline]
For AVAX, possible types include:
addValidator,export, andimport.For XRP, possible types include:
paymentandaccountSet. The default ispayment.For STX, type is required.
-
messagesarray of objects[UTXO only] An array of messages that you sign with the wallet keys using the BIP322 format. If passed, therecipientsarray must be empty.messages object
-
addressstringThe address for which you're proving ownership. This address must belong to the wallet. -
messagestringMessage that is being signed.
-
-
numBlocksinteger(BTC only) The number of blocks required to confirm a transaction. You can use
numBlocksto estimate the fee rate by targeting confirmation within a given number of blocks. If bothfeeRateandnumBlocksare absent, the transaction defaults to 2 blocks for confirmation.Note: The
maxFeeRatelimits the fee rate generated bynumBlocks. -
feeRatestring or integerCustom fee rate (in base units) per kilobyte (or virtual kilobyte). For example, satoshis per kvByte.
If the
feeRateis less than the minimum required network fee, then the minimum fee applies. For example, 1000 sat/kvByte, a flat 1000 microAlgos, or a flat 10 drops of xrp. For XRP, the actual fee is usually 4.5 times the open ledger fee.Note: The
feeRateoverrides themaxFeeRateandminFeeRate. -
maxFeeRatestring or integer(BTC only) The maximum fee rate (in base units) per kilobyte (or virtual kilobyte). For example, satoshis per kvByte. The
maxFeeRatelimits the fee rate generated by bothfeeMultiplierandnumBlocks.Note: The
feeRateoverrides themaxFeeRate. -
feeMultiplierstring or number(UTXO only) Custom multiplier to the
feeRate. The resulting fee rate is limited by themaxFeeRate. For replace-by-fee (RBF) transactions (that includerbfTxIds), thefeeMultipliermust be greater than 1, since it's an absolute fee multiplier to the transaction being replaced.Note: The
maxFeeRatelimits the fee rate generated byfeeMultiplier. -
minConfirmsintegerThe unspent selection for the transaction will only consider unspents with at least this many confirmations to be used as inputs. Does not apply to change outputs unless used in combination withenforceMinConfirmsForChange. -
enforceMinConfirmsForChangebooleanWhen set to true, will enforce minConfirms for change outputs. Defaults to false. -
gasPricestring or integerCustom gas price to be used for sending the transaction. Only for ETH and ERC20 tokens. -
eip1559objecteip1559 object
-
maxPriorityFeePerGasstring or integerMax priority tip price for EIP1559 transactions. Only for ETH and ERC20 tokens. -
maxFeePerGasstring or integerMax total gasPrice for EIP1559 transactions. Only for ETH and ERC20 tokens.
-
-
gasLimitstring or integerCustom gas limit to be used for sending the transaction. Only for ETH and ERC20 tokens. -
targetWalletUnspentsintegerSpecifies the minimum count of good-sized unspents to maintain in the wallet. Change splitting ceases when the wallet has
targetWalletUnspentsgood-sized unspents.Note: Wallets that continuously send a high count of transactions will automatically split large change amounts into multiple good-sized change outputs while they have fewer than
targetWalletUnspentsgood-sized unspents in their unspent pool. Breaking up large unspents helps to reduce the amount of unconfirmed funds in flight in future transactions, and helps to avoid long chains of unconfirmed transactions. This is especially useful for newly funded wallets or recently refilled send-only wallets. -
minValuestring or integerIgnore unspents smaller than this amount of base units (e.g. satoshis). For doge, only string is allowed. -
maxValuestring or integerIgnore unspents larger than this amount of base units (e.g. satoshis). For doge, only string is allowed. -
sequenceIdstringAsequenceIdis a unique and arbitrary wallet identifier applied to transfers and transactions at creation. It is optional but highly recommended. With asequenceIdyou can easily reference transfers and transactions—for example, to safely retry sending. Because the system only confirms one send request persequenceId(and fails all subsequent attempts), you can retry sending without the risk of double spending. ThesequenceIdis only visible to users on the wallet and is not shared publicly. -
noncestring(DOT only) A nonce ID is a number used to protect private communications by preventing replay attacks. This is an advanced option where users can manually input a new nonce value in order to correct or fill in a missing nonce ID value. -
noSplitChangebooleanSet
trueto disable automatic change splitting.Also see:
targetWalletUnspents -
unspentsarray of stringsUsed to explicitly specify the unspents to be used in the input set in the transaction. Each unspent should be in the formprevTxId:nOutput. -
changeAddressstringSpecifies a custom destination address for the transaction's change output(s) -
txFormatstring enum[UTXO only] Format of the returned transaction hex serialization.legacyfor serialized transaction in custom bitcoinjs-lib format.psbtfor BIP174 serialized transactionlegacypsbtpsbt-lite -
instantboolean(DASH only) Specifies whether or not to use Dash's "InstantSend" feature when sending a transaction. -
memoobjectExtra transaction information for CSPR, EOS, HBAR, RUNE, STX, TON, XLM, and XRP. Required for XLM transactions.
Note: For XRP this is the destination tag (DT), for CSPR this is the transfer ID and for ALGO this is the message field.
memo object
-
typestring -
valuestring
-
-
commentstringOptional metadata (only persisted in BitGo) to be applied to the transaction. Use this to add transaction-specific information such as the transaction's purpose or another identifier that you want to reference later. The value is shown in the UI in the transfer listing page. -
destinationChainstring(AVAXC and AVAXP only) Destination chain for an AVAX import/export transaction. One of [P, C]. -
sourceChainstring(AVAXC and AVAXP only) Source chain for an AVAX import/export transaction. One of [P, C]. -
addressTypestring deprecatedDEPRECATED - usechangeAddressType. The type of address to create for change. One ofp2sh,p2shP2wsh,p2wsh, orp2tr. -
changeAddressTypestring or array of stringsThe address type for the change address. One ofp2sh,p2shP2wsh,p2wsh,p2trorp2trMusig2.ANY OF
string enumarray of string enums -
startTimestringUnix timestamp in seconds.nanoseconds format, denoting the start of the validity window. Only for HBAR transactions. -
consolidateIdstring(ALGO/TEZOS only) Consolidation ID of this consolidation transaction. -
lastLedgerSequenceinteger(XRP only) Absolute max ledger the transaction should be accepted in, whereafter it will be rejected -
ledgerSequenceDeltainteger(XRP only) Relative ledger height (in relation to the current ledger) that the transaction should be accepted in, whereafter it will be rejected -
rbfTxIdsarray of stringsThe list of transactions to accelerate using Replace-By-Fee (RBF) for UTXO coins (currently accelerating only one tx is supported). -
isReplaceableByFeebooleanIt is used to mark an UTXO transaction eligible for Replace-By-Fee (RBF) later. -
validFromBlockintegerOptional block this transaction is valid from -
validToBlockintegerOptional block this transaction is valid until -
trustlinesarray of objectsList of trustlines to manage on the account. Available for Stellar.trustlines object
-
tokenstringOne of the supported coin types for Stellar tokens listed in Coin-specific-implementation -
actionobjectaddremove -
limitstringString representation of the amount to limit in base units (stroops)
-
-
stakingOptionsobjectRequired object for staking. Only for CSPR and STX.ANY OF
-
amountstring or integerRequired for CSPR. String representation of the amount to stake or unstake in base units (motes). -
validatorstringRequired for CSPR. The validator address used to delegate or undelegate.
-
contractNamestringThe STX staking contract name. Use pox-3. -
functionNamestringSTX staking contract function. -
functionArgsarray of objectsThe 4 Objects are required and in the order expressed.ANY OF
-
typestringType of argument. Use the default. -
valstringAmount in micro-stx
-
typestringType of argument. Use the default. -
valstringAddress of the validator
-
typestringType of argument. Use the default. -
valstringThe number of cycles that the delegation will last. This is a mandatory field that must be greater than 1.
-
typestringType of argument. Use the default. -
valobjectval object
-
typestringType of argument. Use the default. -
valarray of objectsThe 2 objects are required and in the order expressed.ANY OF
-
keystringType of argument. Use the default. -
typestringType of argument. Use the default. -
valstringThe BTC Address hash.
-
keystringType of argument. Use the default. -
typestringType of argument. Use the default. -
valstringThe BTC Address version.
-
-
-
-
-
messageKeystringOptional parameter that takes a hexadecimal value to setmessagekeyfor an XRPaccountSettransaction. Recipients field should be empty whenmessageKeyis set. -
reservationobjectOptional parameter for UTXO coins to automatically reserve the unspents that are used in the build. Useful for Cold wallets. If using, must set expireTime.reservation object
-
expireTimestring date-timeRequired. The time that the unspent reservations should expire.
-
-
nonParticipationboolean required
Responses
200
OK
Response Body
object
-
keyDerivationPathstring
400
Bad Request
Response Body
ONE OF
-
errorstring requiredHuman-readable error message -
requestIdstring requiredClient request id -
contextobjectProperties that apply to a specific error name -
namestring requiredError code
-
errorstring requiredHuman-readable error message -
requestIdstring requiredClient request id -
contextobject requiredcontext object
-
addressstring required -
coinstring requiredA cryptocurrency or token ticker symbol.
-
-
namestring enum requiredError codeInvalidAddress
-
errorstring requiredHuman-readable error message -
requestIdstring requiredClient request id -
contextobject requiredcontext object
-
idstring
-
-
namestring enum requiredError codeInvalidWalletId