getwalletbalance

Returns the balance of the corresponding asset in the wallet, based on the specified asset number.

📘

Before you can invoke this method, wallet must be open first.

Parameters

Object NameRequiredTypeDetail
ASSET IDStringThe NEP-17 contract script hash.

The asset ID for NEO is 0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5

The asset ID for Gas is 0xd2a4cff31913016155e38e474a2c06d08be276cf

"params": ["0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5"]

Result

The balance of the corresponding asset in the wallet.

Example

Request

curl <your-endpoint> \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{"jsonrpc": "2.0", "method": "getwalletbalance", "params":["0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5"],"id": 1}'

Return

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "balance": "1"
    }
}
Language
Click Try It! to start a request and see the response here!