latestOpenAPI 3.0.32026-08-224982,0272.8 MB

e445c15e5bee

Wallet

Initiate a transaction

Initiate an unsigned transaction to create a pending approval. This is useful to request funds to be sent from custodial wallets. Use only with custodial wallets.

post/api/v2/{coin}/wallet/{walletId}/tx/initiate

Path parameters

coinstring required

A cryptocurrency symbol or token ticker symbol

Example:btc

A cryptocurrency or token ticker symbol

walletIdstring required
Example:59cd72485007a239fb00282ed480da1f

The wallet ID

Request body

typestring

Required 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, and import.

For XRP, possible types include: payment and accountSet. The default is payment.

For STX, type is required.

numBlocksnumber

(BTC only) The number of blocks required to confirm a transaction. You can use numBlocks to estimate the fee rate by targeting confirmation within a given number of blocks. If both feeRate and numBlocks are absent, the transaction defaults to 2 blocks for confirmation.

Note: The maxFeeRate limits the fee rate generated by numBlocks.

feeRatenumber

Custom fee rate (in base units) per kilobyte (or virtual kilobyte). For example, satoshis per kvByte.

If the feeRate is 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 feeRate overrides the maxFeeRate and minFeeRate.

maxFeeRatenumber

(BTC only) The maximum fee rate (in base units) per kilobyte (or virtual kilobyte). For example, satoshis per kvByte. The maxFeeRate limits the fee rate generated by both feeMultiplier and numBlocks.

Note: The feeRate overrides the maxFeeRate.

minConfirmsnumber

The 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 with enforceMinConfirmsForChange.

enforceMinConfirmsForChangeboolean

When set to true, will enforce minConfirms for change outputs.

gasPricenumber

Custom gas price to be used for sending the transaction. Only for ETH and ERC20 tokens.

gasLimitnumber

Custom gas limit to be used for sending the transaction. Only for ETH and ERC20 tokens.

targetWalletUnspentsnumber

Specifies the minimum count of good-sized unspents to maintain in the wallet. Change splitting ceases when the wallet has targetWalletUnspents good-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 targetWalletUnspents good-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.

minValuenumber

Ignore unspents smaller than this amount of base units (e.g. satoshis). For doge, only string is allowed.

maxValuenumber

Ignore unspents larger than this amount of base units (e.g. satoshis). For doge, only string is allowed.

sequenceIdstring

A sequenceId is a unique and arbitrary wallet identifier applied to transfers and transactions at creation. It is optional but highly recommended. With a sequenceId you can easily reference transfers and transactions—for example, to safely retry sending. Because the system only confirms one send request per sequenceId (and fails all subsequent attempts), you can retry sending without the risk of double spending. The sequenceId is 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.

noSplitChangeboolean

Set true to disable automatic change splitting.

Also see: targetWalletUnspents

unspentsstring[]
changeAddressstring

Specifies a custom destination address for the transaction's change output(s)

txFormat'legacy' | 'psbt' | 'psbt-lite'

[UTXO only] Format of the returned transaction hex serialization. legacy for serialized transaction in custom bitcoinjs-lib format. psbt for BIP174 serialized transaction

instantboolean

(DASH only) Specifies whether or not to use Dash's "InstantSend" feature when sending a transaction.

commentstring

An optional memo for the transaction.

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

DEPRECATED - use changeAddressType. The type of address to create for change. One of p2sh, p2shP2wsh, p2wsh, or p2tr.

startTimestring

Unix 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.

lastLedgerSequencenumber

(XRP only) Absolute max ledger the transaction should be accepted in, whereafter it will be rejected

ledgerSequenceDeltanumber

(XRP only) Relative ledger height (in relation to the current ledger) that the transaction should be accepted in, whereafter it will be rejected

cpfpTxIdsstring[]
cpfpFeeRatenumber

The desired effective fee rate of the accelerated transaction in base units per kilobyte (e.g. satoshi/kB), the unconfirmed transactions it depends on, and the newly created Child-Pays-For-Parent transaction. Must be higher than the current effective fee rate of the target transaction.

rbfTxIdsstring[]
isReplaceableByFeeboolean

It is used to mark an UTXO transaction eligible for Replace-By-Fee (RBF) later.

maxFeenumber

Limits the amount of satoshis that can be used for fees in a Child-Pays-For-Parent (CPFP) transaction. CPFP transactions accelerate the targeted transaction and all of the unconfirmed transactions the targeted transaction depends on. maxFee is required for all CPFP transactions as it allows users to set a safety net that will halt CPFP attempts that exceed the expected cost.

strategystring

Optional unspent selection strategy to use. One of RANDOM, FIFO or BNB.

validFromBlocknumber

Optional block this transaction is valid from

validToBlocknumber

Optional block this transaction is valid until

messageKeystring

Optional parameter that takes a hexadecimal value to set messagekey for an XRP accountSet transaction. Recipients field should be empty when messageKey is set.

videoApproversstring[]

Example request

{
  "messages": [
    {
      "message": "BIP322 test message."
    }
  ],
  "feeRate": 10000,
  "maxFeeRate": 20000,
  "nonce": "2000000",
  "unspents": [
    "12b147dd8b4f73c01f72bdbf5b589eea614f3de609ffdbdac84852d6505cf8a3:1"
  ],
  "changeAddress": "2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS",
  "txFormat": "psbt",
  "addressType": "p2sh",
  "changeAddressType": "p2sh",
  "startTime": "1714067129.1020603",
  "consolidateId": "59cd72485007a239fb00282ed480da1f",
  "trustlines": [
    {
      "limit": "2000000",
      "token": "txlm:BST-GBQTIOS3XGHB7LVYGBKQVJGCZ3R4JL5E4CBSWJ5ALIJUHBKS6263644L"
    }
  ],
  "stakingOptions": {
    "validator": "2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS"
  },
  "unstakingOptions": {
    "unstakeCpuQuantity": "100 EOS",
    "unstakeNetQuantity": "100 EOS"
  },
  "recipients": [
    {
      "address": "2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS"
    }
  ],
  "videoApprovers": [
    "59cd72485007a239fb00282ed480da1f"
  ]
}

Response

Accepted

idstring required
coinstring

A cryptocurrency or token ticker symbol.

walletstring
walletTypestring
walletSubTypestring

The subtype of the wallet (e.g., custodialHot)

walletsstring[]
enterprisestring
organizationstring
safeIdstring

The safe the pending approval is scoped to

organizationNamestring

The organization name

bitgoOrgstring

The BitGo organization

creatorstring required
createDatestring date-time required

The creation date of the pending approval

approvedDatestring date-time

The date when the approval was granted

updatedAtstring date-time

The date when the approval was last updated (any update, not just processing)

keyCurve'secp256k1' | 'ed25519' | 'bls12_381'

The key curve of the coin attached to this pending approval

scope'enterprise' | 'wallet' | 'organization' | 'global' | 'safe' required

What kind of entity the Pending Approval is tied to

userIdsstring[]
approvalsRequirednumber
walletLabelstring

Label for the wallet

approversstring[]
txRequestIdstring uuid

Transaction request ID

versionnumber

Version of the pending approval

policyEvaluationIdstring

ID for the policy evaluation

useLegacyPolicyEngineboolean

Flag to use legacy policy engine

videoCallIdstring

ID for the video call

lastUpdatedstring date-time

The last date the approval was processing