Skip to main content

Address Management

Per-client blockchain addresses are not managed by a separate "address management" API. They are produced and rotated as a side effect of the deposit / withdraw flows and listed in the wallet UI:

  • A new deposit address is generated by create_address for the requested token_network. Some chains (Ethereum, Tron, Binance Smart Chain) use the technical address model — one per-client address per token; others use a hot-wallet-with-memo model.
  • The WalletAddresses admin page lists every address linked to the wallet, with type, observed on-chain amount, and activity totals. See Wallets and Addresses admin.
  • Operational addresses (hot wallets, commission, reserve) are managed through System Addresses admin.

There is no archive / unlink endpoint for client addresses — old addresses stay attached to the wallet for ledger continuity.

Listing addresses (list_addresses)

Authenticated wallet clients read addresses with GET /trex/v1/wallet/list_addresses. The token_network query parameter is optional:

  • with token_network={id}, the response is filtered to address types compatible with that terminal's transport network and may include technical state;
  • without token_network, the response contains all addresses attached to the wallet and does not include technicalState, even if includeTechnicalState=true is sent.
GET /trex/v1/wallet/list_addresses?token_network=2
Cookie: sid=...
{
"result": [
{
"id": "24529041",
"address": "0x0a733ec4476233066359864c6a9b547104fa5167",
"typeAddress": "ETH_EOA",
"technicalState": null
}
],
"error": null
}

Technical state for source-address selection

For crypto terminals (Base, ERC20, TRC20, BEP20, EVM, Jetton) the same endpoint can include a per-address technical on-chain state by passing includeTechnicalState=true. This is meant for the "send from a specific address" UX — for example, showing the user which of their own technical addresses currently holds enough of the asset and enough native coin to cover network fees, without making them open an external block explorer.

GET /trex/v1/wallet/list_addresses?token_network=2&includeTechnicalState=true
Cookie: sid=...
{
"result": [
{
"id": "24529041",
"address": "0x0a733ec4476233066359864c6a9b547104fa5167",
"typeAddress": "ETH_EOA",
"technicalState": {
"tokenNetwork": 2,
"typeNetwork": "Ethereum",
"typeContract": "ERC20",
"currency": "USDT",
"technicalAmount": 123.45,
"nativeTokenNetwork": 1,
"nativeTypeContract": "Base",
"nativeCurrency": "ETH",
"nativeTechnicalAmount": 0.0048,
"hotApproved": false,
"sourceTransferSupported": true,
"timetickUpdate": "1700000000000000",
"nativeTimetickUpdate": "1700000000000000"
}
}
],
"error": null
}

technicalState carries:

  • tokenNetwork / typeNetwork / typeContract / currency — echo of the requested terminal.
  • technicalAmount — on-chain amount of the requested asset on this address.
  • nativeTokenNetwork / nativeTypeContract / nativeCurrency / nativeTechnicalAmount — the native/base terminal in the same transport network and its on-chain amount (used to pay gas). For native (Base) terminals the native fields mirror the asset fields.
  • hotApproved — true when the address is approved for the hot-spender (transferFrom) routing path.
  • sourceTransferSupported — true when TrexWallet supports pinning a withdrawal to a specific client address for this terminal (currently EVM-based Ethereum and BNB Smart Chain networks with Base / ERC20 / BEP20 / EVM contracts).
  • timetickUpdate / nativeTimetickUpdate — last on-chain update ticks for the asset and native currency; serialized as strings (int64 wire convention).
Not a user balance

technicalAmount and nativeTechnicalAmount are technical on-chain amounts of an address used as a transfer source, not the user's spendable wallet balance. Use get_balance for the wallet balance.

When includeTechnicalState=false (default), the response keeps the legacy shape. For non-crypto terminals the field is also null: technical state applies only to supported per-address on-chain tracking.

  • Depositcreate_address and how technical-address chains assign per-client addresses.
  • Withdrawalcreate_withdraw and the requireClientAssetSource option for pinning a withdrawal to a specific client address.