# Get Transactions

## Query Transactions

<mark style="color:blue;">`GET`</mark> `https://api.aquanow.io/accounts/v2/transaction`

To view example requests for this endpoint, visit Aquanow's [Postman](https://developer.aquanow.io/#42cc9a93-3f51-4a98-8d19-be08227cd98f) documentation.<br>

**Possible query parameter combinations:** \
These are the only combinations that are currently supported. `limit` can be added to any of the combinations below. \
\
\- `txId`\
\
\- `txHash`

-`accountId` +`tag`\
\
-`accountId` + `address` + (`startTime` + `endTime`) optional

-`accountId` +`startTime` + `endTime`

-`accountId` +`transactionType`\
\
If the combination of the query parameters does not match one of the above, a 200 response will be returned with an empty data array.&#x20;

#### Query Parameters

| Name            | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                          |
| --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| limit           | Number | <p>e.g.,<code>2</code></p><p>Limit the number of listed transactions. Must not be greater than 1000. </p>                                                                                                                                                                                                                                                                                                                            |
| transactionType | String | <p>e.g., <code>Withdraw</code><br>Filter by a supported transaction type.</p><p>One of <code>Conversion, Credit, Debit, Deposit, Internal\_Credit, Internal\_Debit, Withdraw</code></p>                                                                                                                                                                                                                                              |
| startTime       | Number | <p>e.g., <code>1569533825636</code></p><p>UTC timestamp in milliseconds. Specify the start time of transactions. If this is specified, <code>endTime</code> needs to be specified as well. </p>                                                                                                                                                                                                                                      |
| endTime         | Number | <p>e.g., <code>1572976325459</code></p><p>UTC timestamp in milliseconds. Specify the end time of transactions. </p><p>If this is specified, <code>startTime</code> needs to be specified as well. </p>                                                                                                                                                                                                                               |
| txId            | String | <p>e.g., <code>04cbakkdb3-795f-41fb-a70e-5df278cc4386</code></p><p>Specify the <code>txId</code> if you wish to get a single transaction by its ID. Not to be confused with <code>txHash</code>.</p>                                                                                                                                                                                                                                 |
| txHash          | String | <p>e.g.,<code>70a867671a6e01e91f5888d800d3978e2ec9aec6770740572a0a485b7d4b6629</code></p><p>Specify the <code>txHash</code> (transactions hash) to get the corresponding transactions.</p><p></p><p><mark style="color:orange;">NOTE:</mark> This will only grab a transaction hash if it is a <code>txHash</code> associated with one of your transactions. It does <strong>NOT</strong> grab blockchain transaction hash data.</p> |
| address         | String | <p>e.g., <code>0x25F437f5fb89743D8bEccce3d348e898944DA832</code></p><p>Specify the associated address to get the corresponding transactions. You can optionally add <code>startTime</code> and <code>endTime</code> as well.</p>                                                                                                                                                                                                     |
| tag             | String | <p>e.g., <code>client</code></p><p>Specify the tag to get the corresponding transactions.</p>                                                                                                                                                                                                                                                                                                                                        |

#### Headers

| Name                                          | Type   | Description                                                                                                                                                        |
| --------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| x-api-key<mark style="color:red;">\*</mark>   | String | <p><code>{{x-api-key}}</code></p><p>API Auth Key</p>                                                                                                               |
| x-signature<mark style="color:red;">\*</mark> | String | <p><code>32c92460f65cbb78d0eaf9a4361fb6b0a2bb8bb4c40f531e9974a0afc12d9a328b5ff621a544d242ee9ba1dfa799c85a</code></p><p>Signature created using your API secret</p> |
| x-nonce<mark style="color:red;">\*</mark>     | String | <p><code>1657731573930</code></p><p>Timestamp in millisecond</p>                                                                                                   |

