Comment on page
Withdrawal
On-chain withdrawal to any blockchain address.
Withdrawal will move assets from DeFi Account
address
to target address. If withdrawal has source in Virtual Account, liabilities balance is first moved from Virtual Account to DeFi Account, and then assets are moved on-chain.You can estimate blockchain transaction fee.
First Tab
echo 'calculate blockchain fees'
curl --location --request GET 'https://api.orangepill.cloud/v1/withdrawals/estimate \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json' \
--data-raw '{
"account": "634b56217f6a7b0be52dffca",
"address": "bc1qxyvqcwepfwsxstemz626uc73n0w6nxh3swgh68",
"amount": 0.15,
"speed": "fast"
}'
In response you will get fee values for
slow
, medium
or fast
processing speed."0.000684"
Withdrawal will create on-chain transaction from
account
to address
.Blockchain fee can be charged to sender or receiver. If it is charged to sender, fee is added to transaction value. If it is charged to receiver, fee is deducted from transaction value.
cURL
echo 'create withdrawal from virtual account 634b56217f6a7b0be52dffca to Bitcoin address bc1qxyvqcwepfwsxstemz626uc73n0w6nxh3swgh68'
curl --location --request POST 'https://api.orangepill.cloud/v1/withdrawals \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffff' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": {
"account": "634b56217f6a7b0be52dffca"
},
"destination": {
"address": "bc1qxyvqcwepfwsxstemz626uc73n0w6nxh3swgh68"
},
"asset": "BTC",
"value": 0.15,
"fee": {
"paid_by": "receiver",
"speed": "fast"
},
"data": {
"my_field_1": "Salary 11/2022",
"my_field_2": "I1234",
}
}'
In response you will get processing withdrawal.
{
"id": "634b56217f6a7b0be52dffac",
"source": {
"account": "634b56217f6a7b0be52dffca",
"ramp": "637176640b45bd060bdced17",
"address": "637176640b45bd060bdced17"
},
"destination": {
"address": "bc1qxyvqcwepfwsxstemz626uc73n0w6nxh3swgh68"
},
"asset": "BTC",
"value": 0.15,
"fee": {
"paid_by": "receiver",
"speed": "fast",
"value": 0.0005
},
"data": {
"my_field_1": "Salary 11/2022",
"my_field_2": "I1234",
},
"amount": 0.1495,
"status": "PROCESSING",
"created_at": "1519211809934",
"error": null
}
Last modified 3mo ago