Express

POST

Build, sign, and send a consolidation transaction for an account-based asset all in 1 call. For account-based assets, consolidating the balances in the receive addresses to the base address maximizes the spendable balance of a wallet.

Path Params

  • coin string required
    A cryptocurrency or token ticker symbol.
  • walletId string required
    The wallet ID.

    matches ^[0-9a-f]{32}$

Body Params

object

  • consolidateAddresses array of strings
    Optional: restrict the consolidation to the specified receive addresses. If not provided, will consolidate the funds from all receive addresses up to 500 addresses.
  • walletPassphrase string
    Passphrase to decrypt the user key on the wallet. Required if External Signer is not used to sign the transactions.
  • prv string
    The un-encrypted user private key in string form. If the key is a JSON object it must be stringified. Required if walletPassphrase is not available or encrypted private key is not stored by BitGo.
  • apiVersion string enum
    The Trasaction Request API version to use for MPC EdDSA Hot Wallets. Defaults based on the wallet type and asset curve.
    fulllite

Responses

200
OK

Response Body

object

  • success array of objects required
    An Array of TransactionRequest or Transfers.

    ONE OF

    • txRequestId string required
      A unique ID for the TxRequest document across all wallets. The combination of the txRequestId and version will always be unique.
    • version number required
      The version of the document. Data changes are done only with inserts and incrementing the version.
    • latest boolean required
      A boolean flag that indicates whether the document is the latest version of the TxRequest.
    • walletId string required
      The id of the Wallet the TxRequest is for.
    • walletType string enum
      The type describes who owns the keys to the wallet associated to the TxRequest.
      coldcustodialcustodialPairedhottradingdistributedCustodyadvanced
    • enterpriseId string
      If the wallet that owns the TxRequest is owned by an enterprise then this is the Id of said enterprise.
    • state string enum required
      initializedpendingApprovalpendingUserCommitmentpendingUserRSharependingUserGSharereadyToSendpendingUserSignaturependingDeliverysigneddeliveredcanceledrejectedfailed
    • date string date-time required
      The date and time this version of the TxRequest document was created.
    • createdDate string date-time required
      The date and time the version 1 TxRequest document was created.
    • userId string required
      The Id of the User that produced this version of the TxRequest document. Could have created a new document or updated an existing document.
    • initiatedBy string required
      The Id of the User that originally created the TxRequest document (initiated the TxRequest).
    • updatedBy string required
      The Id of the User that last updated the TxRequest document. This is an alias for the userId field.
    • intent object required

      ANY OF

      • intentType string required
      • 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—for example, to safely retry sending. Because BitGo 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. It is the responsibility of the caller to keep track of this ID.
      • comment string
        The comment is only visible to users on the wallet and is not shared publicly.
      • nonce string
        The 'nonce' of a transaction (optional)
      • memo string
        A memo is an additional address feature necessary for identifying a transaction recipient beyond wallet address.
      • stakingRequestId string required
      • intentType string enum required
        stake
      • poolKeyHash string required
        The pool key hash to which the coins will be delegated to.
    • intents array of objects required
      intents object
      • Same shape as TransactionRequestIntent.
    • pendingApprovalId string
      The id of the Pending Approval that was created for the TxRequest if one was required.
    • isCanceled boolean
      True, if the transaction request is canceled.
    • unsignedTxs array of objects
      Holds all unsigned transactions that will be used to fulfill the TxRequest for MPC wallets.
      unsignedTxs object
      • serializedTxHex string required
        The unsigned transaction as a hex string.
      • signableHex string required
        The portion of a transaction used to generate a signature (may or may not be the same as serializedTxHex) as a hex string.
      • derivationPath string
        A bip32 path.
      • feeInfo object
        feeInfo object
        • feeString string required
        • fee number required
      • coinSpecific object
        Coin specific information.
      • parsedTx object
        The parsed transaction information.
        parsedTx object
        • minerFee string required
        • spendAmount string
        • spendAmounts array of objects
          spendAmounts object
          • coinName string
          • amountString string
        • payGoFee string
        • outputs array of objects required
          outputs object
          • address string required
          • isPayGo boolean
          • value number
          • wallet string
          • walletV1 string
          • baseAddress string
          • enterprise string
          • valueString string required
          • data string
          • change boolean
          • coinName string
        • inputs array of objects required
          inputs object
          • derivationIndex number
          • value number required
          • address string
          • valueString string required
          • chain number
          • index number
        • type string
        • memo string
    • signatureShares array of objects
      Only used for MPC coins. This is used to collect signature shares from and exchange them with the user.
      signatureShares object
      • from string enum required
        The source of the signature share.
        userbackupbitgo
      • to string enum required
        The recipient of the signature share.
        userbackupbitgo
      • share string required
        The signature share.
    • commitmentShares array of objects
      Only used for MPC coins on EdDSA curve. This is used to collect commitment shares from and exchange them with the user.
      commitmentShares object
      • from string enum required
        The source of the commitment share.
        userbackupbitgo
      • to string enum required
        The recipient of the commitment share.
        userbackupbitgo
      • share string required
        The commitment share.
      • type string enum required
        The type of the commitment share.

        Defaults to commitment

        commitment
    • txHashes array of strings
  • failure array of strings required
    An Array of Error messages.
400
Bad Request

Response Body

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