REST APIWallet & TransactWallet

POST

Get TRON account resources and resource delegations

Retrieves frozenV2 balances, resource delegation fields, network conversion ratios, and spendable bandwidth/energy for TRON addresses from a single getaccountresource call per address. Ratios are returned raw; callers convert frozenV2 amounts to energy/bandwidth units.

per address — consequence: a second call can drift a block so usage would not match energyRatio/bandwidthRatio on each account — consequence: the resources page MUST NOT also call getAccountResources

Path Params

  • coin string required
    Coin or token identifier (e.g. trx, ttrx:usdt)
  • walletId string required
    Wallet ID to retrieve account resource data for

Body Params

object

Addresses to query for TRON frozenV2, resource delegation, and spendable usage.

Each address is looked up via TRON getaccount and getaccountresource in parallel so frozenV2, conversion ratios, and usage come from the same block. Addresses that do not belong to the wallet are returned in failedAddresses. The resources page SHOULD call this endpoint instead of also calling getAccountResources.

  • addresses array of strings required
  • destinationAddress string
    Optional destination address for resource deficit calculation (token transfers)

Responses

200
OK

Response Body

object

  • accounts array of objects required
    accounts object
    • frozenV2 array of objects required
      frozenV2 object
      • type string enum required
        Resource type. Omitted BANDWIDTH from TRON protobuf is normalised to this literal.
        BANDWIDTHENERGYTRON_POWER
      • amount string required
        Frozen TRX amount in SUN (already SUN from IMS; not a TRX→SUN conversion). Decimal integer string, same as bandwidthSunRequired / maxResourcesDelegatable. Missing IMS amounts are returned as "0".
    • delegatedFrozenV2BalanceForEnergy string required
      SUN delegated to others for energy. Protobuf-omitted zeros are returned as "0".
    • acquiredDelegatedFrozenV2BalanceForEnergy string required
      SUN of energy delegated from others. Protobuf-omitted zeros are returned as "0".
    • delegatedFrozenV2BalanceForBandwidth string required
      SUN delegated to others for bandwidth. Protobuf-omitted zeros are returned as "0".
    • acquiredDelegatedFrozenV2BalanceForBandwidth string required
      SUN of bandwidth delegated from others. Protobuf-omitted zeros are returned as "0".
    • energyRatio number required
      TotalEnergyLimit / TotalEnergyWeight from the paired getaccountresource call. 0 when unavailable.
    • bandwidthRatio number required
      TotalNetLimit / TotalNetWeight from the paired getaccountresource call. 0 when unavailable.
    • address string required
      TRON address these resource and usage fields belong to
    • freeBandwidthAvailable number required
      Spendable free bandwidth remaining
    • freeBandwidthUsed number required
    • stakedBandwidthAvailable number required
    • stakedBandwidthUsed number required
    • energyAvailable number required
    • energyUsed number required
    • resourceDeficitForAssetTransfer object
      Shared TRON account-resource response codecs used by getAccount and getAccountResources. Request bodies stay in each route file so OpenAPI keeps per-operation @title / description.
      resourceDeficitForAssetTransfer object
      • bandwidthDeficit number required
      • bandwidthSunRequired string required
      • energyDeficit number
      • energySunRequired string
    • maxResourcesDelegatable object
      maxResourcesDelegatable object
      • bandwidthSun string required
      • energySun string required
    • TotalNetLimit number
      Live total network bandwidth limit (same value for all addresses)
    • TotalNetWeight number
      Live total staked TRX for bandwidth (same value for all addresses)
    • TotalEnergyLimit number
      Live total network energy limit (same value for all addresses)
    • TotalEnergyWeight number
      Live total staked TRX for energy (same value for all addresses)
  • failedAddresses array of objects required
    failedAddresses object
    • address string required
    • error string required
400
Bad Request

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id
404
Not Found

Response Body

object

Wallet does not exist, or the caller has no view access to it
  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id
500
Internal Server Error

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id