# Get Transactions

## Query Transactions

<mark style="color:blue;">`GET`</mark> `https://api.aquanow.io/accounts/v1/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`

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

-`startTime` + `endTime`

-`transactionType`\
\
If the combination of the query parameters does not match one of the above, a generic 500 response will be returned.&#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 [TransactionObject](https://docs.aquanow.io/aquanow/data-objects-and-statuses/transaction-objects#transactionobject).

```json
[
  {
      "quantity": 0.01,
      "sourceAddress": "bc1qxk904wl2urmfpapnf875wy5f3ns682xtxg6vqq",
      "networkType": "btc",
      "isAutopilotAddress": false,
      "accountId": "CA1000051R",
      "bankInfo": {},
      "originUser": "helloWorldUser",
      "txId": "185fb322-ee9a-49dc-8a22-fc9c7357e426",
      "symbol": "BTC",
      "txHash": "60d68a8f2edd770f913c41cce4bb44c73feb31fc69c6833105a6001dddab4410",
      "createdAt": 1712611540332,
      "address": "bc1q8k5508tfz299v7ywxj8j4g4p9hkn6n06xndv0d",
      "transactionType": "WITHDRAW",
      "dateSigned": 1712613947184,
      "updatedAt": 1712613967137,
      "networkFee": 2.1e-7,
      "username": "helloWorld",
      "itemDateTime": 1712611540325,
      "adminApproval": "DONE"
  },
  {
      "quantity": 0.9,
      "sourceAddress": "0x2E4b48f88Fb1a0A79B6173C53dAd5678dC894B59",
      "networkType": "eth",
      "isAutopilotAddress": false,
      "accountId": "CA1000049R",
      "bankInfo": {},
      "originUser": "helloWorldUser",
      "txId": "316eb842-2686-49ea-9835-572797ac472b",
      "symbol": "ETH",
      "txHash": "0x133bf0a2c26126b87493101443cccee0ceab7e5d34a853d75888a95708816ad4",
      "createdAt": 1710968046176,
      "address": "0xEE506212EE33ac1ac66D56e9Ea5D5866e8C7168e",
      "transactionType": "WITHDRAW",
      "dateSigned": 1712614282865,
      "updatedAt": 1712614287013,
      "networkFee": 0.09,
      "username": "helloWorld",
      "itemDateTime": 1710968046174,
      "adminApproval": "DONE"
  },
]
```

{% endtab %}

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

```json
[
    {
        "quantity": 0.01,
        "isAutopilotAddress": false,
        "symbol": "BTC",
        "orderId": "N/A",
        "txHash": "asdf",
        "txTime": 1569533338550,
        "createdAt": 1569533339142,
        "address": "asdfgg",
        "fiatReceived": "N/A ",
        "transactionType": "DEPOSIT",
        "dateSigned": 1569533338550,
        "updatedAt": 1569533339142,
        "username": "helloWorld",
        "itemDateTime": 1569533335000,
        "adminApproval": "DONE"
    },
    {
        "quantity": 1,
        "isAutopilotAddress": false,
        "symbol": "ETH",
        "orderId": "N/A",
        "txHash": "asdddddfff",
        "txTime": 1569533360187,
        "createdAt": 1569533359148,
        "address": "N/A",
        "fiatReceived": "N/A ",
        "transactionType": "DEPOSIT",
        "dateSigned": 1569533360187,
        "updatedAt": 1569533359148,
        "username": "helloWorld",
        "itemDateTime": 1569533355000,
        "adminApproval": "DONE"
    },
    {
        "quantity": 1,
        "currencyTag": "asdf",
        "isAutopilotAddress": false,
        "symbol": "LTC",
        "orderId": "N/A",
        "txHash": "asdf",
        "txTime": 1569533383967,
        "createdAt": 1569533382954,
        "address": "N/A",
        "fiatReceived": "N/A ",
        "transactionType": "DEPOSIT",
        "dateSigned": 1569533383967,
        "updatedAt": 1569533382954,
        "username": "helloWorld",
        "itemDateTime": 1569533380000,
        "adminApproval": "DONE"
    },
    {
        "quantity": 10,
        "isAutopilotAddress": false,
        "symbol": "USD",
        "orderId": "N/A",
        "txHash": "sgfsdgf",
        "txTime": 1569533598552,
        "createdAt": 1569533599222,
        "address": "N/A",
        "fiatReceived": "N/A ",
        "transactionType": "DEPOSIT",
        "dateSigned": 1569533598563,
        "updatedAt": 1569533599222,
        "username": "helloWorld",
        "itemDateTime": 1569533586000,
        "adminApproval": "DONE"
    },
    {
        "quantity": 10,
        "isAutopilotAddress": false,
        "symbol": "CAD",
        "orderId": "N/A",
        "txHash": "dsgedrfg",
        "txTime": 1569533662396,
        "createdAt": 1569533663059,
        "address": "N/A",
        "fiatReceived": "N/A ",
        "transactionType": "WITHDRAW",
        "dateSigned": 1569533662396,
        "updatedAt": 1569533663059,
        "username": "helloWorld",
        "itemDateTime": 1569533652000,
        "adminApproval": "DONE"
    },
    {
        "quantity": 0.01,
        "symbol": "BTC",
        "txHash": "0b5944c49dcb6feee4b7fefecb7ebd01e4d3ba7de0d527e96baf126072229310",
        "updatedAt": 1569533803546,
        "createdAt": 1569533803546,
        "username": "helloWorld",
        "address": "CD7iJgfC1BF1a26LuTxAuQ35E5TSPsTsDr",
        "itemDateTime": 1569533803546,
        "transactionType": "WITHDRAW",
        "adminApproval": "DONE",
    },
    {
        "quantity": 0.01,
        "symbol": "BTC",
        "txHash": "bfdf10c9a7acb10a5d92216470bca9044bbd32bdf442bb89b3bd8f97dcf9c348",
        "updatedAt": 1569533816965,
        "createdAt": 1569533816965,
        "username": "helloWorld",
        "address": "CD7iJgfC1BF1a26LuTxAuQ35E5TSPsTsDr",
        "itemDateTime": 1569533816965,
        "transactionType": "WITHDRAW",
        "adminApproval": "DONE"
    },
    {
        "quantity": 0.01,
        "isAutopilotAddress": false,
        "symbol": "LTC",
        "createdAt": 1569533825636,
        "address": "CD7iJgfC1BF1a26LuTxAuQ35E5TSPsTsDr",
        "transactionType": "WITHDRAW",
        "isCompleted": false,
        "dateSigned": 1569545162132,
        "updatedAt": 1569545162132,
        "networkFee": 0,
        "username": "helloWorld",
        "itemDateTime": 1569533825636,
        "adminApproval": "DONE"
    },
    {
        "quantity": 1e-9,
        "isAutopilotAddress": false,
        "symbol": "BTC",
        "createdAt": 1572976325459,
        "address": "CD7iJgfC1BF1a26LuTxAuQ35E5TSPsTsDr",
        "transactionType": "WITHDRAW",
        "retroActive": true,
        "freeOrNot": true,
        "updatedAt": 1572976325459,
        "networkFee": 0,
        "username": "helloWorld",
        "itemDateTime": 1572976325459,
        "adminApproval": "PROCESSING"
    }
]
```

