# RPC 命令

此 RPC 命令可以帮你查询最新的链高度和钱包余额，Ethereum 和 Binance Smart Chain的示例如下：

* **Ethereum 主网**:

查询当前链高度

```
swan-client rpc height --chain ETH
```

输出：

```
	Chain: ETH
	Height: 15844685
```

查询余额

```
swan-client rpc balance --chain ETH --address 0x29D5527CaA78f1946a409FA6aCaf14A0a4A0274b
```

输出：

```
	Chain: ETH
	Height: 15844698
	Address: 0x29D5527CaA78f1946a409FA6aCaf14A0a4A0274b
	Balance: 749.53106079798394945
```

* **Binance Smart Chain 主网**:

查询当前链高度

```
swan-client rpc height --chain BNB
```

输出：

```
	Chain: BNB
	Height: 22558967
```

查询余额

```
swan-client rpc balance --chain BNB --address 0x4430b3230294D12c6AB2aAC5C2cd68E80B16b581
```

输出：

```
	Chain: BNB
	Height: 22559008
	Address: 0x4430b3230294D12c6AB2aAC5C2cd68E80B16b581
	Balance: 0.027942338705784518
```

* 查看 [此处](https://github.com/filswan/go-swan-client/blob/main/document/rpc-cmd-example.md)，了解更多更多 JSON-RPC 方法
