跳至主要內容

Accounts

tokenview大约 7 分钟

Accounts

createaccount

POST https://services.tokenview.io/vipapi/nodeservice/trx/wallet/createaccount?apikey={apikey}

Create an account. Uses an already activated account to create a new account.

Note:

The expiration time of the http api creation transaction is 1 minute, so to complete the on-chain, you need to complete gettransactionsign and broadcasttransaction within 1 minute after the creation.

请求参数说明:

  • owner_address: string. Owner_address is an activated account,converted to a hex String.If the owner_address has enough bandwidth obtained by freezing TRX, then creating an account will only consume bandwidth , otherwise, 0.1 TRX will be burned to pay for bandwidth, and at the same time, 1 TRX will be required to be created.
  • account_address: string. account_address is the address of the new account, converted to a hex string, this address needs to be calculated in advance.
  • visible: boolean. Optional,whether the address is in base58 format.
  • permission_id: int32. Optional,for multi-signature use.

Returns:

  • Transaction object.

Request

curl --location -g 'https://services.tokenview.io/vipapi/nodeservice/trx/wallet/createaccount?apikey={apikey}' \
--data '{
  "owner_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292",
  "account_address": "41e552f6487585c2b58bc2c9bb4492bc1f17132cd0"
}'

Response


getaccount

POST https://services.tokenview.io/vipapi/nodeservice/trx/wallet/getaccount?apikey={apikey}

Query information about an account, including TRX balance, TRC-10 balances, stake information and vote information and permissions etc.

请求参数说明:

  • address: string. address should be converted to a hex string.
  • visible: boolean. Optional,whether the address is in base58 format.

Returns:

  • account object, which contains the following fields:
    • account_name: The name of the account. The account name can be modified through the wallet/updateaccount interface. The account name can only be changed once.
    • address: Account address
    • create_time: Account creation time, i.e. account activation time on the TRON network.
    • balance: TRX balance.
    • frozen.frozen_balance: In Stake 1.0, the total amount of TRX staked by the account to obtain bandwidth.
    • frozen.expire_time: In Stake 1.0, the expiration time of the stake operation performed by the account to obtain bandwidth. The account can perform the unstake operation after that time.
    • delegated_frozen_balance_for_bandwidth: In Stake 1.0, the total amount of TRX staked by the account for others to get bandwidth.
    • acquired_delegated_frozen_balance_for_bandwidth: In Stake 1.0, the total amount of TRX staked by other accounts for this account to get bandwidth.
    • account_resource.frozen_balance_for_energy.frozen_balance: In Stake 1.0, the total amount of TRX staked by the account to obtain energy.
    • account_resource.frozen_balance_for_energy.expire_time: In Stake 1.0, the expiration time of the stake operation performed by the account to obtain energy. The account can perform the unstake operation after that time.
    • account_resource.delegated_frozen_balance_for_energy: In Stake 1.0, the total amount of TRX staked by the account for others to get energy.
    • account_resource.acquired_delegated_frozen_balance_for_energy: In Stake 1.0, the total amount of TRX staked by other accounts for this account to get energy.
    • account_resource.delegated_frozenV2_balance_for_energy: In Stake 2.0, the total amount of TRX staked by the account for others to get energy.
    • account_resource.acquired_delegated_frozenV2_balance_for_energy: In Stake 2.0, the total amount of TRX staked by other accounts for this account to get energy.
    • delegated_frozenV2_balance_for_bandwidth: In Stake 2.0, the total amount of TRX staked by the account for others to get bandwidth.
    • acquired_delegated_frozenV2_balance_for_bandwidth: In Stake 2.0, the total amount of TRX staked by other accounts for this account to get bandwidth.
    • frozenV2: In Stake 2.0, the total amount of TRX staked to obtain various types of resources does not include the delegated TRX.
    • unfrozenV2: In Stake 2.0, each unstaking information. One of the unstaking information contains three fields: type: resource type; unfreeze_amount: the amount of unstaked TRX; unfreeze_expire_time: the start time stamp when the unstaked TRX can be withdrawn, in ms.
    • account_resource.energy_usage: The amount of energy used by the account.
    • account_resource.latest_consume_time_for_energy: The last time the account consumed energy.
    • net_usage: The amount of bandwidth used by the account.
    • free_net_usage: The amount of free bandwidth used by the account.
    • free_asset_net_usageV2: The amount of trc10's free bandwidth used by this account.
    • votes: The number of votes for each Super Representative.
    • latest_opration_time: The last operation time.
    • latest_consume_time: The last time the account consumed bandwidth.
    • latest_consume_free_time: The last time the account consumed free bandwidth.
    • is_witness: Is Super Representative.
    • allowance: The amount of rewards that can be withdrawn for the account.
    • latest_withdraw_time: The last time the account has withdrawn the reward, the super representative or user can only withdraw the reward once within 24 hours.
    • owner_permission: owner permissions.
    • witness_permission: witness_permissions.
    • active_permission: active_permission.
    • asset: The token id and balance of the TRC10 token in the account.
    • assetV2: The token id and balance of the TRC10 token in the account. Note, the V2 version is used after allowing token with same name and the proposal has been activated at present.
    • asset_issued_name: The name of the TRC10 token created by the account.
    • asset_issued_ID: TRC10 token ID created by the account.
    • free_asset_net_usage: The amount of free bandwidth consumed by account transferring TRC10 tokens.
    • free_asset_net_usageV2: The amount of free bandwidth consumed by account transferring TRC10 tokens.

