Send to many

post/api/v2/{coin}/wallet/{walletId}/sendmany

Send coins to multiple recipients. Currently supported by UTXO coins and ETH coin.

This may be useful if you schedule outgoing transactions in bulk, as you will be able to process multiple recipients and lower the aggregate amount of blockchain fees paid.

Path Parameters

  • coinstringRequired
    A cryptocurrency or token ticker symbol.
    Example: "btc"
  • walletIdstringRequired
    Example: "59cd72485007a239fb00282ed480da1f"
    Pattern: ^[0-9a-f]{32}$

Request Body

recipients array[object]
A list of recipient addresses and amounts. Must be present but empty for CPFP transactions.
address string
Destination address
Max length: <= 250 characters
Example: 2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS
amountOne of
The amount in base units (e.g. satoshis) to send. For doge, only string is allowed.
otp string
Two factor auth code to enable sending the transaction. Not necessary if using a long lived access token within the spending limit.
walletPassphrase string
Passphrase to decrypt the user key on the wallet
prv string
Optional, private key in string form, if "walletPassphrase" is not available or encrypted private key is not stored by BitGo.
numBlocks integer
(BTC only) Used to estimate the fee rate by targeting confirmation within the given number of blocks. If neither "feeRate" nor "numBlocks" is specified, a block target of 2 is used by default. Can be limited with "maxFeeRate".
Minimum: >= 2
Maximum: <= 1000
feeRateOne of
Custom minimum fee rate in a coin's base unit per kilobyte (or virtual kilobyte)--for example, satoshis per kvByte or microAlgos per kByte. For xrp, it refers to the open ledger fee in drops (1 XRP = 1000000 drops) and the actual fee used is usually 4.5 times the open ledger fee. If the applied "feeRate" does not meet a coin's required minimum transaction fee amount, the minimum is still applied (for example, 1000 sat/kvByte , a flat 1000 microAlgos or a flat 10 drops of xrp).
maxFeeRate
Custom upper limit for fee rate in a coin's base unit per kilobyte (or virtual kilobyte)--for example, satoshis per kvByte or microAlgos per kByte. "maxFeeRate" can be used to limit a fee rate estimate generated with "numBlocks".
Example: 20000
feeMultiplierOne of
Custom multiplier for fee rate. Suggested to be used in conjunction with "maxFeeRate" for higher priority transactions, or transactions which may not be broadcast for some time after being built. Must be greater than 0.
minConfirms integer
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".
enforceMinConfirmsForChange boolean
When set to true, will enforce minConfirms for change outputs. Defaults to false.
Default: false
gasPrice
Custom gas price to be used for sending the transaction. Only for ETH and ERC20 tokens.
eip1559 object
maxPriorityFeePerGas
Max priority tip price for EIP1559 transactions. Only for ETH and ERC20 tokens.
maxFeePerGas
Max total gasPrice for EIP1559 transactions. Only for ETH and ERC20 tokens.
gasLimit
Custom gas limit to be used for sending the transaction. Only for ETH and ERC20 tokens.
targetWalletUnspents integer
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. See [this support page](https://bitgo.freshdesk.com/support/solutions/articles/27000051851) for more info
Default: 1000
minValue
Ignore unspents smaller than this amount of base units (e.g. satoshis). For doge, only string is allowed.
maxValue
Ignore unspents larger than this amount of base units (e.g. satoshis). For doge, only string is allowed.
sequenceId string
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&mdash;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.
nonce string
(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.
Example: 2000000
Match pattern: ^-?\d+$
noSplitChange boolean
Set "true" to disable automatic change splitting. Also see: "targetWalletUnspents"
Default: false
unspents array[string]
Used to explicitly specify the unspents to be used in the input set in the transaction. Each unspent should be in the form "prevTxId:nOutput".
changeAddress
Specifies a custom destination address for the transaction's change output(s)
instant boolean
(DASH only) Specifies whether or not to use Dash's "InstantSend" feature when sending a transaction.
memo object
Memo for Stellar or EOS. Type is only required for memos in Stellar transactions. The memo contains optional extra information that can also be used to identify payments in Stellar or EOS.
type string
value string
comment string
Optional 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.
Max length: <= 256 characters
addressType string
The type of address to create for change. One of "p2sh", "p2shP2wsh", and "p2wsh".
startTime string
The start of the validity window for the transaction. Only supported by HBAR
consolidateId string
(ALGO/TEZOS only) Consolidation ID of this consolidation transaction.
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
lastLedgerSequence integer
(XRP only) Absolute max ledger the transaction should be accepted in, whereafter it will be rejected
ledgerSequenceDelta integer
(XRP only) Relative ledger height (in relation to the current ledger) that the transaction should be accepted in, whereafter it will be rejected
validFromBlock integer
Optional block this transaction is valid from
validToBlock integer
Optional block this transaction is valid until
type string
transaction type (e.g., "trustline" for Stellar trustline transactions, "accountSet" for XRP account set transactions, "stakingLock" and "stakingUnlock" for Stacks delegation).
trustlines array[object]
List of trustlines to manage on the account. Available for Stellar.
token string
One of the supported coin types for Stellar tokens listed in [Coin-specific-implementation](#tag/Coin-specific-implementation)
Example: txlm:BST-GBQTIOS3XGHB7LVYGBKQVJGCZ3R4JL5E4CBSWJ5ALIJUHBKS6263644L
action
Allowed values: add remove
limit string
String representation of the amount to limit in base units (stroops)
Example: 2000000
Match pattern: ^-?\d+$
stakingOptionsAny of
Required object for staking. Only for CSPR and STX.
amount
Required for CSPR. String representation of the amount to stake or unstake in base units (motes).
validator
Required for CSPR. The validator address used to delegate or undelegate.
messageKey string
Optional parameter that takes a hexadecimal value to set "messagekey" for an XRP "accountSet" transaction. Recipients field should be empty when "messageKey" is set.
reservation object
Optional parameter for UTXO coins to automatically reserve the unspents that are used in the build. Useful for Cold wallets. If using, must set expireTime.
expireTime string <date-time>
Required. The time that the unspent reservations should expire.
data string
(ETH only) Optional data to pass to the transaction
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 let params = { recipients: [ { amount: 0.01 * 1e8, address: '2NFfxvXpAWjKng7enFougtvtxxCJ2hQEMo4', }, { amount: 0.01 * 1e8, address: '2MsMFw75RKRiMb548q6W4jrJ63jwvvDdR2w', }, ], walletPassphrase: 'secretpassphrase1a5df8380e0e30', }; wallet.sendMany(params).then(function (transaction) { // print transaction details console.dir(transaction); });

200 Response

transfer object
New transfer
txid string required
The on-chain transaction id
Example: b8a828b98dbf32d9fd1875cbace9640ceb8c82626716b4a64203fdc79bb46d26
height integer required
The height of the block this Transfer was confirmed in (999999999 if unconfirmed)
heightId string
The unique height id of the block
date string <date-time>required
The date this Transfer was last updated
type string required
Defines whether or not this Transfer was sent or received by the user
Allowed values: send receive
value integer
The total value (in base units) sent by this Transfer (may be approximate for ETH and other coins where amounts in base units can exceed 2^53 - 1)
valueString required
The total value (in base units) sent by this Transfer represented as a String
baseValue integer
The value (in base units) sent by this Transfer without network fees, represented
baseValueString
The value (in base units) sent by this Transfer without network fees, represented as a String
feeString string
The Transfer's fee (in base units) represented as a String
payGoFee integer
The Transfer's BitGo fee (in base units)
payGoFeeString string
The Transfer's BitGo fee (in base units) represented as a String
usd number required
The amount of USD of this Transfer (will be negative if it's a send)
usdRate number required
The USD price at the time this Transfer was created
state string required
The status of this Transfer
Allowed values: signed unconfirmed confirmed pendingApproval removed failed rejected
Example: confirmed
tags array required
The tags to be used on this Transfer (used in Policies)
history array[object] required
An audit log of events that have happened to the Transfer during its lifecycle
comment string required
A comment from the user
vSize integer
The size of the transaction
coinSpecific object required
Transfer fields specific to each coin type
sequenceId string
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&mdash;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.
entries array[object]
An array of objects describing the change in address balances made as a result of this Transfer
usersNotified boolean
Whether BitGo already sent notifications to the users of the transfer wallet
txid string
Unique transaction identifier
tx string
Encoded transaction hex (or base64 for XLM)
status string
Transfer status
Allowed values: signed signed (suppressed) pendingApproval

400 Response

One of
error string required
Human-readable error message
requestId string required
Client request id
context object
Properties that apply to a specific error name
name string required
Error code