{% tabs %}
{% tab title="200: OK Get transactions" %}
Returns an array of [TransactionV2Object](https://docs.aquanow.io/aquanow/legacy/data-objects-and-statuses/transaction-objects#transactionv2object).

```json
{
  "pagination": {
    "startsAfter": "",
    "limit": 1000
  },
  "data": [
    {
      "quantity": 299.99999,
      "networkType": "eth",
      "isAutopilotAddress": false,
      "accountId": "CA1264810R",
      "bankInfo": {},
      "originUser": "helloWorld",
      "txId": "d1b41951-adc8-4ef4-9038-ac67ab70a05b",
      "symbol": "USDT",
      "txHash": "0xa8e1df18e8790b62f60ddc45b738b4116e8f298f0q",
      "createdAt": 1738096477410,
      "address": "0xD0795f990d484a461757f41723Q77",
      "transactionType": "WITHDRAW",
      "updatedAt": 1738096477410,
      "grossQuantity": 300,
      "username": "helloWorld",
      "tag": "my tag",
      "itemDateTime": 1738096477408,
      "adminApproval": "PROCESSING"
    },
    {
      "quantity": 10,
      "networkType": "eth",
      "isAutopilotAddress": false,
      "accountId": "CA1264810R",
      "bankInfo": {},
      "txId": "f4fe4074-f2ca-47b7-b480-809656d3ad82",
      "symbol": "USDT",
      "createdAt": 1733961689977,
      "address": "0xD0795f990da265484a461757f40723B77",
      "transactionType": "WITHDRAW",
      "updatedAt": 1733961689977,
      "grossQuantity": 10.00001,
      "username": "helloWorld",
      "itemDateTime": 1733961689976,
      "adminApproval": "PROCESSING"
    },
    {
      "quantity": 1.099995,
      "networkType": "btc",
      "isAutopilotAddress": false,
      "accountId": "CA1264810R",
      "bankInfo": {},
      "originUser": "helloWorld",
      "txId": "704bfc2b-f420-44q2-97cd-c71337712f39",
      "symbol": "BTC",
      "createdAt": 1733960913880,
      "address": "mwQB2Cd5GJsi1dQvppJ91YJZkPZ",
      "transactionType": "WITHDRAW",
      "updatedAt": 1733960913880,
      "grossQuantity": 1.1,
      "username": "helloWorld",
      "itemDateTime": 1733960913879,
      "adminApproval": "PROCESSING"
    }
  ]
}
```

{% endtab %}

{% tab title="200: OK Get transactions by time range" %}
Returns an array of [TransactionV2Object](https://docs.aquanow.io/aquanow/legacy/data-objects-and-statuses/transaction-objects#transactionv2object).

```json
{
  "pagination": {
    "startsAfter": "",
    "limit": 1000
  },
  "data": [
    {
      "quantity": 10,
      "sourceAddress": "61157ee7-eabb-4d3d-a490-82f80c385bac",
      "networkType": false,
      "isAutopilotAddress": false,
      "accountId": "CA1264810R",
      "bankInfo": {},
      "originUser": "helloWorld",
      "txId": "61057ee7-ea1b-4d3d-a490-82f80c385bac",
      "symbol": "RENDER",
      "txHash": "61057ee7-e111-4d3d-a490-82f80c385bac",
      "createdAt": 1737586672032,
      "address": "7EcDhSYGxXyscszYEp35KHN8vsvAuLKTzXwCFLtV",
      "transactionType": "WITHDRAW",
      "dateSigned": 1737586735897,
      "updatedAt": 1737586735897,
      "grossQuantity": 10,
      "username": "helloWorld",
      "itemDateTime": 1737586672032,
      "adminApproval": "DONE"
    },
    {
      "quantity": 100000,
      "sourceAddress": "s",
      "isAutopilotAddress": false,
      "accountId": "CA1264810R",
      "txId": "2d607da3-22a3-4bd4-948b-570e9e079c34",
      "symbol": "BTC",
      "createdAt": 1737586636052,
      "txTime": 1737586627700,
      "address": "0xD079590da265f5a6A74484a46sd57f41723B77",
      "transactionType": "DEPOSIT",
      "dateSigned": 1737586635852,
      "updatedAt": 1737586636052,
      "username": "helloWorld",
      "itemDateTime": 1737586627700,
      "adminApproval": "DONE"
    },
    {
      "quantity": 0.2,
      "sourceAddress": "7EcDhSYGxXyscszYEp35KHN8vvw3svAuLKTzXwCFLtV",
      "networkType": "sol",
      "isAutopilotAddress": false,
      "accountId": "CA1264810R",
      "bankInfo": {},
      "originUser": "helloWorld",
      "txId": "a1c9f90f-2547-40ab-ba35-1127516f2472",
      "symbol": "USDT",
      "txHash": "a1c9f90f-2547-40ab-ba35-1127516f2472",
      "createdAt": 1737510029825,
      "address": "0xD079590da265f5a6A74484a46sd57f41723B77",
      "transactionType": "WITHDRAW",
      "dateSigned": 1737510073027,
      "updatedAt": 1737510073027,
      "grossQuantity": 0.2,
      "username": "helloWorld",
      "itemDateTime": 1737510029825,
      "adminApproval": "DONE"
    },
    {
      "quantity": 100,
      "sourceAddress": "s",
      "isAutopilotAddress": false,
      "accountId": "CA1264810R",
      "txId": "0b640077-0d85-4303-a494-2701110d7c79",
      "symbol": "ETH",
      "createdAt": 1737509704446,
      "txTime": 1737509456500,
      "address": "0xD07959asda265f5a6A74484a46s57f41723B77",
      "transactionType": "DEPOSIT",
      "dateSigned": 1737509704197,
      "updatedAt": 1737509704446,
      "username": "helloWorld",
      "itemDateTime": 1737509456500,
      "adminApproval": "DONE"
    }
  ]
}
```

{% endtab %}

{% tab title="200: OK Get transactions by transactionType and limit" %}
Returns an array of [TransactionV2Object](https://docs.aquanow.io/aquanow/legacy/data-objects-and-statuses/transaction-objects#transactionv2object).

```json
{
  "pagination": {
    "startsAfter": "",
    "limit": 1000
  },
  "data": [
    {
      "quantity": 1e-9,
      "isAutopilotAddress": false,
      "symbol": "BTC",
      "createdAt": 1572976325459,
      "address": "CD7iJgfC1BF1a26LuTxAuQ35E5TSPsTsDr",
      "transactionType": "WITHDRAW",
      "updatedAt": 1572976325459,
      "username": "helloWorld",
      "itemDateTime": 1572976325459,
      "adminApproval": "PROCESSING"
    },
    {
      "quantity": 0.01,
      "isAutopilotAddress": false,
      "symbol": "LTC",
      "createdAt": 1569533825636,
      "address": "CD7iJgfC1BF1a26LuTxAuQ35E5TSPsTsDr",
      "transactionType": "WITHDRAW",
      "dateSigned": 1569545162132,
      "updatedAt": 1569545162132,
      "username": "helloWorld",
      "itemDateTime": 1569533825636,
      "adminApproval": "DONE"
    },
    {
      "quantity": 0.01,
      "symbol": "BTC",
      "txHash": "bfdf10c9a7acb10a5d92216470bca9044bbd32bdf442bb89b3bd8f97dcf9c348",
      "updatedAt": 1569533816965,
      "createdAt": 1569533816965,
      "username": "helloWorld",
      "address": "CD7iJgfC1BF1a26LuTxAuQ35E5TSPsTsDr",
      "itemDateTime": 1569533816965,
      "transactionType": "WITHDRAW",
      "adminApproval": "DONE"
    }
  ]
}
```

{% endtab %}

{% tab title="200: OK Get transactions by txId" %}
Returns an array of [TransactionV2Object](https://docs.aquanow.io/aquanow/legacy/data-objects-and-statuses/transaction-objects#transactionv2object).

```json
{
  "data": {
    "quantity": 0.17558213,
    "strategy": "SOR",
    "isAutopilotAddress": true,
    "txId": "04cbadb3-795f-41fb-a70e-5df278cc4386",
    "symbol": "BTC",
    "orderId": "f1e98c7c-c9cd-44ab-b665-52726aaa6a64",
    "txHash": "70a867671a6e01e91f5888d800d3978e2ec9aec6770740572a0a485b7d4b6629",
    "txTime": 1591841077000,
    "createdAt": 1592327455594,
    "fiat": "USD",
    "address": "2NDUK4P74P185KM4YrHCtKjebvsSVtgaHQA",
    "fiatReceived": 1666.63575,
    "transactionType": "DEPOSIT",
    "dateSigned": 1592327424982,
    "tradeSide": "sell",
    "updatedAt": 1592327455594,
    "username": "helloWorld",
    "tag": "superman",
    "itemDateTime": 1592327424982,
    "adminApproval": "DONE"
  }
}
```

{% endtab %}

{% tab title="200: OK Get transactions by txHash" %}
Returns an array of [TransactionV2Object](https://docs.aquanow.io/aquanow/legacy/data-objects-and-statuses/transaction-objects#transactionv2object).

```json
{
  "pagination": {
    "startsAfter": "",
    "limit": 1000
  },
  "data": [
    {
      "quantity": 0.17558213,
      "strategy": "SOR",
      "isAutopilotAddress": true,
      "txId": "04cbadb3-795f-41fb-a70e-5df278cc4386",
      "txHash": "70a867671a6e01e91f5888d800d3978e2ec9aec6770740572a0a485b7d4b6629",
      "symbol": "BTC",
      "orderId": "f1e98c7c-c9cd-44ab-b665-52726aaa6a64",
      "txTime": 1591841077000,
      "createdAt": 1592327455594,
      "fiat": "USD",
      "address": "2NDUK4P74P185KM4YrHCtKjebvsSVtgaHQA",
      "fiatReceived": 1666.63575,
      "transactionType": "DEPOSIT",
      "dateSigned": 1592327424982,
      "tradeSide": "sell",
      "updatedAt": 1592327455594,
      "username": "helloWorld",
      "tag": "superman",
      "itemDateTime": 1592327424982,
      "adminApproval": "DONE"
    }
  ]
}
```

{% endtab %}

{% tab title="200: OK Get transactions by txId and time range" %}
Returns an array of [TransactionV2Object](https://docs.aquanow.io/aquanow/legacy/data-objects-and-statuses/transaction-objects#transactionv2object).

```json
{
  "pagination": {
    "startsAfter": "",
    "limit": 1000
  },
  "data": [
    {
      "quantity": 0.1,
      "isAutopilotAddress": false,
      "txId": "d322d0ea-e3f2-4bdc-99a4-9c98d00cf46e",
      "symbol": "ETH",
      "txHash": "0x5b8a1667242877b9e8707377eda81a2acdfad33f17ee272b9a5dd2ec6c702887",
      "createdAt": 1608609671489,
      "txTime": 1608609668871,
      "address": "0x25F437f5fb89743D8bEccce3d348e898944DA832",
      "transactionType": "DEPOSIT",
      "dateSigned": 1608609671322,
      "updatedAt": 1608609671489,
      "username": "helloWorld",
      "itemDateTime": 1608609668871,
      "adminApproval": "DONE"
    },
    {
      "quantity": 0.1,
      "isAutopilotAddress": true,
      "txId": "a7896c0e-786b-4206-9e18-4c730406deff",
      "orderId": "33c67a61-dc97-4c16-8d02-dae4f5d7ebc1",
      "symbol": "ETH",
      "txHash": "0x10755237859b0098b8fb133c69ec2e752f5599911b4f2abd9caabce71177ff01",
      "createdAt": 1607672964551,
      "txTime": 1607672926506,
      "address": "0x25F437f5fb89743D8bEccce3d348e898944DA832",
      "fiatReceived": 43.06512,
      "transactionType": "DEPOSIT",
      "dateSigned": 1607672930238,
      "updatedAt": 1607672964551,
      "username": "helloWorld",
      "itemDateTime": 1607672926506,
      "adminApproval": "DONE"
    }
  ]
}
```

{% endtab %}

{% tab title="200: OK Get transactions by address" %}
Returns an array of [TransactionV2Object](https://docs.aquanow.io/aquanow/legacy/data-objects-and-statuses/transaction-objects#transactionv2object).

```json
{
  "pagination": {
    "startsAfter": "",
    "limit": 1000
  },
  "data": [
    {
      "quantity": 0.01,
      "isAutopilotAddress": false,
      "txId": "28b673ef-4e5c-43e3-b9a8-310d35b92c6a",
      "symbol": "ETH",
      "txHash": "0x4d2dbf6e4f3d28d464d7fec542a81ca1af2ce289a1e38fd8b7f30ef6d164ec65",
      "createdAt": 1609812611159,
      "txTime": 1609812029169,
      "address": "0x25F437f5fb89743D8bEccce3d348e898944DA832",
      "transactionType": "DEPOSIT",
      "dateSigned": 1609812610971,
      "updatedAt": 1609812611159,
      "username": "helloWorld",
      "itemDateTime": 1609812029169,
      "adminApproval": "DONE"
    },
    {
      "quantity": 0.1,
      "isAutopilotAddress": false,
      "txId": "d322d0ea-e3f2-4bdc-99a4-9c98d00cf46e",
      "symbol": "ETH",
      "txHash": "0x5b8a1667242877b9e8707377eda81a2acdfad33f17ee272b9a5dd2ec6c702887",
      "createdAt": 1608609671489,
      "txTime": 1608609668871,
      "address": "0x25F437f5fb89743D8bEccce3d348e898944DA832",
      "transactionType": "DEPOSIT",
      "dateSigned": 1608609671322,
      "updatedAt": 1608609671489,
      "username": "helloWorld",
      "itemDateTime": 1608609668871,
      "adminApproval": "DONE"
    },
    {
      "quantity": 0.1,
      "isAutopilotAddress": true,
      "txId": "a7896c0e-786b-4206-9e18-4c730406deff",
      "orderId": "33c67a61-dc97-4c16-8d02-dae4f5d7ebc1",
      "symbol": "ETH",
      "txHash": "0x10755237859b0098b8fb133c69ec2e752f5599911b4f2abd9caabce71177ff01",
      "createdAt": 1607672964551,
      "txTime": 1607672926506,
      "address": "0x25F437f5fb89743D8bEccce3d348e898944DA832",
      "fiatReceived": 43.06512,
      "transactionType": "DEPOSIT",
      "dateSigned": 1607672930238,
      "updatedAt": 1607672964551,
      "username": "helloWorld",
      "itemDateTime": 1607672926506,
      "adminApproval": "DONE"
    },
    {
      "quantity": 0.05,
      "isAutopilotAddress": true,
      "txId": "b0f44606-3f7f-4cc4-91f1-2eb7894a5eab",
      "orderId": "a9a9e1b8-81a6-420f-bea3-40e2367178d3",
      "symbol": "ETH",
      "txHash": "0x6484e70fb9b2a5e9f460654716f0a221314393877f0b56d34065a4bab07ac21b",
      "createdAt": 1607671064116,
      "txTime": 1607671005021,
      "address": "0x25F437f5fb89743D8bEccce3d348e898944DA832",
      "fiatReceived": 21.53256,
      "transactionType": "DEPOSIT",
      "dateSigned": 1607671029689,
      "updatedAt": 1607671064116,
      "username": "helloWorld",
      "itemDateTime": 1607671005021,
      "adminApproval": "DONE"
    }
  ]
}
```

{% endtab %}

{% tab title="200: OK Get transactions by tag" %}
Returns an array of [TransactionV2Object](https://docs.aquanow.io/aquanow/legacy/data-objects-and-statuses/transaction-objects#transactionv2object).

```json
{
  "pagination": {
    "startsAfter": "",
    "limit": 1000
  },
  "data": [
    {
      "quantity": 200,
      "isAutopilotAddress": false,
      "txId": "7016b12c-1779-4655-b781-c07af98def22",
      "symbol": "EUR",
      "createdAt": 1596492108673,
      "txTime": 2020,
      "address": "NDgyNjg",
      "transactionType": "DEPOSIT",
      "dateSigned": 1596492108515,
      "updatedAt": 1596492108673,
      "username": "helloWorld",
      "tag": "iban",
      "itemDateTime": 1596492108515,
      "adminApproval": "DONE"
    },
    {
      "quantity": 69,
      "isAutopilotAddress": false,
      "txId": "a4493cc7-c78d-4fa1-a485-3615cedae600",
      "symbol": "USD",
      "createdAt": 1594681087399,
      "txTime": 2020,
      "address": "NDgyNzA",
      "transactionType": "DEPOSIT",
      "dateSigned": 1594681087259,
      "updatedAt": 1594681087399,
      "username": "helloWorld",
      "tag": "iban",
      "itemDateTime": 1594681087259,
      "adminApproval": "DONE"
    },
    {
      "quantity": 100,
      "isAutopilotAddress": false,
      "txId": "b0779dfe-9390-4830-a76c-60df74eb61df",
      "symbol": "EUR",
      "createdAt": 1596492108717,
      "txTime": 2020,
      "address": "NDgyNjg",
      "transactionType": "DEPOSIT",
      "dateSigned": 1596492108577,
      "updatedAt": 1596492108717,
      "username": "helloWorld",
      "tag": "iban",
      "itemDateTime": 1596492108577,
      "adminApproval": "DONE"
    },
    {
      "quantity": 500000,
      "isAutopilotAddress": false,
      "txId": "fa6b06e2-2a48-4304-b4be-2c6d3f0ffcac",
      "symbol": "EUR",
      "createdAt": 1596060108559,
      "txTime": 2020,
      "address": "NDgyNjg",
      "transactionType": "DEPOSIT",
      "dateSigned": 1596060108405,
      "updatedAt": 1596060108559,
      "username": "helloWorld",
      "tag": "iban",
      "itemDateTime": 1596060108405,
      "adminApproval": "DONE"
    }
  ]
}
```

{% endtab %}

{% tab title="400: Bad Request Get transactions if the params are invalid" %}
If `startTime` is passed in without an `endTime`:

```json
{
    "errors": [
        {
            "id": "46372ae1-39c9-47bf-88b1-we24n461876",
            "message": "must have required property 'endTime'"
        }
    ]
}
```

If the params are invalid:&#x20;

```json
{
    "errors": [
        {
            "id": "76372ae1-39c9-47bf-88b1-7418e560c948",
            "message": "Limit exceeds the maximum of 1000"
        }
    ]
}
```

If additional properties that are not defined above are passed in:

```json
{
    "errors": [
        {
            "id": "76369gt3-39c9-47bf-88b1-sh653-8hg5f62147",
            "message": "must NOT have additional properties"
        }
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Get transactions if api-key is invalid" %}

```json
{
  "errors": [
    {
      "id": "76372ae1-39c9-47bf-88b1-7418e560c948",
      "message": "Unauthorized"
    }
  ]
}
```

{% endtab %}

{% tab title="500: Internal Server Error Get transactions returns a generic server error" %}

```json
{
  "errors": [
    {
      "id": "76372ae1-39c9-47bf-88b1-7418e560c948",
      "message": "There was a problem with grabbing data, please contact support"
    }
  ]
}
```

{% endtab %}
{% endtabs %}