{% endtab %}

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

```
[
  {
    "quantity": 0.045,
    "grossQuantity": 0.05,
    "networkFee": "0.005"
    "symbol": "BTC",
    "txHash": "3e9839efd0e8b92631648f06c2c32e724b87af194ca05f5a0bbeccc6cbbad98b",
    "updatedAt": 1569964868510,
    "createdAt": 1569964868510,
    "username": "helloWorld",
    "address": "CD7iJgfC1BF1a26LuTxAuQ35E5TSPsTsDr",
    "itemDateTime": 1569964868509,
    "transactionType": "WITHDRAW",
    "adminApproval": "DONE"
  },
  {
    "quantity": 0.95,
    "grossQuantity": 1,
    "networkFee": "0.05"
    "symbol": "BTC",
    "txHash": "a302e62611fc2f3b6736e63eb9f034f45819abe750719693d033209841552b5a",
    "updatedAt": 1569975516918,
    "createdAt": 1569975516918,
    "username": "helloWorld",
    "address": "CD7iJgfC1BF1a26LuTxAuQ35E5TSPsTsDr",
    "itemDateTime": 1569975516917,
    "transactionType": "WITHDRAW",
    "adminApproval": "DONE"
  }
]
```

{% endtab %}

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

```json
[
    {
        "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 [TransactionObject](https://docs.aquanow.io/aquanow/data-objects-and-statuses/transaction-objects#transactionobject).

```json
{
  "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 [TransactionObject](https://docs.aquanow.io/aquanow/data-objects-and-statuses/transaction-objects#transactionobject).

```json
[
  {
    "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 [TransactionObject](https://docs.aquanow.io/aquanow/data-objects-and-statuses/transaction-objects#transactionobject).

```json
[
  {
    "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 [TransactionObject](https://docs.aquanow.io/aquanow/data-objects-and-statuses/transaction-objects#transactionobject).

```json
[
  {
    "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 [TransactionObject](https://docs.aquanow.io/aquanow/data-objects-and-statuses/transaction-objects#transactionobject).

```json
[
  {
    "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`:

<pre><code><strong>{
</strong>    "message": "must have required property 'endTime'"
}
</code></pre>

If the params are invalid:&#x20;

```
{
    "message": "Limit exceeds the maximum of 1000"
}
```

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

```json
{
    "message": "must NOT have additional properties"
}
```

{% endtab %}

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

```
{
    "message": "Unauthorized"
}
```

{% endtab %}

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

```json
{
    "message": "There was a problem with grabbing data, please contact support"
}
```

{% endtab %}
{% endtabs %}
