> For the complete documentation index, see [llms.txt](https://walletcloud.gitbook.io/walletcloud-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://walletcloud.gitbook.io/walletcloud-api/api-1/transaction.md).

# Transaction

## Send Transaction

<mark style="color:green;">`POST`</mark> `https://api.walletcloud.app/wallet/:walletId/send`

This endpoint allows you to send transactions to the blockchain. To begin sending transactions out of your wallet, your wallet has to have a wallet balance that is at least the minimum balance of the wallet. For ETH and all the supported tokens in the Ethereum ecosystem, the minimum wallet balance is **0.005ETH**. Any request to send a transaction when the wallet balance is less than the minimum will be rejected.&#x20;

#### Path Parameters

| Name                                       | Type   | Description                                |
| ------------------------------------------ | ------ | ------------------------------------------ |
| walletId<mark style="color:red;">\*</mark> | string | ID of the wallet to send transaction from. |

#### Headers

| Name                                        | Type   | Description                                       |
| ------------------------------------------- | ------ | ------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | string | Api key of the wallet to send a transaction from. |

#### Request Body

| Name                                        | Type   | Description                                                                                                  |
| ------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------ |
| amount<mark style="color:red;">\*</mark>    | number | Amount of cypto to send.                                                                                     |
| recipient<mark style="color:red;">\*</mark> | string | <p>Destination address.<br><strong>Example</strong>: <em>0x9086b928658D473380E5c6f80FC5419e8fd98e60</em></p> |
| coin<mark style="color:red;">\*</mark>      | string | Token or cypto symbol to be sent. Example: eth, usdt , usdc, btc, etc.                                       |

{% tabs %}
{% tab title="200 Transaction sent successfully." %}

```javascript
{
    "status": true,
    "message": "Transaction sent successfully!",
    "data": {
        "transactionId": "3eb7ab75-70d9-4c1a-9908-3a10dc260efe",
        "amount": 0.0005,
        "hash": "0xf84f79fa083b54a16db5d06f0929fb0f1a20d4d1e01284a8299970645edf50c2",
        "sender": "0xc7a02a762Ab0175c80249b5d4f703Bb01A9f053B",
        "receiver": "0x9086b928658D473380E5c6f80FC5419e8fd98e60",
        "currency": "eth",
        "walletId": "14b7efd3-fae6-4cef-ae21-589d9d19d784",
        "blockchain": "Ethereum",
        "network": "testnet",
        "blockNumber": 0,
        "confirmations": 0,
        "status": "SENT",
        "type": "OUTGOING",
        "createdAt": 1623686600533,
        "updatedAt": 1623686600533
    }
}
```

{% endtab %}

{% tab title="400 Transaction could not be sent." %}

```javascript
{
    "status": false,
    "message": "Transaction could not be sent.",
    "data": "Recipient address is invalid."
}
```

{% endtab %}
{% endtabs %}

## Get Transaction

<mark style="color:blue;">`GET`</mark> `https://api.walletcloud.app/wallet/:walletId/transaction/:transactionId`

Get a wallet transaction.

#### Path Parameters

| Name                                            | Type   | Description                                      |
| ----------------------------------------------- | ------ | ------------------------------------------------ |
| walletId<mark style="color:red;">\*</mark>      | string | ID of the wallet to retrieve a transaction from. |
| transactionId<mark style="color:red;">\*</mark> | string | Transaction ID of the transaction.               |

#### Headers

| Name                                        | Type   | Description                                      |
| ------------------------------------------- | ------ | ------------------------------------------------ |
| x-api-key<mark style="color:red;">\*</mark> | string | Api key of the wallet from the wallet dashboard. |

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

```javascript
{
    "status": true,
    "message": "Transaction successfully retrieved!",
    "data": {
        "amount": 0.0005,
        "receiver": "0x9086b928658D473380E5c6f80FC5419e8fd98e60",
        "currency": "eth",
        "status": "SENT",
        "date": "Monday, June 14, 2021 6:09 PM",
        "walletId": "14b7efd3-fae6-4cef-ae21-589d9d19d784",
        "transactionId": "3d4d511d-e25f-4ffb-9dfe-b3d688a8ed98",
        "network": "testnet",
        "sender": "0xc7a02a762Ab0175c80249b5d4f703Bb01A9f053B",
        "hash": "0xd78353e8ca2885e0f156cff6929b86f7aceef08cc09ea184d5bfd8b5939c7f69",
        "blockchain": "Ethereum",
        "type": "OUTGOING"
    }
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
    "status": false,
    "message": "Transaction could not be retrieved",
    "data": {}
}
```

{% endtab %}
{% endtabs %}

## List Transactions

<mark style="color:blue;">`GET`</mark> `https://api.walletcloud.app/wallet/:walletId/transactions`

Retrieve all transactions from a wallet.&#x20;

#### Path Parameters

| Name                                       | Type   | Description                                 |
| ------------------------------------------ | ------ | ------------------------------------------- |
| walletId<mark style="color:red;">\*</mark> | string | ID of wallet to retrieve transactions from. |

#### Query Parameters

| Name        | Type    | Description                                                                                                                                                                                      |
| ----------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| nextItemKey | string  | The start key of the next batch of transactions to fetch.                                                                                                                                        |
| limit       | integer | <p>Maximum number of results to return per request. If the result set is truncated, use <code>nextItemKey</code> to get the next batch.<br><br><strong>Default</strong>: <strong>25</strong></p> |

#### Headers

| Name                                        | Type   | Description                                          |
| ------------------------------------------- | ------ | ---------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | string | Api key of the wallet to retrieve transactions from. |

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

```javascript
{
    "status": true,
    "message": "Transactions successfully retrieved!",
    "data": {
        "transactions": [
            {
                "amount": 0.0015,
                "receiver": "0x9086b928658D473380E5c6f80FC5419e8fd98e60",
                "currency": "eth",
                "status": "SENT",
                "date": "Monday, June 14, 2021 1:32 AM",
                "walletId": "14b7efd3-fae6-4cef-ae21-589d9d19d784",
                "transactionId": "8f887520-8683-4a89-91e2-92f385021a13",
                "network": "testnet",
                "sender": "0xc7a02a762Ab0175c80249b5d4f703Bb01A9f053B",
                "hash": "0xc990eca6faf2210f511039178e69724d2d4161f7c689aaf1ce6583edc6118e98",
                "blockchain": "Ethereum",
                "type": "OUTGOING"
            },
            {
                "amount": 0.0005,
                "receiver": "0x9086b928658D473380E5c6f80FC5419e8fd98e60",
                "currency": "eth",
                "status": "SENT",
                "date": "Monday, June 14, 2021 8:30 PM",
                "walletId": "14b7efd3-fae6-4cef-ae21-589d9d19d784",
                "transactionId": "466f241b-a2f3-454f-9318-b4a475a67fa4",
                "network": "testnet",
                "sender": "0xc7a02a762Ab0175c80249b5d4f703Bb01A9f053B",
                "hash": "0xe2be4b07692c5a3acdfd6f0bbe7b727392de8fce5c3b7a0af958bddc7a4d7109",
                "blockchain": "Ethereum",
                "type": "OUTGOING"
            }
        ],
        "nextItemKey": "eyJ3YWxsZXRJZCI6IjE0YjdlZmQzLWZhZTYtNGNlZi1hZTIxLTU4OWQ5ZDE5ZDc4NCIsInRyYW5zYWN0aW9uSWQiOiI0NjZmMjQxYi1hMmYzLTQ1NGYtOTMxOC1iNGE0NzVhNjdmYTQiLCJzdGF0dXMiOiJTRU5UIn0="
    }
}
```

{% endtab %}
{% endtabs %}
