🛰️
xPay.Stream
  • 📡xPay.Stream
  • 📌Prerequisites
  • Authentication API
  • Wallets
    • Create Wallet
    • Update Wallet
    • Get Wallet Info
    • Search Wallets
  • Billing
    • Create Bill
    • Cancel Bill
    • Get Bill Info
    • Search Bills
  • Transactions
    • 〰️Preview Transaction
    • ✔️Broadcast Transaction
    • 🔎Search Transactions
  • Notifications
    • Webhook
    • Email Alerts
Powered by GitBook
On this page
  1. Wallets

Get Wallet Info

Fetch an existing wallet by its UUID

PreviousUpdate WalletNextSearch Wallets

Last updated 9 months ago

API Endpoint

POST


Request Headers:

Authorization: Bearer

Content-Type: application/json Request Body:

{
    "wallet":"<existing_wallet_uuid>"
}

Success Response You will get under the created wallet details under thesuccess.data

Wallet Address: success.data.address.base58

Wallet Identifier: success.data.uuid

Example Below:

{
	"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"
}

curl 'https://apis.xpay.stream/client/wallets/view' \
  -H 'Authorization: Bearer <access_token>'         \
  -H 'Content-Type: application/json'               \
  --data-raw '{"wallet":"<existin_wallet_uuid>"}'             
// 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);
});

/client/wallets/view
<access_token>