# 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>](/authentication-api.md)

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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xpay.stream/wallets/get-wallet-info.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
