Crypto Withdrawals API
Overview
A withdrawal is a quorum-approved movement of assets to an external address, initiated either by the iOS app or API.
- See Transfers for more information on programmatic transfers that do not require quorum for asset transfers to allowlisted addresses.
- For details on the AML questionnaire see the payload guide.
- For the destination object, you can choose any of the following options
WALLETADDRESSTRUSTED DESTINATIONVAULT(not recommended due to reduced precision)
| Withdrawal destination type | Wallet | Trusted destination | Non-allowlisted address | Vault (not recommended) |
|---|---|---|---|---|
| Digital assets | Supported | Supported | Supported | Supported |
| USD | Not supported | Not supported | Not supported | Not supported |
Withdrawal examples
{
"amount": "1",
"assetType": "SOL_TD",
"source": {
"id": "{WALLET ID HERE",
"type": "WALLET"
},
"destination": {
"id": "{ADDRESS HERE}",
"type": "ADDRESS"
},
"description": "Test Withdrawal",
"useGasStation": false,
"withdrawalAmlQuestionnaire": {
"destinationType": "SELFHOSTED_WALLET",
"recipientType": "PERSON",
"purpose": "INVESTMENT",
"originatorType": "MY_ORGANIZATION",
"selfhostedDescription": "a wallet description",
"recipientFirstName": "John",
"recipientLastName": "Recipient",
"recipientFullName": "John Recipient Full Name",
"recipientCountry": "US",
"recipientStreetAddress": "Some Recipient Street",
"recipientCity": "New York",
"recipientStateProvince": "NY",
"recipientPostalCode": "10101"
}
}
{
"idempotentId": "{Add ID}",
"amount": "{Add Amount with correct decimal precision}",
"assetType": "{Add asset}",
"source": {
"id": "{Wallet ID}",
"type": "WALLET",
},
"destination": {
"type": "ADDRESS",
"id": "{ADDRESS HERE}",
},
"description": "Test Withdrawal",
"useGasStation": false,
"withdrawalAmlQuestionnaire": {
"useTrustedDestinationAml": true,
"originatorType": "MY_ORGANIZATION",
"purpose": "INVESTMENT",
}
}API endpoints
| Endpoint | Overview |
|---|---|
| Create a withdrawal request | Initiates a withdrawal request from an Anchorage Digital wallet to an external destination. Enables you to initiate a withdrawal request but requires quorum approval to process. No queuing is enabled. |
| List transactions | Returns metadata across all transactions in every wallet in the vault(s) permissioned to a client’s API key. Note: The date format for start_date and end_date is YYYY-mm-dd. |
| Get transaction by ID | Returns metadata across a transaction using a client’s transaction ID, including assets, fees, status, destination addresses, and the transaction type. |
Status
| Status | Overview |
|---|---|
SUCCESS | This transaction has succeeded. |
NEEDS APPROVAL | This transaction has begun but is awaiting approval by quorum members. |
INPROGRESS | This transaction is currently in progress. |
FAILURE | This transaction has failed. |
REJECTED | This transaction has been rejected. |
EXPIRED | This transaction has expired. |
Withdrawals and transactions
A withdrawal is a type of transaction at Anchorage Digital. A transfer is another type of transaction. Each of these have their own transaction ID and then respective withdrawal ID and transfer ID as well.
withdrawalIdtransferId
Quorum approval for withdrawals
Withdrawals refer to transactions that involve a movement of funds out of the Anchorage Digital platform. Clients have to go through the following workflow to complete transactions:
- Initiate a withdrawal request via the create a withdrawal request endpoint.
- Once a withdrawal request is initiated, a mobile-based quorum approval will be triggered, where the designated vault policy must be met and users must accept using their iOS devices.
- If quorum is reached, the transaction undergoes an Anchorage Digital risk review and policy check to ensure the transaction meets both Anchorage Digital and client-specified withdrawal requirements.
- If requirements are met, the transaction is submitted and an on-chain transaction is submitted to the network.
- This requires network fees and the processing time depends on speed and congestion on the blockchain at the time of submission.
- Ensure there are sufficient funds in place to cover the additional network fees on top of the designated withdrawal amount.
- Once the transaction is completed, the status will be reflected when returning information via API.
Network fees for withdrawals
For withdrawals on the web dashboard and the API, network fees will be added to the withdrawal amount and are paid in the native layer-1 blockchain asset (e.g., fees paid in ETH for ERC-20s). As noted in Unsuccessful withdrawals, if there are not enough fees, the withdrawal will be unsuccessful.
The only case where the network fee will be deducted from the withdrawal amount is when clients are withdrawing the full amount of assets within the wallet from the web dashboard.
UTXO asset processing - Withdrawal considerations
Anchorage Digital obfuscates UTXO-based transaction processing from pooled addresses by enabling clients to use a single wallet-level address—the most recently created address within a wallet, used as the single address to represent all underlying pooled addresses within that wallet). However at the address-level, when transferring or withdrawing funds, UTXOs—not addresses—within the wallet are selected randomly to preserve privacy.
If an address has multiple UTXO balances associated with it (e.g. if multiple deposits have been made to the same address), Anchorage Digital randomly selects UTXOs within the wallet across addresses to be used as the source for a transaction. Thus, one of many UTXOs for a given address may be used for a transaction, but the exact selection of UTXOs is random.
Addresses with multiple deposits on the same address can spend multiple UTXOs, and balances of these sub-UTXOs can be seen on-chain using a block explorer
Troubleshooting
Common issues
A withdrawal request may fail for any of the following reasons:
- An ongoing withdrawal already exists. Note that withdrawal requests are not queued like transfers.
- The specified asset does not exist. Please verify that the symbol is correct and the asset is in the correct vault.
- The specified amount exceeds the available funds. You may have insufficient funds for a withdrawal or the network fee.
- The destination address is invalid.
- The provided API key does not have permissions to initiate withdrawals from this vault.
- Withdrawal requests made using a wallet ID or address will fail, as this transaction can only be specified at the vault level using a vault ID.
In some cases, a transaction may still fail even with initial quorum approval. This may be because of the following reasons:
- There are insufficient funds to pay the network fees at the time of the transaction, or there is a failure on the blockchain.
Updated 3 months ago