getBalance

Gets the balance of the specified asset for the specified account.

Parameters

1. asset (required)

UInt160

The contract hash of the asset or token.

2. account (required)

UInt160

The script hash of the account to query.

Returns

Promise<Integer>

Integer can be returned as a string or number.

Errors

Code
Name
Description

10002

INVALID

One or more inputs are invalid.

10003

NOTFOUND

The account or asset cannot be found.

10004

FAILED

Contract execution failed.

10008

RPC_ERROR

The RPC server returned an error.

Example

Request

Response

最后更新于