# Getting details of an HD wallet root key

**Request Body - `Content-Type: application/json;charset=utf-8`**

| Parameter | Type   | Required | Description                                                             |
| --------- | ------ | -------- | ----------------------------------------------------------------------- |
| `rootKey` | string | Yes      | Root key generated from the mnemonic.                                   |
| `index`   | number | No       | The starting index of the HD wallet to lookup (*Default: 0*)            |
| `count`   | number | No       | The number of wallet addresses to return for the lookup (*Default: 10*) |

**Response - `200 OK, application/json`**

| Parameter       | Type   | Description                                        |
| --------------- | ------ | -------------------------------------------------- |
| `address`       | list   | A list of addresses with the following parameters: |
| `balance`       | string | The amount of Hycon in the address                 |
| `pendingAmount` | string | The amount of Hycon pending in the address         |
| `index`         | number | Index value of the address in the HD walelt        |

**Response Error Table**

| Status | Error       | Message                    |
| ------ | ----------- | -------------------------- |
| 404    | `NOT_FOUND` | the wallet cannot be found |

POST/api/v1/getHDWalletFromRootKey

**Example request body**

```
{
	"rootKey": "xprv9s21ZrQH143K4AS5aB6u92QhhFNraGRKE9kHUdtkndLLLu4V5CKHugyAGVgs7R38y8gTG2t",
    "index": 0,
    "count": 2
}
```

**Example request**

```
$ curl -X POST http://localhost:2442/api/v1/getHDWalletFromRootKey \
    -H 'Content-Type: application/json;charset=utf-8' \
    -d '{
	  "rootkey": "xprv9s21ZrQH143K4AS5aB6u92QhhFNraGRKE9kHUdtkndLLLu4V5CKHugyAGVgs7R38y8gTG2t",
      "index": 0,
      "count": 2
    }'
```

**Response (Success)**

```
[
    {
        "address": "H34kywGZSMUdPSCa3rqJLeHaRqigS3Bnt",
        "balance": "0",
        "pendingAmount": "0",
        "index": 0
    },
    {
        "address": "H2zTphq19pxGWHgHyitKcXgjH9S37JB9L",
        "balance": "0",
        "pendingAmount": "0",
        "index": 1
    }
]
```
