Create Wallet
Create a new Tron or Bitcoin Wallet used for deposits and withdrawals
Success Response
You will get under the created wallet details under thesuccess.data
Wallet Address: success.data.address.base58
Wallet Identifier: success.data.uuid
Sample Below:
{
"success": {
"message": "Wallet Saved",
"data": {
"address": {
"base58": "TYViWxHG5wgnnmCMfVfwTvp3KGkRt4qk7V",
"hex": "41F717E263E541FDB3C69F7F5062D0573EFF8A9760"
},
"username": "<your_email>",
"uuid": "dd249743-22a3-42fb-8d86-3e27287272e2",
"createdAt": 1697182976392,
"tag": "<optional_your_tag>",
"balances": {
"tokenBalanceRaw": 0,
"tokenBalance": 0,
"tronBalanceSun": 0,
"tronBalance": 0
}
}
},
"uuid": "7ac71a3c-7aa2-440c-a379-bcf416fd74e9"
}curl 'https://apis.xpay.stream/client/wallets/save' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>' \
--data-raw '{"tag":"<your_tag>"}' // npm i cross-fetch
const fetch = require("cross-fetch");
const API_URL = "https://apis.xpay.stream/client/wallets/save";
const method = "POST";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <access_token>"
};
const body = JSON.stringify({
tag: "<your_tag>",
lightning: "on" // for BTC Lightning or off for TRON
});
fetch(API_URL, { headers, body, method })
.then(async res => await res.json())
.then(result => {
if(result.error)
console.log("Wallet Creation Error", result);
if(result.success)
console.log("Wallet Created", result);
})
.catch((err) => {
console.error("Wallet Create API Exception", err);
});Last updated