# Get Transactions

This API allows you to withdraw funds from a sub-user's wallet.

<mark style="color:green;">`POST`</mark> `https://wallet-api.xaigate.com/api/v1/getTransactions`

**Parameter content type: application/json**

#### Request Body

| Name                                     | Type   | Description                          |
| ---------------------------------------- | ------ | ------------------------------------ |
| apiKey<mark style="color:red;">\*</mark> | String | fdda9f03-6409-43eb-a6ef-e1f6cea71c2e |
| userId<mark style="color:red;">\*</mark> | String | 097f35dd-a806-43ef-ab0d-f121cb11567e |

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

```javascript
{
    "name"="Wilson",
    "owner": {
        "id": "sha7891bikojbkreuy",
        "name": "Samuel Passet",
    "species": "Dog",}
    "breed": "Golden Retriever",
}
```

{% endtab %}

{% tab title="401 Bad Request" %}

{% endtab %}
{% endtabs %}

### Request Parameter <a href="#request-parameter" id="request-parameter"></a>

| Parameter                                         | Type   | Sample Value |
| ------------------------------------------------- | ------ | ------------ |
| apiKey <mark style="color:red;">(required)</mark> | String | ​            |
| userId <mark style="color:red;">(required)</mark> | String | ​            |

### Example Value <a href="#example-value-1" id="example-value-1"></a>

```
{
  "apiKey": "033e15ee-3de7-4a93-800a-ae131b73c237",
  "userId": "b3e36e1a-296f-4198-bda1-180c51aff14a"
}
```

### Response (200 Ok - https status code) <a href="#response-200-ok-https-status-code" id="response-200-ok-https-status-code"></a>

| Response   | Type  | Sample Value |
| ---------- | ----- | ------------ |
| results    | Array | ​Item List   |
| total      | Int   | ​            |
| size       | Int   |              |
| totalPages | Int   |              |
| page       | Int   |              |

### Item <a href="#response-200-ok-https-status-code" id="response-200-ok-https-status-code"></a>

| Response        | Type   | Sample Value |
| --------------- | ------ | ------------ |
| id              | String | ​            |
| txid            | String | ​            |
| explorerUrl     | String |              |
| coin            | String |              |
| walletId        | String |              |
| sentAddress     | String |              |
| receivedAddress | String |              |
| amount          | String |              |
| confirmations   | Int    |              |
| date            | String |              |
| networkFee      | String |              |
| status          | String |              |
| type            | String |              |
| userId          | String |              |
| errorMessage    | String |              |

### Example Value <a href="#example-value-1" id="example-value-1"></a>

```
{
  "results": [
    {
      "id": "9f715070-cfd1-4aac-894a-f7e205729888",
      "txid": "0x9daacda4d233a5066ce8947636a3bd52632b7e9a571eefcf07b8cbc588f9ea40",
      "explorerUrl": "https://sepolia.etherscan.io/tx/0x9daacda4d233a5066ce8947636a3bd52632b7e9a571eefcf07b8cbc588f9ea40",
      "merchantId": "16",
      "coin": "ETH",
      "walletId": "f70b0cbb-d86f-4bb8-a75f-578fbd201f35",
      "sentAddress": "d5a74197-880e-4b41-9955-7e548782d513",
      "receivedAddress": "0xD72F3aF2C1DaB33780ddd10e0d826e70598E4fe7",
      "amount": "0.048700001090765",
      "confirmations": 1,
      "date": "2023-12-19T16:27:43.754Z",
      "networkFee": "0.0013000001199543476",
      "status": "success",
      "userId": null,
      "type": "withdraw",
      "errorMessage": null
    },
    {
      "id": "0xb68759a6c162ce6b3381098cd4048c090e5bebe905914fa4cf99a189fdef320b",
      "txid": "0xb68759a6c162ce6b3381098cd4048c090e5bebe905914fa4cf99a189fdef320b",
      "explorerUrl": "https://sepolia.etherscan.io/tx/0xb68759a6c162ce6b3381098cd4048c090e5bebe905914fa4cf99a189fdef320b",
      "merchantId": "16",
      "coin": "ETH",
      "walletId": "f70b0cbb-d86f-4bb8-a75f-578fbd201f35",
      "sentAddress": "0xd72f3af2c1dab33780ddd10e0d826e70598e4fe7",
      "receivedAddress": "0x529f23b8f62091ba4429560a89dd953ab892aa93",
      "amount": "0.05",
      "confirmations": 1,
      "date": "2023-12-19T16:25:50.080Z",
      "networkFee": "null",
      "status": "success",
      "userId": null,
      "type": "deposit",
      "errorMessage": null
    }
  ],
  "total": 2,
  "size": 20,
  "totalPages": 1,
  "page": 0
}
```

​