Request

curl --location -g 'https://services.tokenview.io/vipapi/nodeservice/trx/wallet/getaccount?apikey={apikey}' \
--data '{
  "address": "41E552F6487585C2B58BC2C9BB4492BC1F17132CD0"
}'

Response

{
    "account_name": "636363797979636363",
    "address": "41e552f6487585c2b58bc2c9bb4492bc1f17132cd0",
    "asset": [
        {
            "key": "TRX",
            "value": 1
        },
        {
            "key": "DEX",
            "value": 0
        },
        {
            "key": "Kitty",
            "value": 0
        },
        {
            "key": "SEED",
            "value": 0
        },
        {
            "key": "WIN",
            "value": 0
        },
        {
            "key": "Perogies",
            "value": 0
        },
        {
            "key": "TRXTestCoin",
            "value": 0
        },
        {
            "key": "ofoBike",
            "value": 7
        },
        {
            "key": "Skypeople",
            "value": 0
        },
        {
            "key": "OnePiece",
            "value": 0
        },
        {
            "key": "ZZZDOGETRXZZ",
            "value": 0
        },
        {
            "key": "IGG",
            "value": 0
        },
        {
            "key": "Messenger",
            "value": 0
        },
        {
            "key": "justinsuntron",
            "value": 0
        },
        {
            "key": "Bitcoin",
            "value": 0
        },
        {
            "key": "bittorrent",
            "value": 0
        },
        {
            "key": "IPFS",
            "value": 33
        },
        {
            "key": "Pornhub",
            "value": 1
        },
        {
            "key": "BitTorrent",
            "value": 21
        },
        {
            "key": "Durex",
            "value": 0
        },
        {
            "key": "DICKS",
            "value": 1
        },
        {
            "key": "binance",
            "value": 15
        },
        {
            "key": "CommunityNodeToken",
            "value": 0
        },
        {
            "key": "TRXCash",
            "value": 0
        },
        {
            "key": "FomoThreeD",
            "value": 2
        },
        {
            "key": "REcoin",
            "value": 0
        },
        {
            "key": "TEFOOD",
            "value": 0
        },
        {
            "key": "RingCoin",
            "value": 0
        },
        {
            "key": "DACC",
            "value": 0
        },
        {
            "key": "Dislike",
            "value": 0
        },
        {
            "key": "LuckyChipsCoin",
            "value": 8967
        },
        {
            "key": "LuckyPenny",
            "value": 0
        },
        {
            "key": "McDonaldsCoin",
            "value": 3
        },
        {
            "key": "DogCoin",
            "value": 3
        },
        {
            "key": "ZTRON",
            "value": 0
        },
        {
            "key": "Bithumb",
            "value": 14
        },
        {
            "key": "NBACoin",
            "value": 36
        },
        {
            "key": "HuobiToken",
            "value": 37
        },
        {
            "key": "mmmmm",
            "value": 0
        },
        {
            "key": "Tarquin",
            "value": 0
        },
        {
            "key": "James",
            "value": 0
        },
        {
            "key": "ZZZZZB",
            "value": 0
        },
        {
            "key": "TRXTwitter",
            "value": 320
        },
        {
            "key": "BeatzCoin",
            "value": 0
        },
        {
            "key": "MacCoin",
            "value": 14
        },
        {
            "key": "KsumNole",
            "value": 0
        },
        {
            "key": "MenzCoin",
            "value": 70
        },
        {
            "key": "TheLOneCrewToken",
            "value": 5
        },
        {
            "key": "GoodVibes",
            "value": 4
        },
        {
            "key": "TronClassic",
            "value": 0
        },
        {
            "key": "STARBUCKS",
            "value": 0
        },
        {
            "key": "StarWars",
            "value": 7790
        },
        {
            "key": "LoveHearts",
            "value": 1
        },
        {
            "key": "CandyFloss",
            "value": 80877
        },
        {
            "key": "Eventz",
            "value": 0
        },
        {
            "key": "dice",
            "value": 0
        },
        {
            "key": "GoldenTron",
            "value": 0
        },
        {
            "key": "IndyCash",
            "value": 0
        },
        {
            "key": "FileCoin",
            "value": 1
        },
        {
            "key": "TronWalletMe",
            "value": 1
        },
        {
            "key": "BitGuild",
            "value": 1
        },
        {
            "key": "TronLottery",
            "value": 20
        },
        {
            "key": "TRONONE",
            "value": 0
        },
        {
            "key": "FUN",
            "value": 2000
        },
        {
            "key": "ReynaToken",
            "value": 1
        }
    ],
    "create_time": 1529896593000,
    "latest_opration_time": 1656422124000,
    "latest_consume_time": 1539587514000,
    "latest_consume_free_time": 1656422124000,
    "account_resource": {
        "latest_consume_time_for_energy": 1604766489000
    },
    "frozenV2": [
        {},
        {
            "type": "ENERGY"
        },
        {
            "type": "TRON_POWER"
        }
    ],
    "assetV2": [
        {
            "key": "1000542",
            "value": 0
        },
        {
            "key": "1001434",
            "value": 0
        },
        {
            "key": "1001950",
            "value": 0
        },
        {
            "key": "1002962",
            "value": 0
        },
        {
            "key": "1000467",
            "value": 0
        },
        {
            "key": "1000820",
            "value": 0
        },
        {
            "key": "1000743",
            "value": 0
        },
        {
            "key": "1000501",
            "value": 0
        },
        {
            "key": "1001039",
            "value": 0
        },
        {
            "key": "1001875",
            "value": 0
        },
        {
            "key": "1002881",
            "value": 0
        },
        {
            "key": "1000541",
            "value": 0
        },
        {
            "key": "1002927",
            "value": 0
        },
        {
            "key": "1000624",
            "value": 0
        },
        {
            "key": "1000745",
            "value": 0
        },
        {
            "key": "1000503",
            "value": 0
        },
        {
            "key": "1000667",
            "value": 0
        },
        {
            "key": "1000744",
            "value": 0
        },
        {
            "key": "1000821",
            "value": 0
        },
        {
            "key": "1002845",
            "value": 0
        },
        {
            "key": "1000746",
            "value": 0
        },
        {
            "key": "1001074",
            "value": 0
        },
        {
            "key": "1001030",
            "value": 0
        },
        {
            "key": "1002000",
            "value": 0
        },
        {
            "key": "1001350",
            "value": 0
        },
        {
            "key": "1002479",
            "value": 0
        },
        {
            "key": "1002798",
            "value": 0
        },
        {
            "key": "1000455",
            "value": 0
        },
        {
            "key": "1000532",
            "value": 0
        },
        {
            "key": "1002830",
            "value": 0
        },
        {
            "key": "1000017",
            "value": 0
        },
        {
            "key": "1002876",
            "value": 0
        },
        {
            "key": "1000054",
            "value": 0
        },
        {
            "key": "1000494",
            "value": 0
        },
        {
            "key": "1002035",
            "value": 0
        },
        {
            "key": "1000176",
            "value": 0
        },
        {
            "key": "1000451",
            "value": 0
        },
        {
            "key": "1002672",
            "value": 0
        },
        {
            "key": "1003049",
            "value": 0
        },
        {
            "key": "1000012",
            "value": 0
        },
        {
            "key": "1000893",
            "value": 0
        },
        {
            "key": "1000299",
            "value": 0
        },
        {
            "key": "1002157",
            "value": 0
        },
        {
            "key": "1000935",
            "value": 0
        },
        {
            "key": "1000019",
            "value": 0
        },
        {
            "key": "1001305",
            "value": 0
        },
        {
            "key": "1001624",
            "value": 0
        },
        {
            "key": "1000777",
            "value": 0
        },
        {
            "key": "1002636",
            "value": 0
        },
        {
            "key": "1002999",
            "value": 0
        },
        {
            "key": "1001428",
            "value": 0
        },
        {
            "key": "1002517",
            "value": 0
        },
        {
            "key": "1000050",
            "value": 0
        },
        {
            "key": "1000491",
            "value": 0
        },
        {
            "key": "1000493",
            "value": 0
        },
        {
            "key": "1000093",
            "value": 0
        },
        {
            "key": "1001060",
            "value": 0
        },
        {
            "key": "1000003",
            "value": 0
        },
        {
            "key": "1000520",
            "value": 0
        },
        {
            "key": "1000322",
            "value": 0
        },
        {
            "key": "1000564",
            "value": 0
        },
        {
            "key": "1001379",
            "value": 0
        },
        {
            "key": "1004801",
            "value": 0
        },
        {
            "key": "1000004",
            "value": 0
        },
        {
            "key": "1002544",
            "value": 0
        },
        {
            "key": "1002742",
            "value": 0
        },
        {
            "key": "1001216",
            "value": 0
        },
        {
            "key": "1000006",
            "value": 0
        },
        {
            "key": "1001331",
            "value": 0
        },
        {
            "key": "1000165",
            "value": 0
        },
        {
            "key": "1000001",
            "value": 0
        },
        {
            "key": "1000002",
            "value": 0
        },
        {
            "key": "1000524",
            "value": 0
        },
        {
            "key": "1000008",
            "value": 0
        },
        {
            "key": "1000645",
            "value": 0
        },
        {
            "key": "1002669",
            "value": 0
        },
        {
            "key": "1000526",
            "value": 0
        },
        {
            "key": "1000406",
            "value": 0
        },
        {
            "key": "1000604",
            "value": 0
        },
        {
            "key": "1001090",
            "value": 0
        },
        {
            "key": "1000161",
            "value": 0
        },
        {
            "key": "1000086",
            "value": 0
        },
        {
            "key": "1000278",
            "value": 0
        },
        {
            "key": "1000477",
            "value": 0
        },
        {
            "key": "1001367",
            "value": 0
        },
        {
            "key": "1002775",
            "value": 0
        },
        {
            "key": "1000396",
            "value": 0
        },
        {
            "key": "1000110",
            "value": 0
        },
        {
            "key": "1001404",
            "value": 0
        },
        {
            "key": "1000317",
            "value": 0
        },
        {
            "key": "1000834",
            "value": 0
        },
        {
            "key": "1002814",
            "value": 0
        },
        {
            "key": "1002858",
            "value": 0
        },
        {
            "key": "1001084",
            "value": 0
        },
        {
            "key": "1002099",
            "value": 0
        },
        {
            "key": "1004031",
            "value": 0
        }
    ],
    "free_asset_net_usageV2": [
        {
            "key": "1000542",
            "value": 0
        },
        {
            "key": "1002962",
            "value": 0
        },
        {
            "key": "1000820",
            "value": 0
        },
        {
            "key": "1001875",
            "value": 0
        },
        {
            "key": "1000541",
            "value": 0
        },
        {
            "key": "1000667",
            "value": 0
        },
        {
            "key": "1000821",
            "value": 0
        },
        {
            "key": "1002845",
            "value": 0
        },
        {
            "key": "1001074",
            "value": 0
        },
        {
            "key": "1001350",
            "value": 0
        },
        {
            "key": "1002798",
            "value": 0
        },
        {
            "key": "1000532",
            "value": 0
        },
        {
            "key": "1002830",
            "value": 0
        },
        {
            "key": "1000017",
            "value": 0
        },
        {
            "key": "1000494",
            "value": 0
        },
        {
            "key": "1002035",
            "value": 0
        },
        {
            "key": "1002672",
            "value": 0
        },
        {
            "key": "1000012",
            "value": 0
        },
        {
            "key": "1000893",
            "value": 0
        },
        {
            "key": "1002157",
            "value": 0
        },
        {
            "key": "1000935",
            "value": 0
        },
        {
            "key": "1000019",
            "value": 0
        },
        {
            "key": "1001624",
            "value": 0
        },
        {
            "key": "1000777",
            "value": 0
        },
        {
            "key": "1000491",
            "value": 0
        },
        {
            "key": "1000493",
            "value": 0
        },
        {
            "key": "1000093",
            "value": 0
        },
        {
            "key": "1001060",
            "value": 0
        },
        {
            "key": "1000322",
            "value": 0
        },
        {
            "key": "1000564",
            "value": 0
        },
        {
            "key": "1001379",
            "value": 0
        },
        {
            "key": "1004801",
            "value": 0
        },
        {
            "key": "1002742",
            "value": 0
        },
        {
            "key": "1000165",
            "value": 0
        },
        {
            "key": "1000604",
            "value": 0
        },
        {
            "key": "1001090",
            "value": 0
        },
        {
            "key": "1000161",
            "value": 0
        },
        {
            "key": "1000278",
            "value": 0
        },
        {
            "key": "1001367",
            "value": 0
        },
        {
            "key": "1000396",
            "value": 0
        },
        {
            "key": "1001404",
            "value": 0
        },
        {
            "key": "1000317",
            "value": 0
        },
        {
            "key": "1000834",
            "value": 0
        },
        {
            "key": "1002858",
            "value": 0
        },
        {
            "key": "1001084",
            "value": 0
        },
        {
            "key": "1001434",
            "value": 0
        },
        {
            "key": "1001950",
            "value": 0
        },
        {
            "key": "1000467",
            "value": 0
        },
        {
            "key": "1000743",
            "value": 0
        },
        {
            "key": "1000501",
            "value": 0
        },
        {
            "key": "1001039",
            "value": 0
        },
        {
            "key": "1002881",
            "value": 0
        },
        {
            "key": "1002927",
            "value": 0
        },
        {
            "key": "1000624",
            "value": 0
        },
        {
            "key": "1000745",
            "value": 0
        },
        {
            "key": "1000503",
            "value": 0
        },
        {
            "key": "1000744",
            "value": 0
        },
        {
            "key": "1000746",
            "value": 0
        },
        {
            "key": "1001030",
            "value": 0
        },
        {
            "key": "1002000",
            "value": 0
        },
        {
            "key": "1002479",
            "value": 0
        },
        {
            "key": "1000455",
            "value": 0
        },
        {
            "key": "1002876",
            "value": 0
        },
        {
            "key": "1000054",
            "value": 0
        },
        {
            "key": "1000176",
            "value": 0
        },
        {
            "key": "1000451",
            "value": 0
        },
        {
            "key": "1003049",
            "value": 0
        },
        {
            "key": "1000299",
            "value": 0
        },
        {
            "key": "1001305",
            "value": 0
        },
        {
            "key": "1002636",
            "value": 0
        },
        {
            "key": "1002999",
            "value": 0
        },
        {
            "key": "1001428",
            "value": 0
        },
        {
            "key": "1002517",
            "value": 0
        },
        {
            "key": "1000050",
            "value": 0
        },
        {
            "key": "1000003",
            "value": 0
        },
        {
            "key": "1000520",
            "value": 0
        },
        {
            "key": "1000004",
            "value": 0
        },
        {
            "key": "1002544",
            "value": 0
        },
        {
            "key": "1001216",
            "value": 0
        },
        {
            "key": "1000006",
            "value": 0
        },
        {
            "key": "1001331",
            "value": 0
        },
        {
            "key": "1000001",
            "value": 0
        },
        {
            "key": "1000002",
            "value": 0
        },
        {
            "key": "1000524",
            "value": 0
        },
        {
            "key": "1000008",
            "value": 0
        },
        {
            "key": "1000645",
            "value": 0
        },
        {
            "key": "1002669",
            "value": 0
        },
        {
            "key": "1000526",
            "value": 0
        },
        {
            "key": "1000406",
            "value": 0
        },
        {
            "key": "1000086",
            "value": 0
        },
        {
            "key": "1000477",
            "value": 0
        },
        {
            "key": "1002775",
            "value": 0
        },
        {
            "key": "1000110",
            "value": 0
        },
        {
            "key": "1002814",
            "value": 0
        },
        {
            "key": "1002099",
            "value": 0
        },
        {
            "key": "1004031",
            "value": 0
        }
    ]
}

