# Get Wallet Info

{% hint style="info" %}
**API Endpoint**

**POST** [**/client/wallets/view**](https://xpay.stream/client/wallets/view)
{% endhint %}

***

{% hint style="info" %}
**Request Headers:**

Authorization: Bearer [\<access\_token>](https://docs.xpay.stream/authentication-api)

Content-Type: application/json\
\
**Request Body:**

{% code lineNumbers="true" %}

```json
{
    "wallet":"<existing_wallet_uuid>"
}
```

{% endcode %}
{% endhint %}

{% hint style="success" %}
**Success Response**\
You will get under the created wallet details under th&#x65;*`success.data`*

Wallet Address: *`success.data.address.base58`*

Wallet Identifier: *`success.data.uuid`*

**`Example Below:`**

{% code lineNumbers="true" fullWidth="true" %}

```json
{
	"success": {
		"message": "Wallet Fetched",
		"data": {
			"uuid": "6984da12-ca05-4712-b63c-63f3d5460cba",
			"address": {
				"base58": "TNQGnbM1tBYPq87K9cyGrRAoGrfsboUi2N",
				"hex": "41885F116CC866561509309A344B2E1E3EA39225E2"
			},
			"balances": {
				"tokenBalanceRaw": 60000000,
				"tokenBalance": 60,
				"tronBalanceSun": 186027480,
				"tronBalance": 186.02748
			},
			"createdAt": 1695943356186,
			"tag": "<wallet_tag>",
			"username": "<email>",
			"resources": {
				"freeNetLimit": 600,
				"TotalNetLimit": 43200000000,
				"TotalNetWeight": 84632720284,
				"TotalEnergyLimit": 50000000000000,
				"TotalEnergyWeight": 564258050529
			},
			"bandwidth": 600, // Tron Wallet Bandwidth
			"energy": 0       // Tron Wallet Energy
		}
	},
	"uuid": "55a5194e-6eb0-462a-b0fa-70bb88fb6c35"
}
```

{% endcode %}
{% endhint %}

***

{% tabs %}
{% tab title="CURL Example" %}
{% code lineNumbers="true" fullWidth="true" %}

```bash
curl 'https://apis.xpay.stream/client/wallets/view' \
  -H 'Authorization: Bearer <access_token>'         \
  -H 'Content-Type: application/json'               \
  --data-raw '{"wallet":"<existin_wallet_uuid>"}'             
```

{% endcode %}
{% endtab %}

{% tab title="NodeJS Example" %}
{% code lineNumbers="true" %}

```javascript
// npm i cross-fetch
const fetch = require("cross-fetch");

const API_URL = "https://apis.xpay.stream/client/wallets/view";

const method = "POST";

const headers = { 
    "Content-Type": "application/json",
    "Authorization": "Bearer <access_token>"
};

const body = JSON.stringify({
    wallet: "<existing_wallet_uuid>"
});

fetch(API_URL, { headers, body, method })
.then(async res =>  await res.json())
.then(result => {
    if(result.error)
        console.log("Wallet Fetch Error", result);
    if(result.success)
        console.log("Wallet Fetched", result);
})
.catch((err) => {
    console.error("Wallet Fetch API Exception", err);
});
```

{% endcode %}

{% endtab %}
{% endtabs %}
