> For the complete documentation index, see [llms.txt](https://centr.gitbook.io/netcs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://centr.gitbook.io/netcs/api/functions/tokenbalancesget.md).

# TokenBalancesGet()

Retrieve Token Balances for Given Public Key

Before calling the function make sure you have the Connector object initialized.&#x20;

{% content-ref url="/pages/-MgM38pBUeXL96\_AW6Jy" %}
[Understanding Connector Object](/netcs/getting-started/understanding-connector-object.md)
{% endcontent-ref %}

## Function Call&#x20;

| Field    | Type       | Description      |
| -------- | ---------- | ---------------- |
| `PubKey` | ​`string`​ | Base58 Publickey |

```csharp
TokenBalancesGet("Input here Base58 PublicKey");
```

{% hint style="info" %}
Return value of function: [TokenBalancesResult](/netcs/api/result-types/tokenbalancesresult.md)
{% endhint %}

## Example

{% tabs %}
{% tab title="C#" %}

```csharp
Connector connect_ = new Connector("95.111.224.219", 9091);
NodeApi.TokenBalancesResult TokenBalances = connect_.TokenBalancesGet("4SFfA1S2xfA3BdgkTn2tK14yDhLuD11RVz78kqx35jct");
Console.WriteLine(TokenBalances);
```

{% endtab %}

{% tab title="Python" %}

```python
Connect_ =  Connector("165.22.212.253:9090")
print(Connect_.TokenBalancesGet("4SFfA1S2xfA3BdgkTn2tK14yDhLuD11RVz78kqx35jct"))
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var connect_ = new Connector("194.163.152.177", 9091);
connect_.TokenBalancesGet("4SFfA1S2xfA3BdgkTn2tK14yDhLuD11RVz78kqx35jct").then((res) => {connect_.Close();console.log(res); });
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Return value of function: [TokenBalancesResult](/netcs/api/result-types/tokenbalancesresult.md)
{% endhint %}

#### Output of Example

Output is printed via ObjectDumper

```scheme
{TokenBalancesResult}
  Status: {APIResponse}
    Code: 0
    Message: "Success: "
  Balances: ...
```
