Withdraw funds

1

Build withdrawal transaction

Please note only free balances are able to withdraw from the current hydra cycle. Deposit funds

For in-depth API details Build withdrawal transaction

In the following example we're withdrawing 10 Ada, equivalent to 10_000_000 lovelace.

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"
		},
	]
}'

2

Submit withdrawal transaction

With the returned tx_hex from step 1, you will need to sign it before submitting it.

For in-depth API details 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": ""
}'

Verifying withdrawal

After you have made a successful withdrawal request, you can check your latest account balance via the Balances API.

curl --location 'https://api-staging.deltadefi.io/accounts/balance' \
--header 'X-API-KEY: <your_api_key>'

Your requested withdrawal amount will be converted from Free will to Locked , and will be distributed during the next hydra closed.

Your Response should look something like below:

[
    {
        "asset": "ada",
        "asset_unit": "",
        "free": 0,
        "locked": 100
    }
]

Last updated