Deposit funds

1

Build a deposit transaction

You must first build a transaction using your current UTxO state before processing.

How can I get UTxOs from my wallet address?

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

curl --location 'https://api-staging.deltadefi.io/accounts/deposit/build' \
--header 'x-api-key: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
    "deposit_amount": [
        {
            "unit": "lovelace",
            "quantity": "10000000"
        }
    ], 
    "input_utxos": [
        {
            "input": {
                "tx_hash": "6a33db7b4da84707b088d29fd6ec3072f03599427a4854c7ebe88c3052524385",
                "output_index": 4
            },
            "output": {
                "address": "addr_test1qr77kjlsarq8wy22g4flrcznjh5lkug5mvth7qhhkewgmezwvc8hnnjzy82j5twzf8dfy5gjk04yd09t488ys9605dvq4ymc4x",
                "amount": [
                    {
                        "unit": "lovelace",
                        "quantity": "77261137"
                    }
                ],
                "data_hash": null,
                "plutus_data": null,
                "script_ref": null,
                "script_hash": null
            }
        }
    ]
}

2

Submit a deposit transaction

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

How can I sign a Cardano transaction?

For in-depth API details Submit deposit transaction


curl --location 'https://api-staging.deltadefi.io/accounts/deposit/submit' \
--header 'X-API-key: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
    "signed_tx": "<your_signed_tx>"
}


Verifying deposit

After you have made a successful deposit 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 Response should look something like below:

[
    {
        "asset": "usdx",
        "asset_unit": "5066154a102ee037390c5236f78db23239b49c5748d3d349f3ccf04b55534458",
        "free": 0,
        "locked": 17.35
    },
    {
        "asset": "ada",
        "asset_unit": "",
        "free": 0,
        "locked": 100
    }
]


Last updated