Express

POST

Lightning - Withdraw to an onchain address

Withdraw onchain balance from a lightning wallet to a regular onchain address.

Path Params

  • coin string required
    A lightning coin name.
  • walletId string required
    The wallet ID.

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

Body Params

object

  • passphrase string required
    The wallet passphrase.
  • recipients array of objects required
    A list of on-chain recipients with their withdrawal amounts.
    recipients object
    • amountSat string
      The amount to send in satoshis.
    • address string
      The on-chain Bitcoin address of the recipient.
  • satsPerVbyte string
    Optional fee rate for the transaction in satoshis per virtual byte. Cannot be used with numBlocks.
  • numBlocks integer
    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 satsPerVbyte and numBlocks are absent, the transaction defaults to 2 blocks for confirmation.

    >= 2 · <= 1000

  • sequenceId string
    Optional sequence ID for the withdrawal transfer.
  • comment string
    Optional comment for the withdrawal transfer.

Responses

200
OK

Response Body

object

  • txRequestId string
    Transaction request identifier.
  • txRequestState string enum
    initializedpendingApprovalpendingUserCommitmentpendingUserRSharependingUserGSharereadyToSendpendingUserSignaturependingDeliverysigneddeliveredcanceledrejectedfailed
  • pendingApproval object
    pendingApproval object
    • id string

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

    • coin string
      A cryptocurrency or token ticker symbol.
    • wallet string

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

    • enterprise string

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

    • organization string

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

    • creator string

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

    • createDate string date-time
    • info object

      ANY OF

      • transactionRequest object
        transactionRequest object
        • buildParams object
        • coinSpecific object
        • comment string
        • fee string or integer
        • isUnsigned boolean
        • recipients array of objects
          recipients object
          • address string

            up to 500 characters

          • amount string or integer
          • data string
        • requestedAmount object
          requestedAmount object
          • Same shape as IntegerOrIntegerString.
        • sourceWallet string

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

        • triggeredPolicy string

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

        • validTransaction string
        • validTransactionHash string
      • type string enum
        transactionRequest
    • state string

      ANY OF

      string enum

    • scope string enum
      What kind of entity the Pending Approval is tied to
      enterprisewallet
    • userIds array of strings
      All the Users who should see this Pending Approval
    • approvalsRequired integer

      >= 1

    • walletLabel string
    • resolvers array of objects
      resolvers object
      • user string required
      • date string required
      • resolutionType string enum required
        approvedawaitingSignaturependingpendingBitGoAdminApprovalpendingCryptographicApprovalpendingCustodianApprovalpendingFinalApprovalpendingIdVerificationpendingVideoApprovalprocessingrejected
      • signatures array of strings required
      • videoApprover string
      • videoLink string
      • videoException string
    • addressLabels array of objects
      addressLabels object
      • address string required

        up to 500 characters

      • label string nullable required
        A human-readable label for the address.

        up to 250 characters

      • walletLabel string
  • withdrawStatus object
    The status of the on-chain withdrawal transaction.
    withdrawStatus object
    • status string enum
      State of the withdrawal.
      deliveredfailed
    • txid string
      The transaction ID on the blockchain.
    • failureReason string
      The reason for failure, if any.
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