Wallet Get

Read the addresses and balances of a user's wallet across every supported network.

POST /api/wallet/get

Returns the API key user's wallet — addresses per network and the latest known balance for each asset. Use it to power dashboards, deposit screens, and pre-flight checks before a transfer or payout.

Balances are read from Hodle's synced view — the same numbers the wallet UI shows. To force a fresh on-chain read, pass sync: true.

Request

The body is empty unless you want to force a fresh sync. The user is identified from the API key.

curl --request POST \
  --url https://api.hodle.com.br/api/wallet/get \
  --header "Authorization: Bearer $API_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "sync": false }'
const res = await fetch('https://api.hodle.com.br/api/wallet/get', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HODLE_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ sync: false }),
})
const data = await res.json()
import os, requests

res = requests.post(
    "https://api.hodle.com.br/api/wallet/get",
    headers={
        "Authorization": f"Bearer {os.environ['HODLE_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={"sync": False},
)
data = res.json()

Parameters

FieldTypeRequiredDescription
syncbooleanNoIf true, fetches a fresh balance from each chain before returning. Default false.

Response

200 OK
{
  "success": true,
  "data": {
    "userId": "65f1a83b6b7c2b001f3c9e21",
    "addresses": {
      "polygon": "0x4b1f...c9a2",
      "base":    "0x4b1f...c9a2",
      "tron":    "TQHvP...kZ8",
      "liquid":  "lq1qq...nx9",
      "spark":   "sp1q...3kf"
    },
    "balances": [
      { "network": "polygon", "asset": "USDT",  "amount": "182.45" },
      { "network": "base",    "asset": "USDC",  "amount": "0.00"   },
      { "network": "tron",    "asset": "USDT",  "amount": "0.00"   },
      { "network": "liquid",  "asset": "DEPIX", "amount": "0.00"   },
      { "network": "liquid",  "asset": "LBTC",  "amount": "0.00018" },
      { "network": "spark",   "asset": "USDB",  "amount": "0.00"   }
    ],
    "syncedAt": "2026-05-09T22:14:00.000Z"
  }
}
FieldTypeDescription
addressesobjectReceive addresses per network. EVM networks share the same smart-account address.
balancesarrayOne row per (network, asset) the user has ever held.
syncedAtstringISO timestamp of the last successful chain read.

Networks and assets

NetworkAsset(s)Notes
polygonUSDT (ERC-20)Smart account, gas sponsored.
baseUSDCSmart account, gas sponsored.
tronUSDT (TRC-20)Energy + bandwidth covered by Hodle.
liquidLBTC, DEPIXL-BTC and DEPIX live on the same Liquid descriptor.
sparkUSDBSelf-custodial Spark wallet used for the Lightning ↔ PIX flow.

Errors

401 — missing or invalid API key
{ "success": false, "error": "Unauthorized" }
404 — wallet not yet provisioned
{ "success": false, "error": "Wallet not found" }

If the user has just been created and you have not called POST /api/wallet/create yet, this endpoint returns 404.