updateaccount

POST https://services.tokenview.io/vipapi/nodeservice/trx/wallet/updateaccount?apikey={apikey}

Modify account name.

请求参数说明:

  • account_name: string. Account_name is the name of the account, converted to a hex string.
  • owner_address: string. Owner_address is the account address to be modified, converted to a hex string.
  • visible: boolean. Optional,whether the address is in base58 format.
  • permission_id: int32. Optional,for multi-signature use.

Returns:

  • Transaction object

Request

curl --location -g 'https://services.tokenview.io/vipapi/nodeservice/trx/wallet/updateaccount?apikey={apikey}' \
--data '{
  "account_name": "0x7570646174654e616d6531353330383933343635353139",
  "owner_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292"
}'

Response


accountpermissionupdate

POST https://services.tokenview.io/vipapi/nodeservice/trx/wallet/accountpermissionupdate?apikey={apikey}

Update the account's permission.

Parameters

  • owner_address: string.
  • actives: array of objects.
  • owner: objects.
  • witness: string.
  • visible: boolean.

Request

curl --location -g 'https://services.tokenview.io/vipapi/nodeservice/trx/wallet/accountpermissionupdate?apikey={apikey}' \
--data '{
  "owner_address": "string",
  "actives": [
    {
      "type": "string",
      "threshold": 1,
      "keys": [
        {
          "address": "string",
          "weight": 1
        }
      ],
      "operations": "7fff1fc0033e0000000000000000000000000000000000000000000000000000",
      "id": 0
    }
  ],
  "owner": {
    "type": "string",
    "threshold": 1,
    "keys": [
      {
        "address": "string",
        "weight": 1
      }
    ],
    "operations": "7fff1fc0033e0000000000000000000000000000000000000000000000000000",
    "id": 0
  },
  "witness": {
    "type": "string",
    "threshold": 1,
    "keys": [
      {
        "address": "string",
        "weight": 1
      }
    ],
    "operations": "7fff1fc0033e0000000000000000000000000000000000000000000000000000",
    "id": 0
  },
  "visible": true
}'

Response


getaccountbalance

POST https://services.tokenview.io/vipapi/nodeservice/trx/wallet/getaccountbalance?apikey={apikey}

Get the account balance in a specific block.

请求参数说明:

  • account_identifier: json
  • block_identifier: json
  • visible: boolean

Request

curl --location -g 'https://services.tokenview.io/vipapi/nodeservice/trx/wallet/getaccountbalance?apikey={apikey}' \
--data '{
  "account_identifier": {
    "address": "TLLM21wteSPs4hKjbxgmH1L6poyMjeTbHm"
  },
  "block_identifier": {
    "hash": "0000000000010c4a732d1e215e87466271e425c86945783c3d3f122bfa5affd9",
    "number": 68682
  },
  "visible": true
}'

Response

{
    "balance": 0,
    "block_identifier": {
        "hash": "0000000000010c4a732d1e215e87466271e425c86945783c3d3f122bfa5affd9",
        "number": 68682
    }
}
上次编辑于: