Withdraw funds
1
Build withdrawal transaction
curl --location 'https://api-staging.deltadefi.io/accounts/withdrawal/build' \
--header 'x-api-key: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"withdrawal_amount": [
{
"unit": "lovelace",
"quantity": "1000000"
},
]
}'const axios = require('axios');
let data = JSON.stringify({
"withdrawal_amount": [
{
"unit": "lovelace",
"quantity": "1000000"
},
]
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api-staging.deltadefi.io/accounts/withdrawal/build',
headers: {
'x-api-key': '<your_api_key>',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
2
Submit withdrawal transaction
curl --location 'https://api-staging.deltadefi.io/accounts/withdrawal/submit' \
--header 'X-API-KEY: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"signed_tx": ""
}'const axios = require('axios');
let data = JSON.stringify({
"signed_tx": ""
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api-staging.deltadefi.io/accounts/withdrawal/submit',
headers: {
'X-API-KEY': '<your_api_key>',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
✅ Verifying withdrawal
curl --location 'https://api-staging.deltadefi.io/accounts/balance' \
--header 'X-API-KEY: <your_api_key>'const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api-staging.deltadefi.io/accounts/balance',
headers: {
'X-API-KEY': '<your_api_key>'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
[
{
"asset": "ada",
"asset_unit": "",
"free": 0,
"locked": 100
}
]Related FAQ
Last updated