Send BTC from a virtual account to the blockchain

2 credits per API call.


Send BTC (Bitcoin) from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it.

  • If Bitcoin server connection is unavailable, withdrawal request is cancelled.
  • If blockchain transfer is successful, but is it not possible to reach Tatum, transaction id of blockchain transaction is returned and withdrawal request must be completed manually, otherwise all other withdrawals will be pending.
There are two possibilites how the transaction on the blockchain can be created:
  • Using mnemonic - all of the addresses, that are generated from the mnemonic are scanned for the incoming deposits which are used as a source of the transaction. Assets, which are not used in a transaction are moved to the system address wih the derivation index 0. Address with index 0 cannot be assigned automatically to any account and is used for custodial wallet use cases. For non-custodial wallets, field attr should be present and it should be address with the index 1 of the connected wallet.
  • Using keyPair - addresses which are used as a source of the transaction are entered manually
It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
This method is a helper method, which internally wraps these steps:
  1. Store withdrawal - create a ledger transaction, which debits the assets on the sender account.
  2. Perform blockchain transaction
  3. Complete withdrawal - move the withdrawal to the completed state, when all of the previous steps were successful.
When some of the steps fails, Cancel withdrawal operation is used, which cancels withdrawal and creates refund transaction to the sender account. This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

Language
Authorization
Header
Click Try It! to start a request and see the response here!