> For the complete documentation index, see [llms.txt](https://docs.deltadefi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.deltadefi.io/start-trading/developers/getting-started/deposit-funds.md).

# Deposit funds

{% hint style="info" %}
:sparkles:Pre-requisite:  You must create an account and obtain an API key via the user interface

[Create account here](/start-trading/getting-started/create-account.md)
{% endhint %}

{% stepper %}
{% step %}

### &#x20;Build a deposit transaction

You must first build a transaction using your current UTxO state before processing.&#x20;

[Cardano](/faq/cardano.md#how-can-i-get-utxos-from-my-wallet-address)

* For in-depth API details[Build deposit transaction](/start-trading/developers/api-documentation/account/build-deposit-transaction.md).&#x20;
* For a list of supported assets, view [Assets](/start-trading/developers/assets.md)

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

{% tabs %}
{% tab title="Curl" %}

```sh
curl --location 'https://api.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
            }
        }
    ]
}
```

{% endtab %}

{% tab title="NodeJs (axios)" %}

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "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
      }
    }
  ]
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.deltadefi.io/accounts/deposit/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);
});
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Submit a deposit transaction

With the returned <mark style="color:orange;">`tx_hex`</mark> from step 1, you will need to sign it before submitting it.

[Cardano](/faq/cardano.md#how-can-i-sign-a-cardano-transaction)

For in-depth API details [Submit deposit transaction](/start-trading/developers/api-documentation/account/submit-deposit-transaction.md)

{% tabs %}
{% tab title="curl" %}

```sh

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

```

{% endtab %}

{% tab title="NodeJs (axios)" %}

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "signed_tx": "<your_signed_tx>"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.deltadefi.io/accounts/deposit/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);
});
```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "https://api.deltadefi.io/accounts/deposit/submit"
  method := "POST"

  payload := strings.NewReader(`{
    "signed_tx": "<your_signed_tx>"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("X-API-key", "<your_api_key>")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}
{% endtabs %}
{% endstep %}
{% endstepper %}

***

### :white\_check\_mark: Verifying deposit

After you have made a successful deposit request, you can check your latest account balance via the [Account Balances](/start-trading/developers/api-documentation/account/balances.md) API.

{% tabs %}
{% tab title="curl" %}

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

{% endtab %}

{% tab title="NodeJs" %}

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://api.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);
});

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "https://api.deltadefi.io/accounts/balance"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("X-API-KEY", "<your_api_key>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}
{% endtabs %}

Your Response should look something like below:

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

***

### Related FAQ

* [How do I get my API keys?](/start-trading/developers/auth.md)
* [What is the minimum amount of deposit and withdrawal?](/faq/product.md#the-minimum-deposit-amount)
* [How long does it take to deposit & withdraw?](/faq/product.md#how-long-does-it-take-to-deposit-and-withdrawal)
* [What are locked and free balances?](/faq/product.md#what-are-locked-and-free-balance)
* [How can I get UTxOs from my wallet address?](/faq/cardano.md#how-can-i-get-utxos-from-my-wallet-address)
* [How can I sign a Cardano transaction?](/faq/cardano.md#how-can-i-sign-a-cardano-transaction)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.deltadefi.io/start-trading/developers/getting-started/deposit-funds.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
